فهرست منبع

加气支付极速版

chenlei 11 ماه پیش
والد
کامیت
7254100206
4فایلهای تغییر یافته به همراه8 افزوده شده و 34 حذف شده
  1. 1 1
      src/manifest.json
  2. 1 23
      src/pages.json
  3. 3 3
      src/pages/org/index.vue
  4. 3 7
      src/utils/func/native.ts

+ 1 - 1
src/manifest.json

@@ -83,7 +83,7 @@
   },
   "quickapp": {},
   "mp-weixin": {
-    "appid": "wxf69daeba7aec5be4",
+    "appid": "wx72ba78af2cf68cf0",
     "setting": {
       "urlCheck": false,
       "minified": true

+ 1 - 23
src/pages.json

@@ -123,27 +123,5 @@
       "type": "page"
     }
   ],
-  "subPackages": [
-    {
-      "root": "pagesSubExample",
-      "pages": [
-        {
-          "path": "index",
-          "type": "page"
-        },
-        {
-          "path": "list/index",
-          "type": "page"
-        },
-        {
-          "path": "login/index",
-          "type": "page"
-        },
-        {
-          "path": "webview/index",
-          "type": "page"
-        }
-      ]
-    }
-  ]
+  "subPackages": []
 }

+ 3 - 3
src/pages/org/index.vue

@@ -174,12 +174,12 @@ const methods = {
     })
   },
   async scan() {
-    const rt: { orgId?: string } = await func.native.scan()
-    if (!rt.orgId) {
+    const rt: { query: { orgId?: string } } = await func.native.scan()
+    if (!rt.query?.orgId) {
       func.native.showToast('二维码无效')
       return
     }
-    data.orgId = rt.orgId
+    data.orgId = rt.query?.orgId
   },
   closePopup() {
     inputDialog.value.close()

+ 3 - 7
src/utils/func/native.ts

@@ -1,13 +1,9 @@
 export default {
-  async scan() {
-    const ret = { scanType: 'QR_CODE', query: {}, path: '' }
+  async scan<T>() {
+    const ret = { scanType: 'QR_CODE', query: {} as T, path: '' }
     // #ifdef H5
     // debug模式模拟 扫码信息
     if (store.common.data.debug) {
-      ret.query = {
-        cashierId: '710613333157822464',
-        gasstationId: '710613333157822464',
-      }
       return ret
     }
     // #endif
@@ -34,7 +30,7 @@ export default {
     if (scanRes.scanType === 'WX_CODE') {
       ret.scanType = 'WX_CODE'
       const pqo = func.getPQ(scanRes.path)
-      ret.query = pqo.query
+      ret.query = pqo.query as T
       ret.path = pqo.page
     }
     return ret