diff --git a/pages/personal/personal.vue b/pages/personal/personal.vue index 3f5d04b..32fe05c 100644 --- a/pages/personal/personal.vue +++ b/pages/personal/personal.vue @@ -17,12 +17,33 @@

{{nickName}}

-

UID: {{phoneuserinfo.userName}} -

- +

--> + + + 未认证 + + + + + + + 个人 + + + + + + + + 企业 + + + +
@@ -41,7 +62,7 @@ 常用功能 - + @@ -70,32 +91,42 @@ - + 基本功能 - + 我的订单 - + 报名管理 - + + + 待完善 + + + + 企业简介 + + + 个人简历 - + 用人记录 @@ -103,95 +134,10 @@ - + - @@ -216,7 +162,10 @@ testerStatustext: '', avatar: '', nickName: '', - base: this.http.baseUrl + base: this.http.baseUrl, + applyInfo: {}, //用户认证信息 + signuplistLength: 0, //培训班 + useListLength: 0, //用人需求 } }, onShow() { @@ -228,32 +177,62 @@ this.http.quickGet(`/tester/cert/apply/${this.phoneuserinfo.userId}`, true).then(res => { console.log('实名认证信息---', res) if (res.data.code == 200) { - let testerdata = res.data.data; - if (testerdata) { - if (testerdata.status == 1) { - this.testerStatustext = '已认证' - } else { - this.testerStatustext = '未认证' - } - } else { - this.testerStatustext = '未认证' + this.applyInfo = res.data.data + + if (res.data.data.companyStatus == 1 && this.phoneuserinfo.companyStatus != 2) { + this.phoneuserinfo.companyStatus = 2 + uni.setStorageSync('wxUserInfo', this.phoneuserinfo) } } else { this.testerStatustext = '未认证' } }) + this.getNum() } else { this.phoneuserinfo = null + this.signuplistLength = 0 + this.useListLength = 0 } }, onLoad() {}, methods: { + // 培训班 + async getNum() { + this.http.quickGet(`/train/myTrainingList`, true).then(res => { + this.signuplistLength = res.data.rows.length + }) + + const id = uni.getStorageSync('wxUserInfo').userId + const { + data + } = await this.http.quickGet(`/labor/my/demand/${id}`, true) + this.useListLength = data.rows.length + }, + // 去认证类型页面 + goApply() { + uni.navigateTo({ + url: '/pages/personal/setup/applyType' + }) + }, + goUserApply() { + uni.navigateTo({ + url: '/pages/personal/setup/certification' + }) + }, + goCompanyApply() { + uni.navigateTo({ + url: '/pages/personal/setup/companyApply' + }) + }, + + // 设置页面 goSetUp() { uni.navigateTo({ url: '/pages/personal/setup/index' }) }, + // 用户信息 goUserInfo() { uni.navigateTo({ url: '/pages/personal/setup/Information' @@ -350,6 +329,10 @@ uni.navigateTo({ url: '/pages/personal/setup/certification' }) + } else if (type == 'companynotes') { + uni.navigateTo({ + url: '/pages/personal/setup/companyMsg' + }) } else if (type == 'notes') { uni.navigateTo({ url: '/pages/personal/personalresume/personalresume' @@ -389,6 +372,68 @@ \ No newline at end of file diff --git a/pages/personal/setup/companyMsg.vue b/pages/personal/setup/companyMsg.vue index fbcc7ba..fc69cb7 100644 --- a/pages/personal/setup/companyMsg.vue +++ b/pages/personal/setup/companyMsg.vue @@ -30,6 +30,9 @@ } } }, + onLoad() { + this.getApplyDetail() + }, onReady() { this.$refs.form.setRules(this.rules) }, @@ -37,14 +40,36 @@ // 保存 saveCompanyDesc() { this.$refs.form.validate().then(res => { - const data = {} - this.http.quickPost('/companyInfo/update', this.data).then(re => { - console.log(re); + const data = { + applyId: this.form.companyApplyId, + companyDesc: this.form.companyDesc, + userId: this.form.userId + } + this.http.quickPost('/companyInfo/update', data, true).then(re => { + uni.showToast({ + icon: 'none', + title: '修改成功', + duration: 2000, + }) + setTimeout(() => { + uni.switchTab({ + url: '/pages/personal/personal' + }) + }, 2000) }) }).catch(errors => { }) - } + }, + getApplyDetail() { + const phoneuserinfo = uni.getStorageSync('wxUserInfo'); + this.http.quickGet(`/tester/cert/apply/${phoneuserinfo.userId}`, true).then(res => { + if (res.data.code == 200) { + this.form = res.data.data + // this.form.companyDesc = res.data.data.companyDesc + } + }) + }, } }