From 9bce51f651aad297ef9eb6df832bfdaf1de05d84 Mon Sep 17 00:00:00 2001
From: WXL <wl_5969728@163.com>
Date: 星期三, 22 四月 2026 14:27:54 +0800
Subject: [PATCH] 青岛推送

---
 node_modules/uview-plus/libs/util/gcanvas/env/image.js |   40 ++++++++++++++++++++++++----------------
 1 files changed, 24 insertions(+), 16 deletions(-)

diff --git a/node_modules/uview-plus/libs/util/gcanvas/env/image.js b/node_modules/uview-plus/libs/util/gcanvas/env/image.js
index 9499a51..810e5e0 100644
--- a/node_modules/uview-plus/libs/util/gcanvas/env/image.js
+++ b/node_modules/uview-plus/libs/util/gcanvas/env/image.js
@@ -1,5 +1,6 @@
 let incId = 1;
 
+import GBridge from '../bridge/bridge-weex.js'
 const noop = function () { };
 
 class GImage {
@@ -42,22 +43,29 @@
         }
 
         this._src = v;
-
-        GImage.GBridge.perloadImage([this._src, this._id], (data) => {
-            if (typeof data === 'string') {
-                data = JSON.parse(data);
-            }
-            if (data.error) {
-                var evt = { type: 'error', target: this };
-                this.onerror(evt);
-            } else {
-                this.complete = true;
-                this.width = typeof data.width === 'number' ? data.width : 0;
-                this.height = typeof data.height === 'number' ? data.height : 0;
-                var evt = { type: 'load', target: this };
-                this.onload(evt);
-            }
-        });
+		try {
+			GBridge.perloadImage([this._src, this._id], (data) => {
+				if (process.env.NODE_ENV === 'development') {
+					console.log('****GBridge.perloadImage****')
+				}
+				if (typeof data === 'string') {
+					data = JSON.parse(data);
+				}
+				
+				if (data.error) {
+					var evt = { type: 'error', target: this };
+					this.onerror(evt);
+				} else {
+					this.complete = true;
+					this.width = typeof data.width === 'number' ? data.width : 0;
+					this.height = typeof data.height === 'number' ? data.height : 0;
+					var evt = { type: 'load', target: this };
+					this.onload(evt);
+				}
+			});
+		} catch (error) {
+			console.log('perloadImage fail', error)
+		}
     }
 
     addEventListener(name, listener) {

--
Gitblit v1.9.3