Browse Source

处理商品分享页面逻辑

viczhq 3 weeks ago
parent
commit
243696a5c3

File diff suppressed because it is too large
+ 7 - 0
project.private.config.json


+ 64 - 45
src/components/index/ProductList/index.jsx

@@ -7,7 +7,7 @@ import React, {
7
 import { View, Text, Image, Button } from "@tarojs/components";
7
 import { View, Text, Image, Button } from "@tarojs/components";
8
 import { AtCheckbox, AtActivityIndicator } from "taro-ui";
8
 import { AtCheckbox, AtActivityIndicator } from "taro-ui";
9
 import { setShareContent } from "../../../common/share";
9
 import { setShareContent } from "../../../common/share";
10
-import { getShareJump } from "../../../service";
10
+import { getShareJump, getProductDetail } from "../../../service";
11
 import { handleLog } from "../../../common/track";
11
 import { handleLog } from "../../../common/track";
12
 import Taro from "@tarojs/taro";
12
 import Taro from "@tarojs/taro";
13
 import "./index.less";
13
 import "./index.less";
@@ -99,56 +99,75 @@ const ProductList = forwardRef((props, ref) => {
99
       onAddProduct && onAddProduct(productId, index);
99
       onAddProduct && onAddProduct(productId, index);
100
     }
100
     }
101
   };
101
   };
102
-  // 设置分享标题
103
-  const handleShareTitleChange = (newTitle) => {
104
-    setShareTitle(newTitle);
105
-  };
106
-  useEffect(() => {
107
-    if (shareModalOpened) {
108
-      // 设置分享内容
109
-      setShareContent({
110
-        title: shareTitle || currentShareProduct.item_title,
111
-        path: `/pages/indexSub/productDetail/index?id=${
112
-          currentShareProduct.id
113
-        }&&isShare=${true}&&shareJump=${shareLink}`,
114
-        imageUrl: currentShareProduct.image_url,
115
-      });
116
-    }
117
-  }, [shareTitle]);
118
   // 分享商品
102
   // 分享商品
119
-  const shareProduct = (product, e) => {
103
+  const shareProduct = async (product, e) => {
120
     e.stopPropagation(); // 防止事件穿透
104
     e.stopPropagation(); // 防止事件穿透
121
     setCurrentShareProduct(product);
105
     setCurrentShareProduct(product);
106
+    const productRes = await getProductDetail({
107
+      goods_id: product.id,
108
+    });
109
+    // 使用 encodeURIComponent 编码商品详情数据
110
+    const encodedProductDetail = encodeURIComponent(JSON.stringify(productRes));
111
+    // 设置分享路径
112
+    const share_extend = JSON.stringify({
113
+      path: `pages/indexSub/productDetail/index?id=${product.id}&isShare=true&isSeckill=${isSeckill}&shareType=11&&shareUserId=${shareUserId}`,
114
+    });
122
     getShareJump({
115
     getShareJump({
123
-      share_type: 1,
116
+      share_type: 11,
124
       share_id: product.id,
117
       share_id: product.id,
118
+      share_extend,
125
     }).then((res) => {
119
     }).then((res) => {
126
-      // 打开分享弹窗
127
-      let shareUserId = "";
128
-      if (Taro.getStorageSync("loginInfo")) {
129
-        shareUserId = Taro.getStorageSync("loginInfo").id;
130
-      }
131
-      setShareContent({
132
-        title: shareTitle || product.item_title,
133
-        path: `/pages/indexSub/productDetail/index?id=${
134
-          product.id
135
-        }&&isShare=${true}&&shareJump=${
136
-          res.share_unique_value
137
-        }&&isSeckill=${isSeckill}&&shareUserId=${shareUserId}`,
138
-        imageUrl: product.image_url,
120
+      Taro.navigateTo({
121
+        url: `/pages/indexSub/sharePage/index?isSeckill=${isSeckill}&&tagTitle=${tagTitle}&&productDetail=${encodedProductDetail}&&shareJump=${res.share_unique_value}&&share_scheme_link=${encodeURIComponent(res.share_scheme_link)}&&shareUserId=${shareUserId}`,
139
       });
122
       });
140
-      setShareLink(res.share_unique_value);
141
-      setShareModalOpened(true);
142
-      // 埋点
143
-      if (isSeckill) {
144
-        handleLog({
145
-          event_type: "share_product_link",
146
-          event_type_title: "点击分享赚",
147
-          goods_id: product.id,
148
-        });
149
-      }
150
     });
123
     });
124
+    return;
125
+    // 埋点
126
+    if (isSeckill) {
127
+      handleLog({
128
+        event_type: "share_product_link",
129
+        event_type_title: "点击分享赚",
130
+        goods_id: product.id,
131
+      });
132
+    }
133
+    // getShareJump({
134
+    //   share_type: 1,
135
+    //   share_id: product.id,
136
+    // }).then((res) => {
137
+    //   // 打开分享弹窗
138
+    //   let shareUserId = "";
139
+    //   if (Taro.getStorageSync("loginInfo")) {
140
+    //     shareUserId = Taro.getStorageSync("loginInfo").id;
141
+    //   }
142
+    //   setShareContent({
143
+    //     title: shareTitle || product.item_title,
144
+    //     path: `/pages/indexSub/productDetail/index?id=${
145
+    //       product.id
146
+    //     }&&isShare=${true}&&shareJump=${
147
+    //       res.share_unique_value
148
+    //     }&&isSeckill=${isSeckill}&&shareUserId=${shareUserId}`,
149
+    //     imageUrl: product.image_url,
150
+    //   });
151
+    //   setShareLink(res.share_unique_value);
152
+    //   setShareModalOpened(true);
153
+    // });
151
   };
154
   };
