|
@@ -1,7 +1,7 @@ |
|
|
<!-- |
|
|
<!-- |
|
|
* @Date: 2022-03-29 16:57:58 |
|
|
* @Date: 2022-03-29 16:57:58 |
|
|
* @LastEditors: JinxChen |
|
|
* @LastEditors: JinxChen |
|
|
* @LastEditTime: 2023-03-13 16:41:09 |
|
|
|
|
|
|
|
|
* @LastEditTime: 2023-03-13 18:12:26 |
|
|
* @FilePath: \TelpoH5FrontendWeb\src\views\package-list\index.vue |
|
|
* @FilePath: \TelpoH5FrontendWeb\src\views\package-list\index.vue |
|
|
* @description: TODO 小台风充值h5 |
|
|
* @description: TODO 小台风充值h5 |
|
|
--> |
|
|
--> |
|
@@ -279,30 +279,33 @@ export default { |
|
|
this.price = data.packagesPrice; |
|
|
this.price = data.packagesPrice; |
|
|
// 遍历数据找到属于三种支付方式对应的套餐id, 1 微信 2 支付宝全额 3 支付宝分期 |
|
|
// 遍历数据找到属于三种支付方式对应的套餐id, 1 微信 2 支付宝全额 3 支付宝分期 |
|
|
let payTypeToPackAgeId = data.payTypeList; |
|
|
let payTypeToPackAgeId = data.payTypeList; |
|
|
console.log("购买的套餐数据data", data); |
|
|
|
|
|
|
|
|
console.log("购买的套餐数据data", payTypeToPackAgeId); |
|
|
// 需要区分是要用微信支付还是支付宝花呗支付 |
|
|
// 需要区分是要用微信支付还是支付宝花呗支付 |
|
|
if (this.payType === '2') { |
|
|
if (this.payType === '2') { |
|
|
// 全额 |
|
|
// 全额 |
|
|
this.payProductId = payTypeToPackAgeId.filter(item => { |
|
|
this.payProductId = payTypeToPackAgeId.filter(item => { |
|
|
return item.payType === '2'; |
|
|
|
|
|
|
|
|
return item.payType === '2' |
|
|
})[0].productId; |
|
|
})[0].productId; |
|
|
this.packageIssue = 0; |
|
|
this.packageIssue = 0; |
|
|
|
|
|
console.log("this.payProductId", this.payProductId); |
|
|
this.aliPay(data); |
|
|
this.aliPay(data); |
|
|
} else if (this.payType === '3') { |
|
|
} else if (this.payType === '3') { |
|
|
// 分期 |
|
|
// 分期 |
|
|
this.payProductId = payTypeToPackAgeId.filter(item => { |
|
|
this.payProductId = payTypeToPackAgeId.filter(item => { |
|
|
return item.payType === '3'; |
|
|
|
|
|
|
|
|
return item.payType === '3' |
|
|
})[0].productId; |
|
|
})[0].productId; |
|
|
this.packageIssue = 12; |
|
|
this.packageIssue = 12; |
|
|
this.payType = '2' |
|
|
|
|
|
|
|
|
this.payType = '2'; |
|
|
|
|
|
console.log("this.payProductId2", this.payProductId); |
|
|
this.aliPay(data); |
|
|
this.aliPay(data); |
|
|
} else { |
|
|
} else { |
|
|
// 微信 |
|
|
// 微信 |
|
|
let openId = this.$store.getters.openId; |
|
|
let openId = this.$store.getters.openId; |
|
|
this.payProductId = payTypeToPackAgeId.filter(item => { |
|
|
this.payProductId = payTypeToPackAgeId.filter(item => { |
|
|
return item.payType === '1'; |
|
|
|
|
|
|
|
|
return item.payType === '1' |
|
|
})[0].productId; |
|
|
})[0].productId; |
|
|
this.packageIssue = 0; |
|
|
this.packageIssue = 0; |
|
|
|
|
|
console.log("this.payProductId3", this.payProductId); |
|
|
if(openId === null || openId === 'null') { |
|
|
if(openId === null || openId === 'null') { |
|
|
this.$dialog.confirm({ |
|
|
this.$dialog.confirm({ |
|
|
message: '获取OpenId失败,请您重新进入', |
|
|
message: '获取OpenId失败,请您重新进入', |
|
@@ -324,7 +327,7 @@ export default { |
|
|
openId: this.$store.getters.openId, //openId |
|
|
openId: this.$store.getters.openId, //openId |
|
|
imei: this.params.imei, //imei |
|
|
imei: this.params.imei, //imei |
|
|
productId: this.payProductId, //套餐id |
|
|
productId: this.payProductId, //套餐id |
|
|
packageName: /* data.productModel */ data.packageName, //套餐名字 |
|
|
|
|
|
|
|
|
packageName: /* data.productModel */ data.packagesName, //套餐名字 |
|
|
packagePayType: Number(this.payType), //支付类型 |
|
|
packagePayType: Number(this.payType), //支付类型 |
|
|
packageIssue: 0, //分期 |
|
|
packageIssue: 0, //分期 |
|
|
packagePrice: process.env.NODE_ENV === "production" ? data.packagesPrice * 100 : 1 //总金额单位为分,测试环境写死 |
|
|
packagePrice: process.env.NODE_ENV === "production" ? data.packagesPrice * 100 : 1 //总金额单位为分,测试环境写死 |
|
@@ -419,7 +422,7 @@ export default { |
|
|
openId: this.$store.getters.openId, //openId |
|
|
openId: this.$store.getters.openId, //openId |
|
|
imei: this.params.imei, //imei |
|
|
imei: this.params.imei, //imei |
|
|
productId: this.payProductId, //套餐id |
|
|
productId: this.payProductId, //套餐id |
|
|
packageName: /* data.productModel + ',' + */data.packageName, //套餐名字 |
|
|
|
|
|
|
|
|
packageName: /* data.productModel + ',' + */data.packagesName, //套餐名字 |
|
|
packagePayType: Number(this.payType), //支付类型 |
|
|
packagePayType: Number(this.payType), //支付类型 |
|
|
packageIssue: this.packageIssue, //分期 |
|
|
packageIssue: this.packageIssue, //分期 |
|
|
packagePrice: process.env.NODE_ENV === "production" ? data.packagesPrice * 100 : 1 //总金额单位为分,测试环境写死 |
|
|
packagePrice: process.env.NODE_ENV === "production" ? data.packagesPrice * 100 : 1 //总金额单位为分,测试环境写死 |
|
|