充值页面调整
商品折扣显示逻辑调整 增加公众号跳转修改资料逻辑
This commit is contained in:
parent
dccdd43e3a
commit
74dba2ef29
@ -27,6 +27,14 @@ onLaunch((options) => {
|
|||||||
if(params.split('=')[0] === 'storeId') {
|
if(params.split('=')[0] === 'storeId') {
|
||||||
setRegisterStoreId(params.split('=')[1]);
|
setRegisterStoreId(params.split('=')[1]);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if(options?.query.scene === 'edit_avatar_nickname') {
|
||||||
|
setTimeout(()=>{
|
||||||
|
uni.reLaunch({
|
||||||
|
url: '/pages/mine/subs/profile/index'
|
||||||
|
});
|
||||||
|
},500)
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -23,7 +23,7 @@
|
|||||||
<image class='goods-image' :src='item.images||defaultImage' />
|
<image class='goods-image' :src='item.images||defaultImage' />
|
||||||
<text class='goods-name'>{{ item.goodsName || '未知' }}</text>
|
<text class='goods-name'>{{ item.goodsName || '未知' }}</text>
|
||||||
<text class='goods-price'>¥{{ (item.price * ((userInfo.levelEntity?.discount || 100) / 100)).toFixed(2) }}
|
<text class='goods-price'>¥{{ (item.price * ((userInfo.levelEntity?.discount || 100) / 100)).toFixed(2) }}
|
||||||
<text v-if='userInfo.levelEntity?.discount>0'
|
<text v-if='userInfo.levelEntity?.discount>0&&userInfo.levelEntity?.discount<100'
|
||||||
style='text-decoration: line-through;color: #999999;font-size: 25rpx'>¥{{ item.price }}
|
style='text-decoration: line-through;color: #999999;font-size: 25rpx'>¥{{ item.price }}
|
||||||
</text>
|
</text>
|
||||||
</text>
|
</text>
|
||||||
|
@ -16,7 +16,7 @@
|
|||||||
<view class='c-flex-row'>
|
<view class='c-flex-row'>
|
||||||
<text class='goods-price accent-text-color'>
|
<text class='goods-price accent-text-color'>
|
||||||
¥{{ ((goodsBean?.price || 0) * ((userInfo.levelEntity?.discount || 100) / 100)).toFixed(2) }}
|
¥{{ ((goodsBean?.price || 0) * ((userInfo.levelEntity?.discount || 100) / 100)).toFixed(2) }}
|
||||||
<text v-if='userInfo.levelEntity?.discount>0'
|
<text v-if='userInfo.levelEntity?.discount>0&&userInfo.levelEntity?.discount<100'
|
||||||
style='display:unset;text-decoration: line-through;font-size: 30rpx;color: #999999'>
|
style='display:unset;text-decoration: line-through;font-size: 30rpx;color: #999999'>
|
||||||
¥{{ goodsBean?.price || 0 }}
|
¥{{ goodsBean?.price || 0 }}
|
||||||
</text>
|
</text>
|
||||||
@ -57,7 +57,7 @@
|
|||||||
<image :src='item.images||defaultImage' />
|
<image :src='item.images||defaultImage' />
|
||||||
<text>{{ item.goodsName || '未知' }}</text>
|
<text>{{ item.goodsName || '未知' }}</text>
|
||||||
<text class='goods-price'>{{ (item.price * ((userInfo.levelEntity?.discount || 100) / 100)).toFixed(2) }}
|
<text class='goods-price'>{{ (item.price * ((userInfo.levelEntity?.discount || 100) / 100)).toFixed(2) }}
|
||||||
<text v-if='userInfo.levelEntity?.discount>0'
|
<text v-if='userInfo.levelEntity?.discount>0&&userInfo.levelEntity?.discount<100'
|
||||||
style='text-decoration: line-through;font-size: 25rpx;color: #999999'>{{ item.price }}
|
style='text-decoration: line-through;font-size: 25rpx;color: #999999'>{{ item.price }}
|
||||||
</text>
|
</text>
|
||||||
</text>
|
</text>
|
||||||
|
@ -14,7 +14,7 @@
|
|||||||
<image class='goods-image' :src='item.images||defaultImage' />
|
<image class='goods-image' :src='item.images||defaultImage' />
|
||||||
<text class='goods-name'>{{ item.goodsName || '未知' }}</text>
|
<text class='goods-name'>{{ item.goodsName || '未知' }}</text>
|
||||||
<text class='goods-price'>¥{{ (item.price * ((userInfo.levelEntity?.discount || 100)/100)).toFixed(2) }}
|
<text class='goods-price'>¥{{ (item.price * ((userInfo.levelEntity?.discount || 100)/100)).toFixed(2) }}
|
||||||
<text v-if='userInfo.levelEntity?.discount>0'
|
<text v-if='userInfo.levelEntity?.discount>0&&userInfo.levelEntity?.discount<100'
|
||||||
style='text-decoration: line-through;color: #999999;font-size: 25rpx'>¥{{ item.price }}
|
style='text-decoration: line-through;color: #999999;font-size: 25rpx'>¥{{ item.price }}
|
||||||
</text>
|
</text>
|
||||||
</text>
|
</text>
|
||||||
|
@ -26,7 +26,7 @@
|
|||||||
</view>
|
</view>
|
||||||
<text style='margin-top: 50rpx'>
|
<text style='margin-top: 50rpx'>
|
||||||
¥{{ (item?.price * ((userInfo.levelEntity?.discount || 100) / 100)).toFixed(2) }}
|
¥{{ (item?.price * ((userInfo.levelEntity?.discount || 100) / 100)).toFixed(2) }}
|
||||||
<text v-if='userInfo.levelEntity?.discount>0'
|
<text v-if='userInfo.levelEntity?.discount>0&&userInfo.levelEntity?.discount<100'
|
||||||
style='text-decoration: line-through;color: #999999;font-size: 25rpx'>¥{{ item?.price }}
|
style='text-decoration: line-through;color: #999999;font-size: 25rpx'>¥{{ item?.price }}
|
||||||
</text>
|
</text>
|
||||||
</text>
|
</text>
|
||||||
|
@ -13,17 +13,30 @@
|
|||||||
</view>
|
</view>
|
||||||
|
|
||||||
<view class='recharge-option-card'>
|
<view class='recharge-option-card'>
|
||||||
<text>充值金额</text>
|
<view class='top-border'></view>
|
||||||
<tabbar :titles='rechargeItems?.map(res=>res.rechargeamount)' @change='change' />
|
<text class='title'>充值金额</text>
|
||||||
<view class='divider' />
|
<scroll-view scroll-y style='flex: 1;padding-bottom: 180rpx'>
|
||||||
<view class='option-item'>
|
<view class='option-item' :class="{'option-item-active': currentIndex==index}"
|
||||||
<image :src='assetsUrl("bg_member_recharge_item.png")' />
|
v-for='(item,index) in rechargeItems' :key='index' @click.stop='change(index)'>
|
||||||
<text>充值{{ rechargeItems[currentIndex]?.rechargeamount }}送{{ rechargeItems[currentIndex]?.rewardamount }}元
|
<image v-if='currentIndex==index' class='checked-image' src='/static/images/ic_recharge_checked.png' />
|
||||||
</text>
|
<label class='amount-title'>{{ item.rechargeamount }}元</label>
|
||||||
<text class='accent-text-color'>
|
<view class='divider' style='margin-bottom: 36rpx' />
|
||||||
实得{{ rechargeItems[currentIndex]?.rechargeamount + (rechargeItems[currentIndex]?.rewardamount) }}元
|
<view class='card-view'>
|
||||||
</text>
|
<view class='title-container'>
|
||||||
</view>
|
<text>充值{{ item?.rechargeamount || 0 }}送{{ item?.rewardamount || 0
|
||||||
|
}}元
|
||||||
|
</text>
|
||||||
|
<text class='accent-text-color'>
|
||||||
|
实得{{ item?.rechargeamount + (item?.rewardamount) }}元
|
||||||
|
</text>
|
||||||
|
</view>
|
||||||
|
<text class='description'>送{{ item.rewardamount || 0 }}元、送{{ item.rewardcouponamount || 0
|
||||||
|
}}元优惠券共{{ item.rewardcouponnum || 0 }}张、
|
||||||
|
返利{{ item.rewardrefundamount || 0 }}元
|
||||||
|
</text>
|
||||||
|
</view>
|
||||||
|
</view>
|
||||||
|
</scroll-view>
|
||||||
</view>
|
</view>
|
||||||
|
|
||||||
<view class='bottom-button-view'>
|
<view class='bottom-button-view'>
|
||||||
@ -47,7 +60,7 @@
|
|||||||
<script lang='ts' setup>
|
<script lang='ts' setup>
|
||||||
import { assetsUrl } from '@/utils/assets';
|
import { assetsUrl } from '@/utils/assets';
|
||||||
import { useUserStore } from '@/store';
|
import { useUserStore } from '@/store';
|
||||||
import { getRechargeList, preRecharge, recharge, rechargeVerify } from '@/api/user';
|
import { getRechargeList, preRecharge, rechargeVerify } from '@/api/user';
|
||||||
import { parseParameter, sortASCII } from '@/utils';
|
import { parseParameter, sortASCII } from '@/utils';
|
||||||
import { hexMD5 } from '@/utils/common/md5';
|
import { hexMD5 } from '@/utils/common/md5';
|
||||||
import { handlePayResult } from '@/utils/order';
|
import { handlePayResult } from '@/utils/order';
|
||||||
@ -55,12 +68,16 @@ import { handlePayResult } from '@/utils/order';
|
|||||||
const userState = useUserStore();
|
const userState = useUserStore();
|
||||||
const { userInfo, terminalInfo } = storeToRefs(userState);
|
const { userInfo, terminalInfo } = storeToRefs(userState);
|
||||||
|
|
||||||
|
const rechargeOptionBackgroundUrl = assetsUrl('bg_member_recharge_item.png');
|
||||||
|
|
||||||
const rechargeItems = ref<{
|
const rechargeItems = ref<{
|
||||||
itemid: string
|
itemid: string
|
||||||
rechargeamount: number
|
rechargeamount: number
|
||||||
rewardamount: number
|
rewardamount: number
|
||||||
rewardcouponamount: number,
|
rewardcouponamount: number,
|
||||||
rechargetype: number
|
rewardcouponnum: number
|
||||||
|
rechargetype: number,
|
||||||
|
rewardrefundamount: number
|
||||||
}[]>([]);
|
}[]>([]);
|
||||||
const currentIndex = ref<number>(0);
|
const currentIndex = ref<number>(0);
|
||||||
const preRechargeOrderId = ref();
|
const preRechargeOrderId = ref();
|
||||||
@ -68,6 +85,12 @@ const preRechargeOrderId = ref();
|
|||||||
onLoad(async () => {
|
onLoad(async () => {
|
||||||
const { ruleitems } = await getRechargeList();
|
const { ruleitems } = await getRechargeList();
|
||||||
rechargeItems.value = ruleitems;
|
rechargeItems.value = ruleitems;
|
||||||
|
// rechargeItems.value.push(rechargeItems.value[0]);
|
||||||
|
// rechargeItems.value.push(rechargeItems.value[0]);
|
||||||
|
// rechargeItems.value.push(rechargeItems.value[0]);
|
||||||
|
// rechargeItems.value.push(rechargeItems.value[0]);
|
||||||
|
|
||||||
|
console.log(rechargeItems.value);
|
||||||
await change(0);
|
await change(0);
|
||||||
});
|
});
|
||||||
|
|
||||||
@ -158,53 +181,109 @@ const goRecharge = async () => {
|
|||||||
.recharge-option-card {
|
.recharge-option-card {
|
||||||
display: flex;
|
display: flex;
|
||||||
flex-direction: column;
|
flex-direction: column;
|
||||||
background: #FFFFFF;
|
background: #F5F5F5;
|
||||||
border-radius: 30rpx 30rpx 0 0;
|
|
||||||
position: relative;
|
position: relative;
|
||||||
margin-top: -25rpx;
|
//margin-top: -25rpx;
|
||||||
|
|
||||||
text:nth-of-type(1) {
|
.top-border {
|
||||||
|
background: #FFFFFF;
|
||||||
|
height: 30rpx;
|
||||||
|
margin-top: -35rpx;
|
||||||
|
border-radius: 30rpx 30rpx 0 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
.title {
|
||||||
font-size: 30rpx;
|
font-size: 30rpx;
|
||||||
font-weight: bold;
|
font-weight: bold;
|
||||||
color: #333333;
|
color: #333333;
|
||||||
margin-top: 20rpx;
|
background: #FFFFFF;
|
||||||
margin-left: 30rpx;
|
border-radius: 10rpx 10rpx 0 0;
|
||||||
|
padding: 10rpx 20rpx 20rpx 20rpx;
|
||||||
margin-bottom: 20rpx;
|
margin-bottom: 20rpx;
|
||||||
|
margin-top: -15rpx;
|
||||||
}
|
}
|
||||||
|
|
||||||
.option-item {
|
.option-item {
|
||||||
display: flex;
|
display: flex;
|
||||||
flex-direction: column;
|
flex-direction: column;
|
||||||
|
margin: 10rpx 20rpx 20rpx 20rpx;
|
||||||
|
background: #FFFFFF;
|
||||||
|
border-radius: 20rpx;
|
||||||
|
padding-top: 20rpx;
|
||||||
|
box-sizing: border-box;
|
||||||
|
border: solid #00000000 2rpx;
|
||||||
position: relative;
|
position: relative;
|
||||||
margin: 36rpx 20rpx;
|
|
||||||
|
|
||||||
image {
|
.amount-title {
|
||||||
|
font-weight: bold;
|
||||||
|
font-size: 40rpx;
|
||||||
|
width: fit-content;
|
||||||
|
color: #333333;
|
||||||
|
margin-left: 30rpx;
|
||||||
|
}
|
||||||
|
|
||||||
|
.amount-title:after {
|
||||||
|
content: "";
|
||||||
|
display: block;
|
||||||
|
border: 2rpx solid black;
|
||||||
|
}
|
||||||
|
|
||||||
|
.checked-image {
|
||||||
|
width: 70rpx;
|
||||||
|
height: 70rpx;
|
||||||
|
position: absolute;
|
||||||
|
right: 0;
|
||||||
|
top: 0;
|
||||||
|
border-radius: 0 18rpx 0 0
|
||||||
|
}
|
||||||
|
|
||||||
|
.card-view {
|
||||||
|
display: flex;
|
||||||
|
flex-direction: column;
|
||||||
width: 100%;
|
width: 100%;
|
||||||
height: 167rpx;
|
height: 167rpx;
|
||||||
border-radius: 20rpx;
|
border-radius: 20rpx;
|
||||||
}
|
//background-image: url(v-bind(rechargeOptionBackgroundUrl));
|
||||||
|
background-image: url('https://img.lakeapp.cn/wx/images/bg_member_recharge_item.png');
|
||||||
text:nth-of-type(1) {
|
background-size: 100% 100%;
|
||||||
font-size: 36rpx;
|
justify-content: flex-start;
|
||||||
color: #FFFFFF;
|
color: #FFFFFF;
|
||||||
margin-top: 27rpx;
|
|
||||||
margin-left: 30rpx;
|
|
||||||
position: absolute;
|
|
||||||
}
|
|
||||||
|
|
||||||
text:nth-of-type(2) {
|
.title-container {
|
||||||
display: flex;
|
display: flex;
|
||||||
font-size: 30rpx;
|
flex-direction: row;
|
||||||
margin-top: 85rpx;
|
align-items: center;
|
||||||
margin-left: 30rpx;
|
justify-content: space-between;
|
||||||
align-items: center;
|
margin-top: 27rpx;
|
||||||
justify-content: center;
|
padding: 0 30rpx;
|
||||||
width: 185rpx;
|
|
||||||
height: 50rpx;
|
text:nth-of-type(1) {
|
||||||
background: #FFFFFF;
|
display: flex;
|
||||||
border-radius: 25rpx;
|
font-size: 36rpx;
|
||||||
position: absolute;
|
}
|
||||||
|
|
||||||
|
text:nth-of-type(2) {
|
||||||
|
display: flex;
|
||||||
|
font-size: 30rpx;
|
||||||
|
align-items: center;
|
||||||
|
justify-content: center;
|
||||||
|
width: 185rpx;
|
||||||
|
height: 50rpx;
|
||||||
|
background: #FFFFFF;
|
||||||
|
border-radius: 25rpx;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
.description {
|
||||||
|
margin-top: 30rpx;
|
||||||
|
margin-left: 30rpx;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.option-item-active {
|
||||||
|
@extend .option-item;
|
||||||
|
border: 2rpx solid #f95e5d;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
</style>
|
</style>
|
||||||
|
BIN
src/static/images/ic_recharge_checked.png
Normal file
BIN
src/static/images/ic_recharge_checked.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 2.3 KiB |
Loading…
Reference in New Issue
Block a user