Commit a662f1bf authored by linwenqing's avatar linwenqing

Merge branch 'test'

parents c5fad040 07663669
...@@ -98,6 +98,23 @@ ...@@ -98,6 +98,23 @@
<text class="font-default-color" :class="{'font-active-color':courselist[2].percent}" v-text="courselist[2].status"></text> <text class="font-default-color" :class="{'font-active-color':courselist[2].percent}" v-text="courselist[2].status"></text>
</view> </view>
</view> </view>
<!-- <view class="learn-class1 u-margin-left-30" @click="goPlay(courselist[3])">
<image class="learn-img" :src="courselist[3].pic" mode=""></image>
<image class="bofang" :src="bofang" mode=""></image>
<view class="learn-desc">
<view class="u-font-28 font-bold h68">
{{ courselist[3].title }}
</view>
<view class="u-font-20 learn-intro h48">
{{ courselist[3].desc }}
</view>
</view>
<view class="line-percent u-margin-top-35">
<u-line-progress active-color="#2979ff" :percent="courselist[3].percent" :show-percent="false">
</u-line-progress>
<text class="font-default-color" :class="{'font-active-color':courselist[3].percent}" v-text="courselist[3].status"></text>
</view>
</view> -->
</view> </view>
</scroll-view> </scroll-view>
</swiper-item> </swiper-item>
...@@ -175,6 +192,15 @@ var json = { ...@@ -175,6 +192,15 @@ var json = {
id: 173, id: 173,
sectionId: "", sectionId: "",
}, },
// {
// title: "充电桩安装要点提示",
// desc: "在充电装安装过程中需要着重注意的要点",
// pic: process.uniEnv.qn_base_url + "cdz-3x-v2.png",
// percent: 0,
// status: "",
// id: 173,
// sectionId: "",
// },
], ],
test: [ test: [
{ {
...@@ -204,6 +230,15 @@ var json = { ...@@ -204,6 +230,15 @@ var json = {
id: 151, id: 151,
sectionId: "", sectionId: "",
}, },
// {
// title: "充电桩安装要点提示",
// desc: "在充电装安装过程中需要着重注意的要点",
// pic: process.uniEnv.qn_base_url + "cdz-3x-v2.png",
// percent: 0,
// status: "",
// id: 151,
// sectionId: "",
// },
], ],
prod: [ prod: [
{ {
...@@ -233,6 +268,15 @@ var json = { ...@@ -233,6 +268,15 @@ var json = {
id: 599, id: 599,
sectionId: "", sectionId: "",
}, },
// {
// title: "学习-我的模块",
// desc: "学习-我的模块",
// pic: process.uniEnv.qn_base_url + "yaodiantishi.png",
// percent: 0,
// status: "",
// id: 600,
// sectionId: "",
// },
], ],
}; };
...@@ -374,7 +418,17 @@ export default { ...@@ -374,7 +418,17 @@ export default {
pic: courseListJson[2].pic, pic: courseListJson[2].pic,
id: courseListJson[2].id, id: courseListJson[2].id,
sectionId: courseListJson[2].sectionId, sectionId: courseListJson[2].sectionId,
}, }
// ,
// {
// title: courseListJson[3].title,
// desc: courseListJson[3].desc,
// percent: courseListJson[3].percent,
// status: courseListJson[3].status,
// pic: courseListJson[3].pic,
// id: courseListJson[3].id,
// sectionId: courseListJson[3].sectionId,
// },
], ],
examList: [ examList: [
{ {
......
...@@ -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,8 +96,10 @@ ...@@ -90,8 +96,10 @@
keyName: "business_license", keyName: "business_license",
color: "#999999", color: "#999999",
desc: ['营业执照正面'], desc: ['营业执照正面'],
data: {}
}, },
} },
isRuZhu: false,
} }
}, },
onLoad() { onLoad() {
...@@ -103,24 +111,51 @@ ...@@ -103,24 +111,51 @@
if(res.code != 200){ if(res.code != 200){
return return
} }
this.isRuZhu = true
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 ? "#999999" : "#2272FF";
this.list[key].data = getData;
}
} }
}).catch((err) => { }).catch((err) => {
this.isRuZhu = false;
}); });
}, },
onUnload() {
uni.switchTab({
url: '/pages/index/mine'
});
},
methods: { methods: {
isUpload(typeBool) { isUpload(typeBool) {
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.isRuZhu){
uni.showToast({
icon: "none",
title: "您当前未入驻,暂无法上传证件",
});
return
// 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
......
...@@ -139,7 +139,7 @@ ...@@ -139,7 +139,7 @@
this.param.type = this.type; this.param.type = this.type;
this.$u.api.submitCert(this.param) this.$u.api.submitCert(this.param)
.then((res) => { .then((res) => {
if(res.status != 200){ if(res.code != 200){
uni.showToast({ uni.showToast({
icon: "none", icon: "none",
title: res.message, title: res.message,
...@@ -149,9 +149,6 @@ ...@@ -149,9 +149,6 @@
url: '/pages/mine/cert/index' url: '/pages/mine/cert/index'
}); });
}) })
.catch((err) => {
console.log(err);
});
} }
} }
} }
......
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