Browse Source

Merge branch 'feat' into develop

pull/2/head
JinxChen 1 year ago
parent
commit
42e0d40e96
1 changed files with 8 additions and 2 deletions
  1. +8
    -2
      src/views/package-list/index.vue

+ 8
- 2
src/views/package-list/index.vue View File

@@ -1,7 +1,7 @@
<!-- <!--
* @Date: 2022-03-29 16:57:58 * @Date: 2022-03-29 16:57:58
* @LastEditors: JinxChen * @LastEditors: JinxChen
* @LastEditTime: 2023-04-08 17:07:51
* @LastEditTime: 2023-04-08 22:05:03
* @FilePath: \TelpoH5FrontendWeb\src\views\package-list\index.vue * @FilePath: \TelpoH5FrontendWeb\src\views\package-list\index.vue
* @description: TODO 小台风充值h5 * @description: TODO 小台风充值h5
--> -->
@@ -140,7 +140,8 @@ export default {
payProductId: null, //套餐id payProductId: null, //套餐id
packageIssue: null, //套餐分期 packageIssue: null, //套餐分期
payType: '1', //支付方式 1 微信, 2 支付宝,支付宝又分为花呗和全额支付,全额支付分期数传0 或者1 ,花呗则传 3 6 12 payType: '1', //支付方式 1 微信, 2 支付宝,支付宝又分为花呗和全额支付,全额支付分期数传0 或者1 ,花呗则传 3 6 12
openId: ''
openId: '',
code: ''
}; };
}, },
created() { created() {
@@ -161,6 +162,10 @@ export default {
if(data.code === 20000) { if(data.code === 20000) {
this.openId = data.data.openId; this.openId = data.data.openId;
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);
} }
}) })
}, },
@@ -188,6 +193,7 @@ export default {
console.log("url", url); console.log("url", url);
if (isNotNull(url) ||window.location.href.indexOf("code") > -1) { if (isNotNull(url) ||window.location.href.indexOf("code") > -1) {
let code = url.split("&")[0]; let code = url.split("&")[0];
this.code = code;
if (isNotNull(code)) { if (isNotNull(code)) {
this.getOpenId(code); this.getOpenId(code);
} else { } else {


Loading…
Cancel
Save