Jelajahi Sumber

顶部样式

baijunde 1 tahun lalu
induk
melakukan
713bc78962
3 mengubah file dengan 9 tambahan dan 4 penghapusan
  1. 1 1
      pages/scan/check.vue
  2. 1 1
      pages/scan/details.vue
  3. 7 2
      pages/scan/manual.vue

+ 1 - 1
pages/scan/check.vue

@@ -97,7 +97,7 @@
 		.top {
 			width: 100%;
 			background: linear-gradient( 87deg, #E2F4F8 0%, #A3CDFF 100%), linear-gradient( 360deg, #FFFFFF 0%, rgba(255,255,255,0) 100%);
-			background: #fff;
+				height: var(--status-bar-height);
 		}
 		
 		/*#endif*/

+ 1 - 1
pages/scan/details.vue

@@ -109,7 +109,7 @@
 		.top {
 			width: 100%;
 			background: linear-gradient(90deg, #E6FFFF 0%, #CEF7FF 40%, #A3CEFE 73%, #BCD6FF 100%), linear-gradient(0, #F7F8FC 0%, rgba(255, 255, 255, 0) 100%);
-			background: #fff;
+				height: var(--status-bar-height);
 		}
 		
 		/*#endif*/

+ 7 - 2
pages/scan/manual.vue

@@ -46,6 +46,7 @@
 				});
 			},
 			verify(){
+				console.log(111)
 				if(this.voucherCode == ''){
 					uni.showToast({
 						title: '请输入核销码',
@@ -72,9 +73,14 @@
 				})
 			},
 			scan(){
+				let that = this
 				uni.scanCode({
 					success: function (res) {
 						console.log('条码内容:' + res.result);
+						if(res.result){
+							that.voucherCode = res.result
+							that.verify()
+						}
 					}
 				});
 			}
@@ -100,10 +106,9 @@
 		/*#ifdef APP-PLUS*/
 		.top {
 			width: 100%;
+				height: var(--status-bar-height);
 			background: linear-gradient(90deg, #E6FFFF 0%, #CEF7FF 40%, #A3CEFE 73%, #BCD6FF 100%), linear-gradient(0, #F7F8FC 0%, rgba(255, 255, 255, 0) 100%);
-			background: #fff;
 		}
-
 		/*#endif*/
 
 		.head {