新增打开微信小程序增加开通会员测试环境
This commit is contained in:
@@ -11,7 +11,7 @@
|
||||
<view class="title">{{item.title}}</view>
|
||||
<view class="tool">
|
||||
<view class="price"><text>¥</text>{{item.price}}</view>
|
||||
<uni-number-box class="number" :min="1" :value="qty" @change="numberChange"></uni-number-box>
|
||||
<uni-number-box class="number" :min="item.number" :value="qty" @change="numberChange"></uni-number-box>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
@@ -38,7 +38,7 @@
|
||||
</view>
|
||||
<!-- 支付方式 -->
|
||||
<radio-group class="pay-group" @change="payType">
|
||||
<view class="item" v-if="buyTypeId != 1">
|
||||
<view class="item">
|
||||
<label>
|
||||
<radio class="radio" value="eb" checked color="#c82626" />
|
||||
<view class="title">易货额支付</view>
|
||||
@@ -60,7 +60,7 @@
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import { buy } from '@/apis/interfaces/order'
|
||||
import { buy, eb } from '@/apis/interfaces/order'
|
||||
export default {
|
||||
data() {
|
||||
return {
|
||||
@@ -73,17 +73,16 @@
|
||||
coupons : [],
|
||||
account : {},
|
||||
payValue : 'eb',
|
||||
buyTypeId : ''
|
||||
}
|
||||
},
|
||||
created(){
|
||||
buy({
|
||||
goods_sku_id: this.$Route.query.skuId || 23,
|
||||
qty : this.qty,
|
||||
type : this.$Route.query.type === 1 ? 2: 1
|
||||
goods_sku_id: this.$Route.query.skuId,
|
||||
qty : this.$Route.query.qty,
|
||||
type : 1
|
||||
}, 'GET').then(res=>{
|
||||
this.loding = true
|
||||
this.buyTypeId = this.$Route.query.type
|
||||
this.qty = this.$Route.query.qty,
|
||||
this.payValue = this.$Route.query.type === 1 ? 'wx' : 'eb'
|
||||
this.detail = res.detail
|
||||
this.couponPrice = res.coupon_price
|
||||
@@ -117,10 +116,20 @@
|
||||
type : this.payValue == 'eb' ? 1 : 2,
|
||||
remark : 'app订单'
|
||||
}, 'POST').then(res=>{
|
||||
uni.showToast({
|
||||
title: '订单id:' + res.order_no,
|
||||
icon : 'none'
|
||||
})
|
||||
switch (this.payValue){
|
||||
case 'eb':
|
||||
this.ebPay(res.order_no)
|
||||
break;
|
||||
case 'wx':
|
||||
this.wxPay(res.order_no)
|
||||
break;
|
||||
default:
|
||||
uni.showToast({
|
||||
title: '支付方式错误',
|
||||
icon : 'none'
|
||||
})
|
||||
break;
|
||||
}
|
||||
}).catch(err =>{
|
||||
uni.showToast({
|
||||
title: err.message,
|
||||
@@ -129,8 +138,25 @@
|
||||
})
|
||||
},
|
||||
// 微信pay
|
||||
wxPay(){
|
||||
|
||||
wxPay(orderNo){
|
||||
uni.showToast({
|
||||
title: '微信支付' + orderNo,
|
||||
icon : 'none'
|
||||
})
|
||||
},
|
||||
// 易币支付
|
||||
ebPay(orderNo){
|
||||
eb(orderNo).then(res => {
|
||||
uni.showModal({
|
||||
title: '提示',
|
||||
content: '支付成功,后续优化支付成功后直接转跳我的权证'
|
||||
})
|
||||
}).catch(err => {
|
||||
uni.showToast({
|
||||
title: err.message,
|
||||
icon : 'none'
|
||||
})
|
||||
})
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user