155
+  // 设置分享标题
156
+  // const handleShareTitleChange = (newTitle) => {
157
+  //   setShareTitle(newTitle);
158
+  // };
159
+  // useEffect(() => {
160
+  //   if (shareModalOpened) {
161
+  //     // 设置分享内容
162
+  //     setShareContent({
163
+  //       title: shareTitle || currentShareProduct.item_title,
164
+  //       path: `/pages/indexSub/productDetail/index?id=${
165
+  //         currentShareProduct.id
166
+  //       }&&isShare=${true}&&shareJump=${shareLink}`,
167
+  //       imageUrl: currentShareProduct.image_url,
168
+  //     });
169
+  //   }
170
+  // }, [shareTitle]);
152
   return (
171
   return (
153
     <View className="product-list-wrap">
172
     <View className="product-list-wrap">
154
       {/* {isSeckill && (
173
       {/* {isSeckill && (
@@ -226,7 +245,7 @@ const ProductList = forwardRef((props, ref) => {
226
                     </View>
245
                     </View>
227
                   )}
246
                   )}
228
                 </View>
247
                 </View>
229
-                <View className={`profit-line ${isShare ? 'flexEnd' : ''}`}>
248
+                <View className={`profit-line ${isShare ? "flexEnd" : ""}`}>
230
                   {!isShare ? (
249
                   {!isShare ? (
231
                     Number(product.estimated_commission_buy) > 0 ? (
250
                     Number(product.estimated_commission_buy) > 0 ? (
232
                       <View className="save-money">
251
                       <View className="save-money">
@@ -296,7 +315,7 @@ const ProductList = forwardRef((props, ref) => {
296
       )}
315
       )}
297
       {isNoMore && !isEmpty && <View className="no-more">没有更多了~</View>}
316
       {isNoMore && !isEmpty && <View className="no-more">没有更多了~</View>}
298
       {/* 分享弹窗 */}
317
       {/* 分享弹窗 */}
299
-      <ShareModal
318
+      {/* <ShareModal
300
         onClose={() => {
319
         onClose={() => {
301
           setShareModalOpened(false);
320
           setShareModalOpened(false);
302
           // 添加延时,等待关闭动画完成后再重置其他状态
321
           // 添加延时,等待关闭动画完成后再重置其他状态
@@ -309,7 +328,7 @@ const ProductList = forwardRef((props, ref) => {
309
         isOpened={shareModalOpened}
328
         isOpened={shareModalOpened}
310
         product={currentShareProduct}
329
         product={currentShareProduct}
311
         onShareTitleChange={handleShareTitleChange}
330
         onShareTitleChange={handleShareTitleChange}
312
-      />
331
+      /> */}
313
     </View>
332
     </View>
314
   );
333
   );
