forked from angelo/web-retail-h5
feat(pay): 支付按钮添加disabled状态
This commit is contained in:
parent
8779a723cd
commit
6b2e35480b
|
@ -52,7 +52,6 @@ export default {
|
|||
grade: this.userInfo.pkGradeId,
|
||||
awards: this.userInfo.pkAwardsId,
|
||||
}).then((res) => {
|
||||
console.log(res, '....resaaaa?')
|
||||
if (res.code == "200") {
|
||||
let list = JSON.parse(localStorage.getItem("menuList"));
|
||||
let arr = res.data[0].publishLocation.split(",");
|
||||
|
|
|
@ -680,26 +680,30 @@
|
|||
<view class="footer_f">
|
||||
<view class="footer">
|
||||
<view class="footer_r">
|
||||
<u-button type="success"
|
||||
class="uBtn"
|
||||
shape="circle"
|
||||
:loading="isLoading"
|
||||
loadingText="支付中"
|
||||
@tap="quickPay(ifcz)"
|
||||
color="linear-gradient(to right, #fb3024, #fb3024 )">{{'立即支付'}}
|
||||
<u-button
|
||||
type="success"
|
||||
class="uBtn"
|
||||
shape="circle"
|
||||
:loading="isLoading"
|
||||
loadingText="支付中"
|
||||
:disabled="payBtnDisabled"
|
||||
@tap="quickPay(ifcz)"
|
||||
color="linear-gradient(to right, #fb3024, #fb3024 )"
|
||||
>
|
||||
{{'立即支付'}}
|
||||
</u-button>
|
||||
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
<!-- 成功 -->
|
||||
<u-modal :show="showSucce"
|
||||
showConfirmButton
|
||||
:content='content'
|
||||
confirmColor='#DE3932'
|
||||
@confirm="reset"
|
||||
ref="uModal"
|
||||
:asyncClose="true"></u-modal>
|
||||
<u-modal
|
||||
:show="showSucce"
|
||||
showConfirmButton
|
||||
:content='content'
|
||||
confirmColor='#DE3932'
|
||||
@confirm="reset"
|
||||
ref="uModal"
|
||||
:asyncClose="true"></u-modal>
|
||||
<!-- 二维码 -->
|
||||
<u-popup :show="wxPopup"
|
||||
mode="center"
|
||||
|
@ -753,7 +757,6 @@
|
|||
<script>
|
||||
import * as api from '@/config/pay.js'
|
||||
import QRCode from 'qrcodejs2'
|
||||
|
||||
import successDialog from '@/components/successDialog.vue'
|
||||
import * as act from '@/config/activity.js'
|
||||
var payStatus
|
||||
|
@ -802,6 +805,14 @@ export default {
|
|||
unBindCode: '',
|
||||
}
|
||||
},
|
||||
computed: {
|
||||
payBtnDisabled() {
|
||||
if (this.ifcz) {
|
||||
return !Object.values(this.payList).some(val => val)
|
||||
}
|
||||
return false
|
||||
},
|
||||
},
|
||||
onLoad(options) {
|
||||
this.paramsPost = JSON.parse(options.paramsPost)
|
||||
console.log(
|
||||
|
@ -930,7 +941,6 @@ export default {
|
|||
},
|
||||
payPw() {
|
||||
let url, obj
|
||||
console.log(this.paramsPost, '....%257B%2522ifcz%2522%253Atrue%257D')
|
||||
// 银行卡
|
||||
if (this.isBank) {
|
||||
if (this.isBank == 'hf') {
|
||||
|
|
Loading…
Reference in New Issue