viczhq 1 månad sedan
förälder
incheckning
121ed74024

+ 22 - 1
project.private.config.json

@@ -5,11 +5,32 @@
5 5
     "compileHotReLoad": false,
6 6
     "urlCheck": true
7 7
   },
8
-  "libVersion": "3.6.4",
8
+  "libVersion": "3.7.1",
9 9
   "condition": {
10 10
     "miniprogram": {
11 11
       "list": [
12 12
         {
13
+          "name": "pages/memberSub/partnerDetail/index",
14
+          "pathName": "pages/memberSub/partnerDetail/index",
15
+          "query": "",
16
+          "launchMode": "default",
17
+          "scene": null
18
+        },
19
+        {
20
+          "name": "pages/memberSub/myPartner/index",
21
+          "pathName": "pages/memberSub/myPartner/index",
22
+          "query": "",
23
+          "launchMode": "default",
24
+          "scene": null
25
+        },
26
+        {
27
+          "name": "pages/memberSub/Alipay/index",
28
+          "pathName": "pages/memberSub/Alipay/index",
29
+          "query": "",
30
+          "launchMode": "default",
31
+          "scene": null
32
+        },
33
+        {
13 34
           "name": "pages/login/index",
14 35
           "pathName": "pages/login/index",
15 36
           "query": "",

+ 3 - 1
src/app.config.js

@@ -27,7 +27,9 @@ export default defineAppConfig({
27 27
         "cashOut/index",
28 28
         "cashOutRecord/index",
29 29
         "statementRecords/index",
30
-        "Alipay/index"
30
+        "Alipay/index",
31
+        "myPartner/index",
32
+        "partnerDetail/index"
31 33
       ]
32 34
     },
33 35
     {

+ 4 - 0
src/components/Modal/index.jsx

@@ -1,5 +1,6 @@
1 1
 import { AtModal, AtModalContent } from "taro-ui";
2 2
 import { View, Image, Text } from "@tarojs/components";
3
+import { addLog } from "../../service";
3 4
 import "./index.less";
4 5
 import Taro from "@tarojs/taro";
5 6
 import selectStep from "../../images/productDetail/selectStep.png";
@@ -15,6 +16,9 @@ export default function Modal(props) {
15 16
         title: '口令已复制',
16 17
         icon: 'success',
17 18
       });
19
+      addLog({
20
+        log_type: 'click_to_purchase',
21
+      });
18 22
     });
19 23
   }
20 24
   return (

+ 2 - 2
src/components/index/OperationArea/index.jsx

@@ -7,11 +7,11 @@ const OperationArea = ({ recommend }) => {
7 7
   const handleNavigate = (type) => {
8 8
     if (type === "鱼市秒杀") {
9 9
       Taro.navigateTo({
10
-        url: "/pages/indexSub/seckillIndex/index",
10
+        url: `/pages/indexSub/seckillIndex/index?isDirect=true`,
11 11
       });
12 12
     } else if (type === "高佣专项") {
13 13
       Taro.navigateTo({
14
-        url: "/pages/indexSub/highCommission/index",
14
+        url: `/pages/indexSub/highCommission/index?isDirect=true`,
15 15
       });
16 16
     }
17 17
   };

+ 2 - 0
src/components/shareModal/index.jsx

@@ -15,6 +15,8 @@ export default function shareModal(props) {
15 15
   useEffect(() => {
16 16
     if (!isOpened) {
17 17
       setShareTitle('');
18
+    }else{
19
+      setShareTitle(product.item_title);
18 20
     }
19 21
   }, [isOpened]);
20 22
   const handleInputChange = (e) => {

BIN
src/images/member/myPartner.png


BIN
src/images/partner/bgc.png


BIN
src/images/partner/level.png


+ 0 - 1
src/pages/index/index.config.js

@@ -1,4 +1,3 @@
1 1
 export default definePageConfig({
2 2
   navigationStyle: 'custom',
3
-  enableShareAppMessage: true
4 3
 })

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

@@ -44,7 +44,7 @@ export default class Index extends Component {
44 44
   handleBannerClick = (item) => {
45 45
     if(item.type_jpath==1){
46 46
       Taro.navigateTo({
47
-        url: `${item.jpath}`
47
+        url: `${item.jpath}?isBanner=true`
48 48
       })
49 49
     }
50 50
   };

+ 34 - 2
src/pages/indexSub/highCommission/index.jsx

@@ -1,9 +1,10 @@
1 1
 import { Component } from "react";
2 2
 import { View, Image } from "@tarojs/components";
3 3
 import "./index.less";
4
+import Taro from "@tarojs/taro";
4 5
 import seckillImg from "../../../images/seckill/heighTop.jpg";
5 6
 import ProductList from "../../../components/index/ProductList";
6
-import { getRecommendProductList } from "../../../service";
7
+import { getRecommendProductList, addLog } from "../../../service";
7 8
 import { getShareContent } from "../../../common/share";
8 9
 export default class Index extends Component {
9 10
   state = {
@@ -11,8 +12,21 @@ export default class Index extends Component {
11 12
     page: 1, //页数
12 13
     loading: false, //加载状态
13 14
     totalPages: 1, // 添加总页数
15
+    isNoMore: false, // 是否没有更多
16
+    isDirect: false, // 是否直接跳转
17
+    isBanner: false, // 是否是banner跳转
18
+    isShare: false, // 是否是分享跳转
14 19
   };
15 20
   componentDidMount() {
21
+    const { isDirect, isBanner, isShare } =
22
+    Taro.getCurrentInstance().router.params || "";
23
+    this.setState({
24
+      isDirect: isDirect || false,
25
+      isBanner: isBanner || false,
26
+      isShare: isShare || false,
27
+    },()=>{
28
+      this.handleLog(isDirect?'direct_to_fish_seckill':isBanner?'banner_to_fish_seckill':isShare?'share_to_fish_seckill':'direct_to_fish_seckill');
29
+    });
16 30
     this.getRecommendProductList();
17 31
   }
18 32
   // 获取推荐商品列表
@@ -30,11 +44,28 @@ export default class Index extends Component {
30 44
       productList: [...prevState.productList, ...res.goods_list],
31 45
       totalPages: res.total_pages,
32 46
       loading: false,
47
+      isNoMore: res.total_pages <= page,
33 48
     }));
34 49
   };
50
+  // 埋点
51
+  handleLog = (type) => {
52
+    console.log('type',type);
53
+    // addLog({
54
+    //   log_type: type,
55
+    // });
56
+  };
35 57
   // 配置分享内容
36 58
   onShareAppMessage() {
37
-    return getShareContent();
59
+    const shareConfig = getShareContent();
60
+    if (shareConfig.title == "默认分享标题") {
61
+      return {
62
+        title: "高佣专项",
63
+        path: "/pages/indexSub/highCommission/index?isShare=true",
64
+        imageUrl: '',
65
+      };
66
+    } else {
67
+      return getShareContent();
68
+    }
38 69
   }
39 70
   // 页面上拉触底
40 71
   onReachBottom = () => {
@@ -56,6 +87,7 @@ export default class Index extends Component {
56 87
             isHighCommission={true}
57 88
             productList={this.state.productList}
58 89
             loading={this.state.loading}
90
+            isNoMore={this.state.isNoMore}
59 91
           />
60 92
         </View>
61 93
       </View>

+ 1 - 0
src/pages/indexSub/productDetail/index.config.js

@@ -1,3 +1,4 @@
1 1
 export default definePageConfig({
2 2
   navigationStyle: 'custom',
3
+  enableShareAppMessage: false
3 4
 })

+ 38 - 26
src/pages/indexSub/productDetail/index.jsx

@@ -1,11 +1,5 @@
1 1
 import { Component } from "react";
2
-import {
3
-  View,
4
-  Text,
5
-  Swiper,
6
-  SwiperItem,
7
-  Image,
8
-} from "@tarojs/components";
2
+import { View, Text, Swiper, SwiperItem, Image } from "@tarojs/components";
9 3
 import { AtIcon } from "taro-ui";
10 4
 import {
11 5
   getProductDetail,
@@ -13,6 +7,7 @@ import {
13 7
   getProductPromotion,
14 8
   getShareJump,
15 9
   bindShareJump,
10
+  addLog,
16 11
 } from "../../../service";
17 12
 import "./index.less";
18 13
 import Taro from "@tarojs/taro";
@@ -28,30 +23,23 @@ export default class Index extends Component {
28 23
   state = {
29 24
     id: "", //商品id
30 25
     isShare: false, //是否是分享
31
-    isOpened: '', //是否打开弹窗
26
+    isOpened: "", //是否打开弹窗
32 27
     productDetail: [], //商品详情
33 28
     productLikeList: [], //推荐商品列表
34 29
     productPromotion: [], //商品推广转链
35 30
     isHighCommission: false, //是否是高佣金页面
36 31
     isSeckill: false, //是否是秒杀页面
37 32
     shareJump: "", //分享跳转标识
33
+    shareTitle: "", //分享标题
38 34
   };
39 35
   // 获取产品详情的方法
40 36
   fetchProductDetails = async (id) => {
41 37
     const res = await getProductDetail({
42 38
       goods_id: id,
43 39
     });
44
-    this.setState(
45
-      {
46
-        productDetail: res,
47
-      },
48
-      () => {
49
-        // let session_key = Taro.getStorageSync("session_key");
50
-        // if (session_key) {
51
-        //   this.getProductPromotion(); //获取商品推广转链
52
-        // }
53
-      }
54
-    );
40
+    this.setState({
41
+      productDetail: res,
42
+    });
55 43
   };
56 44
   // 获取猜你喜欢列表
57 45
   getProductLikeList = async () => {
@@ -72,6 +60,10 @@ export default class Index extends Component {
72 60
     });
73 61
   };
74 62
   componentDidMount() {
63
+    // 隐藏右上角分享按钮
64
+    Taro.hideShareMenu({
65
+      menus: ["shareAppMessage", "shareTimeline"],
66
+    });
75 67
     const { id, isShare, isHighCommission, isSeckill, shareJump } =
76 68
       Taro.getCurrentInstance().router.params;
77 69
     this.setState(
@@ -96,6 +88,7 @@ export default class Index extends Component {
96 88
         }
97 89
       }
98 90
     );
91
+    this.handleLog("enter_product_detail"); //埋点
99 92
   }
100 93
   // 复制商品编号
101 94
   handleCopy = (text) => {
@@ -123,7 +116,7 @@ export default class Index extends Component {
123 116
       await this.getProductPromotion();
124 117
     }
125 118
     this.setState({
126
-      isOpened: 'self',
119
+      isOpened: "self",
127 120
     });
128 121
   };
129 122
 
@@ -135,8 +128,9 @@ export default class Index extends Component {
135 128
     });
136 129
     this.setState({
137 130
       shareJump: res.share_unique_value,
138
-      isOpened: 'share',
131
+      isOpened: "share",
139 132
     });
133
+    this.handleLog("click_share_earn"); //埋点
140 134
   };
141 135
   // 绑定分享跳转标识
142 136
   bindShareJump = async () => {
@@ -147,10 +141,16 @@ export default class Index extends Component {
147 141
     });
148 142
     Taro.removeStorageSync("shareJump");
149 143
   };
144
+  // 设置分享标题
145
+  handleShareTitleChange = (newTitle) => {
146
+    this.setState({
147
+      shareTitle: newTitle,
148
+    });
149
+  };
150 150
   // 配置分享内容
151 151
   onShareAppMessage() {
152 152
     return {
153
-      title: this.state.productDetail.item_title,
153
+      title: this.state.shareTitle || this.state.productDetail.item_title,
154 154
       path: `/pages/indexSub/productDetail/index?id=${this.state.id}&&isShare=true&&isHighCommission=${this.state.isHighCommission}&&isSeckill=${this.state.isSeckill}&&shareJump=${this.state.shareJump}`,
155 155
       imageUrl: this.state.productDetail.images[0].img,
156 156
     };
@@ -166,6 +166,12 @@ export default class Index extends Component {
166 166
       });
167 167
     }
168 168
   };
169
+  // 埋点
170
+  handleLog = (type) => {
171
+    // addLog({
172
+    //   log_type: type,
173
+    // });
174
+  };
169 175
   render() {
170 176
     const { productDetail } = this.state;
171 177
     return (
@@ -303,15 +309,21 @@ export default class Index extends Component {
303 309
         {/* 自购弹窗 */}
304 310
         <Modal
305 311
           title="咸鱼口令已复制"
306
-          isOpened={this.state.isOpened=='self'}
312
+          isOpened={this.state.isOpened == "self"}
307 313
           productPromotion={this.state.productPromotion}
308 314
           linkText={this.state.productPromotion.short_tpwd}
309 315
         />
310 316
         {/* 分享弹窗 */}
311 317
         <ShareModal
312
-          isOpened={this.state.isOpened=='share'}
313
-          onClose={() => this.setState({ isOpened: '' })}
314
-          title="分享赚"
318
+          onClose={() => {
319
+            this.setState({
320
+              isOpened: "",
321
+              shareTitle: productDetail.item_title,
322
+            });
323
+          }}
324
+          isOpened={this.state.isOpened == "share"}
325
+          product={this.state.productDetail}
326
+          onShareTitleChange={this.handleShareTitleChange}
315 327
         />
316 328
       </View>
317 329
     );

+ 4 - 13
src/pages/indexSub/searchList/index.jsx

@@ -12,7 +12,7 @@ export default class Index extends Component {
12 12
     totalPages: 1,
13 13
     loading: false,
14 14
     keyword: "",
15
-    isHasData: true,
15
+    isNoMore: false, // 是否没有更多
16 16
   };
17 17
   componentDidMount() {
18 18
     const { keyword }  = Taro.getCurrentInstance().router.params||"";
@@ -37,11 +37,8 @@ export default class Index extends Component {
37 37
         : [...prevState.productList, ...res.goods_list],
38 38
       totalPages: res.total_pages,
39 39
       loading: false,
40
-    }),()=>{
41
-      this.setState({
42
-        isHasData: res.goods_list.length > 0,
43
-      });
44
-    });
40
+      isNoMore: res.total_pages <= page,
41
+    }));
45 42
   };
