From 5f5179811a778b6bd996ed64cae2a96f5ccc437f Mon Sep 17 00:00:00 2001
From: zhaojs <349234519@qq.com>
Date: 星期四, 13 七月 2023 17:02:20 +0800
Subject: [PATCH] no message

---
 uniapp/utils/getClipboard.js |   21 +++++++++++++--------
 1 files changed, 13 insertions(+), 8 deletions(-)

diff --git a/uniapp/utils/getClipboard.js b/uniapp/utils/getClipboard.js
index 3c3a248..8af8f3f 100644
--- a/uniapp/utils/getClipboard.js
+++ b/uniapp/utils/getClipboard.js
@@ -2,10 +2,9 @@
   import request from './http.js'
   import utils from './utils.js'
   import clipboard from "../js_sdk/dc-clipboard/clipboard.js"
-    
-
+  
   function getclick(callback) {
-	 
+  //鑾峰彇鍓创鏉垮唴瀹�
   uni.getClipboardData({
       success: res => {
         console.log(res, '======================================================');
@@ -18,10 +17,10 @@
             var res = e.data;
             callback(res)
           }).catch(function (err) {
+			  console.log(err)
           })
         }else{
           getApp().globalData.hasMode = false
-          console.log('鍐呴儴澶嶅埗');
         }
       }
     })
@@ -31,7 +30,7 @@
   function updatePopup(dataInfo) {
     var data = dataInfo.goods;
     // 寮圭獥閬僵灞�
-    let maskLayers = new plus.nativeObj.View("maskLayers", { //鍏堝垱寤洪伄缃╁眰
+    var maskLayers = new plus.nativeObj.View("maskLayers", { //鍏堝垱寤洪伄缃╁眰
       top: '0px',
       left: '0px',
       height: '100%',
@@ -50,13 +49,13 @@
     const viewContentWidth = parseInt(popupViewWidth - viewContentPadding * 2);
     // 鏄剧ず寮圭獥
     maskLayers.show();
-
+    try{
     if (data.goodsId) {
       let sLeft = 0;
       let popupViewHeight = popupViewWidth + uni.upx2px(390);
       sLeft = (data.originalPrice.toString().length + 1) * uni.upx2px(30);
       // 寮圭獥鍐呭
-      var clipViews = new plus.nativeObj.View("clipViews", { //鍒涘缓搴曢儴鍥炬爣鑿滃崟
+    let clipViews = new plus.nativeObj.View("clipViews", { //鍒涘缓搴曢儴鍥炬爣鑿滃崟
         tag: "rect",
         top: (screenHeight - popupViewHeight) / 2 + "px",
         left: (screenWidth - popupViewWidth) / 2 + "px",
@@ -297,7 +296,7 @@
               })
             }else{
               uni.navigateTo({
-                url: '/pages/goods/goodsDetail?info=' + encodeURIComponent(JSON.stringify(data))
+                url: '/pages/goods/goodsDetail?proform=clipboard&info=' + encodeURIComponent(JSON.stringify(data))
               })
             }
             getApp().globalData.hasMode = false
@@ -744,6 +743,12 @@
         getApp().globalData.hasMode = false
       }
     });
+	}
+	catch(e)
+	{
+		console.log(e);
+		maskLayers.hide();
+	}
   }
 
   export default () => {

--
Gitblit v1.9.3