From e903d5be15a629e0ee950492d4f84c9bd7fc3af6 Mon Sep 17 00:00:00 2001 From: zhangdongxue Date: Thu, 30 Sep 2021 10:37:23 +0800 Subject: [PATCH] =?UTF-8?q?['=E8=AE=BE=E7=BD=AE']?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- apis/interfaces/setting.js | 12 +++++++++++- pages/company/approve.vue | 2 +- pages/setting/setting.vue | 16 +++++++++++++--- 3 files changed, 25 insertions(+), 5 deletions(-) diff --git a/apis/interfaces/setting.js b/apis/interfaces/setting.js index f903b7c..2e00959 100644 --- a/apis/interfaces/setting.js +++ b/apis/interfaces/setting.js @@ -78,6 +78,15 @@ const companyStatus = () => { }) } +// 是否允许企业能开通 +const companyIsallow = () => { + return request({ + url: 'companies/applies/isallow', + method:'POST' + }) +} + + export { login, @@ -88,5 +97,6 @@ export { resetUserInfo, getUserSettingInfo, aboutUs, - companyStatus + companyStatus, + companyIsallow } diff --git a/pages/company/approve.vue b/pages/company/approve.vue index 8f3b19b..e0a840d 100644 --- a/pages/company/approve.vue +++ b/pages/company/approve.vue @@ -304,7 +304,7 @@ .btns{ padding-top: $padding * 2; button{ - background: $mian-color-deep; + background: $mian-color; border-radius: 0; height: 90rpx; line-height: 90rpx; diff --git a/pages/setting/setting.vue b/pages/setting/setting.vue index c86e235..2651e58 100644 --- a/pages/setting/setting.vue +++ b/pages/setting/setting.vue @@ -89,7 +89,8 @@ wechatbind, resetUserInfo, getUserSettingInfo, - companyStatus + companyStatus, + companyIsallow } from '@/apis/interfaces/setting' import { uploads @@ -141,9 +142,18 @@ company(code) { if (code === -1) { // 跳转到企业认证页面 - this.$Router.push({ - name:'companyApprove' + companyIsallow().then(res=>{ + this.$Router.push({ + name:'companyApprove' + }) + }).catch(err=>{ + this.$refs.uToast.show({ + title: err.message, + type: 'primary', + duration: 3000 + }) }) + } else if (code === 2) { // 跳转到企业认证页面 this.$Router.push({