46 43
   // 页面上拉触底
47 44
   onReachBottom = () => {
@@ -57,17 +54,11 @@ export default class Index extends Component {
57 54
     return (
58 55
       <View className="index">
59 56
         {/* 搜索列表 */}
60
-        {this.state.isHasData ? (
61 57
           <ProductList
62 58
             productList={this.state.productList}
63 59
             loading={this.state.loading}
60
+            isNoMore={this.state.isNoMore}
64 61
           ></ProductList>
65
-        ) : (
66
-          <View className="no-data">
67
-            <AtIcon value="search" size="30" color="#999"></AtIcon>
68
-            <View className="no-data-text">暂无数据</View>
69
-          </View>
70
-        )}
71 62
       </View>
72 63
     );
73 64
   }

+ 0 - 8
src/pages/indexSub/searchList/index.less

@@ -3,12 +3,4 @@
3 3
     background-color: #f9f9f9;
4 4
     padding-top: 20px;
5 5
     box-sizing: border-box;
6
-    .no-data{
7
-        display: flex;
8
-        flex-direction: column;
9
-        align-items: center;
10
-        justify-content: center;
11
-        height: 100vh;
12
-        color: #999;
13
-    }
14 6
 }

+ 53 - 2
src/pages/indexSub/seckillIndex/index.jsx

