12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879 |
- <template>
- <view class="cmain">
- <view class="form_group">
- <view class="lable re">开户行</view>
- <input type="text" placeholder="请输入开户行" v-model="item.bankName" readonly disabled />
- </view>
- <view class="form_group">
- <view class="lable re">银行账号</view>
- <input type="text" placeholder="请输入银行账号" v-model="item.bankAccount" />
- </view>
- </br></br></br>
- <!-- <button class="btn" @click="save()">提交</button> -->
- <button class="btn back" @click="back()">返回</button>
- </view>
- </template>
- <script>
- export default {
- data() {
- return {
- item: {
- bankName: '',
- bankAccount: ''
- },
- }
- },
- onLoad() {
- this.http.request({
- url: '/sp-admin/app/AppUser/getBankInfo',
- success: res => {
- console.log("res", res)
- this.item.bankName = '云南麻栗坡农村商业银行股份有限公司';
- this.item.bankAccount = res.data.data.bankAccount;
- }
- })
- },
- methods: {
- back() {
- uni.navigateBack()
- },
- save() {
- let rule = [{
- name: 'bankAccount',
- checkType: 'bank',
- errorMsg: '银行账号格式不正确'
- }];
- if (!this.verify.check(this.item, rule)) {
- uni.showModal({
- content: this.verify.error,
- showCancel: false
- });
- return false;
- }
- this.http.request({
- url: '/sp-admin/app/AppUser/saveBankInfo',
- data: {
- bankName: this.item.bankName,
- bankAccount: this.item.bankAccount
- },
- success: res => {
- uni.showToast({
- title: "提交成功"
- })
- uni.switchTab({
- url: '/pages/personal/personal'
- });
- }
- })
- }
- }
- }
- </script>
- <style>
- .back {
- background: cadetblue;
- margin-top: 15px;
- }
- </style>
|