ccj 2 năm trước cách đây
mục cha
commit
19e2536da1
2 tập tin đã thay đổi với 15 bổ sung3 xóa
  1. 2 2
      config/index.js
  2. 13 1
      pages/user/user.vue

+ 2 - 2
config/index.js

@@ -4,13 +4,13 @@ const dev = {
 	// baseUrlNew: 'http://192.168.110.67:9100/',
 	// baseUrlNew: 'http://192.168.110.67:9100/',
 	// baseUrlNew: 'http://192.168.1.118:8090/',
 	// baseUrlNew: 'http://192.168.1.118:8090/',
 	// baseUrlNew: 'http://192.168.110.9:9100/',
 	// baseUrlNew: 'http://192.168.110.9:9100/',
-	baseUrlNew: 'http://192.168.110.138:8090/',
+	// baseUrlNew: 'http://192.168.110.138:8090/',
 	// baseUrlNew: 'http://192.168.110.82:8099/',
 	// baseUrlNew: 'http://192.168.110.82:8099/',
 	 // baseUrlNew: 'http://192.168.110.82:8090/',
 	 // baseUrlNew: 'http://192.168.110.82:8090/',
 	// baseUrlNew: 'http://192.168.110.202:8090/',
 	// baseUrlNew: 'http://192.168.110.202:8090/',
 	// baseUrlNew: 'http://192.168.110.138:8090/',
 	// baseUrlNew: 'http://192.168.110.138:8090/',
 	// 上传图片的
 	// 上传图片的
-	// baseUrlNew: 'https://api2.eliangeyun.com/',
+	baseUrlNew: 'https://api2.eliangeyun.com/',
 	h5Appid: 'wxb66b599f7f61b46f',
 	h5Appid: 'wxb66b599f7f61b46f',
 	debug: false
 	debug: false
 }
 }

+ 13 - 1
pages/user/user.vue

@@ -401,7 +401,8 @@
 			// 	mask: true
 			// 	mask: true
 			// })
 			// })
 			// console.log(111111111)
 			// console.log(111111111)
-			if (uni.getStorageSync('pcUserInfo')) {
+			this.pcUserInfo = uni.getStorageSync('pcUserInfo')
+			if (this.pcUserInfo) {
 				// console.log(2222222)
 				// console.log(2222222)
 				for (var i = 0; i < this.gridList1.length; i++) {
 				for (var i = 0; i < this.gridList1.length; i++) {
 					if (this.gridList1[i].num == 0 || this.gridList1[i].num == 1 || this.gridList1[i].num == 3 || this
 					if (this.gridList1[i].num == 0 || this.gridList1[i].num == 1 || this.gridList1[i].num == 3 || this
@@ -497,6 +498,17 @@
 					if (res.data.data) {
 					if (res.data.data) {
 						// uni.hideLoading()
 						// uni.hideLoading()
 						that.companyList = res.data.data
 						that.companyList = res.data.data
+						if(that.pcUserInfo){
+							for(let i=0;i<that.companyList.length;i++){
+								if(that.pcUserInfo.compId == that.companyList[i].compId){
+									// uni.setStorageSync('compName1',that.companyList[i])
+									uni.setStorageSync('compName1', {company:that.companyList[i].compName})
+									
+									that.compName = that.companyList[i].compName
+								}
+								
+							}
+						}
 						// uni.setStorageSync('companyList', that.companyList)
 						// uni.setStorageSync('companyList', that.companyList)
 						console.log("that.3333")
 						console.log("that.3333")
 						console.log(that.companyList)
 						console.log(that.companyList)