20240517
This commit is contained in:
@@ -2,92 +2,102 @@
|
||||
<view class="container commonPageBox">
|
||||
<!-- 公共组件-每个页面必须引入 -->
|
||||
<public-module></public-module>
|
||||
<z-nav-bar title="充值" bgColor="#3AB3AE" fontColor="#fff"></z-nav-bar>
|
||||
<view class="cha_jine">
|
||||
<view class="cj_title PM_font">充值金额</view>
|
||||
<view class="cj_xiang">
|
||||
<z-nav-bar
|
||||
title="充值"
|
||||
bgColor="#3AB3AE"
|
||||
fontColor="#fff"
|
||||
:homeState="options.source == 'order' ? 1000 : 2000"
|
||||
:backState="options.source == 'order' ? 2000 : 1000"
|
||||
@homeClick="goHome"
|
||||
></z-nav-bar>
|
||||
|
||||
<view>
|
||||
<view class="cha_jine">
|
||||
<view class="cj_title PM_font">充值金额</view>
|
||||
<view class="cj_xiang">
|
||||
<view
|
||||
v-for="(item, index) in cjList"
|
||||
@click="chosPric(item)"
|
||||
:class="
|
||||
stepsCj.priceTypeId == item.priceTypeId
|
||||
? 'Tab_cj cj_price'
|
||||
: 'cj_price'
|
||||
"
|
||||
>
|
||||
<view class="pr_jg">¥{{ item.realMoney }}</view>
|
||||
<view class="pr_yl">{{ item.money }} 天医币</view>
|
||||
<view class="pr_lj">限时特惠</view>
|
||||
</view>
|
||||
<br clear="both" />
|
||||
</view>
|
||||
</view>
|
||||
<view class="cha_fangsh">
|
||||
<view class="cf_title PM_font">支付方式</view>
|
||||
|
||||
<view class="cf_radio">
|
||||
<u-radio-group v-model="payType">
|
||||
<view style="width: 100%" v-if="isAndroid">
|
||||
<view
|
||||
v-for="(item, index) in paylist"
|
||||
@click="choseType(item.id)"
|
||||
:class="payType == item.id ? 'Tab_xf cf_xuanx' : 'cf_xuanx'"
|
||||
>
|
||||
<image class="pay_item_img" :src="item.imgUrl" mode="aspectFil">
|
||||
</image>
|
||||
{{ item.title }}
|
||||
<u-radio
|
||||
:key="index"
|
||||
activeColor="#3AB3AE"
|
||||
:name="item.id"
|
||||
style="float: right; margin-top: 5rpx"
|
||||
></u-radio>
|
||||
</view>
|
||||
</view>
|
||||
|
||||
<view style="width: 100%" v-else>
|
||||
<view
|
||||
v-for="(item, index) in iosPaylist"
|
||||
@click="choseType(item.id)"
|
||||
:class="payType == item.id ? 'Tab_xf cf_xuanx' : 'cf_xuanx'"
|
||||
>
|
||||
<image class="pay_item_img" :src="item.imgUrl" mode="aspectFil">
|
||||
</image>
|
||||
{{ item.title }}
|
||||
<u-radio
|
||||
:key="index"
|
||||
activeColor="#3AB3AE"
|
||||
:name="item.id"
|
||||
style="float: right; margin-top: 5rpx"
|
||||
></u-radio>
|
||||
</view>
|
||||
</view>
|
||||
</u-radio-group>
|
||||
</view>
|
||||
</view>
|
||||
<view class="agree_wo flexbox" style="float: left; display: flex">
|
||||
<radio-group class="agree">
|
||||
<view v-for="(item, index) in argee" :key="index">
|
||||
<radio
|
||||
class="agreeRadio"
|
||||
:value="item.id"
|
||||
:checked="item.id == radioValue"
|
||||
color="#3AB3AE"
|
||||
@click="radioCheck(index)"
|
||||
></radio>
|
||||
</view>
|
||||
</radio-group>
|
||||
<view
|
||||
v-for="(item, index) in cjList"
|
||||
@click="chosPric(item)"
|
||||
:class="
|
||||
stepsCj.priceTypeId == item.priceTypeId
|
||||
? 'Tab_cj cj_price'
|
||||
: 'cj_price'
|
||||
"
|
||||
>* 我已阅读并同意<span class="highlight" @click="showXieyi"
|
||||
>《增值服务协议》</span
|
||||
></view
|
||||
>
|
||||
<view class="pr_jg">¥{{ item.realMoney }}</view>
|
||||
<view class="pr_yl">{{ item.money }} 天医币</view>
|
||||
<view class="pr_lj">限时特惠</view>
|
||||
</view>
|
||||
<br clear="both" />
|
||||
</view>
|
||||
</view>
|
||||
<view class="cha_fangsh">
|
||||
<view class="cf_title PM_font">支付方式</view>
|
||||
<view class="char_btn">
|
||||
<view @click="goToPay">立即充值</view>
|
||||
|
||||
<view class="cf_radio">
|
||||
<u-radio-group v-model="payType">
|
||||
<view style="width: 100%" v-if="isAndroid">
|
||||
<view
|
||||
v-for="(item, index) in paylist"
|
||||
@click="choseType(item.id)"
|
||||
:class="payType == item.id ? 'Tab_xf cf_xuanx' : 'cf_xuanx'"
|
||||
>
|
||||
<image class="pay_item_img" :src="item.imgUrl" mode="aspectFil">
|
||||
</image>
|
||||
{{ item.title }}
|
||||
<u-radio
|
||||
:key="index"
|
||||
activeColor="#3AB3AE"
|
||||
:name="item.id"
|
||||
style="float: right; margin-top: 5rpx"
|
||||
></u-radio>
|
||||
</view>
|
||||
</view>
|
||||
|
||||
<view style="width: 100%" v-else>
|
||||
<view
|
||||
v-for="(item, index) in iosPaylist"
|
||||
@click="choseType(item.id)"
|
||||
:class="payType == item.id ? 'Tab_xf cf_xuanx' : 'cf_xuanx'"
|
||||
>
|
||||
<image class="pay_item_img" :src="item.imgUrl" mode="aspectFil">
|
||||
</image>
|
||||
{{ item.title }}
|
||||
<u-radio
|
||||
:key="index"
|
||||
activeColor="#3AB3AE"
|
||||
:name="item.id"
|
||||
style="float: right; margin-top: 5rpx"
|
||||
></u-radio>
|
||||
</view>
|
||||
</view>
|
||||
</u-radio-group>
|
||||
<!-- <view @click="iosPay" >立即充值</view> -->
|
||||
</view>
|
||||
</view>
|
||||
<view class="agree_wo flexbox" style="float: left; display: flex">
|
||||
<radio-group class="agree">
|
||||
<view v-for="(item, index) in argee" :key="index">
|
||||
<radio
|
||||
class="agreeRadio"
|
||||
:value="item.id"
|
||||
:checked="item.id == radioValue"
|
||||
color="#3AB3AE"
|
||||
@click="radioCheck(index)"
|
||||
></radio>
|
||||
</view>
|
||||
</radio-group>
|
||||
<view
|
||||
>* 我已阅读并同意<span class="highlight" @click="showXieyi"
|
||||
>《增值服务协议》</span
|
||||
></view
|
||||
>
|
||||
</view>
|
||||
<view class="char_btn">
|
||||
<view @click="goToPay">立即充值</view>
|
||||
|
||||
<!-- <view @click="iosPay" >立即充值</view> -->
|
||||
</view>
|
||||
<!-- 充值协议 -->
|
||||
<u-popup :show="xieyiShow" :round="10" @close="xieyiShow = false">
|
||||
<view class="tanchu">
|
||||
@@ -118,6 +128,7 @@ export default {
|
||||
data() {
|
||||
return {
|
||||
playData: {},
|
||||
options: {},
|
||||
xieyi: {
|
||||
title: "",
|
||||
content: "",
|
||||
@@ -165,16 +176,16 @@ export default {
|
||||
},
|
||||
|
||||
urlList: {
|
||||
list:'common/bookBuyConfig/getBookBuyConfigList',
|
||||
|
||||
list: "common/bookBuyConfig/getBookBuyConfigList",
|
||||
},
|
||||
};
|
||||
},
|
||||
//第一次加载
|
||||
onLoad(e) {
|
||||
onLoad(options) {
|
||||
this.options = options;
|
||||
// 隐藏原生的tabbar
|
||||
uni.hideTabBar();
|
||||
this.chargeOrderSn = e.orderSn;
|
||||
this.chargeOrderSn = options.orderSn;
|
||||
// console.log(e.orderSn,'orderSn')
|
||||
},
|
||||
//页面显示
|
||||
@@ -211,11 +222,29 @@ export default {
|
||||
}
|
||||
);
|
||||
},
|
||||
showXieyi() {
|
||||
this.$http.get(`sys/agreement/list?key=pay`).then((res) => {
|
||||
this.xieyi = res.page.list[0];
|
||||
this.xieyiShow = true;
|
||||
});
|
||||
async showXieyi() {
|
||||
|
||||
// this.$http.get(`sys/agreement/list?key=pay`).then((res) => {
|
||||
// this.xieyi = res.page.list[0];
|
||||
// this.xieyiShow = true;
|
||||
// });
|
||||
|
||||
|
||||
var data = await this.$commonJS.getAgreement(104);
|
||||
if (data.content) {
|
||||
data.content = data.content.replace(
|
||||
/<h5>/g,
|
||||
'<view style="font-weight: bold;font-size: 32rpx;margin-top: 20rpx;margin-bottom: 20rpx;">'
|
||||
);
|
||||
data.content = data.content.replace(
|
||||
/<\/h5>/g,
|
||||
"</view>"
|
||||
);
|
||||
}
|
||||
|
||||
this.xieyi=data
|
||||
this.xieyiShow = true;
|
||||
|
||||
},
|
||||
radioCheck(index) {
|
||||
// 勾选用户协议
|
||||
@@ -385,23 +414,21 @@ export default {
|
||||
},
|
||||
// 安卓充值列表
|
||||
getAndorList() {
|
||||
var data={
|
||||
var data = {
|
||||
type: "point",
|
||||
qudao: "Android",
|
||||
}
|
||||
qudao: "Android",
|
||||
};
|
||||
|
||||
|
||||
$http
|
||||
.request({
|
||||
url: this.urlList.list,
|
||||
method: "POST", // POST、GET、PUT、DELETE,具体说明查看官方文档
|
||||
data,
|
||||
header: {
|
||||
//默认 无 说明:请求头1
|
||||
"Content-Type": "application/json",
|
||||
},
|
||||
})
|
||||
|
||||
$http
|
||||
.request({
|
||||
url: this.urlList.list,
|
||||
method: "POST", // POST、GET、PUT、DELETE,具体说明查看官方文档
|
||||
data,
|
||||
header: {
|
||||
//默认 无 说明:请求头1
|
||||
"Content-Type": "application/json",
|
||||
},
|
||||
})
|
||||
|
||||
.then((res) => {
|
||||
console.log("res at line 389:", res);
|
||||
@@ -413,15 +440,20 @@ export default {
|
||||
},
|
||||
// 苹果充值列表
|
||||
getAppleList() {
|
||||
var data={
|
||||
var data = {
|
||||
type: "point",
|
||||
qudao: "IOS",
|
||||
}
|
||||
qudao: "IOS",
|
||||
};
|
||||
|
||||
this.$http
|
||||
.post(this.urlList.list, {
|
||||
type: "point",
|
||||
qudao: "IOS",
|
||||
$http
|
||||
.request({
|
||||
url: this.urlList.list,
|
||||
method: "POST", // POST、GET、PUT、DELETE,具体说明查看官方文档
|
||||
data,
|
||||
header: {
|
||||
//默认 无 说明:请求头1
|
||||
"Content-Type": "application/json",
|
||||
},
|
||||
})
|
||||
.then((res) => {
|
||||
console.log("res at line 403:", res);
|
||||
@@ -466,6 +498,7 @@ export default {
|
||||
realMoney: that.stepsCj.money * 1, //实收金额
|
||||
orderStatus: 0, //订单状态
|
||||
orderType: "point", //订单类型
|
||||
appName: "zmzm",
|
||||
productId: that.stepsCj.priceTypeId, // 充值的类型id
|
||||
};
|
||||
|
||||
@@ -500,14 +533,14 @@ export default {
|
||||
});
|
||||
setTimeout(() => {
|
||||
uni.navigateTo({
|
||||
url: "/pages/mine/wallet/index/index",
|
||||
url: "/pages/mine/wallet/index/index?source=recharge",
|
||||
});
|
||||
}, 2000);
|
||||
} else {
|
||||
uni.showToast({
|
||||
title: "支付失败",
|
||||
icon: "none",
|
||||
image: "@/static/icon/ic_close.png",
|
||||
image: "../../../static/icon/ic_close.png",
|
||||
});
|
||||
}
|
||||
}
|
||||
@@ -532,7 +565,7 @@ export default {
|
||||
});
|
||||
setTimeout(() => {
|
||||
uni.navigateTo({
|
||||
url: "/pages/mine/wallet/index/index",
|
||||
url: "/pages/mine/wallet/index/index?source=recharge",
|
||||
});
|
||||
}, 2000);
|
||||
} else {
|
||||
@@ -541,13 +574,13 @@ export default {
|
||||
uni.showToast({
|
||||
title: "用户取消支付",
|
||||
icon: "none",
|
||||
image: "@/static/icon/ic_close.png",
|
||||
image: "../../../static/icon/ic_close.png",
|
||||
});
|
||||
} else {
|
||||
uni.showToast({
|
||||
title: "支付失败",
|
||||
icon: "none",
|
||||
image: "@/static/icon/ic_close.png",
|
||||
image: "../../../static/icon/ic_close.png",
|
||||
});
|
||||
}
|
||||
}
|
||||
@@ -827,7 +860,7 @@ export default {
|
||||
.agree {
|
||||
width: auto !important;
|
||||
}
|
||||
.commonPageBox{
|
||||
.commonPageBox {
|
||||
background-color: #fff !important;
|
||||
}
|
||||
</style>
|
||||
|
||||
Reference in New Issue
Block a user