diff --git a/src/pages/health-risks/index/index.vue b/src/pages/health-risks/index/index.vue index 0530bb5..37d0169 100644 --- a/src/pages/health-risks/index/index.vue +++ b/src/pages/health-risks/index/index.vue @@ -870,7 +870,11 @@ }) hideLoading() if (reg.code == 200) { - if (this.diseases == '95') { + if(reg.data.integral && reg.data.integral > 0){ + toast(reg.data.integral + "积分已到账") + } + setTimeout(()=>{ + if (this.diseases == '95') { let b = { userParameters: JSON.stringify(this.userParameters), //用户参数 name: this.userName, @@ -894,6 +898,7 @@ .stringify(b) }) } + },1000) } else { toast(reg.msg ? reg.msg : '生成报告异常') } @@ -938,6 +943,11 @@ subType: '0', //答题状态(1 完成 0未完成 ) } }) + if(ret.code == 200){ + if(ret.data.integral && ret.data.integral > 0){ + toast(ret.data.integral + "积分已到账") + } + } }, // 继续填写 async continueChange() { diff --git a/src/pages/psychological-assessment/index/index.vue b/src/pages/psychological-assessment/index/index.vue index 70a13f9..4d1358f 100644 --- a/src/pages/psychological-assessment/index/index.vue +++ b/src/pages/psychological-assessment/index/index.vue @@ -660,6 +660,9 @@ mbti: that.jieguo, //15类型结果 } }).then((res) => { + if(res.data && res.data > 0){ + toast(res.data + "积分已到账") + } hideLoading() let a = { userParameters: JSON.stringify(this.userParameters), @@ -668,9 +671,11 @@ id: this.id, dicCode: this.dictNo, } - uni.redirectTo({ - url: '/pages/psychological-assessment/result/result?params=' + JSON.stringify(a) - }) + setTimeout(() => { + uni.redirectTo({ + url: '/pages/psychological-assessment/result/result?params=' + JSON.stringify(a) + }) + }, 1000) }) }, scroll(e) { diff --git a/src/pages/quitSmoking/content/content.vue b/src/pages/quitSmoking/content/content.vue index 3109762..4dcec76 100644 --- a/src/pages/quitSmoking/content/content.vue +++ b/src/pages/quitSmoking/content/content.vue @@ -34,11 +34,15 @@ content: this.content } }).then(res => { - toast('保存成功') if (res.code == 200) { + if(res.data && res.data > 0 ){ + toast(res.data + "积分已到账") + }else{ + toast('保存成功') + } setTimeout(() => { uni.navigateBack() - }, 500) + }, 1000) } }) }, diff --git a/src/pages/quitSmoking/smokingSituation/smokingSituation.vue b/src/pages/quitSmoking/smokingSituation/smokingSituation.vue index 425054f..3089a20 100644 --- a/src/pages/quitSmoking/smokingSituation/smokingSituation.vue +++ b/src/pages/quitSmoking/smokingSituation/smokingSituation.vue @@ -156,10 +156,16 @@ this.$SMOKE.userSmokingAdd({ data, }).then(res => { - toast('保存成功') - setTimeout(() => { - uni.navigateBack() - }, 500) + if(res.code == 200){ + if(res.data && res.data > 0){ + toast(res.data + '积分已到账') + }else{ + toast('保存成功') + } + setTimeout(() => { + uni.navigateBack() + }, 500) + } }) }, // 最后吸烟日 diff --git a/src/pages/scanCodeEvaluation/health-risks/index/index.vue b/src/pages/scanCodeEvaluation/health-risks/index/index.vue index 3262cf8..3b7ecef 100644 --- a/src/pages/scanCodeEvaluation/health-risks/index/index.vue +++ b/src/pages/scanCodeEvaluation/health-risks/index/index.vue @@ -724,9 +724,14 @@ }) hideLoading() if (reg.code == 200) { - uni.redirectTo({ - url: '/pages/scanCodeEvaluation/health-risks/basicReport/basicReport?age=' + this.age + '&name=' + this.userName - }) + if(reg.data.integral && reg.data.integral > 0){ + toast(reg.data.integral + "积分已到账") + } + setTimeout(() => { + uni.redirectTo({ + url: '/pages/scanCodeEvaluation/health-risks/basicReport/basicReport?age=' + this.age + '&name=' + this.userName + }) + }, 1000) } else { toast(reg.msg ? reg.msg : '生成报告异常') } @@ -770,6 +775,11 @@ subType: '0', //答题状态(1 完成 0未完成 ) } }) + if(ret.code == 200){ + if(ret.data.integral && ret.data.integral > 0){ + toast(ret.data.integral + "积分已到账") + } + } }, // 继续填写 async continueChange() { diff --git a/src/pages/selfRegistration/actionList/actionList.vue b/src/pages/selfRegistration/actionList/actionList.vue index 62c2a05..7f2a72f 100644 --- a/src/pages/selfRegistration/actionList/actionList.vue +++ b/src/pages/selfRegistration/actionList/actionList.vue @@ -299,7 +299,11 @@ }).then(res => { if (res.code == 200) { hideLoading() - toast('保存成功') + if(res.data && res.data > 0){ + toast(res.data + "积分已到账") + }else{ + toast('保存成功') + } // 跳转到每日任务页 setTimeout(() => { uni.reLaunch({ diff --git a/src/pages/selfRegistration/content/content.vue b/src/pages/selfRegistration/content/content.vue index 69d1305..2ac98aa 100644 --- a/src/pages/selfRegistration/content/content.vue +++ b/src/pages/selfRegistration/content/content.vue @@ -30,8 +30,12 @@ planDiary: this.content } }).then(res => { - toast('保存成功') if (res.code == 200) { + if(res.data && res.data > 0){ + toast(res.data + '积分已到账') + }else{ + toast('保存成功') + } var pages = getCurrentPages(); var prevPage = pages[pages.length - 2]; //上一个页面 prevPage._data.pageShow = false diff --git a/src/pages/selfRegistration/dailyTasks/dailyTasks.vue b/src/pages/selfRegistration/dailyTasks/dailyTasks.vue index 87eb4c3..bed1985 100644 --- a/src/pages/selfRegistration/dailyTasks/dailyTasks.vue +++ b/src/pages/selfRegistration/dailyTasks/dailyTasks.vue @@ -198,6 +198,12 @@ finishStatus: 1, id: item.id } + }).then(res=>{ + if(res.code == 200){ + if(res.data && res.data > 0){ + toast(res.data + "积分已到账") + } + } }) }, // 删除 diff --git a/src/pages/selfRegistration/planningCycle/planningCycle.vue b/src/pages/selfRegistration/planningCycle/planningCycle.vue index 7bc74f3..c50a2d2 100644 --- a/src/pages/selfRegistration/planningCycle/planningCycle.vue +++ b/src/pages/selfRegistration/planningCycle/planningCycle.vue @@ -107,7 +107,11 @@ }).then(res => { if (res.code == 200) { hideLoading() - toast('保存成功') + if(res.data && res.data > 0){ + toast(res.data + "积分已到账") + }else{ + toast('保存成功') + } // 跳转到每日任务页 setTimeout(() => { uni.reLaunch({ diff --git a/src/pages/selfRegistration2/aplanning/aplanning.vue b/src/pages/selfRegistration2/aplanning/aplanning.vue index 1d14554..e75a54c 100644 --- a/src/pages/selfRegistration2/aplanning/aplanning.vue +++ b/src/pages/selfRegistration2/aplanning/aplanning.vue @@ -259,6 +259,9 @@ export default { // action: 'message' // } // }) + if(res.data && res.data >0){ + toast(res.data + "积分已到账") + } jWeixin.miniProgram ? jWeixin.miniProgram.navigateBack() : jWeixin.navigateBack(); if (window.Android) { @@ -297,6 +300,9 @@ export default { // action: 'message' // } // }) + if(res.data && res.data >0){ + toast(res.data + "积分已到账") + } jWeixin.miniProgram ? jWeixin.miniProgram.navigateBack() : jWeixin.navigateBack(); if (window.Android) { diff --git a/src/pages/selfRegistration2/dailyTasks/dailyTasks.vue b/src/pages/selfRegistration2/dailyTasks/dailyTasks.vue index 10dcc86..5bf2c84 100644 --- a/src/pages/selfRegistration2/dailyTasks/dailyTasks.vue +++ b/src/pages/selfRegistration2/dailyTasks/dailyTasks.vue @@ -199,6 +199,12 @@ finishStatus: 1, id: item.id } + }).then(res=>{ + if(res.code == 200){ + if(res.data && res.data > 0){ + toast(res.data + "积分已到账") + } + } }) }, // 删除 diff --git a/src/pages/selfRegistration2/planningCycle/planningCycle.vue b/src/pages/selfRegistration2/planningCycle/planningCycle.vue index 14d3780..08cd21a 100644 --- a/src/pages/selfRegistration2/planningCycle/planningCycle.vue +++ b/src/pages/selfRegistration2/planningCycle/planningCycle.vue @@ -37,7 +37,7 @@ import { hideLoading } from "/tool/index.js" export default { - data () { + data() { return { rateValue: null, //评分 List: [], //行动列表数据 @@ -49,21 +49,21 @@ export default { cuttDate: formatTime(new Date()).split(" ")[0], // 年月日 } }, - onLoad (option) { + onLoad(option) { this.List = JSON.parse(option.params) this.rateValue = option.rateValue }, methods: { // 选择 - bindPickerChange (e) { + bindPickerChange(e) { this.index = e.detail.value }, // 日期选择 - maskClick () { + maskClick() { console.log(this.range, 'range') }, // 保存 - goNext () { + goNext() { if (this.$preventClick()) return showLoading('保存中...') let taskType = '' //周期类型 @@ -114,15 +114,19 @@ export default { cancelText: '确定', confirmText: '创建自主计划', confirmColor: '#3AAFB8', - success (ret) { + success(ret) { if (ret.confirm) { uni.redirectTo({ - url: '/pages/selfRegistration2/aplanning/aplanning?params='+ - JSON.stringify(that.List) + url: '/pages/selfRegistration2/aplanning/aplanning?params=' + + JSON.stringify(that.List) }) console.log('创建自主计划'); } else if (ret.cancel) { - toast('保存成功') + if (res.data && res.data > 0) { + toast(res.data + "积分已到账") + } else { + toast('保存成功') + } // 跳转到每日任务页 setTimeout(() => { uni.reLaunch({