Browse Source

fix

- 话费查询
    - 修复 token过期时导致获取openId失败的问题
test
JinxChen 1 year ago
parent
commit
7331cb3959
3 changed files with 30 additions and 14 deletions
  1. +9
    -2
      README.md
  2. +2
    -2
      src/config/models.js
  3. +19
    -10
      src/views/card-info/index.vue

+ 9
- 2
README.md View File

@@ -1,7 +1,7 @@
<!--
* @Date: 2022-08-17 16:19:13
* @LastEditors: JinxChen
* @LastEditTime: 2023-10-27 14:20:10
* @LastEditTime: 2023-10-30 10:07:43
* @FilePath: \TelpoH5FrontendWeb\README.md
* @description: 项目说明
-->
@@ -747,4 +747,11 @@ update
`2023.10.27`
fix
- c1后台设备功耗查看页面
- 修复 上报周期无数据时显示不全的问题
- 修复 上报周期无数据时显示不全的问题


## v1.0.94
`2023.10.30`
fix
- 话费查询
- 修复 token过期时导致获取openId失败的问题

+ 2
- 2
src/config/models.js View File

@@ -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/',


+ 19
- 10
src/views/card-info/index.vue View File

@@ -1,7 +1,7 @@
<!--
* @Date: 2022-04-15 10:22:36
* @LastEditors: JinxChen
* @LastEditTime: 2023-04-17 17:40:01
* @LastEditTime: 2023-10-30 10:04:00
* @FilePath: \TelpoH5FrontendWeb\src\views\card-info\index.vue
* @description:
-->
@@ -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: '系统繁忙,请重新进入'
})
}
}
})
},


Loading…
Cancel
Save