@@ -1,9 +1,10 @@
1 1
 import { Component } from "react";
2 2
 import { View, Image } from "@tarojs/components";
3 3
 import "./index.less";
4
+import Taro from "@tarojs/taro";
4 5
 import seckillImg from "../../../images/seckill/seckillTop.jpg";
5 6
 import ProductList from "../../../components/index/ProductList";
6
-import { getRecommendProductList } from "../../../service";
7
+import { getRecommendProductList, addLog } from "../../../service";
7 8
 import { getShareContent } from "../../../common/share";
8 9
 export default class Index extends Component {
9 10
   state = {
@@ -11,8 +12,34 @@ export default class Index extends Component {
11 12
     page: 1, //页数
12 13
     loading: false, //加载状态
13 14
     totalPages: 1, // 添加总页数
15
+    isNoMore: false, // 是否没有更多
16
+    isDirect: false, // 是否直接跳转
17
+    isBanner: false, // 是否是banner跳转
18
+    isShare: false, // 是否是分享跳转
19
+    userId: "", // 用户id
14 20
   };
15 21
   componentDidMount() {
22
+    const { isDirect, isBanner, isShare, userId } =
23
+      Taro.getCurrentInstance().router.params || "";
24
+    this.setState(
25
+      {
26
+        isDirect: isDirect || false,
27
+        isBanner: isBanner || false,
28
+        isShare: isShare || false,
29
+        userId: userId || "",
30
+      },
31
+      () => {
32
+        this.handleLog(
33
+          isDirect
34
+            ? "direct_to_fish_seckill"
35
+            : isBanner
36
+            ? "banner_to_fish_seckill"
37
+            : isShare
38
+            ? "share_to_fish_seckill"
39
+            : "direct_to_fish_seckill"
40
+        );
41
+      }
42
+    );
16 43
     this.getRecommendProductList();
17 44
   }
18 45
   // 获取推荐商品列表
@@ -30,11 +57,34 @@ export default class Index extends Component {
30 57
       productList: [...prevState.productList, ...res.goods_list],
31 58
       totalPages: res.total_pages,
32 59
       loading: false,
60
+      isNoMore: res.total_pages <= page,
33 61
     }));
34 62
   };
63
+  // 埋点
64
+  handleLog = (type) => {
65
+    console.log("type", type);
66
+
67
+    // addLog({
68
+    //   log_type: type,
69
+    // });
70
+  };
35 71
   // 配置分享内容
