小程序修改证件类型取动态数据
This commit is contained in:
@@ -185,3 +185,11 @@ export function msCaseSign(data) {
|
||||
data: data,
|
||||
})
|
||||
}
|
||||
//证件类型
|
||||
export function idType(data) {
|
||||
return request({
|
||||
url: '/system/dict/data/type/id_type',
|
||||
method: 'get',
|
||||
params: data
|
||||
})
|
||||
}
|
||||
@@ -94,3 +94,11 @@ export function wxregister(data) {
|
||||
data: data
|
||||
})
|
||||
}
|
||||
// 获取证件类型
|
||||
export function idType(data){
|
||||
return request({
|
||||
url: '/system/dict/data/type/id_type',
|
||||
method: 'get',
|
||||
params: data
|
||||
})
|
||||
}
|
||||
@@ -163,7 +163,8 @@
|
||||
caseApplicationInsert,
|
||||
updateComfire,
|
||||
caseApplicationSelectById,
|
||||
getUserInfo
|
||||
getUserInfo,
|
||||
idType
|
||||
} from '../../../api/handlecase/index.js'
|
||||
import {
|
||||
getToken
|
||||
@@ -173,10 +174,7 @@
|
||||
data() {
|
||||
return {
|
||||
baseUrl: config.baseUrlTJ,
|
||||
certificate: [
|
||||
{ value: 0, text: "身份证" },
|
||||
{ value: 1, text: "护照" },
|
||||
],
|
||||
certificate: [],
|
||||
nationality: [
|
||||
{ value: 0, text: "国内" },
|
||||
{ value: 1, text: "国外" },
|
||||
@@ -599,6 +597,15 @@
|
||||
// 改变证件类型
|
||||
changeDocment(e){
|
||||
console.log(e)
|
||||
},
|
||||
// 获取证件类型
|
||||
getIdType(){
|
||||
idType().then(res =>{
|
||||
console.log(res)
|
||||
res.data.forEach(item =>{
|
||||
this.certificate.push({value:item.dictSort,text:item.dictLabel})
|
||||
})
|
||||
})
|
||||
}
|
||||
},
|
||||
onLoad(data) {
|
||||
@@ -617,6 +624,7 @@
|
||||
}
|
||||
this.getTemplateFn()
|
||||
this.getUserInfoNumber()
|
||||
this.getIdType() //获取证件类型
|
||||
},
|
||||
onReady() {
|
||||
this.$refs.form.setRules(this.rules)
|
||||
|
||||
+34
-26
@@ -30,14 +30,14 @@
|
||||
</view>
|
||||
<view class="input-item flex align-center">
|
||||
<uni-data-select
|
||||
style="text-align: left;width: 200px;"
|
||||
style="text-align: left;width: 200px;d"
|
||||
v-model="registerForm.nationality"
|
||||
:localdata="nationality"
|
||||
></uni-data-select>
|
||||
</view>
|
||||
<view class="input-item flex align-center">
|
||||
<!-- <view class="iconfont icon-user icon"></view> -->
|
||||
<input v-model="registerForm.identityNo" class="input" type="text" :placeholder="registerForm.idType==0?'请输入身份证号':'请输入护照'"
|
||||
<input v-model="registerForm.identityNo" class="input" type="text" placeholder="请输入证件号码"
|
||||
maxlength="30" />
|
||||
</view>
|
||||
<view class="input-item flex align-center">
|
||||
@@ -84,7 +84,8 @@
|
||||
getCodeImg,
|
||||
register,
|
||||
sendCode,
|
||||
wxregister
|
||||
wxregister,
|
||||
idType
|
||||
} from '@/api/login'
|
||||
import constant from '../utils/constant'
|
||||
|
||||
@@ -109,10 +110,7 @@ import constant from '../utils/constant'
|
||||
nationality:0
|
||||
},
|
||||
sysType:null,
|
||||
certificate: [
|
||||
{ value: 0, text: "身份证" },
|
||||
{ value: 1, text: "护照" },
|
||||
],
|
||||
certificate: [],
|
||||
nationality: [
|
||||
{ value: 0, text: "国内" },
|
||||
{ value: 1, text: "国外" },
|
||||
@@ -123,24 +121,6 @@ import constant from '../utils/constant'
|
||||
created() {
|
||||
this.getCode()
|
||||
},
|
||||
onLoad(option) {
|
||||
this.sysType = uni.getStorageSync('sysType');
|
||||
// this.passportVal = option;
|
||||
if(option.valus==1){
|
||||
this.registerForm.idType =1
|
||||
this.registerForm.nationality =1
|
||||
}else{
|
||||
let {
|
||||
params
|
||||
} = option
|
||||
// this.improvedetail = JSON.parse(improvedetail)
|
||||
let paramsObj = JSON.parse(params);
|
||||
this.registerForm.name = paramsObj.nickName;
|
||||
this.registerForm.identityNo = paramsObj.idCard
|
||||
this.registerForm.id = paramsObj.id
|
||||
}
|
||||
|
||||
},
|
||||
methods: {
|
||||
// 获取手机验证码
|
||||
getCodeNumber(data) {
|
||||
@@ -235,9 +215,37 @@ import constant from '../utils/constant'
|
||||
})
|
||||
},
|
||||
certificateValue(e){
|
||||
this.registerForm.idType = e
|
||||
// this.registerForm.idType = e
|
||||
},
|
||||
// 获取证件类型
|
||||
getIdType(){
|
||||
idType().then(res=>{
|
||||
res.data.forEach(item=>{
|
||||
this.certificate.push({value:item.dictSort,text:item.dictLabel})
|
||||
})
|
||||
console.log(this.certificate)
|
||||
})
|
||||
}
|
||||
},
|
||||
onLoad(option) {
|
||||
this.sysType = uni.getStorageSync('sysType');
|
||||
// this.passportVal = option;
|
||||
console.log(option)
|
||||
if(option.valus==1){
|
||||
this.registerForm.idType =0
|
||||
this.registerForm.nationality =0
|
||||
}else{
|
||||
let {
|
||||
params
|
||||
} = option
|
||||
// this.improvedetail = JSON.parse(improvedetail)
|
||||
let paramsObj = JSON.parse(params);
|
||||
this.registerForm.name = paramsObj.nickName;
|
||||
this.registerForm.identityNo = paramsObj.idCard
|
||||
this.registerForm.id = paramsObj.id
|
||||
}
|
||||
this.getIdType()
|
||||
},
|
||||
}
|
||||
</script>
|
||||
|
||||
|
||||
Reference in New Issue
Block a user