From db8da70b72a81d049ca7411cd3d9a1d10a7d0c91 Mon Sep 17 00:00:00 2001 From: JinxChen <2183691628@qq.com> Date: Mon, 30 Oct 2023 14:59:23 +0800 Subject: [PATCH] =?UTF-8?q?fix=20-=20=E8=AF=9D=E8=B4=B9=E6=9F=A5=E8=AF=A2?= =?UTF-8?q?=20=20=20=20=20-=20=E4=BF=AE=E5=A4=8D=20=E5=BC=82=E6=AD=A5?= =?UTF-8?q?=E9=97=AE=E9=A2=98=E5=AF=BC=E8=87=B4=E9=A6=96=E6=AC=A1=E8=BF=9B?= =?UTF-8?q?=E5=85=A5=E9=A1=B5=E9=9D=A2=E7=99=BD=E5=B1=8F=E7=9A=84=E9=97=AE?= =?UTF-8?q?=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- README.md | 8 +++++ public/index.html | 4 +-- src/config/models.js | 2 +- src/router/index.js | 4 ++- src/views/card-info/index.vue | 6 ++-- src/views/health/psychological/report.vue | 36 +++++++++++++++++++++++ src/views/package-home/index.vue | 17 ++++------- 7 files changed, 59 insertions(+), 18 deletions(-) create mode 100644 src/views/health/psychological/report.vue diff --git a/README.md b/README.md index fb71320..64a699d 100644 --- a/README.md +++ b/README.md @@ -755,3 +755,11 @@ fix fix - 话费查询 - 修复 token过期时导致获取openId失败的问题 + + + +## v1.0.95 +`2023.10.30` +fix +- 话费查询 + - 修复 异步问题导致首次进入页面白屏的问题 \ No newline at end of file diff --git a/public/index.html b/public/index.html index 4ec6181..b23ae0b 100644 --- a/public/index.html +++ b/public/index.html @@ -1,7 +1,7 @@ @@ -10,7 +10,7 @@ - + diff --git a/src/config/models.js b/src/config/models.js index df192ec..c5bb08a 100644 --- a/src/config/models.js +++ b/src/config/models.js @@ -5,7 +5,7 @@ * @FilePath: \TelpoH5FrontendWeb\src\config\models.js * @description: */ -export const VERSION_MODEL = '1.0.94F'; //版本号 +export const VERSION_MODEL = '1.0.95F'; //版本号 export const IMAGE_URL = { production: 'http://zfb.ssjlai.com/web/', test: 'http://zfb.ssjlai.com/web/', diff --git a/src/router/index.js b/src/router/index.js index 2540538..c31845c 100644 --- a/src/router/index.js +++ b/src/router/index.js @@ -1,7 +1,7 @@ /* * @Date: 2023-09-21 09:54:53 * @LastEditors: JinxChen - * @LastEditTime: 2023-10-13 11:30:23 + * @LastEditTime: 2023-10-30 11:31:37 * @FilePath: \TelpoH5FrontendWeb\src\router\index.js * @description: */ @@ -61,6 +61,8 @@ const routes = [ { path: '/psychological', name: 'psychological', component: resolve => require(['@/views/health/psychological'], resolve) }, // 健康-抑郁,压力和疲劳汇总入口 { path: '/psychologicalMain', name: 'psychologicalMain', component: resolve => require(['@/views/health/psychological-main'], resolve) }, + // 周报/月报 + { path: '/psychologicalReport', name: 'psychologicalReport', component: resolve => require(['@/views/health/psychological/report'], resolve) }, // 告警详情-中间页 { path: '/aiCallAlarm', name: 'aiCallAlarm', component: resolve => require(['@/views/ai-call-alarm'], resolve) }, diff --git a/src/views/card-info/index.vue b/src/views/card-info/index.vue index 3fe6e41..a56ba84 100644 --- a/src/views/card-info/index.vue +++ b/src/views/card-info/index.vue @@ -1,7 +1,7 @@ @@ -171,13 +171,13 @@ export default { // 根据code获取openId getOpenId(code) { let openId = this.$store.getters.openId; - APIPay.getOpenId(code).then(res => { + APIPay.getOpenId(code).then( async res => { let data= res.data; if(data.code === 20000) { this.$store.commit("openId", data.data.openId); }else if (data.state === false) { console.log("token过期"); - let hasToken = this.getToken(); + let hasToken = await this.getToken(); if(hasToken) { this.getOpenId(this.code); } else { diff --git a/src/views/health/psychological/report.vue b/src/views/health/psychological/report.vue new file mode 100644 index 0000000..e4a5e25 --- /dev/null +++ b/src/views/health/psychological/report.vue @@ -0,0 +1,36 @@ + + + + + + diff --git a/src/views/package-home/index.vue b/src/views/package-home/index.vue index 466aabc..fce4ae0 100644 --- a/src/views/package-home/index.vue +++ b/src/views/package-home/index.vue @@ -1,7 +1,7 @@ @@ -41,8 +41,7 @@ export default { // 3.如果有基础套餐并且已充值,跳转费查询页面 // 4.如果有基础套餐但未充值,跳转套餐充值页面 getDevicePayPackage() { - return new Promise((resolve, reject) => { - APICore.devicePayPackage(this.params.imei) + APICore.devicePayPackage(this.params.imei) .then(res => { let data = res.data; if (data.code === 106 || data.code === 104) { @@ -52,15 +51,11 @@ export default { }, 1500); } else { // 筛选是否存在基础套餐, producModelId = 1 是基础套餐, 2 是加油包 - const isHasBasePackage = data.data.packagesList.some(res => { + this.isHasBasePackage = data.data.packagesList.some(res => { return res.producModelId === 1; }); - resolve(isHasBasePackage); } - }).catch(e => { - reject(false); - }) - }) + }).catch(() => {}) }, checkImei() { let reqBody = { @@ -182,7 +177,7 @@ export default { }, // 获取url传过来的参数 - async getParams() { + getParams() { let params = this.$route.query; if (params) { this.params = {...params}; @@ -191,7 +186,7 @@ export default { const reqUrl = encodeURI(params.reqUrl); window.location.href = reqUrl; } else { - this.isHasBasePackage = await this.getDevicePayPackage(); + this.getDevicePayPackage(); this.checkImei(); } }