Kaynağa Gözat

Merge branch 'master' of http://82.156.35.112:3000/qiubinghui/zhywpt-sp

* 'master' of http://82.156.35.112:3000/qiubinghui/zhywpt-sp:
  修复基本信息认证&多次登录弹窗问题
master
bjfight 1 hafta önce
ebeveyn
işleme
b9a18811d2

+ 20
- 16
pages/user/user.vue Dosyayı Görüntüle

@@ -14,7 +14,7 @@
<view class="nickname">登录/注册</view>
</view>
<view v-else class="name">
<view class="nickname">{{state.accountInfoVo.nickName || state.accountInfoVo.userName}}
<view class="nickname">{{state.accountInfoVo.userName || state.accountInfoVo.nickName}}
</view>
<view class="user-id">
<view class="phone">{{state.accountInfoVo.mobile}}</view>
@@ -200,21 +200,7 @@
state.data.opId = getItem(StorageKeys.OpenId);
console.log("state.data.opId", state.data.opId)
mobile.value = getItem("mobile");
const options = {
type: 2,
data: { openId: getItem('openId') },
method: "POST",
showLoading: true,
};
requestNew(getUserMsg, options).then((res) => {
const data = res;
console.log(data, "用户信息"); //|| !data.userNegImgUrl || !data.userPosImgUrl
if (!data.userIdNum || !data.userNegImgUrl || !data.userPosImgUrl) {
isSm.value = true
} else {
isSm.value = false
}
});
getAuthInfo();
});
const carDetails = (vehicleId) => {
uni.navigateTo({
@@ -233,9 +219,27 @@
console.log("state.data.opId", state.data.opId)
if (state.data.opId) {
getUserInfo();
getAuthInfo();
}
state.customerObj = getItem('customerObj')
});
const getAuthInfo = () => {
const options = {
type: 2,
data: { openId: getItem('openId') },
method: "POST",
showLoading: true,
};
requestNew(getUserMsg, options).then((res) => {
const data = res;
console.log(data, "用户信息"); //|| !data.userNegImgUrl || !data.userPosImgUrl
if (!data.userIdNum || !data.userNegImgUrl || !data.userPosImgUrl) {
isSm.value = true
} else {
isSm.value = false
}
});
}
const getUserInfo = () => {
const options = {
type: 2,

+ 37
- 7
subpackage/personal-center/real-name-authentication.vue Dosyayı Görüntüle

@@ -46,26 +46,26 @@
<u-form-item label="姓名" :left-icon='`${$imgUrl}issuance/point-form.png`'
:left-icon-style='leftIcon'>
<u-input v-model="state.form.userName" placeholder='请输入姓名' maxlength="20"
@input="replaceInput" inputAlign="right" />
@input="replaceInput" inputAlign="right" :disabled="isSM" />
</u-form-item>
<u-form-item label="身份证号" :left-icon='`${$imgUrl}issuance/point-form.png`'
:left-icon-style='leftIcon'>
<u-input placeholder='请输入身份证' type="idcard" v-model="state.form.idNum" maxlength="18"
inputAlign="right" />
inputAlign="right" :disabled="isSM" />
</u-form-item>
<u-form-item label="地址" :left-icon='`${$imgUrl}issuance/point-form.png`'
:left-icon-style='leftIcon'>
<u-input placeholder='请输入地址' :autoHeight='true' v-model="state.form.address" maxlength="50"
inputAlign="right" />
inputAlign="right" :disabled="isSM" />
</u-form-item>
<u-form-item label="证件类型" :left-icon='`${$imgUrl}issuance/point-form.png`'
:left-icon-style='leftIcon' borderBottom>
<u-input v-model="state.form.idTypeStr" type="select" @click="show1 = true"
input-align='right' />
<u-input v-model="state.form.idTypeStr" type="select" @click="show1 = isSM ? false : true"
input-align='right' :disabled="isSM" />
</u-form-item>
</u-form>
</view>
<view class="action">
<view v-if="!isSM" class="action">
<view class="btn-tip">
如识别信息有误,请手动修改,确认无误后,点击下一步!
</view>
@@ -129,6 +129,7 @@
}
const scrollTop = ref(0)
const show1 = ref(false)
const isSM = ref(true)
const state = reactive({
choiceIndex: 1, // 1 身份证正面 2 身份证反面 3行驶证正面 4行驶证反面
isTakePhotoModeShow: false, //选择拍照方式是否出来
@@ -197,9 +198,35 @@
};

onLoad((option : any) => {

console.log("option", option)
initInfo();
});
const initInfo = () => {
const options = {};
requestNew(getUserMsg, options).then((res) => {
const data = res;
console.log(data, "认证信息"); //|| !data.userNegImgUrl || !data.userPosImgUrl
if (data.userName && data.userIdNum) {
state.form.address = data.userAddress;
state.form.idNum = data.userIdNum;
state.form.idType = data.userIdType;
const idTypeStrItem = credentialTypeSelect.find(item => item.value === data.userIdType);
state.form.idTypeStr = idTypeStrItem.label;
state.form.userIdImgUrl = data.userPosImgUrl;
state.form.userIdImgUrlName = data.userPosImgUrl;
state.form.userIdBackImgUrl = data.userNegImgUrl;
state.form.userIdBackImgUrlName = data.userNegImgUrl;
state.form.userName = data.userName;
} else {
// 无用户信息则按未认证进行初始化
isSM.value = false
state.form.idType = credentialTypeSelect[0].value
state.form.idTypeStr = credentialTypeSelect[0].label
}
});
}

//监听页面滚动
onPageScroll((e) => {
@@ -220,6 +247,9 @@
console.log("event.replace(screeningStr, '')", event.replace(screeningStr, ''), event, state.form.userName)
}
const takePhotoMode = (index) => {
if (isSM.value) {
return;
}
console.log("index", index)
state.isTakePhotoModeShow = true
state.choiceIndex = index

+ 516
- 516
utils/network/request.js
Dosya farkı çok büyük olduğundan ihmal edildi
Dosyayı Görüntüle


Loading…
İptal
Kaydet