Merge branch 'gyj' of SH-Arbitrate/miniapp into dev

This commit was merged in pull request #48.
This commit is contained in:
2024-03-18 16:14:27 +08:00
committed by Gitea
4 changed files with 63 additions and 31 deletions
+8
View File
@@ -184,4 +184,12 @@ export function msCaseSign(data) {
method: "post",
data: data,
})
}
//证件类型
export function idType(data) {
return request({
url: '/system/dict/data/type/id_type',
method: 'get',
params: data
})
}
+8
View File
@@ -93,4 +93,12 @@ export function wxregister(data) {
method: 'post',
data: data
})
}
// 获取证件类型
export function idType(data){
return request({
url: '/system/dict/data/type/id_type',
method: 'get',
params: data
})
}
+13 -5
View File
@@ -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
View File
@@ -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>