Browse Source

地理位置

蒋科 4 months ago
parent
commit
bfc23ec812
2 changed files with 17 additions and 5 deletions
  1. 1 1
      manifest.json
  2. 16 4
      pages/index/index.vue

+ 1 - 1
manifest.json

@@ -1,5 +1,5 @@
 {
-    "name" : "智小锂",
+    "name" : "智小锂运维",
     "appid" : "__UNI__26352DE",
     "description" : "",
     "versionName" : "1.0.0",

+ 16 - 4
pages/index/index.vue

@@ -119,7 +119,7 @@
 				this.getIndexOptionData();
 				this.getStationSupData();
 			}
-			this.getUserCode()
+			// this.getUserCode()
 		},
 		onLoad() {
 
@@ -134,6 +134,9 @@
 			},
 			//搜索换电站
 			searchStation(){
+				if(!this.params.code && uni.getStorageSync('token')){
+					this.getUserCode()
+				}
 				this.getStationSupData()
 			},
 			//获取用户code
@@ -229,7 +232,10 @@
 				})
 			},
 			//跳转工单上报
-			gotoOrderUp() {
+			gotoOrderUp() {
+				if(!this.params.code && uni.getStorageSync('token')){
+					this.getUserCode()
+				}
 				let token = uni.getStorageSync('token')
 				if(!token) {
 					uni.navigateTo({
@@ -242,7 +248,10 @@
 				}
 			},
 			//跳转工单页面
-			gotoOrder(type) {
+			gotoOrder(type) {
+				if(!this.params.code && uni.getStorageSync('token')){
+					this.getUserCode()
+				}
 				let token = uni.getStorageSync('token')
 				if(!token) {
 					uni.navigateTo({
@@ -255,7 +264,10 @@
 				}
 			},
 			//跳转合作者页面
-			gotoSupplier(item) {
+			gotoSupplier(item) {
+				if(!this.params.code && uni.getStorageSync('token')){
+					this.getUserCode()
+				}
 				let token = uni.getStorageSync('token')
 				if(!token) {
 					uni.navigateTo({