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