diff --git a/README.md b/README.md index b99193f..110a72b 100644 --- a/README.md +++ b/README.md @@ -1,7 +1,7 @@ @@ -747,4 +747,11 @@ update `2023.10.27` fix - c1后台设备功耗查看页面 - - 修复 上报周期无数据时显示不全的问题 \ No newline at end of file + - 修复 上报周期无数据时显示不全的问题 + + +## v1.0.94 +`2023.10.30` +fix +- 话费查询 + - 修复 token过期时导致获取openId失败的问题 diff --git a/src/config/models.js b/src/config/models.js index a8c5847..df192ec 100644 --- a/src/config/models.js +++ b/src/config/models.js @@ -1,11 +1,11 @@ /* * @Date: 2021-11-20 10:26:39 * @LastEditors: JinxChen - * @LastEditTime: 2023-10-16 09:34:24 + * @LastEditTime: 2023-10-30 10:07:56 * @FilePath: \TelpoH5FrontendWeb\src\config\models.js * @description: */ -export const VERSION_MODEL = '1.0.93F'; //版本号 +export const VERSION_MODEL = '1.0.94F'; //版本号 export const IMAGE_URL = { production: 'http://zfb.ssjlai.com/web/', test: 'http://zfb.ssjlai.com/web/', diff --git a/src/views/card-info/index.vue b/src/views/card-info/index.vue index 8f13f82..3fe6e41 100644 --- a/src/views/card-info/index.vue +++ b/src/views/card-info/index.vue @@ -1,7 +1,7 @@ @@ -95,6 +95,7 @@ export default { isShowMenu: this.$route.query.isShowMenu, params: {}, isShowPage: false, //是否显示整个页面 + code: '', //微信授权code } }, computed: { @@ -125,13 +126,14 @@ export default { // 获取token getToken() { let manufacturerNo = '9f166b07-ff83-4991-84dc-ca6ad4a6b95b'; - APIPay.getToken(manufacturerNo).then(res => { - console.log("token的数据", res.data) - let data = res.data; - if(data.code === 20000) { - this.$store.commit("token", data.token); - console.log("token的数据", localStorage.getItem('token')) - } + return new Promise((resolve) => { + APIPay.getToken(manufacturerNo).then(res => { + let data = res.data; + if(data.code === 20000) { + this.$store.commit("token", data.token); + resolve(true); + } + }); }) }, // 获取url传过来的参数 @@ -143,6 +145,7 @@ export default { if ( isNotNull(url) || window.location.href.indexOf("code") > -1) { let timeStamp = new Date().getTime(); let code = url.split("&")[0]; + this.code = code; if (isNotNull(code)) { this.isShowPage = true; if(!params.isHasCode) { @@ -174,8 +177,14 @@ export default { this.$store.commit("openId", data.data.openId); }else if (data.state === false) { console.log("token过期"); - this.getToken(); - this.getOpenId(this.code); + let hasToken = this.getToken(); + if(hasToken) { + this.getOpenId(this.code); + } else { + this.$dialog({ + message: '系统繁忙,请重新进入' + }) + } } }) },