payNow() {
this.showLoading = true
prepay({
from: 'order',
order_id: Number(this.id)
}).then(res => {
if (res.code == 1) {
this.showLoading = false
let args = res.data; //data: "余额测试" args取到的就是"余额测试" wxpay这个里面的参数就是"余额测试" 你那边怎么取的到呢
wxpay(args).then(() => {
this.$toast({
title: "支付成功"
})
this.getOrderDetailFun();
uni.$emit("refreshorder")
}).catch(() => {
this.showLoading = false
});
}
});
},
<view class="pay-way contain">
<view class="lighter title">支付方式</view>
<radio-group class="radio-group" @change="radioChange">
<label v-for="(item, index) in payWayArr" :key="index" class="item row-between">
<view class="row">
<image class="icon-lg mr20" :src="item.icon"></image>
<view class>
<view class="balck bt10">{{item.name}}</view>
<view class="muted xs">{{item.desc}}{{ item.type == 3 ? orderInfo.user_money : ''}}</view>
</view>
</view>
<radio class="radio" :value="String(item.type)" :checked="item.type == payWay"></radio>
</label>
</radio-group>
</view>