小程序修改证件类型取动态数据

This commit is contained in:
gyj
2024-03-18 16:12:31 +08:00
parent 4a2a9ed7b3
commit e16107be27
4 changed files with 63 additions and 31 deletions
+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)