no message

This commit is contained in:
2025-08-30 20:03:57 +08:00
parent b76360992e
commit 345cd45fbe
10 changed files with 282 additions and 19 deletions
@@ -18,7 +18,7 @@
</view>
</view>
<!-- 证件照 -->
<CommonCard @valueFunc="getValue" />
<CommonCard @valueFunc="getValue" :Fimg="form.certFimg" :Bimg="form.certBimg" />
<view class="add_but" @click="addAuthentication">
提交
</view>
@@ -31,7 +31,7 @@
<script>
import CommonCard from '@/components/common_card.vue';
import Header from '@/components/header.vue';
import { realNameAuthentication } from '@/api/auth.js';
import { realNameAuthentication,getUserInfo } from '@/api/auth.js';
import { CERT_OPTION } from '@/utils/enumUtils.js';
export default {
@@ -96,10 +96,34 @@ export default {
],
certShow: false,
certOption: [],
userInfo:null
}
},
onLoad(){
this.init();
},
methods: {
init(){
this.getUserInfo();
},
async getUserInfo() {
const result = await getUserInfo();
if (result && result.bizcode === 100) {
const data = result.data;
this.userInfo = result.data || {};
this.form = {
name:this.userInfo.name,
certNo:this.userInfo.certNo,
certType:this.userInfo.certType,
certName: this.userInfo.certType == 1?'居民身份证' : '护照',
certFimg:this.userInfo.certFimg,
certBimg:this.userInfo.certBimg,
}
}
},
async addAuthentication() {
const params = {
...this.form
@@ -111,6 +135,7 @@ export default {
});
return;
}
if (!params.certType) {
this.$refs.uToastRef.show({
type: 'error',
@@ -125,6 +150,13 @@ export default {
});
return;
}
if(!/(^\d{15}$)|(^\d{17}(\d|X|x)$)/.test(params.certNo)){
this.$refs.uToastRef.show({
type: 'error',
message: "请输入正确的证件号码",
});
return;
}
if (params.certFimg.length === 0) {
this.$refs.uToastRef.show({
type: 'error',
@@ -140,12 +172,12 @@ export default {
return;
}
console.log("params", params);
const resp = await realNameAuthentication(params);
if (resp && resp.bizcode === 100) {
uni.navigateTo({
url: '/pages/mine_package/mine_authentication_ok/mine_authentication_ok',
})
}
// const resp = await realNameAuthentication(params);
// if (resp && resp.bizcode === 100) {
// uni.navigateTo({
// url: '/pages/mine_package/mine_authentication_ok/mine_authentication_ok',
// })
// }
},
// 提交地址
certConfirm(e) {