gjy 2 år sedan
förälder
incheckning
99dcb37760
1 ändrade filer med 5 tillägg och 2 borttagningar
  1. 5 2
      pages/user/user.vue

+ 5 - 2
pages/user/user.vue

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