diff --git a/common/js/request.js b/common/js/request.js
index 663bcbf..42496ee 100644
--- a/common/js/request.js
+++ b/common/js/request.js
@@ -13,8 +13,8 @@ export default {
})
let userInfo = _this.getCurUserInfo();
// request 触发前拼接 url
- args.url = 'https://www.opsoul.com' + args.url;
- // args.url = 'http://127.0.0.1:80' + args.url;
+ // args.url = 'https://www.opsoul.com' + args.url;
+ args.url = 'http://127.0.0.1:80' + args.url;
// args.url = 'http://192.168.2.42:80' + args.url;
if (!args.data) {
diff --git a/pages/index/index-home.vue b/pages/index/index-home.vue
index 7b88411..f61f7ed 100644
--- a/pages/index/index-home.vue
+++ b/pages/index/index-home.vue
@@ -246,14 +246,14 @@
this.orderStatistics = res.data;
},
async chooseEntryType(typeCode) {
- let status = 1;
- if (typeCode === 1) {
- status = 0;
- }
- await this.$request.updateWorker({
- type: typeCode,
- status: status
- });
+ // let status = 1;
+ // if (typeCode === 1) {
+ // status = 0;
+ // }
+ // await this.$request.updateWorker({
+ // type: typeCode,
+ // status: status
+ // });
if (typeCode === 1) {
this.$emit('changeCurPageCode', 'supplyChainPage');
} else if (typeCode === 0) {
diff --git a/pages/my/apply-shop.vue b/pages/my/apply-shop.vue
index 5bc3516..1bf8e8b 100644
--- a/pages/my/apply-shop.vue
+++ b/pages/my/apply-shop.vue
@@ -231,7 +231,9 @@
},
async submit(e) {
let res = await this.$request.updateWorker({
- storeStatus: 1
+ storeStatus: 1,
+ type: 1,
+ status: 0
});
if (res && res.code === 0) {
uni.navigateTo({
diff --git a/pages/my/certification.vue b/pages/my/certification.vue
index 167d2f0..c7fcd74 100644
--- a/pages/my/certification.vue
+++ b/pages/my/certification.vue
@@ -67,21 +67,21 @@
-
-
-
-
- 姓氏
-
-
-
- 名字
-
-
+
+
+
+ 姓氏
+
+
+
+ 名字
+
+
身份证号
@@ -103,8 +103,8 @@
-
+
@@ -132,15 +132,15 @@
v-model="realNameInfo.companyAddress" placeholder="请输入营业执照地址/经营地址/服务网点" />
-
- 法人/负责人
-
-
-
- 法人/负责人联系电话
-
+
+ 法人/负责人
+
+
+
+ 法人/负责人联系电话
+
其他服务
@@ -185,16 +185,16 @@
:showField="'goodsCategoryName'" placeholder="请选择"
v-model="specialSkill[index].specialSubTypeObj"
@input="chooseSpecialSkill($event, 1, index)">
-
+ @input="chooseSpecialSkill($event, 2, index)"> -->
+
-
@@ -210,8 +210,8 @@
-
+
@@ -558,7 +558,7 @@
},
async chooseSpecialSkill(e, type, index) {
let funName = "listByStep";
- if (type === 2) {
+ if (type === 1) {
funName = "qrySpecialSkillList";
}
let res = await this.$request[funName]({
@@ -567,25 +567,25 @@
});
if (res.code == 0) {
switch (type) {
+ // case 0: {
+ // this.specialSkill[index].specialSubTypeList = res.data;
+ // this.specialSkill[index].specialSubSubTypeList = [];
+ // this.specialSkill[index].specialSubTypeObj = {};
+ // this.specialSkill[index].specialSubSubTypeObj = {};
+ // }
+ // break;
case 0: {
this.specialSkill[index].specialSubTypeList = res.data;
- this.specialSkill[index].specialSubSubTypeList = [];
this.specialSkill[index].specialSubTypeObj = {};
- this.specialSkill[index].specialSubSubTypeObj = {};
+ }
+ case 1: {
+ this.specialSkill[index].specialSkillList = res.data;
+ this.specialSkill[index].specialSkillObj = {};
}
break;
- case 1: {
- this.specialSkill[index].specialSubSubTypeList = res.data;
- this.specialSkill[index].specialSubSubTypeObj = {};
- }
- case 2: {
- this.specialSkill[index].specialSkillList = res.data;
- this.specialSkill[index].specialSkillObj = {};
- }
- break;
- default:
- break;
- }
+ default:
+ break;
+ }
}
},
addSpecialSkill() {
@@ -608,9 +608,9 @@
this.specialSkill[index].insurStartDate = e[0];
this.specialSkill[index].insurEndDate = e[1];
},
- async chooseImage(e, imgList) {
+ async chooseImage(e, imgList, count) {
uni.chooseImage({
- count: 1, //默认9
+ count: count && count > 0 ? count : 1, //默认9
sizeType: ['original', 'compressed'], //可以指定是原图还是压缩图,默认二者都有
sourceType: ['album'], //从相册选择
success: (res) => {
@@ -785,7 +785,7 @@
font-size: 30rpx;
position: relative;
height: 60rpx;
- line-height: 60rpx;
+ line-height: 60rpx;
flex-basis: 40%;
}
diff --git a/pages/my/master-occupancy.vue b/pages/my/master-occupancy.vue
index afeef81..20087bd 100644
--- a/pages/my/master-occupancy.vue
+++ b/pages/my/master-occupancy.vue
@@ -470,12 +470,50 @@
})
},
/* 特殊技能 end */
- nextStep() {
+ nextStep() {
+ let workerAreas = [];
+ // 区域参数
+ this.servArea.forEach((item) => {
+ item.streetIds.forEach((streetId) => {
+ workerAreas.push({
+ provinceId: item.provinceObj.areaId,
+ cityId: item.cityObj.areaId,
+ districtId: item.districtObj.areaId,
+ streetId: streetId
+ })
+ });
+ });
+ let params = {
+ workerAreas: workerAreas
+ }
+ if (this.curStep === 0 && !this.validData(params)) {
+ return;
+ }
this.curStep = this.curStep === this.stepList.length - 1 ? this.curStep : ++this.curStep;
},
preStep() {
this.curStep = this.curStep === 0 ? 0 : --this.curStep;
},
+ validData(data) {
+ let errMsg = null;
+ if (!data.workerAreas || !data.workerAreas.length) {
+ errMsg = '请至少添加一个服务区域(需要勾选到服务街道)';
+ }
+ if (this.curStep > 0) {
+ if (!data.goodsCategories || !data.goodsCategories.length) {
+ errMsg = '请至少添加一个服务技能(需要勾选到三级类目)';
+ }
+ }
+ if (errMsg) {
+ uni.showToast({
+ icon: 'none',
+ title: errMsg,
+ duration: 3000
+ })
+ return false;
+ }
+ return true;
+ },
async submit() {
let workerId = this.curUserInfo.workerId;
let workerAreas = [];
@@ -520,19 +558,21 @@
goodsCategories: goodsCategories,
// specialSkills: specialSkills
}
+
+ if (!this.validData(params)) {
+ return;
+ }
+
let res = await this.$request.workerSettled(params);
- if (res.code === 0) {
+ if (res && res.code === 0) {
uni.showToast({
icon: 'success',
- title: '提交成功'
+ title: '提交成功',
+ duration: 2000
})
// 更新当前缓存的用户信息
- // let updateCurUserCacheRes = await this.$request.updateCurUserCache();
- // if (updateCurUserCacheRes) {
- // uni.navigateBack({
- // delta: -1
- // })
- // }
+ let newUserInfo = await this.$request.getCurUserNoCache();
+ this.$request.updateCache('userProfile', newUserInfo);
uni.navigateBack({
delta: -1
})
diff --git a/pages/my/master-settled-info.vue b/pages/my/master-settled-info.vue
index e4d160e..3281ac9 100644
--- a/pages/my/master-settled-info.vue
+++ b/pages/my/master-settled-info.vue
@@ -16,7 +16,7 @@
服务技能:
- {{item.goodsCategoryName}}
+ {{item.mergeName}}