3
0
Fork 0

feat(pay): 支付按钮添加disabled状态

This commit is contained in:
ywk 2025-04-11 10:42:20 +08:00
parent 8779a723cd
commit 6b2e35480b
2 changed files with 27 additions and 18 deletions

View File

@ -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(",");

View File

@ -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') {