2
0
Эх сурвалжийг харах

更新 uniapp client 初始化逻辑

x86 1 жил өмнө
parent
commit
3dfda773f7

+ 1 - 1
open-work/package.json

@@ -44,7 +44,7 @@
     },
     "rules": {
       "no-unused-vars": "off",
-      " no-undef": "off"
+      "no-undef": "off"
     }
   },
   "browserslist": [

+ 1 - 1
open-work/src/App.vue

@@ -49,9 +49,9 @@
 
 <script>
 
+import './jssdk/bridgeClientImpl.uni'
 import wf from "@/jssdk/wf";
 import api from "@/api/api";
-import './jssdk/bridgeClientImpl.uni'
 
 export default {
     name: 'App',

+ 6 - 1
open-work/src/jssdk/bridgeClientImpl.uni.js

@@ -66,4 +66,9 @@ function register(handlerName, callback) {
     eventListeners[handlerName] = callback;
 }
 
-init();
+if (uni.postMessage) {
+    console.log('init uni client')
+    init();
+} else {
+   console.log('not init uni client')
+}