Commit bcd1998c authored by linwenqing's avatar linwenqing

Merge branch 'dev-fix' into test

parents b46fec28 6faea5e4
...@@ -33,6 +33,7 @@ ...@@ -33,6 +33,7 @@
keyName: "id_card", keyName: "id_card",
color: "#999999", color: "#999999",
desc: ['身份证人像面', '身份证国徽面'], desc: ['身份证人像面', '身份证国徽面'],
data: {}
}, },
electrician_certificate: { electrician_certificate: {
name: "电工证", name: "电工证",
...@@ -40,8 +41,8 @@ ...@@ -40,8 +41,8 @@
isUploadName: "未上传", isUploadName: "未上传",
keyName: "electrician_certificate", keyName: "electrician_certificate",
color: "#999999", color: "#999999",
desc: ['电工证正面'], desc: ['电工证正面'],
data: {}
}, },
driver_license: { driver_license: {
name: "驾驶证", name: "驾驶证",
...@@ -50,6 +51,7 @@ ...@@ -50,6 +51,7 @@
keyName: "driver_license", keyName: "driver_license",
color: "#999999", color: "#999999",
desc: ['驾驶证正面'], desc: ['驾驶证正面'],
data: {}
}, },
driving_license: { driving_license: {
name: "行驶证", name: "行驶证",
...@@ -58,6 +60,7 @@ ...@@ -58,6 +60,7 @@
keyName: "driving_license", keyName: "driving_license",
color: "#999999", color: "#999999",
desc: ['行驶证正面'], desc: ['行驶证正面'],
data: {}
}, },
vehicle: { vehicle: {
name: "车辆照", name: "车辆照",
...@@ -66,6 +69,7 @@ ...@@ -66,6 +69,7 @@
keyName: "vehicle", keyName: "vehicle",
color: "#999999", color: "#999999",
desc: ['车辆正面/看到车牌', '车辆侧面/看到外观'], desc: ['车辆正面/看到车牌', '车辆侧面/看到外观'],
data: {}
}, },
high_sky_license: { high_sky_license: {
name: "高空证", name: "高空证",
...@@ -74,6 +78,7 @@ ...@@ -74,6 +78,7 @@
keyName: "high_sky_license", keyName: "high_sky_license",
color: "#999999", color: "#999999",
desc: ['高空证正面'], desc: ['高空证正面'],
data: {}
}, },
refrigeration_license: { refrigeration_license: {
name: "制冷证", name: "制冷证",
...@@ -82,6 +87,7 @@ ...@@ -82,6 +87,7 @@
keyName: "refrigeration_license", keyName: "refrigeration_license",
color: "#999999", color: "#999999",
desc: ['制冷证正面'], desc: ['制冷证正面'],
data: {}
}, },
business_license: { business_license: {
name: "营业执照", name: "营业执照",
...@@ -90,6 +96,7 @@ ...@@ -90,6 +96,7 @@
keyName: "business_license", keyName: "business_license",
color: "#999999", color: "#999999",
desc: ['营业执照正面'], desc: ['营业执照正面'],
data: {}
}, },
} }
} }
...@@ -103,13 +110,18 @@ ...@@ -103,13 +110,18 @@
if(res.code != 200){ if(res.code != 200){
return return
} }
for(let key in this.list){ for(let key in this.list){
let getData = res.data[key]; if(res.data.length <= 0){
this.list[key].isUpload = getData.status; this.list[key].data = {}
this.list[key].isUploadName = getData.status == 1 ? '已上传' : '未上传'; }else{
this.list[key].color = getData.status == 1 ? "#999999" : "#2272FF"; let getData = res.data[key];
this.list[key].iconColor = getData.status == 1 ? "#2272FF" : "#999999"; this.list[key].isUpload = getData.status;
this.list[key].data = getData; this.list[key].isUploadName = getData.status == 1 ? '已上传' : '未上传';
this.list[key].color = getData.status == 1 ? "#999999" : "#2272FF";
this.list[key].iconColor = getData.status == 1 ? "#2272FF" : "#999999";
this.list[key].data = getData;
}
} }
}).catch((err) => { }).catch((err) => {
}); });
...@@ -119,8 +131,19 @@ ...@@ -119,8 +131,19 @@
return typeBool ? '已上传' : '未上传' return typeBool ? '已上传' : '未上传'
}, },
toDetail(key) { toDetail(key) {
let data = this.list[key].data; let data = null;
data.desc = this.list[key].desc; if(this.list[key].data.length == undefined || this.list[key].data.length <= 0){
data = {
type: key,
url: "",
desc: this.list[key].desc,
status: 0,
type_key: key
}
}else{
data = this.list[key].data;
data.desc = this.list[key].desc;
}
if(data.status != 1){ if(data.status != 1){
wx.navigateTo({ wx.navigateTo({
url: '/pages/mine/cert/upload?type=' + data.type_key url: '/pages/mine/cert/upload?type=' + data.type_key
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment