From c192e381734b9caf173c90bb9141dff0326785ee Mon Sep 17 00:00:00 2001
From: QYF-GitLab1 <1940665526@qq.com>
Date: 星期四, 17 七月 2025 14:20:11 +0800
Subject: [PATCH] 京师智教小程序的专题活动模块      不做点击进入页面提示复制链接       点击时直接提示“请移步PC端查看”

---
 packageBookService/pages/bookServices/linkPage/index.js |   31 +++++++++++++++++++++++--------
 1 files changed, 23 insertions(+), 8 deletions(-)

diff --git a/packageBookService/pages/bookServices/linkPage/index.js b/packageBookService/pages/bookServices/linkPage/index.js
index 7f35294..dec1070 100644
--- a/packageBookService/pages/bookServices/linkPage/index.js
+++ b/packageBookService/pages/bookServices/linkPage/index.js
@@ -12,9 +12,25 @@
    * 鐢熷懡鍛ㄦ湡鍑芥暟--鐩戝惉椤甸潰鍔犺浇
    */
   onLoad(options) {
-    this.setData({
-      path: options.path
-    })
+    const flags = Object.keys(options).length
+    if (flags == 1) {
+      this.setData({
+        path: options.path
+      })
+    } else {
+      let path = options.path + '?'
+      for (let key in options) {
+        if (key != 'path')
+          path = path + key + '=' + options[key] + '&'
+      }
+      if (path.lastIndexOf('&') == path.length - 1) {
+        console.log(1);
+        path = path.slice(0, path.length - 1)
+      }
+      this.setData({
+        path
+      })
+    }
   },
 
   /**
@@ -62,19 +78,18 @@
   /**
    * 鐢ㄦ埛鐐瑰嚮鍙充笂瑙掑垎浜�
    */
-  onShareAppMessage() {
-
-  },
+  onShareAppMessage() {},
+  onShareTimeline() {},
   copyPath() {
     wx.setClipboardData({
       data: this.data.path,
-      success: () => {
+      success: (res) => {
         wx.showToast({
           icon: 'success',
           title: '澶嶅埗鎴愬姛',
         })
       },
-      fail: () => {
+      fail: (res) => {
         wx.showToast({
           icon: 'error',
           title: '璇烽噸璇�',

--
Gitblit v1.9.1