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) => {
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>
</view>
<view class='tip'>
本月已提现金额:<text class="num">{{userInfo.extract_price}}</text>
</view>
<view class='tip'>
说明: <text class="num">{{userInfo.notes}}</text>
</view>
@ -56,6 +59,20 @@
<!-- #ifdef MP -->
<authorize v-if="isShowAuth" @authColse="authColse" @onLoadFun="onLoadFun"></authorize>
<!-- #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>
</template>
@ -63,7 +80,8 @@
import {
getCashInfoApi,
CashApplicationApi,
getCashRecordApi
getCashRecordApi,
UpdateIdCardApi
} from "@/api/user.js"
// import {
// extractCash,
@ -79,13 +97,17 @@
getHeight: this.getWXStatusHeight(),
// #endif
index: 0,
minPrice: 0.00, //
minPrice: 1.00, //
userInfo: [],
prevent: true, //
moneyMaxLeng: 8,
withdraw_fee: '0',
true_money: 0,
cashVal: '',
IDCardShow: false,
id_card:'',
real_name:'',
mobile:''
};
},
computed: {
@ -98,6 +120,8 @@
onShow() {
getCashInfoApi().then(res => {
this.userInfo = res.data;
this.mobile=res.data.mobile;
this.real_name=res.data.real_name;
})
},
methods: {
@ -110,7 +134,7 @@
this.cashVal = this.userInfo.now_money;
})
},
//
//
getWXStatusHeight() {
//
const barTop = uni.getSystemInfoSync().statusBarHeight;
@ -145,19 +169,33 @@
} else {
return
}
console.log(value)
if (this.userInfo.id_card==''||this.userInfo.id_card==null) {
this.IDCardShow = true
return
}
CashApplicationApi(value).then(res => {
uni.$u.toast(res.msg);
setTimeout(()=>{
setTimeout(() => {
uni.navigateTo({
url: `/pages/my/my`
})
},1500)
}, 1500)
}).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>