diff --git a/common/js/request.js b/common/js/request.js
index e27e828..462b7b3 100644
--- a/common/js/request.js
+++ b/common/js/request.js
@@ -106,8 +106,7 @@ export default {
let registerRes = await this.registerUser({
openId: openId,
name: userInfo.userInfo.nickName,
- workerLogoUrl: userInfo.userInfo.avatarUrl,
- status: 0
+ workerLogoUrl: userInfo.userInfo.avatarUrl
});
if (registerRes.code === 0) {
wxGetUserRes = await this.qryUserInfo(openId);
@@ -227,6 +226,11 @@ export default {
}
}
return userInfo;
+ },
+ async updateCurUserCache() {
+ let curUserInfo = await this.getCurUserNoCache();
+ uni.setStorageSync('userProfile', curUserInfo);
+ return true;
},
async uploadFile(filePath) {
let res = await uni.uploadFile({
@@ -453,5 +457,28 @@ export default {
data: params
})
return res[1].data;
- },
+ },
+ async getWorkerArea(params = {}) {
+ let res = await uni.request({
+ url: '/worker/area/worker',
+ method: 'GET',
+ data: params
+ })
+ return res[1].data;
+ },
+ async getWorkerGoodsCategory(params = {}) {
+ let res = await uni.request({
+ url: '/worker/goods/category/worker',
+ method: 'GET',
+ data: params
+ })
+ return res[1].data;
+ },
+ async getWorkerSpecialSkill(params = {}) {
+ let res = await uni.request({
+ url: '/worker/special/skill/' + params.workerId,
+ method: 'POST'
+ })
+ return res[1].data;
+ }
}
diff --git a/pages.json b/pages.json
index 4fd4df6..8155686 100644
--- a/pages.json
+++ b/pages.json
@@ -49,6 +49,8 @@
"path": "personal-info"
}, {
"path": "account-security"
+ }, {
+ "path": "master-settled-info"
}]
}],
"globalStyle": {
diff --git a/pages/index/my-home.vue b/pages/index/my-home.vue
index b4abf47..bbdf6d8 100644
--- a/pages/index/my-home.vue
+++ b/pages/index/my-home.vue
@@ -76,8 +76,8 @@
icon: 'calendar'
}, {
name: '师傅入驻',
- icon: 'profile',
- pageUrl: '/pages/my/master-occupancy'
+ icon: 'profile',
+ pageUrl: '/pages/my/master-settled-info'
}, {
name: '个人信息',
icon: 'lock',
@@ -112,10 +112,15 @@
this.curUserInfo = this.$request.getCurUserInfo();
this.myInfo = await this.$api.data('myInfo');
},
- clickMenuItem(menu) {
- uni.navigateTo({
- url: menu.pageUrl
- })
+ clickMenuItem(menu) {
+ if (menu.prefixFun) {
+ this[menu.prefixFun]();
+ }
+ if (menu.pageUrl) {
+ uni.navigateTo({
+ url: menu.pageUrl
+ })
+ }
}
},
}
diff --git a/pages/my/master-occupancy.vue b/pages/my/master-occupancy.vue
index 33a60c8..ae57d0a 100644
--- a/pages/my/master-occupancy.vue
+++ b/pages/my/master-occupancy.vue
@@ -459,56 +459,70 @@
this.curStep = this.curStep === 0 ? 0 : --this.curStep;
},
async submit() {
- let workerId = this.curUserInfo.workerId;
- let workerAreas = [];
- let goodsCategories = [];
- let specialSkills = [];
- // 区域参数
- this.servArea.forEach((item) => {
- item.streetIds.forEach((streetId) => {
- workerAreas.push({
- workerId: workerId,
- provinceId: item.provinceObj.areaId,
- cityId: item.cityObj.areaId,
- districtId: item.districtObj.areaId,
- streetId: streetId
- })
- });
- });
- // 服务品类参数
- this.servSkill.forEach((item) => {
- item.subSubTypeIds.forEach((goodsCategoryId) => {
- goodsCategories.push({
- workerId: workerId,
- goodsCategoryId: goodsCategoryId
- });
- });
- });
- // 特殊技能参数
- this.specialSkill.forEach((item) => {
- specialSkills.push({
- workerId: workerId,
- specialSkillId: item.specialSkillObj.specialSkillId,
- credential: item.skillCert[0],
- insurance: item.insurCert[0],
- insuranceStart: item.insurStartDate,
- insuranceEnd: item.insurEndDate
- });
- });
+ // let workerId = this.curUserInfo.workerId;
+ // let workerAreas = [];
+ // let goodsCategories = [];
+ // let specialSkills = [];
+ // // 区域参数
+ // this.servArea.forEach((item) => {
+ // item.streetIds.forEach((streetId) => {
+ // workerAreas.push({
+ // workerId: workerId,
+ // provinceId: item.provinceObj.areaId,
+ // cityId: item.cityObj.areaId,
+ // districtId: item.districtObj.areaId,
+ // streetId: streetId
+ // })
+ // });
+ // });
+ // // 服务品类参数
+ // this.servSkill.forEach((item) => {
+ // item.subSubTypeIds.forEach((goodsCategoryId) => {
+ // goodsCategories.push({
+ // workerId: workerId,
+ // goodsCategoryId: goodsCategoryId
+ // });
+ // });
+ // });
+ // // 特殊技能参数
+ // this.specialSkill.forEach((item) => {
+ // specialSkills.push({
+ // workerId: workerId,
+ // specialSkillId: item.specialSkillObj.specialSkillId,
+ // credential: item.skillCert[0],
+ // insurance: item.insurCert[0],
+ // insuranceStart: item.insurStartDate,
+ // insuranceEnd: item.insurEndDate
+ // });
+ // });
- let params = {
- workerId: workerId,
- workerAreas: workerAreas,
- goodsCategories: goodsCategories,
- specialSkills: specialSkills
- }
- console.log(params)
- let res = await this.$request.workerSettled(params);
- if (res.code === 0) {
- uni.showToast({
- icon: 'success',
- title: '提交成功'
- })
+ // let params = {
+ // workerId: workerId,
+ // workerAreas: workerAreas,
+ // goodsCategories: goodsCategories,
+ // specialSkills: specialSkills
+ // }
+ // let res = await this.$request.workerSettled(params);
+ // if (res.code === 0) {
+ // uni.showToast({
+ // icon: 'success',
+ // title: '提交成功'
+ // })
+ // // 更新当前缓存的用户信息
+ // let updateCurUserCacheRes = await this.$request.updateCurUserCache();
+ // if (updateCurUserCacheRes) {
+ // uni.navigateBack({
+ // delta: -1
+ // })
+ // }
+ // }
+ uni.showToast({
+ icon: 'success',
+ title: '提交成功'
+ })
+ // 更新当前缓存的用户信息
+ let updateCurUserCacheRes = await this.$request.updateCurUserCache();
+ if (updateCurUserCacheRes) {
uni.navigateBack({
delta: -1
})
diff --git a/pages/my/master-settled-info.vue b/pages/my/master-settled-info.vue
new file mode 100644
index 0000000..1d3ea60
--- /dev/null
+++ b/pages/my/master-settled-info.vue
@@ -0,0 +1,119 @@
+
+
+
+
+ 返回
+ 师傅入驻信息
+
+
+ 账户未审核,请填写入驻信息
+
+
+
+
+ 服务区域:
+
+ {{strReplace(item.mergerName, "-", ",")}}
+
+
+
+
+ 服务技能:
+
+ {{item.goodsCategoryName}}
+
+
+
+
+ 特殊技能:
+
+ 类目:{{item.specialSkillName}}
+ 是否危险技能:{{item.dangerous === 0 ? '否' : '是'}}
+
+ 技能证书:
+
+
+
+ 保险证明:
+
+
+ 保险生效时期:{{item.insuranceStart}} ~ {{item.insuranceEnd}}
+
+
+
+ 审核状态:
+ 审核通过
+ 审核中
+ 审核未通过
+
+
+
+
+
+
+
+
+