|
|
@ -16,7 +16,7 @@ |
|
|
|
<uni-section title="输入金额" type="line" titleFontSize="34rpx"></uni-section> |
|
|
|
<view class="money-input"> |
|
|
|
<image src="/static/payment/money.png" mode="widthFix"></image> |
|
|
|
<input v-model="form.money" @focus="focus" placeholder="请输入加油金额" type="number" /> |
|
|
|
<input v-model="form.money" @focus="focus" placeholder="请输入加油金额" type="digit" /> |
|
|
|
</view> |
|
|
|
|
|
|
|
<view v-if="form.money" class="tip"> |
|
|
@ -65,7 +65,7 @@ |
|
|
|
money: '' |
|
|
|
}, |
|
|
|
resolvePrivacyAuthorization: {}, |
|
|
|
currentIndex: 0, |
|
|
|
currentIndex: -1, |
|
|
|
content: [{ |
|
|
|
iconPath: '/static/payment/wedding-celebration.png', |
|
|
|
text: '婚庆服务', |
|
|
@ -79,14 +79,14 @@ |
|
|
|
} |
|
|
|
}, |
|
|
|
onShow() { |
|
|
|
if (wx.onNeedPrivacyAuthorization) { |
|
|
|
console.log('onNeedPrivacyAuthorization'); |
|
|
|
wx.onNeedPrivacyAuthorization(resolve => { |
|
|
|
console.log('onNeedPrivacyAuthorization'); |
|
|
|
this.resolvePrivacyAuthorization = resolve |
|
|
|
this.$refs.showPrivacy.init(resolve) |
|
|
|
}) |
|
|
|
} |
|
|
|
// if (wx.onNeedPrivacyAuthorization) { |
|
|
|
// console.log('onNeedPrivacyAuthorization'); |
|
|
|
// wx.onNeedPrivacyAuthorization(resolve => { |
|
|
|
// console.log('onNeedPrivacyAuthorization'); |
|
|
|
// this.resolvePrivacyAuthorization = resolve |
|
|
|
// this.$refs.showPrivacy.init(resolve) |
|
|
|
// }) |
|
|
|
// } |
|
|
|
// wx.getPrivacySetting({ |
|
|
|
// success: res => { |
|
|
|
// console.log(res) |
|
|
@ -127,7 +127,21 @@ |
|
|
|
url: '/pages/login/login' |
|
|
|
}) |
|
|
|
} |
|
|
|
this.$api('createOrderPay', this.form, res => { |
|
|
|
let money = (this.form.money * |
|
|
|
(this.configList.preferential ? |
|
|
|
this.configList.preferential.keyCentent |
|
|
|
: 1)).toFixed(2) |
|
|
|
|
|
|
|
// if(!money){ |
|
|
|
// uni.showToast({ |
|
|
|
// icon: 'none', |
|
|
|
// title: '' |
|
|
|
// }) |
|
|
|
// } |
|
|
|
|
|
|
|
this.$api('createOrderPay', { |
|
|
|
money |
|
|
|
}, res => { |
|
|
|
this.form.money = '' |
|
|
|
if(res.code == 200){ |
|
|
|
uni.requestPayment({ |
|
|
@ -157,7 +171,7 @@ |
|
|
|
// title: '支付成功' |
|
|
|
// }); |
|
|
|
} |
|
|
|
}) |
|
|
|
}, "订单创建中...") |
|
|
|
}, |
|
|
|
|
|
|
|
//获取充值套餐 |
|
|
|