|
@@ -170,10 +170,23 @@
|
|
|
<text>配送商:{{shelfInfo.dealerName}}</text>
|
|
|
<view @click="callPhone()"><uni-icons size="18" type="phone" color="dodgerblue"></uni-icons><text style="font-size:12px;">拨打</text></view>
|
|
|
</view>
|
|
|
- <!-- <view class="flex align_center justify_between" v-if="shelfInfo">
|
|
|
- <text>支付方式:在线支付</text>
|
|
|
- <view><uni-icons size="18" type="right" color="dodgerblue"></uni-icons></view>
|
|
|
- </view> -->
|
|
|
+ <view v-if="hasBalancePay&&!isAddCart">
|
|
|
+ <view class="totalBar-box">
|
|
|
+ <view class="flex align_center justify_between">
|
|
|
+ <view>总金额</view>
|
|
|
+ <view><text class="pf">¥</text>50.00</view>
|
|
|
+ </view>
|
|
|
+ <view class="flex align_center justify_between">
|
|
|
+ <view>抵扣(余额:<text class="pf">¥</text>3.00)</view>
|
|
|
+ <view class="flex align_center"><uni-icons size="18" type="checkbox" color="#2196f3"></uni-icons> <text class="pf">¥</text>2.00</view>
|
|
|
+ </view>
|
|
|
+ <view class="flex align_center justify_between">
|
|
|
+ <view>合计</view>
|
|
|
+ <view><text class="pf">¥</text>48.00</view>
|
|
|
+ </view>
|
|
|
+ </view>
|
|
|
+ <payOptions v-model="payType"></payOptions>
|
|
|
+ </view>
|
|
|
</view>
|
|
|
<view class="popu-content-btn">
|
|
|
<view class="popu-content-btn-item cartbtn" v-if="isAddCart" @click="submitCart($event)">加入购物车</view>
|
|
@@ -242,7 +255,11 @@
|
|
|
import { getShopDetail } from '@/api/shop.js'
|
|
|
import { purchaseSave, purchaseCheck, purchasePay } from '@/api/purchase.js'
|
|
|
import { toAuthStore, toLogin } from "@/utils/index.js"
|
|
|
+ import payOptions from '../components/payOptions.vue'
|
|
|
export default {
|
|
|
+ components: {
|
|
|
+ payOptions
|
|
|
+ },
|
|
|
data() {
|
|
|
return {
|
|
|
loading: false,
|
|
@@ -264,6 +281,7 @@
|
|
|
showPay: false, // 是否显示付款信息
|
|
|
isAddCart: false, // 是否加入购物车
|
|
|
payData: null, // 支付参数
|
|
|
+ payType: 0, // 支付方式,抵扣、还是微信
|
|
|
}
|
|
|
},
|
|
|
onLoad(option) {
|
|
@@ -304,6 +322,10 @@
|
|
|
const shelfInfo = this.shelfInfo
|
|
|
return shelfInfo&&shelfInfo.minAmount ? shelfInfo.minAmount : 0
|
|
|
},
|
|
|
+ // 抵扣余额支付是否可用,有【余额支付权限】且该产品有抵扣金额
|
|
|
+ hasBalancePay(){
|
|
|
+ return true
|
|
|
+ },
|
|
|
// 经销商电话
|
|
|
dealerPhone(){
|
|
|
const shelfInfo = this.shelfInfo
|
|
@@ -1160,7 +1182,16 @@
|
|
|
width: 100%;
|
|
|
padding-top: 20px;
|
|
|
> view{
|
|
|
- padding: 10px 0;
|
|
|
+ padding: 5px 0;
|
|
|
+ }
|
|
|
+ .totalBar-box{
|
|
|
+ margin-bottom: 20rpx;
|
|
|
+ > view{
|
|
|
+ padding: 5px 0;
|
|
|
+ }
|
|
|
+ .pf{
|
|
|
+ font-size: 20rpx;
|
|
|
+ }
|
|
|
}
|
|
|
}
|
|
|
.pupu-box-pay-item{
|