|
@@ -1,7 +1,7 @@ |
|
|
<!-- |
|
|
<!-- |
|
|
* @Date: 2023-02-24 14:18:25 |
|
|
* @Date: 2023-02-24 14:18:25 |
|
|
* @LastEditors: JinxChen |
|
|
* @LastEditors: JinxChen |
|
|
* @LastEditTime: 2023-04-03 14:12:51 |
|
|
|
|
|
|
|
|
* @LastEditTime: 2023-04-06 10:11:00 |
|
|
* @FilePath: \TelpoH5FrontendWeb\src\views\package-home\index.vue |
|
|
* @FilePath: \TelpoH5FrontendWeb\src\views\package-home\index.vue |
|
|
* @description: |
|
|
* @description: |
|
|
--> |
|
|
--> |
|
@@ -16,6 +16,7 @@ import { APIPay } from "@/api/pay"; |
|
|
import APICore from "@/api/core"; |
|
|
import APICore from "@/api/core"; |
|
|
import APIWx from "@/api/wx"; |
|
|
import APIWx from "@/api/wx"; |
|
|
import { isNotNull } from "@/utils/index"; |
|
|
import { isNotNull } from "@/utils/index"; |
|
|
|
|
|
import AppId from "@/config/appId"; |
|
|
export default { |
|
|
export default { |
|
|
name: "", |
|
|
name: "", |
|
|
data() { |
|
|
data() { |
|
@@ -108,9 +109,6 @@ export default { |
|
|
getWxCode() { |
|
|
getWxCode() { |
|
|
let params = this.params; |
|
|
let params = this.params; |
|
|
let commonUrl = process.env.VUE_APP_BASE_API; |
|
|
let commonUrl = process.env.VUE_APP_BASE_API; |
|
|
/* let redUrl = encodeURIComponent(`${commonUrl}/h5-frontendweb/#/${params.routerName}?imei=${params.imei}&appId=${params.appId}&iccid=${params.iccid}`); |
|
|
|
|
|
let url = `https://open.weixin.qq.com/connect/oauth2/authorize?appid=${params.appId}&redirect_uri=${redUrl}&response_type=code&scope=snsapi_base&state=STATE#wechat_redirect`; |
|
|
|
|
|
window.location.href = url; */ |
|
|
|
|
|
// todo 暂时去掉 |
|
|
// todo 暂时去掉 |
|
|
if(this.isRecharge) { |
|
|
if(this.isRecharge) { |
|
|
// 如果是已经支付,但未激活,跳转激活界面 |
|
|
// 如果是已经支付,但未激活,跳转激活界面 |
|
@@ -122,8 +120,8 @@ export default { |
|
|
} |
|
|
} |
|
|
}) |
|
|
}) |
|
|
} else { |
|
|
} else { |
|
|
let redUrl = encodeURIComponent(`${commonUrl}/h5-frontendweb/#/${params.routerName}?imei=${params.imei}&appId=${params.appId}&iccid=${params.iccid}`); |
|
|
|
|
|
let url = `https://open.weixin.qq.com/connect/oauth2/authorize?appid=${params.appId}&redirect_uri=${redUrl}&response_type=code&scope=snsapi_base&state=STATE#wechat_redirect`; |
|
|
|
|
|
|
|
|
let redUrl = encodeURIComponent(`${commonUrl}/h5-frontendweb/#/${params.routerName}?imei=${params.imei}&appId=${AppId}&iccid=${params.iccid}`); |
|
|
|
|
|
let url = `https://open.weixin.qq.com/connect/oauth2/authorize?appid=${AppId}&redirect_uri=${redUrl}&response_type=code&scope=snsapi_base&state=STATE#wechat_redirect`; |
|
|
window.location.href = url; |
|
|
window.location.href = url; |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
@@ -134,7 +132,7 @@ export default { |
|
|
if (params) { |
|
|
if (params) { |
|
|
console.log("params", params); |
|
|
console.log("params", params); |
|
|
this.params = {...params}; |
|
|
this.params = {...params}; |
|
|
this.$store.commit("appId", params.appId); |
|
|
|
|
|
|
|
|
this.$store.commit("appId", AppId); |
|
|
if(params.reqUrl) { |
|
|
if(params.reqUrl) { |
|
|
const reqUrl = encodeURI(params.reqUrl); |
|
|
const reqUrl = encodeURI(params.reqUrl); |
|
|
console.log("reqUrl", params.reqUrl, reqUrl); |
|
|
console.log("reqUrl", params.reqUrl, reqUrl); |
|
|