315
 });
334
 });

+ 59 - 40
src/pages/indexSub/productDetail/index.jsx

@@ -67,7 +67,7 @@ export default class Index extends Component {
67
     Taro.hideShareMenu({
67
     Taro.hideShareMenu({
68
       menus: ["shareAppMessage", "shareTimeline"],
68
       menus: ["shareAppMessage", "shareTimeline"],
69
     });
69
     });
70
-    const {
70
+    let {
71
       id,
71
       id,
72
       isShare,
72
       isShare,
73
       isSeckill,
73
       isSeckill,
@@ -76,7 +76,9 @@ export default class Index extends Component {
76
       tagTitle,
76
       tagTitle,
77
       shareType,
77
       shareType,
78
       isShowBack,
78
       isShowBack,
79
+      share_unique_value
79
     } = Taro.getCurrentInstance().router.params;
80
     } = Taro.getCurrentInstance().router.params;
81
+    shareJump = shareJump || share_unique_value
80
     let session_key = Taro.getStorageSync("session_key");
82
     let session_key = Taro.getStorageSync("session_key");
81
     let userInfo = Taro.getStorageSync("userInfo");
83
     let userInfo = Taro.getStorageSync("userInfo");
82
     let isShowSign = Taro.getStorageSync("isShowSign");
84
     let isShowSign = Taro.getStorageSync("isShowSign");
@@ -109,10 +111,10 @@ export default class Index extends Component {
109
         // 埋点
111
         // 埋点
110
         if (this.state.isSeckill) {
112
         if (this.state.isSeckill) {
111
           handleLog({
113
           handleLog({
112
-            event_type:"direct_to_product",
113
-            event_type_title:'进入商品详情页',
114
+            event_type: "direct_to_product",
115
+            event_type_title: "进入商品详情页",
114
             goods_id: Number(this.state.id),
116
             goods_id: Number(this.state.id),
115
-            shareUserId:this.state.shareUserId
117
+            shareUserId: this.state.shareUserId,
116
           }); //埋点
118
           }); //埋点
117
         }
119
         }
118
         // 判断是否显示签约弹窗
120
         // 判断是否显示签约弹窗
@@ -159,21 +161,38 @@ export default class Index extends Component {
159
       isOpened: "self",
161
       isOpened: "self",
160
     });
162
     });
161
   };
163
   };
164
+  // 绑定分享跳转标识
165
+  bindShareJump = async () => {
166
+    let shareJump = Taro.getStorageSync("shareJump");
167
+    await bindShareJump({
168
+      share_type: 1,
169
+      share_unique_value: shareJump,
170
+    });
171
+    Taro.removeStorageSync("shareJump");
172
+    Taro.removeStorageSync("shareType");
173
+  };
162
   // 分享
174
   // 分享
