diff --git a/src/views/identity/setting/codeDetail.vue b/src/views/identity/setting/codeDetail.vue index fda2ab9..ba7b165 100644 --- a/src/views/identity/setting/codeDetail.vue +++ b/src/views/identity/setting/codeDetail.vue @@ -103,7 +103,9 @@ data() { return{ info: {}, - identify: {}, + identify: { + mobileSystemInfo: {}, + }, queryParams: { pageNo: 1, pageSize: 10, @@ -124,20 +126,22 @@ async getDate(id) { let res = await getCode(id); this.info = res.data; - this.identify = {}; + this.identify = { + mobileSystemInfo: {}, + }; if (res.data) { const { data: brandTypeData } = await getDictDataListByTypeList({ typeList: "brand_type" }); this.brandTypeList = brandTypeData; getFirstScanInfoByUrlAndNumber({ identityUrl: res.data.identityCode }).then(async ({ data }) => { - if(data) { + if (data) { this.identify = data; const brandSet = new Set(); const modelMap = {}; data.mobileSystemInfo = JSON.parse(data.mobileSystemInfo); if (data.mobileSystemInfo.type == "h5") { - if (data.mobileSystemInfo.brand != "UnknownTablet") { + if (data.mobileSystemInfo.brand != "UnknownTablet" && data.mobileSystemInfo.brand != null) { brandSet.add(data.mobileSystemInfo.brand); } } @@ -146,7 +150,7 @@ const sacnPageList = resf.data.map(item => { item.mobileSystemInfo = JSON.parse(item.mobileSystemInfo); if (item.mobileSystemInfo.type == "h5") { - if (item.mobileSystemInfo.brand != "UnknownTablet") { + if (item.mobileSystemInfo.brand != "UnknownTablet" && data.mobileSystemInfo.brand != null) { brandSet.add(item.mobileSystemInfo.brand); } } @@ -157,6 +161,7 @@ for (let brand of brandSet) { modelMap[brand] = []; } + console.log(brandSet, modelMap); // 请求品牌对应的手机型号 const { data: dictData } = await getDictDataListByTypeList({ typeList: [...brandSet].join(",") }); dictData.map(dict => { diff --git a/src/views/production/setting/miniProConfig.vue b/src/views/production/setting/miniProConfig.vue index 2b14a9d..f39aa49 100644 --- a/src/views/production/setting/miniProConfig.vue +++ b/src/views/production/setting/miniProConfig.vue @@ -40,8 +40,8 @@