@@ -1,7 +1,7 @@ | |||
<!-- | |||
* @Date: 2022-08-17 16:19:13 | |||
* @LastEditors: JinxChen | |||
* @LastEditTime: 2023-02-25 17:24:17 | |||
* @LastEditTime: 2023-02-25 18:17:53 | |||
* @FilePath: \TelpoH5FrontendWeb\README.md | |||
* @description: 项目说明 | |||
--> | |||
@@ -194,4 +194,9 @@ fix | |||
fix | |||
- 修复 调起微信支付异常的问题 | |||
- 修复 获取imei异常的问题 | |||
- 修改 获取openId方式 | |||
- 修改 获取openId方式 | |||
## v1.0.21 | |||
`2023.2.25` | |||
update | |||
- 暂时只开放支付宝支付 |
@@ -5,7 +5,7 @@ | |||
* @FilePath: \AntpayFrontEnd\src\config\models.js | |||
* @description: | |||
*/ | |||
export const VERSION_MODEL = '1.0.20F'; //版本号 | |||
export const VERSION_MODEL = '1.0.21F'; //版本号 | |||
export const IMAGE_URL = { | |||
production: 'http://zfb.ssjlai.com/web/', | |||
test: 'http://zfb.ssjlai.com/web/', | |||
@@ -1,7 +1,7 @@ | |||
/* | |||
* @Date: 2022-01-19 10:08:26 | |||
* @LastEditors: JinxChen | |||
* @LastEditTime: 2023-02-25 15:44:55 | |||
* @LastEditTime: 2023-02-25 18:15:58 | |||
* @FilePath: \TelpoH5FrontendWeb\src\main.js | |||
* @description: | |||
*/ | |||
@@ -1,7 +1,7 @@ | |||
<!-- | |||
* @Date: 2023-02-24 14:18:25 | |||
* @LastEditors: JinxChen | |||
* @LastEditTime: 2023-02-25 16:55:16 | |||
* @LastEditTime: 2023-02-25 18:08:22 | |||
* @FilePath: \TelpoH5FrontendWeb\src\views\package-home\index.vue | |||
* @description: | |||
--> | |||
@@ -54,6 +54,7 @@ export default { | |||
console.log("获取token"); | |||
} | |||
} else { | |||
this.getWxCode(); | |||
console.log("当前浏览器内核并非支付宝或者微信"); | |||
} | |||
}, | |||
@@ -94,8 +95,18 @@ export default { | |||
let proUrl = encodeURIComponent(`https://ai.ssjlai.com/h5-frontendweb/#/${params.routerName}?imei=${params.imei}&appId=${params.appId}`); */ | |||
let redUrl = encodeURIComponent(`${commonUrl}/h5-frontendweb/#/${params.routerName}?imei=${params.imei}&appId=${params.appId}&iccid=${params.iccid}`); | |||
console.log("redUrl", redUrl); | |||
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; | |||
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`; | |||
if(params.imei) { | |||
this.$router.push({ | |||
name: 'packageList', | |||
query: { | |||
imei: params.imei, | |||
iccid: params.iccid, | |||
} | |||
}) | |||
} else { | |||
window.location.href = url; | |||
} | |||
}, | |||
// 获取url传过来的参数 | |||
getParams() { | |||
@@ -1,7 +1,7 @@ | |||
<!-- | |||
* @Date: 2022-03-29 16:57:58 | |||
* @LastEditors: JinxChen | |||
* @LastEditTime: 2023-02-25 17:17:01 | |||
* @LastEditTime: 2023-02-25 18:14:46 | |||
* @FilePath: \TelpoH5FrontendWeb\src\views\package-list\index.vue | |||
* @description: TODO 小台风充值h5 | |||
--> | |||
@@ -246,10 +246,18 @@ export default { | |||
let payType = data.packagePayType; | |||
this.price = data.packagePrice; | |||
// 需要区分是要用微信支付还是支付宝花呗支付 | |||
if (payType === "支付宝花呗") { | |||
if (payType === 2) { | |||
this.aliPay(data); | |||
} else { | |||
this.wxPay(data); | |||
let openId = this.$store.getters.openId; | |||
if(openId === null || openId === 'null') { | |||
this.$dialog.confirm({ | |||
message: '微信支付在调整中,请选择其它支付方式' | |||
}) | |||
} else { | |||
this.wxPay(data); | |||
console.log("openid为空"); | |||
} | |||
} | |||
}, | |||
// 微信支付 | |||
@@ -257,6 +265,7 @@ export default { | |||
this.$toast.loading({ | |||
message: "加载中" | |||
}); | |||
console.log("微信支付", data); | |||
let orderData = data; | |||
let reqBody = { | |||
openId: this.$store.getters.openId, //openId | |||
@@ -348,7 +357,7 @@ export default { | |||
let orderData = data; | |||
let reqBody = { | |||
openId: this.$store.getters.openId, //openId | |||
imei: this.serialNo, //imei | |||
imei: this.params.imei, //imei | |||
productId: data.pechargeUrl, //套餐id | |||
packageName: data.productModel + ',' + data.packageName, //套餐名字 | |||
packagePayType: data.packagePayType, //支付类型 | |||
@@ -366,7 +375,7 @@ export default { | |||
} | |||
let that = this; | |||
let alipayData = res.data.data.xmlStrMap; | |||
this.outTradeNo = alipayData.outTradeNo; | |||
that.outTradeNo = alipayData.outTradeNo; | |||
let alipayForm = decodeURI(alipayData.payXmlStr); | |||
that.$store.commit("isFromWx", true); | |||
let alipayUserId = process.env.NODE_ENV === "production" ? 42 : 18 | |||