This commit is contained in:
mkm 2024-08-16 18:02:02 +08:00
parent 3dd2ed5777
commit 6b68c8f916
2 changed files with 52 additions and 8 deletions

View File

@ -185,3 +185,9 @@ export const CashApplicationApi = (data) => {
export const getCashRecordApi = (data) => { export const getCashRecordApi = (data) => {
return request.get('/user/User/cash_record', data); return request.get('/user/User/cash_record', data);
} }
/**
* 提交身份证
*/
export const UpdateIdCardApi = (data) => {
return request.post('/user/User/update_id_card', data);
}

View File

@ -43,6 +43,9 @@
</navigator> </navigator>
</view> </view>
<view class='tip'>
本月已提现金额:<text class="num">{{userInfo.extract_price}}</text>
</view>
<view class='tip'> <view class='tip'>
说明: <text class="num">{{userInfo.notes}}</text> 说明: <text class="num">{{userInfo.notes}}</text>
</view> </view>
@ -56,6 +59,20 @@
<!-- #ifdef MP --> <!-- #ifdef MP -->
<authorize v-if="isShowAuth" @authColse="authColse" @onLoadFun="onLoadFun"></authorize> <authorize v-if="isShowAuth" @authColse="authColse" @onLoadFun="onLoadFun"></authorize>
<!-- #endif --> <!-- #endif -->
<up-modal :show="IDCardShow" title="提现信息补充" showCancelButton @cancel="IDCardShow=false" @confirm="UpdateCard()">
<up-form labelPosition="left">
<up-form-item label="姓名:" label-width="80px">
<up-input v-model="real_name" border="none" placeholder="请输入对应的真实姓名"></up-input>
</up-form-item>
<up-form-item label="电话:" label-width="80px">
<up-input v-model="mobile" border="none" disabled></up-input>
</up-form-item>
<up-form-item label="身份证号:" label-width="80px">
<up-input v-model="id_card" border="none" placeholder="请输入身份证号"></up-input>
</up-form-item>
</up-form>
</up-modal>
</view> </view>
</template> </template>
@ -63,7 +80,8 @@
import { import {
getCashInfoApi, getCashInfoApi,
CashApplicationApi, CashApplicationApi,
getCashRecordApi getCashRecordApi,
UpdateIdCardApi
} from "@/api/user.js" } from "@/api/user.js"
// import { // import {
// extractCash, // extractCash,
@ -79,13 +97,17 @@
getHeight: this.getWXStatusHeight(), getHeight: this.getWXStatusHeight(),
// #endif // #endif
index: 0, index: 0,
minPrice: 0.00, // minPrice: 1.00, //
userInfo: [], userInfo: [],
prevent: true, // prevent: true, //
moneyMaxLeng: 8, moneyMaxLeng: 8,
withdraw_fee: '0', withdraw_fee: '0',
true_money: 0, true_money: 0,
cashVal: '', cashVal: '',
IDCardShow: false,
id_card:'',
real_name:'',
mobile:''
}; };
}, },
computed: { computed: {
@ -98,6 +120,8 @@
onShow() { onShow() {
getCashInfoApi().then(res => { getCashInfoApi().then(res => {
this.userInfo = res.data; this.userInfo = res.data;
this.mobile=res.data.mobile;
this.real_name=res.data.real_name;
}) })
}, },
methods: { methods: {
@ -110,7 +134,7 @@
this.cashVal = this.userInfo.now_money; this.cashVal = this.userInfo.now_money;
}) })
}, },
// //
getWXStatusHeight() { getWXStatusHeight() {
// //
const barTop = uni.getSystemInfoSync().statusBarHeight; const barTop = uni.getSystemInfoSync().statusBarHeight;
@ -145,19 +169,33 @@
} else { } else {
return return
} }
console.log(value) if (this.userInfo.id_card==''||this.userInfo.id_card==null) {
this.IDCardShow = true
return
}
CashApplicationApi(value).then(res => { CashApplicationApi(value).then(res => {
uni.$u.toast(res.msg); uni.$u.toast(res.msg);
setTimeout(()=>{ setTimeout(() => {
uni.navigateTo({ uni.navigateTo({
url: `/pages/my/my` url: `/pages/my/my`
}) })
},1500) }, 1500)
}).catch(err => { }).catch(err => {
return uni.$u.toast(err); return uni.$u.toast(err.msg);
});
},
UpdateCard:function(){
UpdateIdCardApi({'id_card':this.id_card,'real_name':this.real_name}).then(res => {
uni.$u.toast(res.msg);
setTimeout(() => {
uni.navigateTo({
url: `/pages/user_cash/index`
})
}, 1500)
}).catch(err => {
return uni.$u.toast(err.msg);
}); });
} }
} }
} }
</script> </script>