163
   openSharePopup = async () => {
175
   openSharePopup = async () => {
164
-    // 使用 encodeURIComponent 编码商品详情数据
165
-    // const encodedProductDetail = encodeURIComponent(JSON.stringify(this.state.productDetail));
166
-    // Taro.navigateTo({
167
-    //   url: `/pages/indexSub/sharePage/index?isSeckill=${this.state.isSeckill}&shareJump=${this.state.shareJump}&tagTitle=${this.state.tagTitle}&productDetail=${encodedProductDetail}`,
168
-    // });
169
-    // return
176
+    let shareUserId = "";
177
+    if (Taro.getStorageSync("loginInfo")) {
178
+      shareUserId = Taro.getStorageSync("loginInfo").id;
179
+    }
180
+    // 设置分享路径
181
+    const share_extend = JSON.stringify({
182
+      path: `pages/indexSub/productDetail/index?id=${this.state.id}&isShare=true&isSeckill=${this.state.isSeckill}&shareType=11&&shareUserId=${shareUserId}`,
183
+    });
184
+    // 获取分享跳转标识
170
     const res = await getShareJump({
185
     const res = await getShareJump({
171
-      share_type: 1,
186
+      share_type: 11,
172
       share_id: this.state.id,
187
       share_id: this.state.id,
188
+      share_extend,
173
     });
189
     });
174
-    this.setState({
175
-      shareJump: res.share_unique_value,
176
-      isOpened: "share",
190
+    // 使用 encodeURIComponent 编码商品详情数据
191
+    const encodedProductDetail = encodeURIComponent(
192
+      JSON.stringify(this.state.productDetail)
193
+    );
194
+    Taro.navigateTo({
195
+      url: `/pages/indexSub/sharePage/index?isSeckill=${this.state.isSeckill}&shareJump=${res.share_unique_value}&tagTitle=${this.state.tagTitle}&productDetail=${encodedProductDetail}&shareUserId=${shareUserId}&&share_scheme_link=${encodeURIComponent(res.share_scheme_link)}`,
177
     });
196
     });
178
     // 埋点
197
     // 埋点
179
     if (this.state.isSeckill) {
198
     if (this.state.isSeckill) {
@@ -181,34 +200,34 @@ export default class Index extends Component {
181
         event_type: "share_product_link",
200
         event_type: "share_product_link",
182
         event_type_title: "点击分享赚",
201
         event_type_title: "点击分享赚",
183
         goods_id: Number(this.state.id),
202
         goods_id: Number(this.state.id),
184
-        shareUserId:this.state.shareUserId
185
-      }); //埋点
203
+        shareUserId: this.state.shareUserId,
204
+      });
186
     }
205
     }
187
-  };
188
-  // 绑定分享跳转标识
189
-  bindShareJump = async () => {
190
-    let shareJump = Taro.getStorageSync("shareJump");
191
-    await bindShareJump({
192
-      share_type: 1,
193
-      share_unique_value: shareJump,
194
-    });
195
-    Taro.removeStorageSync("shareJump");
196
-    Taro.removeStorageSync("shareType");
206
+    // return
207
+    // const res = await getShareJump({
208
+    //   share_type: 1,
209
+    //   share_id: this.state.id,
210
+    // });
211
+    // this.setState({
212
+    //   shareJump: res.share_unique_value,
213
+    //   isOpened: "share",
214
+    // });
215
+    // 埋点
197
   };
216
   };
198
   // 设置分享标题
217
   // 设置分享标题
199
-  handleShareTitleChange = (newTitle) => {
200
-    this.setState({
201
-      shareTitle: newTitle,
202
-    });
203
-  };
218
+  // handleShareTitleChange = (newTitle) => {
219
+  //   this.setState({
220
+  //     shareTitle: newTitle,
221
+  //   });
222
+  // };
204
   // 配置分享内容
223
   // 配置分享内容
205
-  onShareAppMessage() {
206
-    return {
207
-      title: this.state.shareTitle || this.state.productDetail.item_title,
208
-      path: `/pages/indexSub/productDetail/index?id=${this.state.id}&&isShare=true&&isSeckill=${this.state.isSeckill}&&shareJump=${this.state.shareJump}&&tagTitle=${this.state.tagTitle}&&shareType=1`,
209
-      imageUrl: this.state.productDetail.images[0].img,
210
-    };
211
-  }
224
+  // onShareAppMessage() {
225
+  //   return {
226
+  //     title: this.state.shareTitle || this.state.productDetail.item_title,
227
+  //     path: `/pages/indexSub/productDetail/index?id=${this.state.id}&&isShare=true&&isSeckill=${this.state.isSeckill}&&shareJump=${this.state.shareJump}&&tagTitle=${this.state.tagTitle}&&shareType=1`,
228
+  //     imageUrl: this.state.productDetail.images[0].img,
229
+  //   };
230
+  // }
212
   // 添加返回方法
