| | |
| | | { |
| | | title: '我的证书', |
| | | icon: '/static/images/personal/certificate.png', |
| | | url: '', |
| | | // url: '', |
| | | url: '/pages/personalCenter/certificate/index', |
| | | type: 'certificate', |
| | | }, |
| | | { |
| | |
| | | { |
| | | title: '我的上传', |
| | | icon: '/static/images/personal/upload.png', |
| | | url: '', |
| | | // url: '', |
| | | url: '/pages/personalCenter/myUpload/index', |
| | | type: 'upload', |
| | | }, |
| | | { |
| | | title: '出书申请', |
| | | icon: '/static/images/personal/chushu.png', |
| | | // url: '', |
| | | url: '/packagePersonal/pages/publishBooks/index', |
| | | type: 'publishBooks', |
| | | }, |
| | | { |
| | | title: '我的课程', |
| | | icon: '/static/images/personal/course.png', |
| | | url: '/packageCourse/pages/course/index', |
| | | type: 'course', |
| | | }, |
| | | { |
| | | title: '我的班级', |
| | | icon: '/static/images/personal/class.png', |
| | | url: '/packageCourse/pages/studentClass/index', |
| | | type: 'class', |
| | | } |
| | | ]; |
| | | const moreMenu = [{ |
| | |
| | | size: '10rpx', |
| | | }, |
| | | scrollTop: 0, |
| | | visibleIntegral: false, |
| | | recordList: [] |
| | | }, |
| | | /** |
| | | * 生命周期函数--监听页面加载 |
| | |
| | | }); |
| | | this.getUserInfo() |
| | | this.getIntegral() |
| | | } else { |
| | | wx.switchTab({ |
| | | url: '/pages/home/home', |
| | | }) |
| | | } |
| | | }) |
| | | } else { |
| | |
| | | this.setData({ |
| | | userInfo: defaultUser |
| | | }) |
| | | if (defaultUser?.role == 'Teacher') { |
| | | const data = [...this.data.menuData] |
| | | const list = data.filter(item => item.type != 'class') |
| | | this.setData({ |
| | | menuData: list |
| | | }) |
| | | } else { |
| | | const data = [...this.data.menuData] |
| | | const list = data.filter(item => item.type != 'course') |
| | | this.setData({ |
| | | menuData: list |
| | | }) |
| | | } |
| | | this.getTeacherInfo() |
| | | wx.setStorageSync(app.config.userInfoKey, JSON.stringify(this.data.userInfo)); |
| | | setTimeout(() => { |
| | |
| | | }) |
| | | }, |
| | | getIntegralList() { |
| | | app.MG.store |
| | | .getWalletHistory({ |
| | | Size: 999, |
| | | Start: 0, |
| | | sort: { |
| | | type: 'Desc', |
| | | field: 'CreateDate' |
| | | }, |
| | | type: 'integral' |
| | | }) |
| | | .then((res) => { |
| | | if (res.datas.length > 0) { |
| | | res.datas.forEach((element) => { |
| | | element.createDate = moment(element.createDate).format('YYYY-MM-DD HH:mm:ss') |
| | | if (element.refType == 'sign') { |
| | | element.type = '每日登录' |
| | | } |
| | | if (element.refType == 'Reward') { |
| | | element.type = '上传资源奖励' |
| | | } |
| | | if (element.refType == 'OrderCoinBonus') { |
| | | element.type = '订单支付奖励' |
| | | } |
| | | if (element.refType == 'Order' && element.value < 0) { |
| | | element.type = '订单支付抵扣' |
| | | } |
| | | if (element.refType == 'Order' && element.value > 0) { |
| | | element.type = '订单取消退回' |
| | | } |
| | | if (element.refType == 'AdminRecharge') { |
| | | element.type = '管理员充值' |
| | | } |
| | | }) |
| | | this.setData({ |
| | | recordList: res.datas, |
| | | visibleIntegral: true |
| | | }); |
| | | } |
| | | }) |
| | | }, |
| | | onVisibleIntegralChange(e) { |
| | | this.setData({ |
| | | visibleIntegral: e.detail.visible, |
| | | wx.navigateTo({ |
| | | url: `/pages/personalCenter/pointsRecord/index`, |
| | | }); |
| | | |
| | | }, |
| | | onClose() { |
| | | this.setData({ |
| | | visibleIntegral: false, |
| | | }); |
| | | }, |
| | | |
| | | |
| | | //点击目录 |
| | | toPages(item) { |
| | |
| | | isWhite: data |
| | | }) |
| | | }, |
| | | |
| | | // delectBtn() { |
| | | // app.MG.ugc |
| | | // .delTopicMessage({ |
| | | // messageIds: [2986, 1302, 1301, 3074, 1305, 1304] |
| | | // }) |
| | | // .then((res) => { |
| | | // console.log('删除成功') |
| | | // }) |
| | | // }, |
| | | |
| | | /** |
| | | * 用户点击右上角分享 |