diff --git a/components/ShopLiveCard.vue b/components/ShopLiveCard.vue index a886766..2a983ce 100644 --- a/components/ShopLiveCard.vue +++ b/components/ShopLiveCard.vue @@ -38,9 +38,9 @@ // #ifdef MP-WEIXIN HAS_LIVE = true let livePlayer = null; - if (HAS_LIVE) { - // livePlayer = requirePlugin('live-player-plugin'); - } + // if (HAS_LIVE) { + // livePlayer = requirePlugin('live-player-plugin'); + // } // #endif let timer = null; export default { @@ -107,9 +107,9 @@ methods: { goRoom() { let that = this; - wx.navigateTo({ - url: `plugin-private://wx2b03c6e691cd7370/pages/live-player-plugin?room_id=${that.detail.roomId}` - }); + // wx.navigateTo({ + // url: `plugin-private://wx2b03c6e691cd7370/pages/live-player-plugin?room_id=${that.detail.roomId}` + // }); }, dateFormat(fmt, date) { let ret; diff --git a/config/index.js b/config/index.js index a50e9b6..1dccdb5 100644 --- a/config/index.js +++ b/config/index.js @@ -1,11 +1,10 @@ // export const VUE_APP_API_URL = 'http://natapp.xinxintuan.co/api'; // export const VUE_APP_API_URL = 'https://wxapi.yixiang.co/api' -// export const VUE_APP_API_URL = 'http://139.186.134.205:9006/api' -export const VUE_APP_API_URL = 'http://192.168.0.114:8098/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' // 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'; // export const VUE_APP_API_URL = 'https://h5api.xinxintuan.co/api'; -export const VUE_APP_RESOURCES_URL = 'https://h5.yixiang.co/static' - \ No newline at end of file +export const VUE_APP_RESOURCES_URL = 'https://h5.yixiang.co/static' \ No newline at end of file diff --git a/libs/wechat.js b/libs/wechat.js index b95b507..0241fa2 100644 --- a/libs/wechat.js +++ b/libs/wechat.js @@ -1,6 +1,6 @@ import { subscribeMessage } from '@/libs/order' import { getProvider } from '@/utils' -import WechatJSSDK from 'wechat-jssdk/dist/client.umd' +// import WechatJSSDK from 'wechat-jssdk/dist/client.umd' import { getWechatConfig, wechatAuth } from '@/api/public' import { parseQuery } from '@/utils' import cookie from '@/utils/store/cookie' diff --git a/pages.json b/pages.json index bf17b76..ec1c408 100644 --- a/pages.json +++ b/pages.json @@ -37,10 +37,17 @@ "navigationBarTitleText": "首页" } }, + { + "path": "pages/noticePage/index", + "style": { + "navigationBarTitleText": "公告" + } + }, { "path": "pages/home/index", "style": { - "navigationBarTitleText": "禅易教育研究院" + "navigationBarTitleText": "禅易教育研究院", + "enablePullDownRefresh": true } }, { @@ -122,7 +129,8 @@ { "path": "pages/shop/GoodsClass/index", "style": { - "navigationBarTitleText": "商城" + "navigationBarTitleText": "商城", + "enablePullDownRefresh": true } }, { @@ -156,13 +164,15 @@ { "path": "pages/user/myCourses/index", "style": { - "navigationBarTitleText": "我的课程" + "navigationBarTitleText": "我的课程", + "enablePullDownRefresh": true } }, { "path": "pages/user/myBangdan/index", "style": { - "navigationBarTitleText": "我的打卡榜" + "navigationBarTitleText": "我的打卡榜", + "enablePullDownRefresh": true } }, { @@ -265,7 +275,8 @@ { "path": "pages/serviceTeacher/courseDetail", "style": { - "navigationBarTitleText": "课程详情" + "navigationBarTitleText": "课程详情", + "enablePullDownRefresh": true } }, { diff --git a/pages/course/detail.vue b/pages/course/detail.vue index 3b242a8..548d637 100644 --- a/pages/course/detail.vue +++ b/pages/course/detail.vue @@ -2,7 +2,9 @@ - + + + - {{detail.courseName}} + + {{detail.courseName}} + 公开课 + ¥{{detail.price}} + {{detail.categoryName}} {{detail.levelName}} @@ -52,10 +58,15 @@ 课程表 + + + 课程类型 + {{detail.courseType == 0 ? '线下课程' : '直播课程'}} + 课程时间 - {{courseStartTime}} 至 {{courseEndTime}} + {{detail.courseStartTime}} 至 {{detail.courseEndTime}} @@ -97,7 +108,7 @@ {{item.courseName}} - {{courseStartTime}}~{{courseEndTime}} + {{item.courseStartTime.split(' ')[0]}}-{{item.courseEndTime.split(' ')[0]}} {{item.coursePlace}} @@ -178,6 +189,18 @@ + + + + + + @@ -205,6 +228,8 @@ tabInitTop:'', isFixedTop: false, maskDialog:false, + showSignUp: false, + times: 0, day:'', hour:'', minute:'', @@ -233,18 +258,20 @@ }) } }, + computed:{ userInfo(){ return this.$store.getters["userInfo"] }, - courseStartTime(){ - return this.detail.courseStartTime.split(' ')[0] - }, - courseEndTime(){ - return this.detail.courseEndTime.split(' ')[0] - }, + // courseStartTime(){ + // return this.detail.courseStartTime.split(' ')[0] + // }, + // courseEndTime(){ + // return this.detail.courseEndTime.split(' ')[0] + // }, }, - mounted() { + mounted(){ + }, methods: { getPhoneNumber: function(e) { @@ -325,7 +352,9 @@ 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) }) + }, signInClick(type){ if(this.userInfo.realName == null){ @@ -368,14 +397,19 @@ this.maskDialog = true this.teacher = res.data } else if(res.data.state == 1){ - uni.showToast({ - title: '报名成功!', - duration: 2000, - type: "success" - }); - setTimeout(()=>{ + if(this.detail.courseType == 1){ //直播课程弹出引导下载小程序 + this.showSignUp = true this.getDetail() - },2000) + } else{ + uni.showToast({ + title: '报名成功!' + }); + setTimeout(()=>{ + this.getDetail() + },2000) + } + } else if(res.data.state == 2){ + this.payment(res.data.payData) } else{ uni.showToast({ title: res.msg, @@ -385,6 +419,36 @@ } }) }, + payment(orderInfo){ + // 调用支付接口 + uni.requestPayment({ + provider: 'wxpay', + ...orderInfo, + signType: 'MD5', + package:orderInfo.packageValue, + success: success => { + if(this.detail.courseType == 1){ //直播课程弹出引导下载小程序 + this.showSignUp = true + this.getDetail() + } else{ + uni.showToast({ + title: '报名成功!' + }); + setTimeout(()=>{ + this.getDetail() + },2000) + } + }, + fail: error => { + console.log(error) + if (error.errMsg == 'requestPayment:fail cancel') { + uni.showToast({ title: '已取消支付', icon: 'none', duration: 5000 }) + } else { + uni.showToast({ title: error || error.msg, icon: 'none', duration: 5000 }) + } + }, + }) + }, call(){ uni.makePhoneCall({ phoneNumber: this.teacher.phone @@ -522,6 +586,104 @@ } } } + + } + .mask-box2{ + width: 100%; + height: 100%; + background: rgba(0,0,0,.6); + position: fixed; + top: 0; + z-index: 99; + .dialog-bg{ + width: 726rpx; + height: 1026rpx; + background: linear-gradient(180deg, #fbd8a5 0%, #fcc86a 100%); + position: absolute; + top: 50%; + left: 50%; + transform: translate(-50%,-50%); + border-radius: 8rpx; + } + .signUp-box{ + width: 543rpx; + height: 836rpx; + background: #fff; + position: absolute; + top: 50%; + left: 50%; + transform: translate(-50%,-50%); + display: flex; + flex-direction: column; + align-items: center; + border-radius: 8rpx; + .signup-success{ + width: 470rpx; + height: 100rpx; + margin: 60rpx 0 46rpx; + } + .divsion-line{ + width: 467rpx; + border-bottom: 1px dashed #fbd69e; + position: relative; + &::before{ + display: inline-block; + content: ''; + width: 50rpx; + height: 50rpx; + border-radius: 50px; + background: #FBD293; + position: absolute; + left: -62rpx; + top: -25rpx; + } + &::after{ + display: inline-block; + content: ''; + width: 50rpx; + height: 50rpx; + border-radius: 50px; + background: #FBD293; + position: absolute; + right: -62rpx; + top: -25rpx; + } + } + .er-code{ + image{ + width: 297rpx; + height: 297rpx; + } + } + .tips{ + width: 340rpx; + font-size: 28rpx; + color: #000; + margin: 28rpx auto 12rpx; + text-align: center; + } + .longpress-btn{ + width: 327rpx; + height: 75rpx; + text-align: center; + line-height: 75rpx; + font-size: 32rpx; + color: #fff; + background: linear-gradient(90deg, #F7D08E 0%, #E2B35D 99%); + border-radius: 37rpx; + margin-top: 32rpx; + } + } + .close-btn{ + width: 80rpx; + height: 80rpx; + background: url(../../static/close-btn.png) no-repeat; + background-size: 100% 100%; + position: absolute; + bottom: 100rpx; + left: 50%; + margin-left: -40rpx; + } } .swiper-box{ width: 100%; @@ -556,6 +718,9 @@ color: #333333; line-height: 56rpx; margin: 0rpx 0 20rpx; + .price{ + color: #EA533E; + } } .tips-box{ display: flex; diff --git a/pages/course/index.vue b/pages/course/index.vue index 8cf1774..3d004c7 100644 --- a/pages/course/index.vue +++ b/pages/course/index.vue @@ -68,20 +68,6 @@ - @@ -147,7 +133,7 @@ }, mounted() { uni.getSystemInfo({ - success:function(res){ + success:(res)=>{ this.windowWidth = res.windowWidth; } }) @@ -192,12 +178,17 @@ }) }, getCourses() { + uni.showLoading({ + title:'正在加载中...' + }) var cid = null; this.active == null ? cid = this.currentTab.id : cid = this.active getCourses({categoryId: cid,listState:0,uid:this.userInfo.uid}).then((res) => { if (res.success) { this.courseList = res.data } + uni.hideLoading() + uni.stopPullDownRefresh() }) }, tabChange(item,index) { @@ -238,22 +229,8 @@ this.getCourses() }, onPullDownRefresh() { - getCategory().then((res) => { - this.tabList = res.data - this.$set(this, 'secondMenu', res.data[0].categoryList) - this.$set(this, 'currentTab', res.data[0]) - this.categoryTitle = res.data[0].categoryName; - if (res.data[0].categoryList.length > 0) { - this.$set(this, 'active', res.data[0].categoryList[0].id) - this.categoryTitle = this.categoryTitle +'·'+res.data[0].categoryList[0].categoryName - } else{ - // this.$set(this, 'tabSelect', 0) - // this.scrollLeft = 0 - } - }).then(() => { - this.getStudyList() - this.getCourses() - }) + this.getStudyList() + this.getCourses() } } } diff --git a/pages/home/index.vue b/pages/home/index.vue index 4e7130c..a27aa72 100644 --- a/pages/home/index.vue +++ b/pages/home/index.vue @@ -59,6 +59,10 @@ --> + + 公告 + 点击下载直播APP,在线观看!! + @@ -256,36 +260,12 @@ export default { uni.showLoading({ title:'正在加载中...' }) - // getCanvas() - // .then(res => {}) - // .catch(error => { - // this.homeData = JSON.parse(error.data.json) - // }) getBlessingFlag().then((res)=>{ this.flag = res.data }) - getHomeData().then(res => { - uni.hideLoading() - that.logoUrl = res.data.logoUrl - res.data.banner.map(item => (item.bgcolor = item.color || '')) - that.$set(that, 'info', res.data.info) - that.$set(that, 'firstList', res.data.firstList) - that.$set(that, 'bastList', res.data.bastList) - that.$set(that, 'likeInfo', res.data.likeInfo) - that.$set(that, 'live', res.data.liveList) - that.$set(that, 'lovely', res.data.lovely) - that.$set(that, 'benefit', res.data.benefit) - that.$set(that, 'couponList', res.data.couponList) - that.$set(that, 'combinationList', res.data.combinationList) - that.$set(that, 'courseList', res.data.cyCourseDtos) - that.$set(that, 'studyList', res.data.studyLists) - that.$set(that, 'articleList', res.data.articleDtos) - uni.hideLoading() - that.setOpenShare() - }) + this.getData() getWanniali(this.dateStr2).then((res)=>{ - console.log(res) var data = res.data if(res.success){ this.suici = JSON.parse(data.huangli.suici).join(' ') @@ -299,9 +279,35 @@ export default { } }) }, + onPullDownRefresh() { + this.getData() + }, methods: { ...mapActions(['getLocation']), + getData(){ + var that = this; + getHomeData().then(res => { + uni.hideLoading() + that.logoUrl = res.data.logoUrl + res.data.banner.map(item => (item.bgcolor = item.color || '')) + that.$set(that, 'info', res.data.info) + that.$set(that, 'firstList', res.data.firstList) + that.$set(that, 'bastList', res.data.bastList) + that.$set(that, 'likeInfo', res.data.likeInfo) + that.$set(that, 'live', res.data.liveList) + that.$set(that, 'lovely', res.data.lovely) + that.$set(that, 'benefit', res.data.benefit) + that.$set(that, 'couponList', res.data.couponList) + that.$set(that, 'combinationList', res.data.combinationList) + that.$set(that, 'courseList', res.data.courseDtos) + that.$set(that, 'studyList', res.data.studyLists) + that.$set(that, 'articleList', res.data.articleDtos) + uni.hideLoading() + that.setOpenShare() + console.log(res.data.courseDtos) + }) + }, todiandeng(){ uni.navigateTo({ url:'/pages/diandeng/index' @@ -334,6 +340,11 @@ export default { path: 'pages/home/index?spread=' + uni.getStorageSync('uid'), } }, + toNoticePage(){ + this.$yrouter.push({ + path: '/pages/noticePage/index', + }) + }, toCourseDetail(id){ this.$yrouter.push({ path: '/pages/course/detail', @@ -488,13 +499,13 @@ export default { diff --git a/pages/serviceTeacher/courseDetail.vue b/pages/serviceTeacher/courseDetail.vue index a401faf..5a18f29 100644 --- a/pages/serviceTeacher/courseDetail.vue +++ b/pages/serviceTeacher/courseDetail.vue @@ -11,7 +11,8 @@ 已取消 {{detail.courseName}} - {{detail.courseIntroduce}} + + 活动时间及地点 @@ -43,7 +44,7 @@ 学员列表({{detail.courseMemberList.length || 0}}) - + @@ -111,6 +112,9 @@ onShow(){ this.getDetail(); }, + onPullDownRefresh: function () { + this.getDetail(); + }, methods:{ sortClick(type){ this.sortNum = type @@ -135,7 +139,9 @@ getDetail(){ getCourseDetail(this.id).then(res=>{ if(res.success){ + res.data.courseIntroduce = res.data.courseIntroduce.replace(/\ {{item.courseName}} - {{item.courseIntroduce}} + {{item.shortIntroduce}} 时间:{{(item.courseStartTime.split(' ')[0]).replace(/\-/g, '.')}} 至 {{(item.courseEndTime.split(' ')[0]).replace(/\-/g,'.')}} 地点:{{item.coursePlace}} 报名总人数:{{item.courseEnterPerson}} @@ -55,8 +55,12 @@ }, methods:{ getList(){ + uni.showLoading({ + title: '正在加载中...' + }) sellerCourses({type:this.active}).then((res)=>{ this.courseList = res.data + uni.hideLoading() }) }, tabClick(idx){ diff --git a/pages/serviceTeacher/memberDetail.vue b/pages/serviceTeacher/memberDetail.vue index d9395ff..265afb8 100644 --- a/pages/serviceTeacher/memberDetail.vue +++ b/pages/serviceTeacher/memberDetail.vue @@ -17,12 +17,12 @@ 拨号 - 课程({{detail.cyCourseDtos.length}}) + 课程({{detail.courseDtos.length}}) 打榜({{detail.studyListDtos.length}}) - + {{item.courseName}} @@ -192,6 +192,7 @@ border-radius: 10px; margin-bottom: 30rpx; .name{ + width: 460rpx; font-size: 32rpx; margin-bottom: 20rpx; } diff --git a/pages/shop/GoodsClass/index.vue b/pages/shop/GoodsClass/index.vue index cb1c121..544dd05 100644 --- a/pages/shop/GoodsClass/index.vue +++ b/pages/shop/GoodsClass/index.vue @@ -143,6 +143,9 @@ export default { // document.addEventListener("scroll", this.onScroll, false); this.loadCategoryData(); }, + onPullDownRefresh() { + this.loadCategoryData(); + }, methods: { getTime() { let hour = new Date().getHours(); @@ -189,11 +192,12 @@ export default { loadCategoryData() { getCategory().then(res => { this.category = res.data; - this.$nextTick(() => { - if (this.$yroute.query.id) { - this.activeCateId(this.$yroute.query.id); - } - }); + uni.stopPullDownRefresh() + // this.$nextTick(() => { + // if (this.$yroute.query.id) { + // this.activeCateId(this.$yroute.query.id); + // } + // }); }); }, submitForm: function() { diff --git a/pages/shop/GoodsCon/index.vue b/pages/shop/GoodsCon/index.vue index ee4be13..ebc0fe7 100644 --- a/pages/shop/GoodsCon/index.vue +++ b/pages/shop/GoodsCon/index.vue @@ -33,7 +33,6 @@ -
diff --git a/pages/study/dabang.vue b/pages/study/dabang.vue index c16d0bb..00fe3e6 100644 --- a/pages/study/dabang.vue +++ b/pages/study/dabang.vue @@ -79,7 +79,7 @@ - + @@ -91,7 +91,7 @@ 完成打榜{{item.finishNum}}项 - {{item.integral}}积分 + 累计打榜{{item.counts}}天 @@ -130,11 +130,15 @@ }); }, getProgress(){ + uni.showLoading({ + title: "正在加载中..." + }) myProgress(this.studyId).then((res)=>{ if(res.success){ res.data.studyListDto.listStartTime = res.data.studyListDto.listStartTime.split(" ")[0]; res.data.studyListDto.listEndTime = res.data.studyListDto.listEndTime.split(" ")[0] this.detail = res.data; + uni.hideLoading() uni.stopPullDownRefresh(); } }) @@ -378,7 +382,7 @@ } .name{ - width: 62%; + width: 60%; } .rank-img{ width: 50rpx; diff --git a/pages/user/User/index.vue b/pages/user/User/index.vue index 6b0f461..126d6fb 100644 --- a/pages/user/User/index.vue +++ b/pages/user/User/index.vue @@ -235,7 +235,7 @@ export default { Authorization, }, props: {}, - data: function() { + data() { return { MyMenus: [], switchActive: false, @@ -533,15 +533,12 @@ export default { }, onShow() { if (this.$store.getters.token) { - // - // uni.showLoading({ - // title: '加载中', - // }) this.$store.dispatch('getUser', true) // this.MenuUser() this.isWeixin = isWeixin() } }, + onHide() { console.log('离开用户中心') this.updateAuthorizationPage(false) diff --git a/pages/user/myBangdan/index.vue b/pages/user/myBangdan/index.vue index 00dd7f4..4f81882 100644 --- a/pages/user/myBangdan/index.vue +++ b/pages/user/myBangdan/index.vue @@ -41,6 +41,9 @@ onLoad(){ this.getList() }, + onPullDownRefresh() { + this.getList() + }, methods:{ getList(){ uni.showLoading({ @@ -51,6 +54,7 @@ if(res.success){ this.studyList = res.data } + uni.stopPullDownRefresh() }) }, toDabang(id){ diff --git a/pages/user/myCourses/index.vue b/pages/user/myCourses/index.vue index 0516b6c..374a718 100644 --- a/pages/user/myCourses/index.vue +++ b/pages/user/myCourses/index.vue @@ -68,6 +68,9 @@ onLoad(){ this.getList() }, + onPullDownRefresh() { + this.getList() + }, methods:{ getList(){ uni.showLoading({ @@ -78,6 +81,7 @@ if(res.success){ this.courseList = res.data } + uni.stopPullDownRefresh() }) }, tabClick(idx){ diff --git a/static/close-btn.png b/static/close-btn.png new file mode 100644 index 0000000..d5c1e28 Binary files /dev/null and b/static/close-btn.png differ diff --git a/static/content-bg.png b/static/content-bg.png new file mode 100644 index 0000000..be1c162 Binary files /dev/null and b/static/content-bg.png differ diff --git a/static/course-icon1.png b/static/course-icon1.png index a3d9976..25e689b 100644 Binary files a/static/course-icon1.png and b/static/course-icon1.png differ diff --git a/static/course-icon2.png b/static/course-icon2.png index 479b5d9..41d9aeb 100644 Binary files a/static/course-icon2.png and b/static/course-icon2.png differ diff --git a/static/course-icon3.png b/static/course-icon3.png index dd855e0..8c82c61 100644 Binary files a/static/course-icon3.png and b/static/course-icon3.png differ diff --git a/static/course-icon4.png b/static/course-icon4.png index 8dfac54..c97c9f9 100644 Binary files a/static/course-icon4.png and b/static/course-icon4.png differ diff --git a/static/course-icon5.png b/static/course-icon5.png new file mode 100644 index 0000000..08ed8fc Binary files /dev/null and b/static/course-icon5.png differ diff --git a/static/ercode-download.png b/static/ercode-download.png new file mode 100644 index 0000000..95cce00 Binary files /dev/null and b/static/ercode-download.png differ diff --git a/static/signup-success.png b/static/signup-success.png new file mode 100644 index 0000000..e01c671 Binary files /dev/null and b/static/signup-success.png differ diff --git a/static/蒙版组 39@2x.png b/static/蒙版组 39@2x.png new file mode 100644 index 0000000..73e6bd7 Binary files /dev/null and b/static/蒙版组 39@2x.png differ diff --git a/utils/index.js b/utils/index.js index 644dc2b..31c9d7f 100644 --- a/utils/index.js +++ b/utils/index.js @@ -1118,7 +1118,6 @@ export function chooseImages(callback) { }, }) } - }, }) } diff --git a/utils/request.js b/utils/request.js index a57b9b2..0e3a1d2 100644 --- a/utils/request.js +++ b/utils/request.js @@ -63,6 +63,7 @@ function baseRequest(options) { options.headers = { ...options.headers, + version: '2.0', } if (options.login === true) {