231
   // 添加返回方法
213
   handleBack = () => {
232
   handleBack = () => {
214
     const pages = Taro.getCurrentPages();
233
     const pages = Taro.getCurrentPages();
@@ -393,7 +412,7 @@ export default class Index extends Component {
393
           isSeckill={this.state.isSeckill}
412
           isSeckill={this.state.isSeckill}
394
         />
413
         />
395
         {/* 分享弹窗 */}
414
         {/* 分享弹窗 */}
396
-        {this.state.isOpened == "share" && (
415
+        {/* {this.state.isOpened == "share" && (
397
           <ShareModal
416
           <ShareModal
398
             onClose={() => {
417
             onClose={() => {
399
               this.setState({
418
               this.setState({
@@ -405,7 +424,7 @@ export default class Index extends Component {
405
             product={this.state.productDetail}
424
             product={this.state.productDetail}
406
             onShareTitleChange={this.handleShareTitleChange}
425
             onShareTitleChange={this.handleShareTitleChange}
407
           />
426
           />
408
-        )}
427
+        )} */}
409
         {/* 签约弹窗 */}
428
         {/* 签约弹窗 */}
410
         <SignModal
429
         <SignModal
411
           isOpened={this.state.isOpened == "sign"}
430
           isOpened={this.state.isOpened == "sign"}

+ 78 - 36
src/pages/indexSub/sharePage/index.jsx

@@ -10,23 +10,29 @@ export default class Index extends Component {
10
     isSeckill: false, //是否是秒杀商品
10
     isSeckill: false, //是否是秒杀商品
11
     shareJump: "", //分享链接
11
     shareJump: "", //分享链接
12
     tagTitle: "", //标签标题
12
     tagTitle: "", //标签标题
13
+    shareUserId: "", //分享用户id
14
+    share_scheme_link: "", //分享方案链接
13
   };
15
   };
14
   componentDidMount() {
16
   componentDidMount() {
15
-    const { isSeckill, shareJump, tagTitle, productDetail } =
17
+    Taro.hideShareMenu({
18
+      menus: ["shareAppMessage", "shareTimeline"],
19
+    });
20
+    const { isSeckill, shareJump, tagTitle, productDetail,shareUserId,share_scheme_link } =
16
       Taro.getCurrentInstance().router.params;
21
       Taro.getCurrentInstance().router.params;
17
-
18
     this.setState({
22
     this.setState({
19
       isSeckill: isSeckill === "true",
23
       isSeckill: isSeckill === "true",
20
       shareJump,
24
       shareJump,
21
       tagTitle,
25
       tagTitle,
22
       productDetail: JSON.parse(decodeURIComponent(productDetail)),
26
       productDetail: JSON.parse(decodeURIComponent(productDetail)),
23
       shareTitle: JSON.parse(decodeURIComponent(productDetail)).item_title,
27
       shareTitle: JSON.parse(decodeURIComponent(productDetail)).item_title,
28
+      shareUserId,
29
+      share_scheme_link:decodeURIComponent(share_scheme_link)
24
     });
30
     });
25
   }
31
   }
26
   // 设置分享标题
32
   // 设置分享标题
27
   handleShareTitleChange = (newTitle) => {
33
   handleShareTitleChange = (newTitle) => {
28
     this.setState({
34
     this.setState({
29
-      shareTitle: newTitle,
35
+      shareTitle: newTitle.detail.value,
30
     });
36
     });
31
   };
37
   };
32
   // 保存图片到手机
38
   // 保存图片到手机
@@ -58,41 +64,75 @@ export default class Index extends Component {
58
     });
64
     });
59
   };
