Browse Source

Merge branch 'fix' into test

test
JinxChen 1 year ago
parent
commit
1438d4d19b
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 * @Date: 2022-08-17 16:19:13
* @LastEditors: JinxChen * @LastEditors: JinxChen
* @LastEditTime: 2023-10-27 14:20:10
* @LastEditTime: 2023-10-30 10:07:43
* @FilePath: \TelpoH5FrontendWeb\README.md * @FilePath: \TelpoH5FrontendWeb\README.md
* @description: 项目说明 * @description: 项目说明
--> -->
@@ -747,4 +747,11 @@ update
`2023.10.27` `2023.10.27`
fix fix
- c1后台设备功耗查看页面 - 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 * @Date: 2021-11-20 10:26:39
* @LastEditors: JinxChen * @LastEditors: JinxChen
* @LastEditTime: 2023-10-16 09:34:24
* @LastEditTime: 2023-10-30 10:07:56
* @FilePath: \TelpoH5FrontendWeb\src\config\models.js * @FilePath: \TelpoH5FrontendWeb\src\config\models.js
* @description: * @description:
*/ */
export const VERSION_MODEL = '1.0.93F'; //版本号
export const VERSION_MODEL = '1.0.94F'; //版本号
export const IMAGE_URL = { export const IMAGE_URL = {
production: 'http://zfb.ssjlai.com/web/', production: 'http://zfb.ssjlai.com/web/',
test: '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 * @Date: 2022-04-15 10:22:36
* @LastEditors: JinxChen * @LastEditors: JinxChen
* @LastEditTime: 2023-04-17 17:40:01
* @LastEditTime: 2023-10-30 10:04:00
* @FilePath: \TelpoH5FrontendWeb\src\views\card-info\index.vue * @FilePath: \TelpoH5FrontendWeb\src\views\card-info\index.vue
* @description: * @description:
--> -->
@@ -95,6 +95,7 @@ export default {
isShowMenu: this.$route.query.isShowMenu, isShowMenu: this.$route.query.isShowMenu,
params: {}, params: {},
isShowPage: false, //是否显示整个页面 isShowPage: false, //是否显示整个页面
code: '', //微信授权code
} }
}, },
computed: { computed: {
@@ -125,13 +126,14 @@ export default {
// 获取token // 获取token
getToken() { getToken() {
let manufacturerNo = '9f166b07-ff83-4991-84dc-ca6ad4a6b95b'; 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传过来的参数 // 获取url传过来的参数
@@ -143,6 +145,7 @@ export default {
if ( isNotNull(url) || window.location.href.indexOf("code") > -1) { if ( isNotNull(url) || window.location.href.indexOf("code") > -1) {
let timeStamp = new Date().getTime(); let timeStamp = new Date().getTime();
let code = url.split("&")[0]; let code = url.split("&")[0];
this.code = code;
if (isNotNull(code)) { if (isNotNull(code)) {
this.isShowPage = true; this.isShowPage = true;
if(!params.isHasCode) { if(!params.isHasCode) {
@@ -174,8 +177,14 @@ export default {
this.$store.commit("openId", data.data.openId); this.$store.commit("openId", data.data.openId);
}else if (data.state === false) { }else if (data.state === false) {
console.log("token过期"); 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