소스 검색

处理扫码结果的前缀

seimin 2 년 전
부모
커밋
2c9f87f8ee
3개의 변경된 파일10개의 추가작업 그리고 5개의 파일을 삭제
  1. 1 1
      main.js
  2. 2 2
      manifest.json
  3. 7 2
      pages/index/index.vue

+ 1 - 1
main.js

@@ -12,7 +12,7 @@ import {
12 12
 Vue.prototype.$request = request
13 13
 
14 14
 Vue.config.productionTip = false
15
-console.info('v1.0.1')
15
+console.info('v1.0.2')
16 16
 
17 17
 App.mpType = 'app'
18 18
 

+ 2 - 2
manifest.json

@@ -2,8 +2,8 @@
2 2
     "name" : "医疗服务中心转运系统",
3 3
     "appid" : "__UNI__FEB1B1E",
4 4
     "description" : "医疗服务中心转运系统",
5
-    "versionName" : "1.0.1",
6
-    "versionCode" : 101,
5
+    "versionName" : "1.0.2",
6
+    "versionCode" : 102,
7 7
     "transformPx" : false,
8 8
     "app-plus" : {
9 9
         /* 5+App特有相关 */

+ 7 - 2
pages/index/index.vue

@@ -114,10 +114,15 @@
114 114
     onShow() {
115 115
       this.flag = true;
116 116
       this.searchText = '';
117
-      uni.$off('scancodedate'); 
117
+      uni.$off('scancodedate');
118 118
       uni.$on('scancodedate', data => {
119
+        let code = data.code || '';
120
+        // 过滤
121
+        if (code.startsWith('2#')) {
122
+          code = code.slice(2);
123
+        }
119 124
         uni.navigateTo({
120
-          url: `/pages/search/search?txt=${data.code}`,
125
+          url: `/pages/search/search?txt=${code}`,
121 126
         })
122 127
       })
123 128
     },