diff --git a/api/user.js b/api/user.js
index a8e631b..8679bd7 100644
--- a/api/user.js
+++ b/api/user.js
@@ -184,4 +184,10 @@ 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);
}
\ No newline at end of file
diff --git a/pages/user_cash/index.vue b/pages/user_cash/index.vue
index 56ecc43..b5f14c7 100644
--- a/pages/user_cash/index.vue
+++ b/pages/user_cash/index.vue
@@ -43,6 +43,9 @@
+
+ 本月已提现金额:¥{{userInfo.extract_price}}
+
说明: {{userInfo.notes}}
@@ -56,6 +59,20 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
@@ -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);
});
}
-
}
}