65
   };
60
 
66
 
61
-  saveImage = () => {
62
-    Taro.downloadFile({
63
-      url: this.state.productDetail.images[0].img,
64
-      success: (res) => {
65
-        console.log(res);
67
+  saveImage = async () => {
68
+    Taro.showLoading({
69
+      title: '保存中...',
70
+    });
71
+    const { images } = this.state.productDetail;
72
+    try {
73
+      for (const image of images) {
74
+        // 下载图片
75
+        const downloadRes = await Taro.downloadFile({
76
+          url: image.img
77
+        });
66
 
78
 
67
-        Taro.saveImageToPhotosAlbum({
68
-          filePath: res.tempFilePath,
69
-          success: () => {
70
-            Taro.showToast({
71
-              title: "保存成功",
72
-              icon: "success",
73
-            });
74
-          },
75
-          fail: () => {
76
-            Taro.showToast({
77
-              title: "保存失败",
78
-              icon: "none",
79
-            });
80
-          },
79
+        // 保存到相册
80
+        await Taro.saveImageToPhotosAlbum({
81
+          filePath: downloadRes.tempFilePath
81
         });
82
         });
82
-      },
83
-      fail: () => {
83
+      }
84
+
85
+      // 全部保存成功后提示
86
+      Taro.showToast({
87
+        title: "所有图片保存成功",
88
+        icon: "success",
89
+        duration: 2000
90
+      });
91
+    } catch (error) {
92
+      Taro.showToast({
93
+        title: "保存失败",
94
+        icon: "none",
95
+        duration: 2000
96
+      });
97
+    }
98
+  };
99
+  // 复制全部内容
100
+  handleCopyAll = () => {
101
+    Taro.setClipboardData({
102
+      data: `${this.state.shareTitle}\n${this.state.share_scheme_link}`,
103
+    });
104
+  };
105
+  // 复制标题
106
+  handleCopyTitle = () => {
107
+    Taro.setClipboardData({
108
+      data: this.state.shareTitle,
109
+      success: () => {
84
         Taro.showToast({
110
         Taro.showToast({
85
-          title: "图片下载失败",
111
+          title: "标题复制成功",
86
           icon: "none",
112
           icon: "none",
113
+          duration: 1500
87
         });
114
         });
88
-      },
115
+      }
116
+    });
117
+  };
118
+  // 复制链接
119
+  handleCopyLink = () => {
120
+    Taro.setClipboardData({
121
+      data: this.state.share_scheme_link,
122
+      success: () => {
123
+        Taro.showToast({
124
+          title: "链接复制成功",
125
+          icon: "none",
126
+          duration: 1500
127
+        });
128
+      }
89
     });
129
     });
90
   };
130
   };
91
   // 配置分享内容
131
   // 配置分享内容
92
   onShareAppMessage() {
132
   onShareAppMessage() {
93
     return {
133
     return {
94
       title: this.state.shareTitle || this.state.productDetail.item_title,
134
       title: this.state.shareTitle || this.state.productDetail.item_title,
95
-      path: `/pages/indexSub/productDetail/index?id=${this.state.productDetail.id}&&isShare=true&&isSeckill=${this.state.isSeckill}&&shareJump=${this.state.shareJump}&&tagTitle=${this.state.tagTitle}&&shareType=1`,
135
+      path: `/pages/indexSub/productDetail/index?id=${this.state.productDetail.id}&&isShare=true&&isSeckill=${this.state.isSeckill}&&shareJump=${this.state.shareJump}&&tagTitle=${this.state.tagTitle}&&shareType=11&&shareUserId=${this.state.shareUserId}`,
96
       imageUrl: this.state.productDetail.images[0].img,
136
       imageUrl: this.state.productDetail.images[0].img,
97
     };
137
     };
98
   }
138
   }
