guangchao.xu | 070005a | 2020-12-07 09:56:40 +0800 | [diff] [blame] | 1 | <template> |
| 2 | <view class="unbindBankCard"> |
| 3 | <view class="unbindBankCard-list"> |
| 4 | <u-field v-model="name" :disabled="true" label="姓名" :field-style="fieldStyle" clear-size="40"></u-field> |
| 5 | <u-field v-model="bankno" :disabled="true" label="银行卡号" :field-style="fieldStyle" clear-size="40"></u-field> |
| 6 | <u-field v-model="status" :disabled="true" label="状态" :field-style="fieldStyle" clear-size="40"></u-field> |
| 7 | <u-field v-model="pwd" label="支付密码" placeholder="请输入6位支付密码" placeholder-style="color:#999999" maxlength="6" |
| 8 | :password="true" |
| 9 | type="number" clear-size="40"></u-field> |
| 10 | </view> |
| 11 | <u-button :custom-style="unbindBankCardBtn" @click="unbind">解除绑定</u-button> |
| 12 | </view> |
| 13 | </template> |
| 14 | |
| 15 | <script> |
| 16 | export default { |
| 17 | data() { |
| 18 | return { |
| 19 | name: "暂无", |
| 20 | bankno: "暂无", |
| 21 | status: "暂无", |
| 22 | pwd: "", |
| 23 | fieldStyle: { |
| 24 | 'font-size': '30rpx', |
| 25 | 'color': '#333333' |
| 26 | }, |
| 27 | unbindBankCardBtn:{ |
| 28 | width: '600rpx', |
| 29 | backgroundColor: '#fa3534', |
| 30 | color: '#FFFFFF', |
| 31 | fontFamily: "PingFang-SC-Medium", |
| 32 | fontSize: '30rpx', |
| 33 | marginTop: '150rpx', |
| 34 | padding: '50rpx 0' |
| 35 | } |
| 36 | } |
| 37 | }, |
| 38 | methods: { |
| 39 | getCardsiInfor() { |
| 40 | let that = this |
| 41 | that.$u.post("/v1/cardinfor").then((res) => { |
| 42 | that.name = res.name |
| 43 | that.status = res.cardstatus |
| 44 | that.bankno = res.cardno |
| 45 | }) |
| 46 | }, |
| 47 | unbind() { |
| 48 | let that = this |
| 49 | let pwd = that.pwd |
| 50 | if (pwd == "") { |
| 51 | uni.showToast({ |
| 52 | title: "请输入您的支付密码", |
| 53 | icon: "none", |
| 54 | duration: 800 |
| 55 | }) |
| 56 | return false |
| 57 | } |
| 58 | let param = { |
| 59 | paypwd: pwd |
| 60 | } |
| 61 | that.$u.post("/v1/unsignbxy", param).then((res) => { |
| 62 | uni.setStorageSync("signed", "") |
| 63 | uni.showToast({ |
| 64 | title: "解绑成功", |
| 65 | icon: "none", |
| 66 | duration: 800, |
| 67 | complete(res) { |
| 68 | setTimeout(() => { |
| 69 | uni.navigateBack({ |
| 70 | delta: 1 |
| 71 | }) |
| 72 | }, 1500) |
| 73 | } |
| 74 | }) |
| 75 | }) |
| 76 | } |
| 77 | }, |
| 78 | onLoad() { |
| 79 | this.getCardsiInfor() |
| 80 | } |
| 81 | |
| 82 | } |
| 83 | </script> |
| 84 | |
| 85 | <style lang="scss" scoped> |
| 86 | .unbindBankCard { |
| 87 | width: 100vw; |
| 88 | // height: 100vh; |
| 89 | background-color: #F3F3F3; |
| 90 | overflow: hidden; |
| 91 | padding-bottom: 30rpx; |
| 92 | |
| 93 | &-list { |
| 94 | background-color: #FFFFFF; |
| 95 | margin-top: 30rpx; |
| 96 | } |
| 97 | |
| 98 | &-btn { |
| 99 | width: 600rpx; |
| 100 | background-color: #2FA8E1; |
| 101 | color: #FFFFFF; |
| 102 | font-family: "PingFang-SC-Medium"; |
| 103 | font-size: 30rpx; |
| 104 | margin-top: 150rpx; |
| 105 | padding: 50rpx 0; |
| 106 | } |
| 107 | } |
| 108 | </style> |