gjy 2 年之前
父節點
當前提交
99dcb37760
共有 1 個文件被更改,包括 5 次插入2 次删除
  1. 5 2
      pages/user/user.vue

+ 5 - 2
pages/user/user.vue

@@ -489,7 +489,6 @@
 				// });
 				console.log(uni.getStorageSync('compName1'))
 				if(uni.getStorageSync('compName1')){
-					console.log(11111111)
 					that.compName = uni.getStorageSync('compName1').company
 				}
 				that.$api.doRequest('get', '/commonUser/getCompOwn', {
@@ -502,12 +501,16 @@
 						console.log("that.3333")
 						console.log(that.companyList)
 						if (that.companyList.length > 0) {
+							console.log("this.compName1")
+							console.log(that.compName)
 							if (!that.compName) {
 								console.log(111111111111)
 								that.compName = that.companyList[0].compName
 								uni.setStorageSync('compName1', {company:that.companyList[0].compName})
+								}else{
+									uni.setStorageSync('compName1', {company:that.compName})
 								}
-							console.log("this.compName")
+							console.log("this.compName2")
 							console.log(that.compName)
 							that.haveCompany = true
 						} else {