Merge remote-tracking branch 'origin/master'
commit
d5592cbd48
|
@ -20,8 +20,8 @@
|
||||||
<view class="iconfont" :class="item.icon"></view>
|
<view class="iconfont" :class="item.icon"></view>
|
||||||
<view class="text">
|
<view class="text">
|
||||||
<view class=name>{{item.name}}</view>
|
<view class=name>{{item.name}}</view>
|
||||||
<view class="info" v-if="item.value === 'yue'">
|
<view class="info" v-if="item.code === 'wallet'">
|
||||||
{{item.title}} <span class="money">¥{{ item.number }}</span>
|
{{item.title}} <span class="money">¥{{ fen2yuan(wallet.balance || 0) }}</span>
|
||||||
</view>
|
</view>
|
||||||
<view class="info" v-else>{{item.title}}</view>
|
<view class="info" v-else>{{item.title}}</view>
|
||||||
</view>
|
</view>
|
||||||
|
@ -40,7 +40,9 @@
|
||||||
import numberScroll from '@/components/numberScroll.vue'
|
import numberScroll from '@/components/numberScroll.vue'
|
||||||
import * as PayOrderApi from '@/api/pay/order.js';
|
import * as PayOrderApi from '@/api/pay/order.js';
|
||||||
import * as PayChannelApi from '@/api/pay/channel.js';
|
import * as PayChannelApi from '@/api/pay/channel.js';
|
||||||
export default {
|
import * as WalletApi from '@/api/pay/wallet.js';
|
||||||
|
import {fen2yuan} from "../../../utils/util";
|
||||||
|
export default {
|
||||||
components: {
|
components: {
|
||||||
CountDown,
|
CountDown,
|
||||||
numberScroll
|
numberScroll
|
||||||
|
@ -52,6 +54,8 @@
|
||||||
payPrice: 0, // 支付金额
|
payPrice: 0, // 支付金额
|
||||||
invalidTime: 0, // 过期时间
|
invalidTime: 0, // 过期时间
|
||||||
|
|
||||||
|
wallet: {},
|
||||||
|
|
||||||
channelCode: '', // 选中的支付渠道
|
channelCode: '', // 选中的支付渠道
|
||||||
channels: [{ // 支付方式
|
channels: [{ // 支付方式
|
||||||
name: '微信支付', // 微信公众号
|
name: '微信支付', // 微信公众号
|
||||||
|
@ -72,6 +76,7 @@
|
||||||
name: '余额支付',
|
name: '余额支付',
|
||||||
icon: "icon-yuezhifu",
|
icon: "icon-yuezhifu",
|
||||||
title: '可用余额',
|
title: '可用余额',
|
||||||
|
code: "wallet"
|
||||||
}, {
|
}, {
|
||||||
name: '模拟支付',
|
name: '模拟支付',
|
||||||
icon: "icon-yuezhifu",
|
icon: "icon-yuezhifu",
|
||||||
|
@ -106,6 +111,7 @@
|
||||||
this.getCashierOrder()
|
this.getCashierOrder()
|
||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
|
fen2yuan,
|
||||||
getCashierOrder() {
|
getCashierOrder() {
|
||||||
uni.showLoading({
|
uni.showLoading({
|
||||||
title: '加载订单中'
|
title: '加载订单中'
|
||||||
|
@ -305,6 +311,11 @@
|
||||||
this.payType(this.channels[0].code)
|
this.payType(this.channels[0].code)
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
|
|
||||||
|
// 3. // 获得钱包
|
||||||
|
WalletApi.getPayWallet().then(res=>{
|
||||||
|
this.wallet = res.data;
|
||||||
|
})
|
||||||
},
|
},
|
||||||
/**
|
/**
|
||||||
* 设置支付方式
|
* 设置支付方式
|
||||||
|
|
Loading…
Reference in New Issue