36 72
   onShareAppMessage() {
37
-    return getShareContent();
73
+    const loginInfo = Taro.getStorageSync("loginInfo");
74
+    let userId = "";
75
+    if (loginInfo) {
76
+      userId = loginInfo.id;
77
+    }
78
+    const shareConfig = getShareContent();
79
+    if (shareConfig.title == "默认分享标题") {
80
+      return {
81
+        title: "鱼市秒杀",
82
+        path: `/pages/indexSub/seckillIndex/index?isShare=true&userId=${userId}`,
83
+        imageUrl: "",
84
+      };
85
+    } else {
86
+      return getShareContent();
87
+    }
38 88
   }
39 89
   // 页面上拉触底
40 90
   onReachBottom = () => {
@@ -56,6 +106,7 @@ export default class Index extends Component {
56 106
             isSeckill={true}
57 107
             productList={this.state.productList}
58 108
             loading={this.state.loading}
109
+            isNoMore={this.state.isNoMore}
59 110
           />
60 111
         </View>
61 112
       </View>

+ 24 - 0
src/pages/member/index.jsx

@@ -11,6 +11,7 @@ import warning from "../../images/member/warning.png";
11 11
 import withdrawable from "../../images/member/withdrawable.png";
12 12
 import order from "../../images/member/order.png";
13 13
 import avatar from "../../images/mine/avatar.png";
14
+import partner from "../../images/member/myPartner.png";
14 15
 export default class Index extends Component {
15 16
   state = {
16 17
     vipInfo: {
@@ -126,6 +127,29 @@ export default class Index extends Component {
126 127
               <View onClick={() => Taro.navigateTo({ url: `/pages/memberSub/cashOut/index` })} className="right">点击提现</View>
127 128
             </View>
128 129
           </View>
130
+          {/* 我的伙伴 */}
131
+          <View className="my-partner">
132
+            <View className="my-partner-header">
133
+              <View className="my-partner-header-left">
134
+                <Image className="my-partner-icon" src={partner} />
135
+                <Text className="my-partner-title">我的伙伴</Text>
136
+              </View>
137
+              <View onClick={() => Taro.navigateTo({ url: `/pages/memberSub/myPartner/index` })} className="my-partner-header-right">
138
+                查看更多
139
+                <AtIcon value='chevron-right' size='10' color='#A1A1A1'></AtIcon>
140
+              </View>
141
+            </View>
142
+            <View className="my-partner-content">
143
+              <View onClick={() => Taro.navigateTo({ url: `/pages/memberSub/myPartner/index` })} className="my-partner-item">
144
+                <Text className="label">直接伙伴</Text>
145
+                <Text className="number">{vipInfo.partner?.direct_partner || 0}</Text>
146
+              </View>
147
+              {/* <View className="my-partner-item">
148
+                <Text className="label">间接伙伴</Text>
149
+                <Text className="number">{vipInfo.partner?.indirect_partner || 0}</Text>
150
+              </View> */}
151
+            </View>
152
+          </View>
129 153
           {/* 今日订单 */}
130 154
           <View className="today-order">
131 155
             <View className="today-order-header">

+ 62 - 1
src/pages/member/index.less

@@ -252,7 +252,68 @@
252 252
             }
253 253
         }
254 254
     }
255
-
255
+    // 我的伙伴
256
+    .my-partner {
257
+        margin-top: 20px;
258
+        .my-partner-header {
259
+            display: flex;
260
+            align-items: center;
261
+            justify-content: space-between;
262
+            margin-bottom: 12px;
263
+            .my-partner-header-left{
264
+                display: flex;
265
+                align-items: center;
266
+                .my-partner-icon {
267
+                    width: 36px;
268
+                    height: 36px;
269
+                }
270
+                .my-partner-title {
271
+                    font-size: 28px;
272
+                    color: #000000;
273
+                    line-height: 40px;
274
+                    font-weight: 700;
275
+                    margin-left: 10px;
276
+                }
277
+            }
278
+            .my-partner-header-right{
279
+                font-size: 22px;
280
+                color: #A1A1A1;
281
+                line-height: 40px;
282
+                margin-right: 10px;
283
+                display: flex;
284
+                align-items: center;
285
+            }
286
+        }
287
+        .my-partner-content{
288
+            width: 100%;
289
+            border-radius: 20px;
290
+            background-color: #fff;
291
+            padding: 27px 138px 35px 138px;
292
+            box-sizing: border-box;
293
+            display: flex;
294
+            justify-content: space-between;
295
+            align-items: center;
296
+            .my-partner-item{
297
+                flex: 1;
298
+                text-align: center;
299
+                display: flex;
300
+                flex-direction: column;
301
+                align-items: center;
302
+                justify-content: space-between;
303
+                .label {
304
+                    font-size: 24px;
305
+                    color: #A1A1A1;
306
+                    line-height: 40px;
307
+                }
308
+                .number {
309
+                    font-size: 28px;
310
+                    font-weight: 700;
311
+                    color: #000000;
312
+                    line-height: 40px;
313
+                }
314
+            }
315
+        }
316
+    }   
256 317
     // 今日订单
257 318
     .today-order {
258 319
         margin-top: 20px;

+ 43 - 3
src/pages/memberSub/Alipay/index.jsx

@@ -7,14 +7,30 @@ export default class Index extends Component {
7 7
   state = {
8 8
     name: "", // 账户姓名
9 9
     account: "", // 支付宝账户
10
+    phone: "", // 手机号
11
+    idCard: "", // 身份证号
12
+    bankCard: "", // 银行卡号
10 13
   };
11
-
14
+  // 账户姓名
12 15
   handleChangeName(value) {
13 16
     this.setState({ name: value });
14 17
   }
18
+  // 支付宝账户
15 19
   handleChangeAccount(value) {
16 20
     this.setState({ account: value });
17 21
   }
22
+  // 手机号
23
+  handleChangePhone(value) {
24
+    this.setState({ phone: value });
25
+  }
26
+  // 身份证号
27
+  handleChangeIdCard(value) {
28
+    this.setState({ idCard: value });
29
+  }
30
+  // 银行卡号
31
+  handleChangeBankCard(value) {
32
+    this.setState({ bankCard: value });
33
+  }
18 34
   render() {
19 35
     return (
20 36
       <View className="index">
@@ -29,7 +45,31 @@ export default class Index extends Component {
29 45
             onChange={this.handleChangeName.bind(this)}
30 46
           />
31 47
           <AtInput
32
-          border={false}  
48
+            name="value"
49
+            title="手机号"
50
+            type="text"
51
+            placeholder="请输入手机号"
52
+            value={this.state.phone}
53
+            onChange={this.handleChangePhone.bind(this)}
54
+          />
55
+          <AtInput
56
+            name="value"
57
+            title="身份证号"
58
+            type="text"
59
+            placeholder="请输入身份证号"
60
+            value={this.state.idCard}
61
+            onChange={this.handleChangeIdCard.bind(this)}
62
+          />
63
+          <AtInput
64
+            name="value"
65
+            title="银行卡号"
66
+            type="text"
67
+            placeholder="请输入银行卡号"
68
+            value={this.state.bankCard}
69
+            onChange={this.handleChangeBankCard.bind(this)}
70
+          />
71
+          <AtInput
72
+            border={false}
33 73
             name="value"
34 74
             title="支付宝账户"
35 75
             type="text"
@@ -45,7 +85,7 @@ export default class Index extends Component {
45 85
             注意:
46 86
           </View>
47 87
           <View className="attention-bottom">
48
-            所维护的支付宝账户所有人需要与提现认证提交的自然人为同一人,避免影响提现
88
+            所维护的信息需要与提现认证提交的自然人为同一人,非同一人会提现失败
49 89
           </View>
50 90
         </View>
51 91
         {/* 提交 */}

+ 0 - 1
src/pages/memberSub/Alipay/index.less

@@ -31,7 +31,6 @@
31 31
         font-size: 26px;
32 32
         color: #A0A0A0;
33 33
         line-height: 38px;
34
-
35 34
         .attention-top {
36 35
             display: flex;
37 36
             align-items: center;

+ 2 - 2
src/pages/memberSub/earningsOrder/index.jsx

@@ -195,10 +195,10 @@ export default class Index extends Component {
195 195
                   <Text className="value">{item.pay_time}</Text>
196 196
                 </View>
197 197
               </View>
198
-              <View className="member-info">
198
+              {/* <View className="member-info">
199 199
                 <Image className="member-icon" src={vip} />
200 200
                 <Text className="member-text">闲鱼会员</Text>
201
-              </View>
201
+              </View> */}
202 202
             </View>
203 203
 
204 204
             {/* 产品信息 */}

+ 3 - 0
src/pages/memberSub/myPartner/index.config.js

@@ -0,0 +1,3 @@
1
+export default definePageConfig({
2
+  navigationBarTitleText: '我的伙伴'
3
+})

+ 66 - 0
src/pages/memberSub/myPartner/index.jsx

@@ -0,0 +1,66 @@
1
+import { Component } from "react";
2
+import { View, Text, Image } from "@tarojs/components";
3
+import level from "../../../images/partner/level.png";
4
+import { AtIcon } from "taro-ui";
5
+import "./index.less";
6
+import Taro from "@tarojs/taro";
7
+export default class Index extends Component {
8
+  state = {};
9
+
10
+  copyPhone = (phone) => {
11
+    Taro.setClipboardData({
12
+      data: phone,
13
+      success: () => {
14
+        Taro.showToast({
15
+          title: '复制成功',
16
+          icon: 'success',
17
+          duration: 2000
18
+        })
19
+      }
20
+    })
21
+  }
22
+
23
+  render() {
24
+    return (
25
+      <View className="index">
26
+        <View className="header"></View>
27
+        <View className="partner-number">
28
+          <Text className="partner-number-title">我的伙伴</Text>
29
+          <Text className="partner-number-count">0</Text>
30
+        </View>
31
+        <View className="partner-list">
32
+          <View className="partner-item">
33
+            <View className="partner-item-top">
34
+              <View className="partner-item-top-left">
35
+                <Image src="" className="partner-item-top-left-avatar" />
36
+              </View>
37
+              <View className="partner-item-top-right">
38
+                <View className="name">张三</View>
39
+                <View className="level">
40
+                  <Image src={level} className="level-icon" />
41
+                  <Text className="level-text">导购员</Text>
42
+                </View>
43
+              </View>
44
+              <View onClick={() => Taro.navigateTo({ url: `/pages/memberSub/partnerDetail/index` })} className="detail">详情
45
+                <AtIcon value='chevron-right' size='10' color='#A1A1A1'></AtIcon>
46
+              </View>
47
+            </View>
48
+            <View className="partner-item-bottom">
49
+              <View className="item">
50
+                <Text className="item-text">绑定手机号</Text>
51
+                <View className="phone-container">
52
+                  <Text className="item-value">138****8888</Text>
53
+                  <Text className="copy-btn" onClick={() => this.copyPhone('138****8888')}>复制</Text>
54
+                </View>
55
+              </View>
56
+              <View className="item">
57
+                <Text className="item-text">推荐绑定时间</Text>
58
+                <Text className="item-value">2024-03-21 12:00:00</Text>
59
+              </View>
60
+            </View>
61
+          </View>
62
+        </View>
63
+      </View>
64
+    );
65
+  }
66
+}

+ 154 - 0
src/pages/memberSub/myPartner/index.less

@@ -0,0 +1,154 @@
1
+.index {
2
+    display: flex;
3
+    flex-direction: column;
4
+    align-items: center;
5
+    min-height: 100vh;
6
+    background-color: #f9f9f9;
7
+
8
+    .header {
9
+        width: 100%;
10
+        height: 170px;
11
+        background: linear-gradient(270deg, #DCBC81 0%, #EFDDB5 100%, );
12
+    }
13
+
14
+    .partner-number {
15
+        width: 624px;
16
+        height: 100px;
17
+        background: linear-gradient(180deg, #FBF8EE 0%, #EBDDBE 100%);
18
+        border-radius: 10px 10px 10px 10px;
19
+        display: flex;
20
+        justify-content: center;
21
+        align-items: center;
22
+        margin-top: -63px;
23
+        font-weight: 700;
24
+        font-size: 28px;
25
+        color: #000000;
26
+
27
+        .partner-number-title {
28
+            margin-right: 60px;
29
+        }
30
+    }
31
+
32
+    .partner-list {
33
+        margin: 40px 20px 0 20px;
34
+        width: 100%;
35
+        padding: 0 16px;
36
+        box-sizing: border-box;
37
+
38
+        .partner-item {
39
+            width: 100%;
40
+            background-color: #fff;
41
+            border-radius: 20px;
42
+            background-color: #fff;
43
+            padding: 17px;
44
+            box-sizing: border-box;
45
+
46
+            .partner-item-top {
47
+                position: relative;
48
+                display: flex;
49
+                align-items: center;
50
+
51
+                .partner-item-top-left {
52
+                    width: 116px;
53
+                    height: 116px;
54
+                    border-radius: 50%;
55
+                    background-color: #ccc;
56
+                    margin-right: 20px;
57
+
58
+                    .partner-item-top-left-avatar {
59
+                        width: 100%;
60
+                        height: 100%;
61
+                        border-radius: 50%;
62
+                    }
63
+                }
64
+
65
+                .partner-item-top-right {
66
+                    flex: 1;
67
+                    display: flex;
68
+                    flex-direction: column;
69
+                    justify-content: space-between;
70
+
71
+                    .name {
72
+                        font-weight: 500;
73
+                        font-size: 34px;
74
+                        color: #000000;
75
+                    }
76
+
77
+                    .level {
78
+                        display: flex;
79
+                        align-items: center;
80
+                        position: relative;
81
+                        padding-left: 55px;
82
+                        box-sizing: border-box;
83
+                        margin-top: 14px;
84
+
85
+                        .level-icon {
86
+                            width: 144px;
87
+                            height: 45px;
88
+                            position: absolute;
89
+                            left: 0;
90
+                        }
91
+
92
+                        .level-text {
93
+                            font-size: 21px;
94
+                            color: #3D3D3D;
95
+                            z-index: 1;
96
+                        }
97
+                    }
98
+                }
99
+
100
+                .detail {
101
+                    font-weight: 700;
102
+                    font-size: 24px;
103
+                    color: #000000;
104
+                    position: absolute;
105
+                    right: 0;
106
+                    top: 0;
107
+                }
108
+            }
109
+
110
+            .partner-item-bottom {
111
+                display: flex;
112
+                justify-content: space-between;
113
+                align-items: center;
114
+                margin-top: 20px;
115
+                background-color: #F8F8F8;
116
+                border-radius: 10px;
117
+                padding: 20px 42px 37px 10px;
118
+                box-sizing: border-box;
119
+
120
+                .item {
121
+                    display: flex;
122
+                    flex-direction: column;
123
+                    align-items: center;
124
+
125
+                    .phone-container {
126
+                        display: flex;
127
+                        align-items: center;
128
+                        justify-content: center;
129
+                        margin-top: 13px;
130
+                        .copy-btn {
131
+                            margin-left: 20px;
132
+                            color: #F6C71A;
133
+                            font-size: 26px;
134
+                        }
135
+                        .item-value {
136
+                            margin-top: 0;
137
+                        }
138
+                    }
139
+
140
+                    .item-text {
141
+                        font-size: 24px;
142
+                        color: #AEAEAE;
143
+                    }
144
+
145
+                    .item-value {
146
+                        font-size: 26px;
147
+                        color: #000000;
148
+                        margin-top: 13px;
149
+                    }
150
+                }
151
+            }
152
+        }
153
+    }
154
+}

+ 3 - 0
src/pages/memberSub/partnerDetail/index.config.js

@@ -0,0 +1,3 @@
1
+export default definePageConfig({
2
+  navigationBarTitleText: '伙伴详情'
3
+})

+ 161 - 0
src/pages/memberSub/partnerDetail/index.jsx

@@ -0,0 +1,161 @@
1
+import { Component } from "react";
2
+import { View, Text, Image } from "@tarojs/components";
3
+import "./index.less";
4
+import { AtDivider } from "taro-ui";
5
+import level from "../../../images/partner/level.png";
6
+import vip from "../../../images/earningsOrder/vip.png";
7
+export default class Index extends Component {
8
+  state = {
9
+    orderList: [
10
+      {
11
+        order_number: "XY202403210001",
12
+        pay_time: "2024-03-21 15:30:25",
13
+        item_pic_url: "https://example.com/product1.jpg",
14
+        item_title: "2024春季新款连衣裙",
15
+        assess_amount_text: "12.50",
16
+        actual_paid_fee: "299.00",
17
+      },
18
+      {
19
+        order_number: "XY202403200015",
20
+        pay_time: "2024-03-20 10:15:33",
21
+        item_pic_url: "https://example.com/product2.jpg",
22
+        item_title: "时尚百搭小白鞋",
23
+        assess_amount_text: "8.80",
24
+        actual_paid_fee: "219.00",
25
+      },
26
+      {
27
+        order_number: "XY202403190089",
28
+        pay_time: "2024-03-19 18:45:12",
29
+        item_pic_url: "https://example.com/product3.jpg",
30
+        item_title: "韩版宽松牛仔外套",
31
+        assess_amount_text: "15.00",
32
+        actual_paid_fee: "358.00",
33
+      },
34
+    ],
35
+  };
36
+  // 复制
37
+  handleCopy = async (text) => {
38
+    try {
39
+      await Taro.setClipboardData({
40
+        data: text,
41
+      });
42
+      Taro.showToast({
43
+        title: "内容已复制",
44
+        icon: "success",
45
+        duration: 2000,
46
+      });
47
+    } catch (error) {
48
+      Taro.showToast({
49
+        title: "复制失败",
50
+        icon: "error",
51
+        duration: 2000,
52
+      });
53
+    }
54
+  };
55
+  render() {
56
+    const { orderList } = this.state;
57
+    return (
58
+      <View className="index">
59
+        <View className="container">
60
+          <View className="header">
61
+            <View className="header-left">
62
+              <Text className="name">张三</Text>
63
+              <View className="level">
64
+                <Image className="level-icon" src={level} />
65
+                <Text className="level-text">导购员</Text>
66
+              </View>
67
+            </View>
68
+            <View className="header-right">
69
+              <Image className="header-right-avatar" src="" />
70
+            </View>
71
+          </View>
72
+          {/* 个人资料 */}
73
+          <View className="personal-info">
74
+            <View className="info-top">
75
+              <View className="personal-info-item">
76
+                <Text className="personal-info-item-label">累计贡献返利</Text>
77
+                <Text className="personal-info-item-value">¥0.00</Text>
78
+              </View>
79
+              <View className="line"></View>
80
+              <View className="personal-info-item">
81
+                <Text className="personal-info-item-label">累计贡献管理奖</Text>
82
+                <Text className="personal-info-item-value">¥0.00</Text>
83
+              </View>
84
+            </View>
85
+            <View className="line-column"></View>
86
+            <View className="info-bottom">
87
+              <View className="personal-info-item">
88
+                <Text className="personal-info-item-label">手机号</Text>
89
+                <Text className="personal-info-item-value">138****8888</Text>
90
+              </View>
91
+              <View className="line"></View>
92
+              <View className="personal-info-item">
93
+                <Text className="personal-info-item-label">推荐绑定时间</Text>
94
+                <Text className="personal-info-item-value">
95
+                  2024-03-21 12:00:00
96
+                </Text>
97
+              </View>
98
+            </View>
99
+          </View>
100
+          {/* 订单列表 */}
101
+          <View className="order-list">
102
+            {orderList.map((item, index) => (
103
+              <View className="order-item" key={index}>
104
+                {/* 订单信息 */}
105
+                <View className="order-info">
106
+                  <View className="order-details">
107
+                    <View className="detail-item">
108
+                      <Text className="label">订单编号:</Text>
109
+                      <Text className="value">{item.order_number}</Text>
110
+                      <Text
111
+                        className="copy-text"
112
+                        onClick={() => this.handleCopy(item.order_number)}
113
+                      >
114
+                        复制
115
+                      </Text>
116
+                    </View>
117
+                    <View className="detail-item">
118
+                      <Text className="label">下单时间:</Text>
119
+                      <Text className="value">{item.pay_time}</Text>
120
+                    </View>
121
+                  </View>
122
+                  {/* <View className="member-info">
123
+                    <Image className="member-icon" src={vip} />
124
+                    <Text className="member-text">闲鱼会员</Text>
125
+                  </View> */}
126
+                </View>
127
+
128
+                {/* 产品信息 */}
129
+                <View className="product-info">
130
+                  <Image
131
+                    mode="aspectFill"
132
+                    className="product-image"
133
+                    src={item.item_pic_url}
134
+                  />
135
+                  <View className="product-details">
136
+                    <Text className="product-name">{item.item_title}</Text>
137
+                    <View className="promotion-info">
138
+                      <View className="tag">推广收入</View>
139
+                      <Text className="amount">¥{item.assess_amount_text}</Text>
140
+                    </View>
141
+                    <View className="payment-info">
142
+                      <Text className="label">实付金额:</Text>
143
+                      <Text className="amount">¥{item.actual_paid_fee}</Text>
144
+                    </View>
145
+                  </View>
146
+                </View>
147
+              </View>
148
+            ))}
149
+          </View>
150
+          {orderList.length === 0 && (
151
+            <AtDivider
152
+              content="暂无成交订单"
153
+              fontColor="#B5B5B5"
154
+            lineColor="#D8D8D8"
155
+          />
156
+          )}
157
+        </View>
158
+      </View>
159
+    );
160
+  }
161
+}

+ 275 - 0
src/pages/memberSub/partnerDetail/index.less

@@ -0,0 +1,275 @@
1
+.index {
2
+    min-height: 100vh;
3
+    background-color: #f9f9f9;
4
+    padding: 20px 16px;
5
+    box-sizing: border-box;
6
+
7
+    .container {
8
+        padding: 60px 10px 20px 10px;
9
+        box-sizing: border-box;
10
+        border-radius: 20px;
11
+        background-color: #fff;
12
+
13
+        .header {
14
+            display: flex;
15
+            justify-content: space-between;
16
+            align-items: center;
17
+
18
+            .header-left {
19
+                display: flex;
20
+                align-items: center;
21
+                flex-direction: column;
22
+
23
+                .name {
24
+                    font-weight: 700;
25
+                    font-size: 48px;
26
+                    color: #000000;
27
+                }
28
+
29
+                .level {
30
+                    display: flex;
31
+                    align-items: center;
32
+                    margin-top: 20px;
33
+                    position: relative;
34
+                    padding-left: 55px;
35
+                    height: 45px;
36
+
37
+                    .level-icon {
38
+                        width: 144px;
39
+                        height: 100%;
40
+                        position: absolute;
41
+                        left: 0;
42
+                        top: 0;
43
+                    }
44
+
45
+                    .level-text {
46
+                        font-size: 21px;
47
+                        color: #3D3D3D;
48
+                        z-index: 1;
49
+                    }
50
+                }
51
+            }
52
+
53
+            .header-right {
54
+                .header-right-avatar {
55
+                    width: 144px;
56
+                    height: 144px;
57
+                    border-radius: 50%;
58
+                    background-color: red;
59
+                }
60
+            }
61
+        }
62
+
63
+        // 个人资料
64
+        .personal-info {
65
+            display: flex;
66
+            flex-direction: column;
67
+            width: 100%;
68
+            box-shadow: 0px 1px 10px 0px rgba(0, 0, 0, 0.1);
69
+            border-radius: 10px 10px 10px 10px;
70
+            overflow: hidden;
71
+            margin-top: 30px;
72
+            padding: 4px 23px;
73
+            box-sizing: border-box;
74
+
75
+            .info-top,
76
+            .info-bottom {
77
+                display: flex;
78
+                width: 100%;
79
+                align-items: center;
80
+
81
+                .personal-info-item {
82
+                    flex: 1;
83
+                    display: flex;
84
+                    flex-direction: column;
85
+                    padding: 36px 0 33px 17px;
86
+                    box-sizing: border-box;
87
+
88
+                    .personal-info-item-label {
89
+                        font-size: 24px;
90
+                        color: #AEAEAE;
91
+                    }
92
+
93
+                    .personal-info-item-value {
94
+                        font-size: 26px;
95
+                        color: #000000;
96
+                        margin-top: 13px;
97
+                    }
98
+                }
99
+            }
100
+
101
+            .line {
102
+                width: 1px;
103
+                height: 126px;
104
+                background-color: #D8D8D8;
105
+                margin-right: 57px;
106
+            }
107
+
108
+            .line-column {
109
+                width: 100%;
110
+                height: 1px;
111
+                background-color: #D8D8D8;
112
+                margin: 10px 0;
113
+            }
114
+        }
115
+
116
+        // 订单列表样式
117
+        .order-list {
118
+            margin-top: 24px;
119
+            .at-divider {
120
+                height: 0;
121
+                margin-bottom: 18px;
122
+            }
123
+
124
+            .order-item {
125
+                background: #FFFFFF;
126
+                border-radius: 20px;
127
+                padding: 0 18px 34px 18px;
128
+                margin-bottom: 24px;
129
+                box-sizing: border-box;
130
+                border-radius: 20px 20px 20px 20px;
131
+                box-shadow: 0px 1px 10px 0px rgba(0, 0, 0, 0.1);
132
+                &:last-child {
133
+                    margin-bottom: 0;
134
+                }
135
+                .order-info {
136
+                    display: flex;
137
+                    justify-content: space-between;
138
+                    padding-bottom: 24px;
139
+                    padding-top: 24px;
140
+
141
+                    .order-details {
142
+                        .detail-item {
143
+                            display: flex;
144
+                            align-items: center;
145
+                            margin-bottom: 8px;
146
+
147
+                            .label {
148
+                                color: #999;
149
+                                font-size: 22px;
150
+                                margin-right: 12px;
151
+                                line-height: 32px;
152
+                            }
153
+
154
+                            .value {
155
+                                color: #999;
156
+                                font-size: 22px;
157
+                                line-height: 32px;
158
+                            }
159
+
160
+                            .copy-text {
161
+                                color: #F6C71A;
162
+                                font-size: 22px;
163
+                                margin-left: 30px;
164
+                                line-height: 32px;
165
+                            }
166
+                        }
167
+                    }
168
+
169
+                    .member-info {
170
+                        display: flex;
171
+                        flex-direction: column;
172
+                        justify-content: flex-start;
173
+                        align-items: center;
174
+
175
+                        .member-icon {
176
+                            width: 58px;
177
+                            height: 49px;
178
+                        }
179
+
180
+                        .member-text {
181
+                            font-size: 18px;
182
+                            color: #E7BE78;
183
+                            line-height: 26px;
184
+                            margin-top: 4px;
185
+                        }
186
+                    }
187
+                }
188
+
189
+                .product-info {
190
+                    display: flex;
191
+                    padding-top: 20px;
192
+                    height: 168px;
193
+
194
+                    .product-image {
195
+                        width: 297px;
196
+                        height: 168px;
197
+                        border-radius: 8px;
198
+                        margin-right: 16px;
199
+                    }
200
+
201
+                    .product-details {
202
+                        flex: 1;
203
+                        height: 100%;
204
+                        display: flex;
205
+                        flex-direction: column;
206
+                        justify-content: space-between;
207
+
208
+                        .product-name {
209
+                            font-size: 28px;
210
+                            color: #000000;
211
+                            line-height: 41px;
212
+                            overflow: hidden;
213
+                            text-overflow: ellipsis;
214
+                            display: -webkit-box;
215
+                            -webkit-line-clamp: 2;
216
+                            -webkit-box-orient: vertical;
217
+                            margin-bottom: 16px;
218
+                        }
219
+
220
+                        .promotion-info {
221
+                            display: flex;
222
+                            align-items: center;
223
+                            justify-content: center;
224
+                            margin-bottom: 16px;
225
+                            height: 30px;
226
+                            width: fit-content;
227
+                            border-radius: 10px;
228
+
229
+                            .tag {
230
+                                color: #F6C71A;
231
+                                font-size: 18px;
232
+                                z-index: 1;
233
+                                background-color: #fff;
234
+                                padding: 2px 6px;
235
+                                box-sizing: border-box;
236
+                                border: 1px solid #F6C71A;
237
+                            }
238
+
239
+                            .amount {
240
+                                color: #fff;
241
+                                font-size: 18px;
242
+                                z-index: 1;
243
+                                background-color: #f6c71a;
244
+                                padding: 2px 4px;
245
+                                box-sizing: border-box;
246
+                                border: 1px solid #F6C71A;
247
+                            }
248
+                        }
249
+
250
+                        .payment-info {
251
+                            display: flex;
252
+                            align-items: center;
253
+                            font-weight: 500;
254
+
255
+                            .label {
256
+                                color: #000000;
257
+                                font-size: 22px;
258
+                                margin-right: 10px;
259
+                            }
260
+
261
+                            .amount {
262
+                                color: #000000;
263
+                                font-size: 22px;
264
+                            }
265
+                        }
266
+                    }
267
+                }
268
+            }
269
+        }
270
+
271
+        .at-divider__content {
272
+            font-size: 22px;
273
+        }
274
+    }
275
+}

+ 8 - 0
src/service/index.js

@@ -186,6 +186,14 @@ export const login = data =>
186 186
     method: 'POST',
187 187
     data,
188 188
   })
189
+  // ---------------------------------------埋点
190
+  // 埋点
191
+  export const addLog = data =>
192
+  Request({
193
+    url: '/log/add_log',
194
+    method: 'POST',
195
+    data,
196
+  })
189 197
 
190 198
 
191 199