优化页面展示逻辑
This commit is contained in:
parent
47671e03fc
commit
1aecb5f7e8
@ -20,7 +20,7 @@
|
||||
<uni-icons type="location"></uni-icons>
|
||||
<view class="location">区域:</view>
|
||||
</view>
|
||||
<view style="flex: 1;">{{company.province_name+company.city_name+company.area_name+company.address}}</view>
|
||||
<view style="flex: 1;">{{company.province_name+company.city_name+company.area_name+company.street_name+company.address}}</view>
|
||||
</view>
|
||||
</view>
|
||||
</block>
|
||||
|
@ -78,7 +78,11 @@
|
||||
}
|
||||
else Toast(this.timeCount+'秒后再支付!')
|
||||
},
|
||||
async goRecharge() {
|
||||
goRecharge() {
|
||||
// console.log(obj);
|
||||
uni.showLoading({
|
||||
title:'获取支付信息',
|
||||
success: async () => {
|
||||
let { data } = await recharge({
|
||||
money: this.payMoney.money
|
||||
});
|
||||
@ -102,10 +106,6 @@
|
||||
"timestamp": res1.data.config.timestamp, // 时间戳(单位:秒)
|
||||
"sign": res1.data.config.paySign
|
||||
}
|
||||
// console.log(obj);
|
||||
uni.showLoading({
|
||||
title:'获取微信支付信息',
|
||||
success: () => {
|
||||
uni.getProvider({
|
||||
service: 'payment',
|
||||
success: (paymentList) => {
|
||||
@ -119,7 +119,7 @@
|
||||
// orderInfo: res1.data.config,
|
||||
orderInfo: obj,
|
||||
success: (e) => {
|
||||
console.log('成功', e);
|
||||
// console.log('成功', e);
|
||||
uni.hideLoading();
|
||||
payStatus({
|
||||
order_id: data.order_id,
|
||||
@ -141,7 +141,9 @@
|
||||
title: '支付失败!'
|
||||
})
|
||||
},
|
||||
complete: () => {},
|
||||
complete: () => {
|
||||
this.payMoney.money = '';
|
||||
},
|
||||
});
|
||||
}
|
||||
})
|
||||
|
@ -100,10 +100,14 @@
|
||||
let res = await userWithdraw({
|
||||
amount: this.payMoney.money
|
||||
});
|
||||
Toast(res.msg);
|
||||
uni.showToast({
|
||||
icon:'success',
|
||||
title: res.msg
|
||||
})
|
||||
// 重新显示余额
|
||||
let info = this.$store.state.app.userInfo;
|
||||
info.user_money -= this.payMoney.money;
|
||||
this.payMoney.money = '';
|
||||
info.user_money = (info.user_money - this.payMoney.money).toFixed(2);
|
||||
this.$store.commit('setUserInfo', info);
|
||||
}
|
||||
},
|
||||
|
Loading…
x
Reference in New Issue
Block a user