Browse Source

H5-商品微信扫码debug

panyong 3 years ago
parent
commit
1e65f94fc7
1 changed files with 6 additions and 2 deletions
  1. 6 2
      htmldev/dashboard/src/views/sell/editTableNum/index.vue

+ 6 - 2
htmldev/dashboard/src/views/sell/editTableNum/index.vue

@@ -60,8 +60,12 @@ export default {
         needResult: 1, // 默认为0,扫描结果由微信处理,1则直接返回扫描结果,
         scanType: ['qrCode', 'barCode'], // 可以指定扫二维码还是一维码,默认二者都有
         success: function (res) {
-          var result = res.resultStr // 当needResult 为 1 时,扫码返回的结果
-          alert(result)
+          setTimeout(() => {
+            alert(JSON.stringify(res))
+          }, 1000)
+        },
+        fail: err => {
+          alert('11111-----:' + JSON.stringify(err))
         }
       })
     },