|
@@ -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-27 18:25:19 |
|
|
|
|
|
|
|
|
* @LastEditTime: 2023-02-28 14:58:08 |
|
|
* @FilePath: \TelpoH5FrontendWeb\src\views\package-list\index.vue |
|
|
* @FilePath: \TelpoH5FrontendWeb\src\views\package-list\index.vue |
|
|
* @description: TODO 小台风充值h5 |
|
|
* @description: TODO 小台风充值h5 |
|
|
--> |
|
|
--> |
|
@@ -125,7 +125,7 @@ |
|
|
</template> |
|
|
</template> |
|
|
</van-radio> |
|
|
</van-radio> |
|
|
</van-radio-group> --> |
|
|
</van-radio-group> --> |
|
|
<van-radio-group v-model="radio" @change="onRaidoChange"> |
|
|
|
|
|
|
|
|
<!-- <van-radio-group v-model="radio" @change="onRaidoChange"> |
|
|
<van-cell-group border > |
|
|
<van-cell-group border > |
|
|
<van-cell clickable @click="radio = '1'" center> |
|
|
<van-cell clickable @click="radio = '1'" center> |
|
|
<template #default> |
|
|
<template #default> |
|
@@ -161,8 +161,9 @@ |
|
|
</template> |
|
|
</template> |
|
|
</van-cell> |
|
|
</van-cell> |
|
|
</van-cell-group> |
|
|
</van-cell-group> |
|
|
</van-radio-group> |
|
|
|
|
|
|
|
|
</van-radio-group> --> |
|
|
</div> |
|
|
</div> |
|
|
|
|
|
|
|
|
</div> |
|
|
</div> |
|
|
</div> |
|
|
</div> |
|
|
</template> |
|
|
</template> |
|
@@ -174,6 +175,7 @@ let wx = require("weixin-js-sdk"); // TODO 再封装,可拦截错误提示等 |
|
|
import APICore from "@/api/core"; |
|
|
import APICore from "@/api/core"; |
|
|
import axios from "axios"; |
|
|
import axios from "axios"; |
|
|
import { isNotNull } from "@/utils/index"; |
|
|
import { isNotNull } from "@/utils/index"; |
|
|
|
|
|
import AppId from "@/config/appId"; |
|
|
export default { |
|
|
export default { |
|
|
name: "packageList", |
|
|
name: "packageList", |
|
|
data() { |
|
|
data() { |
|
@@ -328,7 +330,7 @@ export default { |
|
|
APIWx.createJSSDK({ |
|
|
APIWx.createJSSDK({ |
|
|
sUrl: window.location.href.split("#")[0], |
|
|
sUrl: window.location.href.split("#")[0], |
|
|
userId: '', |
|
|
userId: '', |
|
|
appId: this.params.appId |
|
|
|
|
|
|
|
|
appId: this.params.appId || AppId |
|
|
}) |
|
|
}) |
|
|
.then(res => { |
|
|
.then(res => { |
|
|
let item = res.data.data; |
|
|
let item = res.data.data; |
|
@@ -359,7 +361,7 @@ export default { |
|
|
// 需要区分是要用微信支付还是支付宝花呗支付 |
|
|
// 需要区分是要用微信支付还是支付宝花呗支付 |
|
|
if (this.payType === '2') { |
|
|
if (this.payType === '2') { |
|
|
this.payProductId = process.env.NODE_ENV === "production" ? '1629407413618294784' : '1629405716684029952', //支付宝全额支付 |
|
|
this.payProductId = process.env.NODE_ENV === "production" ? '1629407413618294784' : '1629405716684029952', //支付宝全额支付 |
|
|
this.packageIssue = 1; |
|
|
|
|
|
|
|
|
this.packageIssue = 0; |
|
|
this.aliPay(data); |
|
|
this.aliPay(data); |
|
|
} else if (this.payType === '3') { |
|
|
} else if (this.payType === '3') { |
|
|
this.payProductId = process.env.NODE_ENV === "production" ? '1629407705558630400': '1629405558344859648', //支付宝花呗支付 |
|
|
this.payProductId = process.env.NODE_ENV === "production" ? '1629407705558630400': '1629405558344859648', //支付宝花呗支付 |
|
@@ -370,17 +372,17 @@ export default { |
|
|
let openId = this.$store.getters.openId; |
|
|
let openId = this.$store.getters.openId; |
|
|
if(openId === null || openId === 'null') { |
|
|
if(openId === null || openId === 'null') { |
|
|
this.$dialog.confirm({ |
|
|
this.$dialog.confirm({ |
|
|
message: '微信支付在调整中,请选择其它支付方式', |
|
|
|
|
|
|
|
|
message: '获取OpenId失败,请您重新进入', |
|
|
showCancelButton: false, |
|
|
showCancelButton: false, |
|
|
}) |
|
|
}) |
|
|
} else { |
|
|
} else { |
|
|
this.packageIssue = 1; |
|
|
|
|
|
|
|
|
/* this.packageIssue = 1; |
|
|
this.$dialog.confirm({ |
|
|
this.$dialog.confirm({ |
|
|
message: '微信支付在调整中,请选择其它支付方式', |
|
|
message: '微信支付在调整中,请选择其它支付方式', |
|
|
showCancelButton: false, |
|
|
showCancelButton: false, |
|
|
}) |
|
|
|
|
|
|
|
|
}) */ |
|
|
// todo 暂时取消开放微信支付 |
|
|
// todo 暂时取消开放微信支付 |
|
|
//this.wxPay(data); |
|
|
|
|
|
|
|
|
this.wxPay(data); |
|
|
console.log("openid为空"); |
|
|
console.log("openid为空"); |
|
|
} |
|
|
} |
|
|
} |
|
|
} |
|
@@ -526,6 +528,10 @@ export default { |
|
|
}) |
|
|
}) |
|
|
.catch(error => { |
|
|
.catch(error => { |
|
|
console.log("error", error); |
|
|
console.log("error", error); |
|
|
|
|
|
this.$dialog.confirm({ |
|
|
|
|
|
message: `${error.message}`, |
|
|
|
|
|
showCancelButton: false |
|
|
|
|
|
}) |
|
|
}) |
|
|
}) |
|
|
.finally(() => { |
|
|
.finally(() => { |
|
|
this.$toast.clear(); |
|
|
this.$toast.clear(); |
|
@@ -561,14 +567,14 @@ export default { |
|
|
height: 100vh; |
|
|
height: 100vh; |
|
|
.topup-container { |
|
|
.topup-container { |
|
|
position: relative; |
|
|
position: relative; |
|
|
margin: 20px; |
|
|
|
|
|
|
|
|
/* margin: 20px; */ |
|
|
display: flex; |
|
|
display: flex; |
|
|
justify-content: space-between; |
|
|
justify-content: space-between; |
|
|
align-items: center; |
|
|
align-items: center; |
|
|
flex-direction: column; |
|
|
flex-direction: column; |
|
|
background-color: white; |
|
|
background-color: white; |
|
|
overflow: scroll; |
|
|
overflow: scroll; |
|
|
/* height: calc(100vh - 4rem); */ |
|
|
|
|
|
|
|
|
height: calc(100vh - 88px); |
|
|
.main { |
|
|
.main { |
|
|
display: flex; |
|
|
display: flex; |
|
|
justify-content: center; |
|
|
justify-content: center; |
|
@@ -609,10 +615,8 @@ export default { |
|
|
} |
|
|
} |
|
|
.package-order-container { |
|
|
.package-order-container { |
|
|
position: relative; |
|
|
position: relative; |
|
|
/* height: 140px; */ |
|
|
|
|
|
width: 300px; |
|
|
|
|
|
margin: 10px 0; |
|
|
margin: 10px 0; |
|
|
padding: 0 10px; |
|
|
|
|
|
|
|
|
padding: 0 20px; |
|
|
z-index: 999; |
|
|
z-index: 999; |
|
|
box-shadow: rgba(14, 30, 37, 0.12) 0 3px 5px 0, |
|
|
box-shadow: rgba(14, 30, 37, 0.12) 0 3px 5px 0, |
|
|
rgba(14, 30, 37, 0.32) 0 2px 16px 0; |
|
|
rgba(14, 30, 37, 0.32) 0 2px 16px 0; |
|
@@ -683,19 +687,20 @@ export default { |
|
|
.price { |
|
|
.price { |
|
|
font-size: 16px; |
|
|
font-size: 16px; |
|
|
} |
|
|
} |
|
|
.buy-btn { |
|
|
|
|
|
|
|
|
/* .buy-btn { |
|
|
height: 30px; |
|
|
height: 30px; |
|
|
width: 90px; |
|
|
|
|
|
|
|
|
width: 100px; |
|
|
display: flex; |
|
|
display: flex; |
|
|
justify-content: center; |
|
|
justify-content: center; |
|
|
align-items: center; |
|
|
align-items: center; |
|
|
background: orange; |
|
|
background: orange; |
|
|
border-radius: 20px; |
|
|
|
|
|
|
|
|
border-radius: 45px; |
|
|
p { |
|
|
p { |
|
|
|
|
|
font-size: 16px; |
|
|
padding: 0; |
|
|
padding: 0; |
|
|
color: white; |
|
|
|
|
|
|
|
|
color: red; |
|
|
} |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
} */ |
|
|
} |
|
|
} |
|
|
.remark { |
|
|
.remark { |
|
|
display: flex; |
|
|
display: flex; |
|
@@ -715,8 +720,9 @@ export default { |
|
|
justify-content: center; |
|
|
justify-content: center; |
|
|
align-items: center; |
|
|
align-items: center; |
|
|
background: orange; |
|
|
background: orange; |
|
|
border-radius: 30px; |
|
|
|
|
|
|
|
|
border-radius: 20px; |
|
|
p { |
|
|
p { |
|
|
|
|
|
font-size: 16px; |
|
|
padding: 0; |
|
|
padding: 0; |
|
|
color: white; |
|
|
color: white; |
|
|
} |
|
|
} |
|
@@ -775,7 +781,7 @@ export default { |
|
|
justify-content: flex-start; |
|
|
justify-content: flex-start; |
|
|
align-items: flex-start; |
|
|
align-items: flex-start; |
|
|
flex-direction: column; |
|
|
flex-direction: column; |
|
|
padding: 5px 0 10px 25px; |
|
|
|
|
|
|
|
|
padding: 5px 0 10px 10px; |
|
|
h5 { |
|
|
h5 { |
|
|
font-size: 14px; |
|
|
font-size: 14px; |
|
|
padding: 10px 0 0 0; |
|
|
padding: 10px 0 0 0; |
|
|