@@ -125,7 +165,7 @@ export default class Index extends Component {
125
         <View className="text-box">
165
         <View className="text-box">
126
           <View className="text-box-top">
166
           <View className="text-box-top">
127
             <View className="text-box-title">文案素材</View>
167
             <View className="text-box-title">文案素材</View>
128
-            <View className="text-box-save">复制全部内容</View>
168
+            <View onClick={this.handleCopyAll} className="text-box-save">复制全部内容</View>
129
           </View>
169
           </View>
130
           <View className="text-box-content">
170
           <View className="text-box-content">
131
             {/* 商品标题盒子 */}
171
             {/* 商品标题盒子 */}
@@ -134,16 +174,18 @@ export default class Index extends Component {
134
                 <View className="text-box-content-title-top-title">
174
                 <View className="text-box-content-title-top-title">
135
                   商品标题
175
                   商品标题
136
                 </View>
176
                 </View>
137
-                <View className="text-box-content-title-top-copy">
177
+                <View onClick={this.handleCopyTitle} className="text-box-content-title-top-copy">
138
                   复制标题
178
                   复制标题
139
                 </View>
179
                 </View>
140
               </View>
180
               </View>
141
               {/* 分享标题输入框 */}
181
               {/* 分享标题输入框 */}
142
-              <Input
143
-                onInput={this.handleShareTitleChange}
144
-                className="input"
145
-                value={this.state.shareTitle}
146
-              />
182
+              <View className="text-box-content-title-input">
183
+                <Input
184
+                  onInput={this.handleShareTitleChange}
185
+                  className="input"
186
+                  value={this.state.shareTitle}
187
+                />
188
+              </View>
147
             </View>
189
             </View>
148
             {/* 商品链接盒子 */}
190
             {/* 商品链接盒子 */}
149
             <View className="text-box-content-link">
191
             <View className="text-box-content-link">
@@ -157,12 +199,12 @@ export default class Index extends Component {
157
                 <Input
199
                 <Input
158
                   onInput={this.handleShareTitleChange}
200
                   onInput={this.handleShareTitleChange}
159
                   className="linkInput"
201
                   className="linkInput"
160
-                  value={this.state.shareTitle}
202
+                  value={this.state.share_scheme_link}
161
                   disabled
203
                   disabled
162
                 />
204
                 />
163
                 <View className="copy-box">
205
                 <View className="copy-box">
164
                   <View className="copy-box-line"></View>
206
                   <View className="copy-box-line"></View>
165
-                  <Image className="copy-box-icon" src='https://yushi.tos-cn-beijing.volces.com/productDetail/copy.png' />
207
+                  <Image onClick={this.handleCopyLink} className="copy-box-icon" src='https://yushi.tos-cn-beijing.volces.com/productDetail/copy.png' />
166
                 </View>
208
                 </View>
167
               </View>
209
               </View>
168
             </View>
210
             </View>

+ 22 - 11
src/pages/indexSub/sharePage/index.less

@@ -115,17 +115,21 @@
115
                     }
115
                     }
116
                 }
116
                 }
117
 
117
 
118
-                .input {
118
+                .text-box-content-title-input {
119
                     margin-top: 30px;
119
                     margin-top: 30px;
120
-                    width: 100%;
121
-                    height: 94px;
122
-                    border-radius: 34px;
123
                     border: 4px solid #F6C71A;
120
                     border: 4px solid #F6C71A;
124
-                    padding-left: 24px; 
125
-                    padding-right: 24px;
126
-                    font-size: 28px;
127
-                    color: #999999;
128
-                    box-sizing: border-box;
121
+                    border-radius: 34px;
122
+                    overflow: hidden;
123
+                    .input {
124
+                        width: 100%;
125
+                        height: 94px;
126
+                        border-radius: 34px;
127
+                        padding-left: 24px;
128
+                        padding-right: 24px;
129
+                        font-size: 28px;
130
+                        color: #999999;
131
+                        box-sizing: border-box;
132
+                    }
129
                 }
133
                 }
130
             }
134
             }
131
 
135
 
@@ -134,6 +138,7 @@
134
                 display: flex;
