From 4fe03b6ba321418a0356e37de44417be03cda5af Mon Sep 17 00:00:00 2001
From: zjj <3272660260@qq.com>
Date: 星期五, 12 四月 2024 10:24:10 +0800
Subject: [PATCH] #

---
 pages/mat/matSelected.vue |    4 ++--
 pages/login/login.vue     |   25 ++++++++++++++++++++++++-
 pages/pakin/pakin.vue     |   12 +++++++++---
 3 files changed, 35 insertions(+), 6 deletions(-)

diff --git a/pages/login/login.vue b/pages/login/login.vue
index 78e9ddc..bf4bbe6 100644
--- a/pages/login/login.vue
+++ b/pages/login/login.vue
@@ -90,6 +90,10 @@
 				<uni-popup-dialog :type="msgType" title="閫氱煡" :content="dialogContent" @confirm="dialogConfirm"
 					@close="dialogClose"></uni-popup-dialog>
 			</uni-popup>
+			
+			<uni-popup ref="message" type="message">
+				<uni-popup-message type="error" message="缃戠粶鏈繛鎺�" :duration="0"></uni-popup-message>
+			</uni-popup>
 		</view>
 		
 		<!-- 鐗堟湰鍙� -->
@@ -126,7 +130,8 @@
 				},
 				msgType: 'success',
 				filename: '',
-				dialogContent: ''
+				dialogContent: '',
+				messageText:''
 			}
 		},
 		onLoad() {
@@ -139,9 +144,27 @@
 			if (!this.url) {
 				this.url = {ip: '',port: '',project: ''}
 			}
+			
+		},
+		mounted() {
+			let that = this
+			setInterval(()=>{
+				uni.getNetworkType({
+					success: function (res) {
+					console.log(res.networkType);	
+					if(res.networkType != 'wifi'){
+						that.$refs.message.open()
+					}else{
+						that.$refs.message.close()
+					}
+					
+					}
+				});
+			},3000)
 		},
 		onShow () {
 			this.getVersion()
+			
 		},
 		methods: {
 			// 鏄剧ず/闅愯棌瀵嗙爜
diff --git a/pages/mat/matSelected.vue b/pages/mat/matSelected.vue
index 7676ea6..1324e73 100644
--- a/pages/mat/matSelected.vue
+++ b/pages/mat/matSelected.vue
@@ -55,9 +55,9 @@
 					matnr: null,
 					maktx: null,
 					specs: null,
-					batch: null,
+					batch: '',
 					anfme: 0,
-					meter: null
+					meter: ''
 				},
 				baseIP:'',
 				basePORT:'',
diff --git a/pages/pakin/pakin.vue b/pages/pakin/pakin.vue
index a2361a8..45561a7 100644
--- a/pages/pakin/pakin.vue
+++ b/pages/pakin/pakin.vue
@@ -230,6 +230,7 @@
 							that.matData = result.data
 							that.matnr = ''
 							that.matData['batch'] = ''
+							that.matData['meter'] = ''
 							uni.navigateTo({
 								url: "../mat/matSelected",
 								// 閫氳繃eventChannel鍚戣鎵撳紑椤甸潰浼犻�佹暟鎹�
@@ -399,14 +400,19 @@
 						return;
 					}
 				}
-				for (let k of that.dataList) {
-					k.batch = k.batch + '_' + k.meter
+				let tmpData = JSON.parse(JSON.stringify(that.dataList))
+				for (let k of tmpData) {
+					if(k.batch == '' || k.batch == null) {
+						k.batch = ""
+					}else {
+						k.batch = k.batch + '_' + k.meter
+					}
 				}
 				uni.request({
 					url: that.baseUrl + '/mobile/comb/auth',
 					data: JSON.stringify({
 						barcode: that.barcode,
-						combMats: that.dataList
+						combMats: tmpData
 					}),
 					method: 'POST',
 					header: {

--
Gitblit v1.9.1