From 749d37d04c015f6dfc6e430200700b59ff410b51 Mon Sep 17 00:00:00 2001
From: jiangping <jp@doumee.com>
Date: 星期四, 25 七月 2024 10:18:17 +0800
Subject: [PATCH] 提交

---
 wechat_staff/pages/webView/index.js |   31 +++++++++++++++----------------
 1 files changed, 15 insertions(+), 16 deletions(-)

diff --git a/wechat_staff/pages/webView/index.js b/wechat_staff/pages/webView/index.js
index 5f082d8..8c8b895 100644
--- a/wechat_staff/pages/webView/index.js
+++ b/wechat_staff/pages/webView/index.js
@@ -1,5 +1,6 @@
 // pages/webView/index.js
-
+import { 
+} from '../../api/index'
 Page({
 
   /**
@@ -9,23 +10,21 @@
     hasUserInfo: true,
     userInfo: {},
     id: '',
-    link: ''
+    linkUrl: ''
   },
+  
   onLoad: function (options) {
-    let that = this
-    const eventChannel = this.getOpenerEventChannel()
-   
-    if (options.link) {
-      that.setData({ link: options.link, id: options.id || '' })
-    } else {
-      // 鐩戝惉acceptDataFromOpenerPage浜嬩欢锛岃幏鍙栦笂涓�椤甸潰閫氳繃eventChannel浼犻�佸埌褰撳墠椤甸潰鐨勬暟鎹�
-      eventChannel.on('acceptDataFromOpenerPage', function(data) {
-        console.log('鍙傛暟', data)
-        if (data.title)  wx.setNavigationBarTitle({ title: data.title })
-        that.setData({ link: data.link, id: data.id })
-        // saveBannerLookNum({ id: data.id })
-      })
-    }
+    var that = this
+    const eventChannel = this.getOpenerEventChannel() 
+    if(eventChannel){
+      eventChannel.on('data', function (res) {
+        console.log(res)//浼犻�掑弬鏁� 
+        if(res){ 
+          that.setData({ linkUrl: res.link}) 
+          console.log(that.data.linkUrl)
+        }
+      });   
+    }  
   },
 
   /**

--
Gitblit v1.9.3