138
                 display: flex;
135
                 flex-direction: column;
139
                 flex-direction: column;
136
                 justify-content: space-between;
140
                 justify-content: space-between;
141
+
137
                 .text-box-content-link-top {
142
                 .text-box-content-link-top {
138
                     padding-left: 10px;
143
                     padding-left: 10px;
139
 
144
 
@@ -142,9 +147,11 @@
142
                         color: #333;
147
                         color: #333;
143
                     }
148
                     }
144
                 }
149
                 }
150
+
145
                 .text-box-content-link-bottom {
151
                 .text-box-content-link-bottom {
146
                     position: relative;
152
                     position: relative;
147
                     margin-top: 30px;
153
                     margin-top: 30px;
154
+
148
                     .copy-box {
155
                     .copy-box {
149
                         position: absolute;
156
                         position: absolute;
150
                         right: 19px;
157
                         right: 19px;
@@ -152,20 +159,23 @@
152
                         transform: translateY(-50%);
159
                         transform: translateY(-50%);
153
                         display: flex;
160
                         display: flex;
154
                         align-items: center;
161
                         align-items: center;
162
+
155
                         .copy-box-line {
163
                         .copy-box-line {
156
                             width: 1px;
164
                             width: 1px;
157
                             height: 54px;
165
                             height: 54px;
158
                             background-color: #FF8119;
166
                             background-color: #FF8119;
159
                             margin-right: 39px;
167
                             margin-right: 39px;
160
                         }
168
                         }
169
+
161
                         .copy-box-icon {
170
                         .copy-box-icon {
162
                             width: 34px;
171
                             width: 34px;
163
                             height: 34px;
172
                             height: 34px;
164
                         }
173
                         }
165
                     }
174
                     }
166
                 }
175
                 }
176
+
167
                 .linkInput {
177
                 .linkInput {
168
-                    width:100%;
178
+                    width: 100%;
169
                     height: 94px;
179
                     height: 94px;
170
                     border-radius: 34px;
180
                     border-radius: 34px;
171
                     border: none;
181
                     border: none;
@@ -200,6 +210,7 @@
200
             border: none;
210
             border: none;
201
         }
211
         }
202
     }
212
     }
213
+
203
     .share-button {
214
     .share-button {
204
         position: fixed;
215
         position: fixed;
205
         bottom: 30px;
216
         bottom: 30px;
@@ -216,4 +227,4 @@
216
         justify-content: center;
227
         justify-content: center;
217
         align-items: center;
228
         align-items: center;
218
     }
229
     }
219
-}
230
+}

+ 1 - 0
src/pages/login/index.jsx

@@ -83,6 +83,7 @@ export default class Index extends Component {
83
             Taro.removeStorageSync("shareType");
83
             Taro.removeStorageSync("shareType");
84
             if (global.globalData.optionsData) {
84
             if (global.globalData.optionsData) {
85
               delete global.globalData.optionsData.shareJump;
85
               delete global.globalData.optionsData.shareJump;
86
+              delete global.globalData.optionsData.share_unique_value;
86
             }
87
             }
87
           }
88
           }
88
         } finally {
89
         } finally {

+ 2 - 2
src/pages/mine/index.jsx

@@ -148,9 +148,9 @@ export default class Index extends Component {
148
             ></Image>
148
             ></Image>
149
           </View>
149
           </View>
150
         </View>
150
         </View>
151
-        <Button onClick={() => Taro.navigateTo({ url: '/pages/indexSub/activity/index' })}>
151
+        {/* <Button onClick={() => Taro.navigateTo({ url: '/pages/indexSub/activity/index' })}>
152
           活动页面
152
           活动页面
153
-        </Button>
153
+        </Button> */}
154
         {/* 我的推荐人 */}
154
         {/* 我的推荐人 */}
155
         {mineData.user_relations?.id && (
155
         {mineData.user_relations?.id && (
156
           <View className="recommend-box">
156
           <View className="recommend-box">