618活动修改

This commit is contained in:
liuyuan
2025-06-12 17:08:34 +08:00
parent 29b2a8b206
commit e0556ef0fd
11 changed files with 219 additions and 197 deletions

View File

@@ -7,7 +7,7 @@
<view>
<view class="cha_jine">
<view class="cj_title PM_font">充值金额
<view class="cf_title PM_font">充值金额
</view>
@@ -17,33 +17,25 @@
? 'Tab_cj cj_price'
: 'cj_price'
">
<view
class="pr_jg"
style="display: flex; align-items: center; justify-content: center"
>
<image
src="@/static/icon/currency.png"
alt=""
style="width: 40rpx; height: 40rpx; margin-right: 10rpx"
/>
{{ item.money }}
</view>
<view class="pr_yl" style="color: #565455"
>{{ item.realMoney }}</view
>
<view class="pr_lj" v-if="item.description&&item.description!=''"
> {{item.description}}</view
>
<view
class="pr_jg"
style="display: flex; align-items: center; justify-content: center; font-size:44rpx;"
>
{{ item.realMoney }}
</view>
<view class="pr_yl" :style="item.givejf&&item.givejf>0?' paddingTop: 0':''">{{ item.money }}天医币<text v-if="item.givejf&&item.givejf>0">{{ item.givejf }}积分</text></view>
<view class="pr_lj" v-if="item.description&&item.description!=''">{{item.description}}</view>
</view>
<br clear="both" />
</view>
<view
><text style="font-size: 24rpx; color: #8e8e8e; font-weight: 500"
>说明 : 天医币属于虚拟产品一经购买概不退还</text
></view
>
<view class="limitBlock" v-if="isAndroid">
<text>其他金额</text>
<input type="text" v-model="limitVal" placeholder="请输入充值金额" placeholder-class="limit-placeholder" @input="input()" />
</view>
<view>
<text style="font-size: 24rpx; color: #8e8e8e;">说明 : 天医币属于虚拟产品一经购买概不退还</text>
</view>
<view class="active_block" v-if="isAndroid&&activityContent.remark" v-html="activityContent.remark"></view>
</view>
<view class="cha_fangsh">
<view class="cf_title PM_font">支付方式</view>
@@ -85,8 +77,6 @@
</view>
<view class="char_btn">
<view @click="goToPay">立即充值</view>
<!-- <view @click="iosPay" >立即充值</view> -->
</view>
</view>
<!-- 充值协议 -->
@@ -174,6 +164,8 @@
urlList: {
list: "common/bookBuyConfig/getBookBuyConfigList",
},
limitVal: '',
activityContent: {}
};
},
//第一次加载
@@ -187,6 +179,8 @@
} else {
this.payType = 1;
}
this.getActivity();
},
//页面显示
onShow() {
@@ -528,7 +522,7 @@
// 点击充值金额
chosPric(e) {
this.stepsCj = e;
console.log(e);
this.limitVal = '';
},
// 选择支付方式1
@@ -544,12 +538,59 @@
// 3.请求并创建新的订单
this.iphonepay();
},
//获取活动文案
getActivity(){
$http.request({
url: "common/bookBuyConfig/getRechargeActivity",
method: "POST",
data: {},
header: {
"Content-Type": "application/json",
},
})
.then((data) => {
if(data.code==0){
if(data.res&&data.res.length>0){
this.activityContent = data.res[0];
}
}
})
},
//输入金额
input(val){
this.stepsCj = {};
},
// 充值
goToPay() {
this.kaiChar();
},
// 正常充值
kaiChar() {
if(!this.stepsCj.priceTypeId&&!this.limitVal){
uni.showToast({
title: "请选择充值商品",
icon: "none",
});
return false;
}
const regex = /^[1-9]\d*$/;
//如果输入其他金额
if(this.limitVal){
if(!regex.test(this.limitVal)){
uni.showToast({
title: "充值金额必须为正整数",
icon: "none",
});
return false;
}
//设置充值金额和id
this.stepsCj = {
money: this.limitVal,
priceTypeId: 0
}
}
// 常规充值
if (this.radioValue == "1") {
uni.showLoading({
@@ -792,7 +833,7 @@
}
.cha_jine {
margin: 40rpx 30rpx 0 30rpx;
margin: 40rpx 30rpx 20rpx 30rpx;
.cj_title {
font-size: 36rpx;
@@ -803,57 +844,65 @@
margin-top: 40rpx;
.cj_price {
border: 4rpx solid #ebebeb;
// box-shadow: 0 0 20rpx 0 #0000001a;
box-shadow: 0 0 20rpx 0 #0000001a;
float: left;
width: 31%;
margin: 0 3% 30rpx 0;
text-align: center;
padding: 25rpx 0 30rpx 0;
width: 47%;
margin: 0 5% 30rpx 0;
text-align: center;
padding: 30rpx 0 0;
border-radius: 15rpx;
position: relative;
color: #2d2d2d;
height: 160rpx;
.pr_jg {
font-size: 38rpx;
margin: 0rpx 0 10rpx 0;
font-weight: bold;
}
.pr_yl {
font-size: 28rpx;
// text-decoration: line-through;
padding-top: 10rpx;
font-size: 26rpx;
color: #575555;
text{
width: 100%;
text-align: center;
line-height: 40rpx;
position: absolute;
left: 0;
bottom: 10rpx;
color: red;
display: block;
font-size: 24rpx;
}
}
.pr_lj {
background-image: linear-gradient(90deg, #258feb 0%, $themeColor 100%);
background-image: linear-gradient(180deg, #258feb 0%, #abcbfb 100%);
color: #fff;
position: absolute;
top: -22rpx;
right: -22rpx;
font-size: 24rpx;
padding: 5rpx 4rpx;
border-top-left-radius: 20rpx;
border-bottom-right-radius: 20rpx;
right: -22rpx;
font-size: 24rpx;
line-height: 20px;
padding: 5rpx 10rpx;
border-top-left-radius: 20rpx;
border-bottom-right-radius: 20rpx;
}
}
.cj_price:nth-child(3n) {
.cj_price:nth-child(2n) {
margin-right: 0;
}
.Tab_cj {
// box-shadow: 0 0 20rpx 0 #fe700bcc;
box-shadow: 0px 0px 3px 0px $themeColor !important;
border: 4rpx solid $themeColor;
color: #258feb;
background: #e3f7ff !important;
box-shadow: 0px 0px 5px 0px $themeColor !important;
color: $themeColor;
.pr_yl {
color: #258feb !important;
}
.pr_yl{
color: $themeColor;
}
}
}
}
@@ -861,15 +910,15 @@
.highlight {
color: $uni-color-primary;
}
.cf_title {
font-size: 46rpx;
color: $themeColor;
}
.cha_fangsh {
padding: 40rpx 30rpx;
.cf_title {
font-size: 46rpx;
color: $themeColor;
}
.cf_radio {
margin-top: 20rpx;
@@ -904,10 +953,12 @@
}
.char_btn {
width: 100%;
background: #fff;
padding: 20rpx 0;
position: fixed;
left: 0;
right: 0;
bottom: 30rpx;
bottom: 0;
view {
background-image: linear-gradient(90deg, #258feb 0%, $themeColor 100%);
@@ -915,9 +966,8 @@
width: 90%;
margin: 0 auto;
text-align: center;
font-size: 35rpx;
font-weight: bold;
padding: 25rpx 0;
font-size: 30rpx;
padding: 20rpx 0;
border-radius: 50rpx;
}
}
@@ -936,4 +986,62 @@
.commonPageBox {
background-color: #fff !important;
}
.limitBlock{
display: flex;
align-items: center;
margin-bottom: 10rpx;
text{
font-size: 28rpx;
}
input{
display: inline-block;
margin-left: 20rpx;
width: 300rpx;
height: 70rpx;
border: 1rpx solid #ededed;
border-radius: 10rpx;
line-height: 40rpx;
padding: 20rpx;
font-size: 28rpx;
color: #666;
}
}
.limit-placeholder{
font-size: 25rpx;
color: #8b8c90 !important;
}
.active_block{
width: 100%;
background-color: rgba(37, 143, 235, 0.2);
border-radius: 10rpx;
padding: 10rpx 20rpx;
font-size: 28rpx;
line-height: 42rpx;
margin-top: 15rpx;
color: #333;
}
/deep/.active_block span{
color: red;
font-size: 32rpx;
font-weight: bold;
padding: 0 5rpx;
}
/deep/.active_block span:first-child{
padding: 0 5rpx 0 0;
}
/deep/.active_block p{
padding-top: 10rpx;
color: #666;
font-size: 24rpx;
line-height: 34rpx;
}
/deep/.active_block p span{
padding: 0 5rpx !important;
}
</style>