Kaynağa Gözat

Merge branch 'master' of https://git.nanodreamtech.com/Boss/yizhizan-h5

lyuis 7 ay önce
ebeveyn
işleme
5d7df019d2
2 değiştirilmiş dosya ile 11 ekleme ve 4 silme
  1. 4 2
      pages/my/index.vue
  2. 7 2
      pages/my/myCompany.vue

+ 4 - 2
pages/my/index.vue

@@ -622,7 +622,8 @@
 											规则中心
 										</view>
 									</view>
-									<view v-if="iosAudit == 0" class="util-item" @click="goNav('/pages/my/VIP/benefits')">
+									<view v-if="iosAudit == 0" class="util-item"
+										@click="goNav('/pages/my/VIP/benefits')">
 										<image src="../../static/images/my/icon/utils/benefits.png"
 											style="width: 54rpx; height: 54rpx" mode=""></image>
 										<view class="" style="color: #1a1a1a; font-size: 24rpx; margin-top: 15rpx">
@@ -1300,7 +1301,6 @@ export default {
 		},
 		// 跳转到职位管理页面
 		goJobManagement() {
-			console.log(this.companyInfo, '跳转流程')
 			let status = '';
 			if (this.companyInfo && !this.companyInfo.companyCertification) {
 				status = 1;
@@ -1486,12 +1486,14 @@ export default {
 		getCompanyStatus() {
 			this.$Request.get("/app/company/selectCompanyByUserId").then((res) => {
 				if (res.code == 0 && res.data) {
+					console.log('我获取了公司信息')
 					this.companyInfo = res.data
 					this.companyStatus = res.data.status;
 					uni.setStorageSync("companyStatus", this.companyStatus);
 					uni.setStorageSync("companyName", res.data.companyAllName);
 				} else {
 					this.companyStatus = "";
+					this.companyInfo = {};
 				}
 			});
 		},

+ 7 - 2
pages/my/myCompany.vue

@@ -130,9 +130,9 @@ export default {
 		// 加入公司
 		goCompany() {
 			uni.navigateTo({
-				url:'/pages/my/businessLicense'
+				url: '/pages/my/businessLicense'
 			})
-		 },
+		},
 		// 关闭离开公司弹窗
 		closeLeaveModal() {
 			this.showLeaveModal = false;
@@ -147,6 +147,11 @@ export default {
 			this.$Request.postJson("/app/company/deleteCompany").then(res => {
 				uni.hideLoading();
 				if (res.code === 0) {
+					// 离开公司之后需要清除缓存的公司信息
+					uni.removeStorageSync('companyId');
+					uni.removeStorageSync('companyInfo');
+					uni.removeStorageSync('companyName');
+					uni.removeStorageSync('companyStatus')
 					setTimeout(() => {
 						uni.switchTab({
 							url: '/pages/my/index'