diff --git a/pages/Parentinformation/Parentinformation.vue b/pages/Parentinformation/Parentinformation.vue index 8c07686..a1ce0bf 100644 --- a/pages/Parentinformation/Parentinformation.vue +++ b/pages/Parentinformation/Parentinformation.vue @@ -2,7 +2,7 @@ - + @@ -37,7 +37,8 @@ - + 我已阅读并同意 { if (res.code == 200) { - uni.setStorage({ - key: 'phone', - data: res.msg - }); + uni.setStorageSync("phone", res.msg) this.$refs.uToast.show({ title: "添加成功", type: 'success' }) - // uni.showToast({ - // message: "添加成功", - // icon: 'success' - // }); setTimeout(() => { - uni.navigateTo({ - url: '/pages/index/index' - }) + uni.navigateTo({ + url: '/pages/index/index' + }) }, 500) - } else if (res.code == 500) { this.$refs.uToast.show({ title: res.msg, type: 'error' }) - // uni.showToast({ - // title: res.msg, - // icon: 'none', - // duration: 2000 - // }); } }) } - - }, //取消按钮 cancel() { - uni.removeStorageSync('user'); uni.navigateTo({ url: '/pages/index/index' }) }, - - - } } @@ -190,6 +169,7 @@ margin-top: 40rpx; padding-bottom: 80rpx; } + .btn1, .btn2 { width: 50%; diff --git a/pages/Personal/Personal.vue b/pages/Personal/Personal.vue index f9655ca..17abf07 100644 --- a/pages/Personal/Personal.vue +++ b/pages/Personal/Personal.vue @@ -129,31 +129,10 @@ }, onShow() { let that = this; - this.studentId = uni.getStorageSync('studentId'); - if (this.studentId) { - uni.getStorage({ - key: 'phone', - success: function(res) { - that.phone = res.data - that.getInfoByPhoneinfo(); - }, - fail: function(err) { - that.login = false - that.stuinfos = false - that.tip = true - that.top2 = false - that.top = true - } - }); - uni.getStorage({ - key: 'user', - success: function(res) { - that.yonghuwx = res.data - // that.mask = true - }, - fail: function(err) {} - }); - } + that.phone = uni.getStorageSync('phone'); + if (that.phone) { + that.getInfoByPhoneinfo(); + } else {} }, methods: { goindex() { @@ -171,17 +150,13 @@ } else {} }) }, - gohome() { let that = this const value = uni.getStorageSync('phone'); - const value2 = uni.getStorageSync('studentId'); - if (value && value2) { + if (value) { uni.removeStorageSync('phone'); - uni.removeStorageSync('openid'); uni.removeStorageSync('this.DATAList'); - uni.removeStorageSync('studentId'); - this.mask = false + that.mask = false that.$refs.uToast.show({ title: "退出成功", type: 'success', diff --git a/pages/grade/grade.vue b/pages/grade/grade.vue index 1ce0ce5..38b2d33 100644 --- a/pages/grade/grade.vue +++ b/pages/grade/grade.vue @@ -37,35 +37,33 @@ - - diff --git a/pages/prescription/prescription.vue b/pages/prescription/prescription.vue index edae57c..5a6a30d 100644 --- a/pages/prescription/prescription.vue +++ b/pages/prescription/prescription.vue @@ -142,7 +142,6 @@ StudentScore: [], studentInfoList: [], studentIditem: [], - yonghuwx: [], getchildlist: [], studentId: "", batchCode: "", @@ -152,47 +151,34 @@ }, onShow() { let that = this; - const obj = uni.getStorageSync('studentId'); - uni.getStorage({ - key: 'phone', - success: function(res) { - that.phone = res.data - }, - fail: function(err) {} - }); - uni.getStorage({ - key: 'user', - success: function(res) { - that.yonghuwx = res.data - // that.mask = true - }, - fail: function(err) {} - }); - if (!obj) { - uni.navigateTo({ - url: "/pages/index/index" - }) - } else { - var arr = { - "studentIdList": obj - } - getChildrenResultScore(arr).then(res => { - this.StudentScore = res.data - if (this.StudentScore.length == 1) { - getMotionPrescription(res.data[0].studentId, res.data[0].batchCode).then(res => { - this.studentInfoList = res.data - this.studentInfoList.forEach(e => { - e.motionPrescriptionVideoInfoVOList.forEach(el => { - el.count = 0 - el.prescriptionVideoUrl = baseurl + el - .prescriptionVideoUrl - }) - }) - }) - this.infolist(); + this.phone = uni.getStorageSync('phone'); + getInfoByPhone(this.phone).then(res => { + if (res.code == 200) { + var obj = { + studentIdList: [] } - }) - } + res.data.studentInfoList.forEach(e => { + obj.studentIdList.push(e.studentId) + }) + getChildrenResultScore(obj).then(res => { + this.StudentScore = res.data + if (this.StudentScore.length == 1) { + getMotionPrescription(res.data[0].studentId, res.data[0].batchCode).then( + res => { + this.studentInfoList = res.data + this.studentInfoList.forEach(e => { + e.motionPrescriptionVideoInfoVOList.forEach(el => { + el.count = 0 + el.prescriptionVideoUrl = baseurl + el + .prescriptionVideoUrl + }) + }) + }) + this.infolist(); + } + }) + } else {} + }) }, methods: { look(uitem) {