调整全局支付收银class

This commit is contained in:
唐明明
2021-11-04 11:30:15 +08:00
parent cbe6cc912b
commit d9b4d459ae
13 changed files with 1841 additions and 1865 deletions

View File

@@ -63,15 +63,14 @@
<radio-group class="pay-group" @change="payType">
<view class="item">
<label>
<radio class="pay-radio" value="eb" checked color="#8b64fd" />
<view class="pay-title">易货额支付</view>
<view class="pay-sub-title">可用{{account.eb}}冻结{{account.frozenEb}}</view>
<radio class="pay-radio" value="wechat" checked color="#8b64fd" />
<view class="pay-title">微信支付</view>
</label>
</view>
<view class="item">
<label>
<radio class="pay-radio" value="wechat" color="#8b64fd" />
<view class="pay-title">微信支付</view>
<radio class="pay-radio" value="alipay" color="#8b64fd" />
<view class="pay-title">支付宝支付</view>
</label>
</view>
</radio-group>
@@ -87,16 +86,12 @@
export default {
data() {
return {
payValue: 'eb',
payValue: 'wechat',
orderNo : '',
price : '0.00',
stock : 1,
loding : true,
info : {},
account : {
eb : '0.00',
frozenEb: '0.00'
}
info : {}
};
},
onShow() {
@@ -124,8 +119,7 @@
openLay(){
let token = this.$store.getters.getToken
if(token == ''){
let userLogin = new userAuth()
userLogin.Login()
this.$Router.push({name: 'Login'})
return
}
this.$refs.buyLay.open('bottom')
@@ -152,47 +146,24 @@
},
// 支付
orderPay(){
let data = {}
marketsPay(this.orderNo, this.payValue).then(res => {
switch (this.payValue){
case 'eb':
this.$refs.payLay.close()
this.$Router.push({
name : 'payResults',
params : {
index: 1,
price: this.price,
type : 'eb',
total: '可在我的资产下我的权证中查看购买的数字权证'
}
})
break
case 'wechat':
this.wxPay(JSON.parse(res))
break
case 'alipay':
cashierPay.pay('alipay', res, 'market').then(payRes => {
console.log(payRes)
})
break
}
}).catch(err => {
console.log(err)
uni.showToast({
title: err.message,
icon : 'none'
})
})
},
// 微信支付
wxPay(payConfig){
uni.requestPayment({
provider : 'wxpay',
orderInfo : payConfig,
success : payRes => {
console.log(payRes)
},
fail : payErr => {
uni.showToast({
title: payErr.errMsg,
icon : 'none'
})
}
})
}
}
}