优化问题
This commit is contained in:
@@ -40,16 +40,16 @@
|
||||
<view style="background-color: #F6F6F6;height: 2rpx;width: 100%;margin: 16rpx 0;"></view>
|
||||
<view class="jiesuanmoney">
|
||||
<text>
|
||||
优惠<text style="color: #FF4C11;font-weight: 500;">¥{{info.save * Quantity}}</text>
|
||||
优惠<text style="color: #FF4C11;font-weight: 500;">¥{{calculateEvent(info.save)}}</text>
|
||||
</text>
|
||||
<text>
|
||||
小计<text style="color: #FF4C11;font-weight: 500;">¥{{info.salePrice * Quantity}}</text>
|
||||
小计<text style="color: #FF4C11;font-weight: 500;">¥{{calculateEvent(info.salePrice) }}</text>
|
||||
</text>
|
||||
</view>
|
||||
|
||||
</view>
|
||||
<!-- 支付方式 -->
|
||||
<view class="payType">
|
||||
<view class="payType" >
|
||||
<view class="">
|
||||
支付方式
|
||||
</view>
|
||||
@@ -65,9 +65,8 @@
|
||||
</text>
|
||||
</view>
|
||||
</u-radio>
|
||||
<view style="margin: 22rpx 0;width: 100%;height: 2rpx;background-color: #E5E5E5;">
|
||||
</view>
|
||||
<u-radio activeColor="#ffd158" name="2">
|
||||
<view style="margin: 22rpx 0;width: 100%;height: 2rpx;background-color: #E5E5E5;" v-if="info.isUseVip==1"> </view>
|
||||
<u-radio activeColor="#ffd158" name="2" v-if="info.isUseVip==1">
|
||||
<view class="dfs">
|
||||
<image style="width:44rpx;height:44rpx"
|
||||
src="https://czg-qr-order.oss-cn-beijing.aliyuncs.com/drder/wechat.png" mode="">
|
||||
@@ -77,7 +76,7 @@
|
||||
</view>
|
||||
</u-radio>
|
||||
</u-radio-group>
|
||||
<view style="font-weight: 400;font-size: 24rpx;color: #333333;margin-left: 60rpx;">
|
||||
<view style="font-weight: 400;font-size: 24rpx;color: #333333;margin-left: 60rpx;" v-if="info.isUseVip==1">
|
||||
会员卡余额{{ amountVIP.amount}} <text
|
||||
style="font-weight: 500;font-size: 28rpx;margin-left: 16rpx;color: #FF4C11;"
|
||||
@click="goRecharge">去充值</text>
|
||||
@@ -88,11 +87,12 @@
|
||||
<view class="placeBottom">
|
||||
<view class="">
|
||||
<text style="font-size: 24rpx;font-weight: bold;"> 合计 </text><text
|
||||
style="font-size: 32rpx;font-weight: bold;color:#FF4C11"> ¥{{info.salePrice * Quantity}} </text>
|
||||
style="font-size: 32rpx;font-weight: bold;color:#FF4C11"> ¥{{calculateEvent(info.salePrice)}}
|
||||
</text>
|
||||
<text style="font-size: 24rpx;font-weight: 400;color: # 999;">含优惠卷包¥0</text>
|
||||
</view>
|
||||
<view class="">
|
||||
共{{Quantity}}件 已优惠¥{{info.save * Quantity}}
|
||||
共{{Quantity}}件 已优惠¥{{calculateEvent(info.save) }}
|
||||
</view>
|
||||
<button class="btnStyle" @click="sumbitFrom">提交订单</button>
|
||||
</view>
|
||||
@@ -140,11 +140,16 @@
|
||||
async accountPayevent(pwd) {
|
||||
this.ispws = false
|
||||
let res = await this.api.payOrderPay({
|
||||
orderId: this.listinfoid,
|
||||
orderId: this.listinfoid.id,
|
||||
payType: "deposit",
|
||||
pwd
|
||||
})
|
||||
if (res.code == 0) {
|
||||
let orderInfo = {
|
||||
createdAt:this.listinfoid.createTime,
|
||||
orderNo:this.listinfoid.orderNo,
|
||||
orderAmount:this.calculateEvent(this.info.salePrice)
|
||||
}
|
||||
uni.showToast({
|
||||
icon: 'none',
|
||||
title: '支付成功',
|
||||
@@ -152,8 +157,7 @@
|
||||
setTimeout(res => {
|
||||
uni.redirectTo({
|
||||
url: '/pages/order/successful?orderId=' + this
|
||||
.listinfoid + '&orderInfo=' + JSON.stringify(
|
||||
this.orderInfo)
|
||||
.listinfoid.id + '&orderInfo=' + JSON.stringify(orderInfo)
|
||||
});
|
||||
}, 1000)
|
||||
}
|
||||
@@ -165,6 +169,9 @@
|
||||
}, 2000)
|
||||
}
|
||||
},
|
||||
calculateEvent(d) {
|
||||
return (d * 1000 * this.Quantity)/1000
|
||||
},
|
||||
goRecharge() {
|
||||
uni.pro.navigateTo('/pages/member/index', {
|
||||
shopId_id: this.info.shopId
|
||||
@@ -180,7 +187,7 @@
|
||||
orderAmount: payMoney
|
||||
})
|
||||
if (res.code == 0) {
|
||||
this.listinfoid = res.data.id
|
||||
this.listinfoid = res.data
|
||||
// radiovalue1:为1的时候微信支付,为2是会员卡,需要输入支付密码
|
||||
if (this.radiovalue1 == 1) {
|
||||
// 调用支付接口
|
||||
@@ -190,7 +197,7 @@
|
||||
let isVip = uni.cache.get('userInfo').isPwd
|
||||
if (isVip == 0) {
|
||||
uni.pro.navigateTo('/pages/user/repairpassword', {
|
||||
// shopId_id: uni.cache.get('shopUser')
|
||||
shopId_id: uni.cache.get('shopUser')
|
||||
})
|
||||
} else {
|
||||
this.ispws = true
|
||||
|
||||
Reference in New Issue
Block a user