From dec047c9fbceb85c668970bf6e9dae0588bfd104 Mon Sep 17 00:00:00 2001
From: Tevin <tingquanren@163.com>
Date: Sun, 15 Aug 2021 15:22:13 +0800
Subject: [PATCH] 对接App跨端通讯机制

---
 common/Bridge.js |    8 ++++----
 1 files changed, 4 insertions(+), 4 deletions(-)

diff --git a/common/Bridge.js b/common/Bridge.js
index d5cdfc2..f927482 100644
--- a/common/Bridge.js
+++ b/common/Bridge.js
@@ -42,7 +42,7 @@
      */
     _checkLinking() {
         // 安卓注入
-        if (window.linking) {
+        if (window.aisim && window.aisim.linking) {
             return 'android';
         }
         // 没有注入
@@ -102,7 +102,7 @@
             delete this[name];
         };
         // 发送
-        window.linking(JSON.stringify({
+        window.aisim.linking(JSON.stringify({
             method,
             param,
             callback: 'bridge.' + name,
@@ -144,7 +144,7 @@
             if (this._receives[method]) {
                 if (marker) {
                     this._receives[method](param, (param2) => {
-                        this._sendTelling(method, param2, marker);
+                        this._sendTelling(method, param2 || {}, marker);
                     });
                 } else {
                     this._receives[method](param);
@@ -167,7 +167,7 @@
             return;
         }
         // 发送
-        window.linking(JSON.stringify({
+        window.aisim.linking(JSON.stringify({
             method,
             param,
             marker,

--
Gitblit v1.9.1