|
@@ -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 14:18:15 |
|
|
|
|
|
|
|
|
* @LastEditTime: 2023-04-17 14:43:11 |
|
|
* @FilePath: \TelpoH5FrontendWeb\src\views\card-info\index.vue |
|
|
* @FilePath: \TelpoH5FrontendWeb\src\views\card-info\index.vue |
|
|
* @description: |
|
|
* @description: |
|
|
--> |
|
|
--> |
|
@@ -109,6 +109,7 @@ export default { |
|
|
}, |
|
|
}, |
|
|
created() { |
|
|
created() { |
|
|
this.getAuth(); |
|
|
this.getAuth(); |
|
|
|
|
|
this.getToken(); |
|
|
this.getParams(); |
|
|
this.getParams(); |
|
|
this.getCardInfo(); |
|
|
this.getCardInfo(); |
|
|
|
|
|
|
|
@@ -120,6 +121,18 @@ export default { |
|
|
APICore.getAuth({ manufactorId: manufactorId }).then(res => { |
|
|
APICore.getAuth({ manufactorId: manufactorId }).then(res => { |
|
|
this.$store.commit("gatewayToken", res.data.data); |
|
|
this.$store.commit("gatewayToken", res.data.data); |
|
|
}); |
|
|
}); |
|
|
|
|
|
}, |
|
|
|
|
|
// 获取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')) |
|
|
|
|
|
} |
|
|
|
|
|
}) |
|
|
}, |
|
|
}, |
|
|
// 获取url传过来的参数 |
|
|
// 获取url传过来的参数 |
|
|
getParams() { |
|
|
getParams() { |
|
@@ -157,6 +170,10 @@ export default { |
|
|
let data= res.data; |
|
|
let data= res.data; |
|
|
if(data.code === 20000) { |
|
|
if(data.code === 20000) { |
|
|
this.$store.commit("openId", data.data.openId); |
|
|
this.$store.commit("openId", data.data.openId); |
|
|
|
|
|
}else if (data.state === false) { |
|
|
|
|
|
console.log("token过期"); |
|
|
|
|
|
this.getToken(); |
|
|
|
|
|
this.getOpenId(this.code); |
|
|
} |
|
|
} |
|
|
}) |
|
|
}) |
|
|
}, |
|
|
}, |
|
|