diff --git a/config/index.js b/config/index.js index 08b3df8..ee2e9d7 100644 --- a/config/index.js +++ b/config/index.js @@ -1,8 +1,14 @@ // export const VUE_APP_API_URL = 'http://natapp.xinxintuan.co/api'; // export const VUE_APP_API_URL = 'https://wxapi.yixiang.co/api' +<<<<<<< HEAD // export const VUE_APP_API_URL = 'http://139.186.134.205:9006/api' export const VUE_APP_API_URL = 'http://192.168.0.112:8088/api' // export const VUE_APP_API_URL = 'https://www.cyjyyjy.com:8096/api' +======= +// export const VUE_APP_API_URL = 'http://192.168.0.112:8088/api' +// export const VUE_APP_API_URL = 'http://192.168.0.114:8088/api' +export const VUE_APP_API_URL = 'https://www.cyjyyjy.com/api' +>>>>>>> 1521d49cdb4b0c5490ac953afbe9910a0a287c45 // export const VUE_APP_API_URL = 'http://natapp.xinxintuan.co/api'; // export const VUE_APP_API_URL = 'https://thapi.xinxintuan.co/api' // export const VUE_APP_API_URL = 'https://h5api.xinxintuan.co/api'; diff --git a/pages.json b/pages.json index ec1c408..5284773 100644 --- a/pages.json +++ b/pages.json @@ -74,7 +74,15 @@ { "path": "pages/course/detail", "style": { - "navigationBarTitleText": "课程详情" + "navigationBarTitleText": "课程详情", + "enablePullDownRefresh": true + } + }, + { + "path": "pages/course/signIn", + "style": { + "navigationBarTitleText": "课程签到", + "enablePullDownRefresh": true } }, { diff --git a/pages/course/detail.vue b/pages/course/detail.vue index c5710e0..9e21c90 100644 --- a/pages/course/detail.vue +++ b/pages/course/detail.vue @@ -232,11 +232,11 @@ this.tabInitTop= res.top; } }).exec(); - if(this.$yroute.query.teacherId){ + if(this.$yroute.query.teacherId){ //服务老师分享链接 this.courseId = this.$yroute.query.courseId; this.validCode = this.$yroute.query.validCode; this.teacherId = this.$yroute.query.teacherId; - } else{ + } else{ //普通进入详情页 this.courseId = this.$yroute.query.id; } if(this.userInfo.uid){ @@ -251,15 +251,20 @@ userInfo(){ return this.$store.getters["userInfo"] }, - // courseStartTime(){ - // return this.detail.courseStartTime.split(' ')[0] - // }, - // courseEndTime(){ - // return this.detail.courseEndTime.split(' ')[0] - // }, }, mounted(){ + }, + onPullDownRefresh() { + this.getDetail() + }, + onShareAppMessage: function(res) { + console.log(this.detail.id) + return { + title: this.detail.courseName, + imageUrl:this.detail.imageArr[0], + path: '/pages/course/detail?id=' + this.detail.id, + } }, methods: { getPhoneNumber: function(e) { @@ -340,7 +345,8 @@ this.hour = Math.floor(this.times / (60 * 60)) - (this.day * 24); this.minute = Math.floor(this.times / 60) - (this.day * 24 * 60) - (this.hour * 60); this.second = Math.floor(this.times) - (this.day * 24 * 60 * 60) - (this.hour * 60 * 60) - (this.minute * 60); - console.log(this.times) + // console.log(this.times) + uni.stopPullDownRefresh() }) }, @@ -394,7 +400,9 @@ } else if(res.data.state == 1){ if(this.detail.courseType == 1){ //直播课程弹出引导下载小程序 this.showSignUp = true - this.getDetail() + setTimeout(()=>{ + this.getDetail() + },1500) } else{ uni.showToast({ title: '报名成功!' diff --git a/pages/course/signIn.vue b/pages/course/signIn.vue new file mode 100644 index 0000000..3bb5e83 --- /dev/null +++ b/pages/course/signIn.vue @@ -0,0 +1,246 @@ + + + + + diff --git a/pages/home/index.vue b/pages/home/index.vue index a27aa72..90e7f81 100644 --- a/pages/home/index.vue +++ b/pages/home/index.vue @@ -6,9 +6,9 @@ 搜索商品 - +