diff --git a/api/handlecase/index.js b/api/handlecase/index.js
index fa4ae61..9006349 100644
--- a/api/handlecase/index.js
+++ b/api/handlecase/index.js
@@ -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
+ })
}
\ No newline at end of file
diff --git a/api/login.js b/api/login.js
index c543fa6..3f113c7 100644
--- a/api/login.js
+++ b/api/login.js
@@ -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
+ })
}
\ No newline at end of file
diff --git a/pages/handlecase/component/newlyAddedCase.vue b/pages/handlecase/component/newlyAddedCase.vue
index 03e9600..9bdc841 100644
--- a/pages/handlecase/component/newlyAddedCase.vue
+++ b/pages/handlecase/component/newlyAddedCase.vue
@@ -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)
diff --git a/pages/register.vue b/pages/register.vue
index 1576382..9eee9b5 100644
--- a/pages/register.vue
+++ b/pages/register.vue
@@ -30,14 +30,14 @@
-
@@ -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()
+ },
}