zhengkaixin 1 settimana fa
parent
commit
b852813697
5 ha cambiato i file con 55 aggiunte e 21 eliminazioni
  1. 11 0
      apis/utils/wxJsApi.js
  2. 8 10
      components/Tabbar.vue
  3. 1 1
      config/.env.dev.js
  4. 14 3
      pages/inspection/add.vue
  5. 21 7
      pages/task/addTask.vue

+ 11 - 0
apis/utils/wxJsApi.js

@@ -15,6 +15,17 @@ export function addSysLog(message) {
 	})
 }
 
+
+
+export function findStationByNo(data) {
+
+	return request({
+		url: '/mobile/inspectionRecord/findStationByNo',
+		data: data,
+		method: 'post',
+	})
+}
+
 export function findStationByGun(data) {
 
 	return request({

+ 8 - 10
components/Tabbar.vue

@@ -68,7 +68,9 @@
 						return true;
 				}else{
 					if(process.jphelp.NODE_ENV=='dev'){
-						this.findStationByGun("YQ202207150011001")
+						//this.findStationByGun("YQ202207150011001")
+						this.findStationByGun("E50")
+						
 					}else{
 						this.getScanCode()
 					}
@@ -84,8 +86,8 @@
 					mask: true,
 				})
 				
-				WxJsApi.findStationByGun({
-					gunNo:id,
+				WxJsApi.findStationByNo({
+					no:id,
 				
 				
 				}).then((response) => {
@@ -123,20 +125,16 @@
 						 gunId=url.split("#/?gunId=")[1].trim()
 						
 					}
-					
 					if(url&&url.indexOf("&gunId=")>-1){
 						gunId=url.split("&gunId=")[1].trim()
 					}
 					
 					if(gunId){
-						this.findStationByGun(gunId)
+						
 					}else{
-						uni.showToast({
-							title: "请扫充电桩二维码",
-							icon: "none"
-						})
+						gunId=res
 					}
-					
+					this.findStationByGun(gunId)
 					
 				}).catch(error => {
 							

+ 1 - 1
config/.env.dev.js

@@ -6,7 +6,7 @@ const UNI_APP = {
 	BASE_URL: 'https://youdian.hbjp.com.cn/charging-station-server/',
 	//
 
-	//BASE_URL: 'https://youdian-test.hbjp.com.cn/charging-station-test/',
+	BASE_URL: 'https://youdian-test.hbjp.com.cn/charging-station-test/',
 	
 	
 	//BASE_URL:'http://192.168.8.162:8081/charging-station/', //sz

+ 14 - 3
pages/inspection/add.vue

@@ -518,9 +518,20 @@
 				}
 				console.log(this.taskInfo)
 				console.log(this.submitcontent)
-				this.submitApi()
-
-
+				//this.submitApi()
+
+				uni.showModal({
+					title: '提示',
+					//showCancel: false,
+					content: "确认提交内容无误,是否提交?",
+					success: res1 => {
+						if (res1.confirm) {
+							this.submitApi()
+						} else if (res1.cancel) {
+							//('用户点击取消');
+						}
+					}
+				})
 
 			},
 

+ 21 - 7
pages/task/addTask.vue

@@ -198,14 +198,30 @@
 				this.taskInfo.images = imgUrl.join(',');
 
 
+				uni.showModal({
+					title: '提示',
+					//showCancel: false,
+					content: "确认提交内容无误,是否提交?",
+					success: res1 => {
+						if (res1.confirm) {
+							this.submitApi()
+						} else if (res1.cancel) {
+							//('用户点击取消');
+						}
+					}
+				})
+				
+
 
+			},
+			submitApi(){
 				uni.showLoading({
 					title: "加载中",
 					mask: true,
 				})
-
+				
 				API.addErr(this.taskInfo).then((res) => {
-
+				
 					uni.showModal({
 						title: '提示',
 						showCancel: false,
@@ -218,19 +234,17 @@
 							}
 						}
 					})
-
+				
 					uni.hideLoading();
-
+				
 				}).catch(error => {
-
+				
 					uni.hideLoading();
 					uni.showToast({
 						title: error,
 						icon: "none"
 					})
 				})
-
-
 			},
 			findByCatalogName(obj, listName) {