Sfoglia il codice sorgente

捡漏计算器页面&推广人展示&伙伴说明弹窗

viczhq 1 mese fa
parent
commit
e03d6a14b8
35 ha cambiato i file con 1610 aggiunte e 82 eliminazioni
  1. 49 0
      project.private.config.json
  2. 10 0
      src/app.config.js
  3. 35 0
      src/components/instructionModal/index.jsx
  4. 87 0
      src/components/instructionModal/index.less
  5. 1 2
      src/components/signModal/index.jsx
  6. BIN
      src/images/calculator/IconThree.png
  7. BIN
      src/images/calculator/iconOne.png
  8. BIN
      src/images/calculator/iconTwo.png
  9. BIN
      src/images/calculator/more.png
  10. BIN
      src/images/calculator/toShare.png
  11. BIN
      src/images/calculator/wish.png
  12. BIN
      src/images/member/calculator.png
  13. BIN
      src/images/productDetail/sign.png
  14. 3 0
      src/pages/calculatorSub/calculator/index.config.js
  15. 80 0
      src/pages/calculatorSub/calculator/index.jsx
  16. 203 0
      src/pages/calculatorSub/calculator/index.less
  17. 3 0
      src/pages/calculatorSub/calculatorInventory/index.config.js
  18. 30 0
      src/pages/calculatorSub/calculatorInventory/index.jsx
  19. 68 0
      src/pages/calculatorSub/calculatorInventory/index.less
  20. 3 0
      src/pages/calculatorSub/calculatorResult/index.config.js
  21. 74 0
      src/pages/calculatorSub/calculatorResult/index.jsx
  22. 269 0
      src/pages/calculatorSub/calculatorResult/index.less
  23. 3 0
      src/pages/calculatorSub/calculatorWish/index.config.js
  24. 89 0
      src/pages/calculatorSub/calculatorWish/index.jsx
  25. 172 0
      src/pages/calculatorSub/calculatorWish/index.less
  26. 3 0
      src/pages/calculatorSub/calculatorWishList/index.config.js
  27. 56 0
      src/pages/calculatorSub/calculatorWishList/index.jsx
  28. 64 0
      src/pages/calculatorSub/calculatorWishList/index.less
  29. 21 7
      src/pages/index/index.jsx
  30. 155 40
      src/pages/member/index.jsx
  31. 34 18
      src/pages/member/index.less
  32. 1 1
      src/pages/memberSub/storeManagement/index.jsx
  33. 47 14
      src/pages/mine/index.jsx
  34. 43 0
      src/pages/mine/index.less
  35. 7 0
      src/service/index.js

+ 49 - 0
project.private.config.json

@@ -10,6 +10,55 @@
10 10
     "miniprogram": {
11 11
       "list": [
12 12
         {
13
+          "name": "pages/member/index",
14
+          "pathName": "pages/member/index",
15
+          "query": "",
16
+          "launchMode": "default",
17
+          "scene": null
18
+        },
19
+        {
20
+          "name": "pages/mine/index",
21
+          "pathName": "pages/mine/index",
22
+          "query": "",
23
+          "launchMode": "default",
24
+          "scene": null
25
+        },
26
+        {
27
+          "name": "pages/calculatorSub/calculatorResult/index",
28
+          "pathName": "pages/calculatorSub/calculatorResult/index",
29
+          "query": "",
30
+          "launchMode": "default",
31
+          "scene": null
32
+        },
33
+        {
34
+          "name": "pages/calculatorSub/calculatorWish/index",
35
+          "pathName": "pages/calculatorSub/calculatorWish/index",
36
+          "query": "isShare=true",
37
+          "launchMode": "default",
38
+          "scene": null
39
+        },
40
+        {
41
+          "name": "pages/calculatorSub/calculatorInventory/index",
42
+          "pathName": "pages/calculatorSub/calculatorInventory/index",
43
+          "query": "",
44
+          "launchMode": "default",
45
+          "scene": null
46
+        },
47
+        {
48
+          "name": "pages/calculatorSub/calculatorWishList/index",
49
+          "pathName": "pages/calculatorSub/calculatorWishList/index",
50
+          "query": "",
51
+          "launchMode": "default",
52
+          "scene": null
53
+        },
54
+        {
55
+          "name": "pages/calculatorSub/calculator/index",
56
+          "pathName": "pages/calculatorSub/calculator/index",
57
+          "query": "",
58
+          "launchMode": "default",
59
+          "scene": null
60
+        },
61
+        {
13 62
           "name": "pages/memberSub/earningsOrder/index",
14 63
           "pathName": "pages/memberSub/earningsOrder/index",
15 64
           "query": "type=2",

+ 10 - 0
src/app.config.js

@@ -39,6 +39,16 @@ export default defineAppConfig({
39 39
         "userSpecification/index"
40 40
       ]
41 41
     },
42
+    {
43
+      root: "pages/calculatorSub",
44
+      pages: [
45
+        "calculator/index",
46
+        "calculatorInventory/index",
47
+        "calculatorResult/index",
48
+        "calculatorWish/index",
49
+        "calculatorWishList/index",
50
+      ]
51
+    },
42 52
   ],
43 53
   navigateToMiniProgramAppIdList: [
44 54
     "ttf31985a46c214faf"

+ 35 - 0
src/components/instructionModal/index.jsx

@@ -0,0 +1,35 @@
1
+import { View, Image, RichText } from "@tarojs/components";
2
+import "./index.less";
3
+
4
+// 签约模态框组件
5
+export default function instructionModal(props) {
6
+  const { isOpened, onClose, title, content} = props;
7
+  // 关闭弹窗
8
+  const closeModal = () => {
9
+    onClose();
10
+  };
11
+  return (
12
+    <>
13
+      {isOpened && (
14
+        <View className="modal-container">
15
+          <View className="modal-mask" />
16
+          <View className="modal-content">
17
+          <View className="content-box">
18
+            {/* 背景图 */}
19
+              <Image src='https://yushi.tos-cn-beijing.volces.com/member/instructionBg.png' className="instruction-bg" />
20
+              <View className="instruction-title">
21
+                {title}
22
+              </View>
23
+              <View className="instruction-content">
24
+                <RichText nodes={content} />
25
+              </View>
26
+              <View onClick={closeModal} className="instruction-button">
27
+                我知道了
28
+              </View>
29
+            </View>
30
+          </View>
31
+        </View>
32
+      )}
33
+    </>
34
+  );
35
+}

+ 87 - 0
src/components/instructionModal/index.less

@@ -0,0 +1,87 @@
1
+.modal-container {
2
+  position: fixed;
3
+  top: 0;
4
+  left: 0;
5
+  width: 100%;
6
+  height: 100%;
7
+  z-index: 1000;
8
+  display: flex;
9
+  align-items: center;
10
+  justify-content: center;
11
+}
12
+
13
+.modal-mask {
14
+  position: absolute;
15
+  top: 0;
16
+  left: 0;
17
+  width: 100%;
18
+  height: 100%;
19
+  background-color: rgba(0, 0, 0, 0.6);
20
+}
21
+
22
+.modal-content {
23
+  position: relative;
24
+  background-color: #fff;
25
+  border-radius: 40px;
26
+  width: 80%;
27
+  max-width: 600px;
28
+  z-index: 1001;
29
+  animation: modalFadeIn 0.3s ease;
30
+
31
+  .content-box {
32
+    min-height: 400px;
33
+    padding: 54px 32px 38px 32px;
34
+    display: flex;
35
+    flex-direction: column;
36
+    align-items: center;
37
+    justify-content: center;
38
+    position: relative;
39
+
40
+    // 背景图
41
+    .instruction-bg {
42
+      width: 100%;
43
+      height: 100%;
44
+      position: absolute;
45
+      top: 0;
46
+      left: 0;
47
+      z-index: -1;
48
+    }
49
+    .instruction-title {
50
+      font-weight: 700;
51
+      font-size: 32px;
52
+      color: #000000;
53
+    }
54
+    .instruction-content {
55
+      font-size: 28px;
56
+      color: #3D3D3D;
57
+      line-height: 41px;
58
+      margin-top: 28px;
59
+      padding: 0 39px;
60
+      box-sizing: border-box;
61
+    }
62
+    .instruction-button {
63
+      width: 272px;
64
+      height: 76px;
65
+      background: linear-gradient(270deg, #FF6E39 0%, #FF891B 100%);
66
+      border-radius: 121px 121px 121px 121px;
67
+      font-size: 30px;
68
+      color: #FFFFFF;
69
+      margin-top: 44px;
70
+      display: flex;
71
+      align-items: center;
72
+      justify-content: center;
73
+    }
74
+  }
75
+}
76
+
77
+@keyframes modalFadeIn {
78
+  from {
79
+    opacity: 0;
80
+    transform: scale(0.9);
81
+  }
82
+
83
+  to {
84
+    opacity: 1;
85
+    transform: scale(1);
86
+  }
87
+}

+ 1 - 2
src/components/signModal/index.jsx

@@ -3,7 +3,6 @@ import { getSign, getUserAgreement } from "../../service";
3 3
 import { AtCheckbox } from "taro-ui";
4 4
 import "./index.less";
5 5
 import Taro from "@tarojs/taro";
6
-import sign from "../../images/productDetail/sign.png";
7 6
 import close from "../../images/productDetail/close.png";
8 7
 import { useState, useEffect } from "react";
9 8
 
@@ -60,7 +59,7 @@ export default function signModal(props) {
60 59
           <View className="modal-content">
61 60
             <Image onClick={closeModal} src={close} className="close-icon" />
62 61
             <View className="content-box">
63
-              <Image src={sign} className="sign-icon" />
62
+              <Image src='https://yushi.tos-cn-beijing.volces.com/calculator/sign.png' className="sign-icon" />
64 63
               <View className="sign-title">
65 64
                 鱼市招募推广者!自购享折扣,省钱多多;分享有佣金,赚钱轻松。速来开启共赢之旅!
66 65
               </View>

BIN
src/images/calculator/IconThree.png


BIN
src/images/calculator/iconOne.png


BIN
src/images/calculator/iconTwo.png


BIN
src/images/calculator/more.png


BIN
src/images/calculator/toShare.png


BIN
src/images/calculator/wish.png


BIN
src/images/member/calculator.png


BIN
src/images/productDetail/sign.png


+ 3 - 0
src/pages/calculatorSub/calculator/index.config.js

@@ -0,0 +1,3 @@
1
+export default definePageConfig({
2
+  navigationBarTitleText: '捡漏计算器'
3
+})

+ 80 - 0
src/pages/calculatorSub/calculator/index.jsx

@@ -0,0 +1,80 @@
1
+import { Component } from "react";
2
+import { View, Image, Text, Button } from "@tarojs/components";
3
+import "./index.less";
4
+import Taro from "@tarojs/taro";
5
+import more from "../../../images/calculator/more.png";
6
+import toShare from "../../../images/calculator/toShare.png";
7
+import wish from "../../../images/calculator/wish.png";
8
+export default class Index extends Component {
9
+  state = {};
10
+  componentDidMount() {}
11
+  // 去TA的捡漏心愿
12
+  toWishList = () => {
13
+    Taro.navigateTo({
14
+      url: `/pages/calculatorSub/calculatorWishList/index`,
15
+    });
16
+  };
17
+  // 去捡漏清单
18
+  calculatorInventory = () => {
19
+    Taro.navigateTo({
20
+      url: `/pages/calculatorSub/calculatorInventory/index`,
21
+    });
22
+  };
23
+  // 配置分享内容
24
+  onShareAppMessage(res) {
25
+    return {
26
+      title: "捡漏计算器",
27
+      path: `/pages/calculatorSub/calculatorWish/index?isShare=true`,
28
+      imageUrl: '',
29
+    }
30
+  }
31
+  render() {
32
+    return (
33
+      <View className="index">
34
+        {/* 顶部 */}
35
+        <View className="top-box">
36
+          <Image className="top-img" src='https://yushi.tos-cn-beijing.volces.com/calculator/topImg.png' />
37
+          <View className="button-box">
38
+            <Image className="button-icon" src='https://yushi.tos-cn-beijing.volces.com/calculator/button.png' />
39
+            <View className="button-text-box">
40
+              <Button openType="share">
41
+                <Text className="button-text">去分享</Text>
42
+                <Image className="to-share-icon" src={toShare} />
43
+              </Button>
44
+            </View>
45
+          </View>
46
+        </View>
47
+        {/* 底部 */}
48
+        <View className="bottom-box">
49
+          <Image mode="heightFix" className="bg-img" src='https://yushi.tos-cn-beijing.volces.com/calculator/bottomImg.png' />
50
+          <View className="content-box">
51
+            <View className="content-title">
52
+              <Image className="wish-icon" src={wish} />
53
+              <Text className="title-text">计算结果</Text>
54
+            </View>
55
+            {/* 列表 */}
56
+            <View className="list-box">
57
+              <View className="list-item">
58
+                <View className="list-item-left">
59
+                  <Image className="avatar" src={wish} />
60
+                  <View className="list-item-left-text">
61
+                    <Text className="name">按时打卡上课的急啊离开就</Text>
62
+                    <Text className="wishNum">15次捡漏许愿</Text>
63
+                  </View>
64
+                </View>
65
+                <View onClick={this.toWishList} className="list-item-right">
66
+                  查看
67
+                </View>
68
+              </View>
69
+            </View>
70
+          </View>
71
+          {/* 查看全部 */}
72
+          <View onClick={this.calculatorInventory} className="all-box">
73
+            <Text className="all-text">查看全部</Text>
74
+            <Image className="all-icon" src={more} />
75
+          </View>
76
+        </View>
77
+      </View>
78
+    );
79
+  }
80
+}

+ 203 - 0
src/pages/calculatorSub/calculator/index.less

@@ -0,0 +1,203 @@
1
+.index {
2
+    // 顶部
3
+    .top-box {
4
+        position: relative;
5
+
6
+        // 顶部图片
7
+        .top-img {
8
+            width: 100%;
9
+            height: 492px;
10
+        }
11
+
12
+        // 按钮
13
+        .button-box {
14
+            position: absolute;
15
+            top: 316px;
16
+            left: 50%;
17
+            transform: translateX(-50%);
18
+
19
+            .button-icon {
20
+                width: 324px;
21
+                height: 107px;
22
+            }
23
+
24
+            .button-text-box {
25
+                position: absolute;
26
+                top: 26px;
27
+                left: 50%;
28
+                transform: translateX(-50%);
29
+                font-weight: 700;
30
+                font-size: 32px;
31
+                color: #fff;
32
+                display: flex;
33
+                align-items: center;
34
+                justify-content: center;
35
+                width: 100%;
36
+                z-index: 999;
37
+                .button-text {
38
+                    margin-right: 10px;
39
+                }
40
+
41
+                .to-share-icon {
42
+                    width: 44px;
43
+                    height: 30px;
44
+                }
45
+            }
46
+        }
47
+    }
48
+
49
+    // 底部
50
+    .bottom-box {
51
+        width: 100%;
52
+        min-height: calc(100vh - 442px);
53
+        margin-top: -50px;
54
+        border-radius: 30px 30px 0 0;
55
+        z-index: 100;
56
+        position: relative;
57
+        overflow: hidden;
58
+        padding: 52px 0;
59
+        box-sizing: border-box;
60
+
61
+        .bg-img {
62
+            width: 100% !important;
63
+            height: 100%;
64
+            position: absolute;
65
+            top: 0;
66
+            left: 0;
67
+            z-index: -1;
68
+        }
69
+
70
+        .content-box {
71
+            width: 100%;
72
+            height: 100%;
73
+
74
+            .content-title {
75
+                display: flex;
76
+                align-items: center;
77
+                justify-content: center;
78
+
79
+                .wish-icon {
80
+                    width: 34px;
81
+                    height: 34px;
82
+                    margin-right: 10px;
83
+                }
84
+
85
+                .title-text {
86
+                    font-weight: 700;
87
+                    font-size: 32px;
88
+                    color: #000000;
89
+                }
90
+            }
91
+
92
+            // 列表
93
+            .list-box {
94
+                width: 100%;
95
+                height: 100%;
96
+                margin-top: 36px;
97
+                padding: 0 51px;
98
+                box-sizing: border-box;
99
+
100
+                .list-item {
101
+                    width: 100%;
102
+                    display: flex;
103
+                    align-items: center;
104
+                    justify-content: space-between;
105
+                    margin-bottom: 20px;
106
+
107
+                    .list-item-left {
108
+                        display: flex;
109
+                        align-items: center;
110
+
111
+                        .avatar {
112
+                            width: 130px;
113
+                            height: 130px;
114
+                            border-radius: 50%;
115
+                            margin-right: 20px;
116
+                        }
117
+
118
+                        .list-item-left-text {
119
+                            display: flex;
120
+                            flex-direction: column;
121
+
122
+                            .name {
123
+                                font-weight: 700;
124
+                                font-size: 28px;
125
+                                color: #000000;
126
+                                width: 380px;
127
+                                overflow: hidden;
128
+                                text-overflow: ellipsis;
129
+                                white-space: nowrap;
130
+                            }
131
+
132
+                            .wishNum {
133
+                                font-weight: 500;
134
+                                font-size: 24px;
135
+                                color: #FC8C31;
136
+                                margin-top: 16px;
137
+                            }
138
+                        }
139
+                    }
140
+
141
+                    .list-item-right {
142
+                        display: flex;
143
+                        align-items: center;
144
+                        justify-content: center;
145
+                        width: 112px;
146
+                        height: 64px;
147
+                        background: linear-gradient(270deg, #FFBD4B 0%, #F3802E 100%);
148
+                        border-radius: 62px 62px 62px 62px;
149
+                        font-weight: 700;
150
+                        font-size: 28px;
151
+                        color: #FFFFFF;
152
+                    }
153
+                }
154
+            }
155
+        }
156
+    }
157
+
158
+    // 查看全部
159
+    .all-box {
160
+        display: flex;
161
+        align-items: center;
162
+        justify-content: center;
163
+        margin-top: 34px;
164
+
165
+        .all-text {
166
+            font-weight: 500;
167
+            font-size: 24px;
168
+            color: #999999;
169
+        }
170
+
171
+        .all-icon {
172
+            width: 25px;
173
+            height: 21px;
174
+            margin-left: 10px;
175
+        }
176
+    }
177
+
178
+    // 清除Button默认样式
179
+    Button {
180
+        padding: 0;
181
+        margin: 0;
182
+        background: none;
183
+        border: none;
184
+        line-height: normal;
185
+        height: 100%;
186
+        width: 100%;
187
+        display: flex;
188
+        align-items: center;
189
+        justify-content: center;
190
+        font-size: 32px;
191
+        color: #FFFFFF;
192
+        &::after {
193
+            border: none;
194
+        }
195
+    }
196
+
197
+    .button-hover {
198
+        background-color: transparent !important;
199
+        /* 移除背景高亮 */
200
+        box-shadow: none !important;
201
+        /* 移除可能的阴影 */
202
+    }
203
+}

+ 3 - 0
src/pages/calculatorSub/calculatorInventory/index.config.js

@@ -0,0 +1,3 @@
1
+export default definePageConfig({
2
+  navigationBarTitleText: '捡漏清单'
3
+})

+ 30 - 0
src/pages/calculatorSub/calculatorInventory/index.jsx

@@ -0,0 +1,30 @@
1
+import { Component } from "react";
2
+import { View, Image, Text } from "@tarojs/components";
3
+import "./index.less";
4
+import wish from "../../../images/calculator/wish.png";
5
+
6
+export default class Index extends Component {
7
+  state = {};
8
+  componentDidMount() {}
9
+  render() {
10
+    return (
11
+      <View className="index">
12
+        {/* 列表 */}
13
+        <View className="list-box">
14
+          <View className="list-item">
15
+            <View className="list-item-left">
16
+              <Image className="avatar" src={wish} />
17
+              <View className="list-item-left-text">
18
+                <Text className="name">按时打卡上课的急啊离开就</Text>
19
+                <Text className="wishNum">15次捡漏许愿</Text>
20
+              </View>
21
+            </View>
22
+            <View onClick={this.toWishList} className="list-item-right">
23
+              查看
24
+            </View>
25
+          </View>
26
+        </View>
27
+      </View>
28
+    );
29
+  }
30
+}

+ 68 - 0
src/pages/calculatorSub/calculatorInventory/index.less

@@ -0,0 +1,68 @@
1
+.index {
2
+    padding-top: 58px;
3
+    box-sizing: border-box;
4
+
5
+    // 列表
6
+    .list-box {
7
+        width: 100%;
8
+        height: 100%;
9
+        margin-top: 36px;
10
+        padding: 0 51px;
11
+        box-sizing: border-box;
12
+
13
+        .list-item {
14
+            width: 100%;
15
+            display: flex;
16
+            align-items: center;
17
+            justify-content: space-between;
18
+            margin-bottom: 20px;
19
+
20
+            .list-item-left {
21
+                display: flex;
22
+                align-items: center;
23
+
24
+                .avatar {
25
+                    width: 130px;
26
+                    height: 130px;
27
+                    border-radius: 50%;
28
+                    margin-right: 20px;
29
+                }
30
+
31
+                .list-item-left-text {
32
+                    display: flex;
33
+                    flex-direction: column;
34
+
35
+                    .name {
36
+                        font-weight: 700;
37
+                        font-size: 28px;
38
+                        color: #000000;
39
+                        width: 380px;
40
+                        overflow: hidden;
41
+                        text-overflow: ellipsis;
42
+                        white-space: nowrap;
43
+                    }
44
+
45
+                    .wishNum {
46
+                        font-weight: 500;
47
+                        font-size: 24px;
48
+                        color: #FC8C31;
49
+                        margin-top: 16px;
50
+                    }
51
+                }
52
+            }
53
+
54
+            .list-item-right {
55
+                display: flex;
56
+                align-items: center;
57
+                justify-content: center;
58
+                width: 112px;
59
+                height: 64px;
60
+                background: linear-gradient(270deg, #FFBD4B 0%, #F3802E 100%);
61
+                border-radius: 62px 62px 62px 62px;
62
+                font-weight: 700;
63
+                font-size: 28px;
64
+                color: #FFFFFF;
65
+            }
66
+        }
67
+    }
68
+}

+ 3 - 0
src/pages/calculatorSub/calculatorResult/index.config.js

@@ -0,0 +1,3 @@
1
+export default definePageConfig({
2
+  navigationBarTitleText: '捡漏计算器'
3
+})

+ 74 - 0
src/pages/calculatorSub/calculatorResult/index.jsx

@@ -0,0 +1,74 @@
1
+import { Component } from "react";
2
+import { View, Image, Text } from "@tarojs/components";
3
+import "./index.less";
4
+export default class Index extends Component {
5
+  state = {
6
+  };
7
+  componentDidMount() {
8
+  }
9
+  render() {
10
+    return (
11
+      <View className="index">
12
+        {/* 顶部盒子 */}
13
+        <View className="top-box">
14
+          <Image className="top-img" src='https://yushi.tos-cn-beijing.volces.com/calculator/resultImg.png' />
15
+          {/* <Image className="top-img" src='https://yushi.tos-cn-beijing.volces.com/calculator/failResult.png' /> */}
16
+          {/* 捡漏产品 */}
17
+          <View className="calculator-info">
18
+              <View className="title-box">
19
+                <Text className="title-text-left">您想要的:</Text>
20
+                <Text className="title-text">购买北京到深圳的机票</Text>
21
+              </View>
22
+              <View className="title-box">
23
+                <Text className="title-text-left">期望花费:</Text>
24
+                <Text className="title-text">1000元</Text>
25
+              </View>
26
+          </View>
27
+          {/* 首选推荐产品 */}
28
+          <View className="first-recommend">
29
+            <View className="first-recommend-title">
30
+              <Image className="first-recommend-title-img" src='https://yushi.tos-cn-beijing.volces.com/calculator/recommend.png' />
31
+              <Text className="first-recommend-title-text">首选推荐</Text>
32
+            </View>
33
+            <View className="first-recommend-content">
34
+              <View className="product-info">
35
+                <Image className="product-avatar" src='https://yushi.tos-cn-beijing.volces.com/calculator/default-avatar.png' />
36
+                <View className="product-detail">
37
+                  <Text className="product-title">深圳往返北京机票</Text>
38
+                  <View className="price-box">
39
+                    <Text className="current-price">899</Text>
40
+                    <Text className="original-price">¥1299</Text>
41
+                  </View>
42
+                </View>
43
+              </View>
44
+            </View>
45
+            {/* 再次捡漏 */}
46
+            <View className="first-recommend-button">
47
+              <Image className="first-recommend-button-img" src='https://yushi.tos-cn-beijing.volces.com/calculator/resultButton.png' />
48
+              <Text className="first-recommend-button-text">再次捡漏</Text>
49
+            </View>
50
+          </View>
51
+        </View>
52
+          {/* 精选推荐列表 */}
53
+          <View className="good-recommend-content">
54
+            <View className="good-recommend-list-title">
55
+              <Image className="good-recommend-list-title-img" src='https://yushi.tos-cn-beijing.volces.com/calculator/recommendIcon.png' />
56
+              <Text className="good-recommend-list-title-text">精选推荐</Text>
57
+            </View>
58
+            {/* 精选推荐列表内容 */}
59
+              <View className="good-recommend-list">
60
+                <View className="good-recommend-list-item">
61
+                  <Image className="item-image" src='https://yushi.tos-cn-beijing.volces.com/calculator/default-avatar.png' />
62
+                  <Text className="item-title">深圳往返北京机票</Text>
63
+                  <View className="item-price">
64
+                    <Text className="price-symbol">¥</Text>
65
+                    <Text className="current-price">899</Text>
66
+                    <Text className="original-price">¥1299</Text>
67
+                  </View>
68
+                </View>
69
+              </View>
70
+          </View>
71
+      </View>
72
+    );
73
+  }
74
+}

+ 269 - 0
src/pages/calculatorSub/calculatorResult/index.less

@@ -0,0 +1,269 @@
1
+.index {
2
+    padding-top: 28px;
3
+    box-sizing: border-box;
4
+    background-color: #f4f4f4;
5
+    min-height: 100vh;
6
+
7
+    .top-box {
8
+        margin: 0 24px;
9
+        box-sizing: border-box;
10
+        position: relative;
11
+        background: #fff;
12
+        border-radius: 40px;
13
+        background-color: #faefe2;
14
+
15
+        &::before {
16
+            content: '';
17
+            position: absolute;
18
+            inset: 0;
19
+            padding: 10px;
20
+            background: linear-gradient(45deg, #f6dc65, #e87d3a);
21
+            border-radius: 40px;
22
+            -webkit-mask:
23
+                linear-gradient(#fff 0 0) content-box,
24
+                linear-gradient(#fff 0 0);
25
+            -webkit-mask-composite: xor;
26
+            mask-composite: exclude;
27
+            pointer-events: none;
28
+        }
29
+
30
+        .top-img {
31
+            width: 682px;
32
+            height: 608px;
33
+        }
34
+
35
+        // 期望花费
36
+        .calculator-info {
37
+            position: absolute;
38
+            top: 93px;
39
+            left: 266px;
40
+
41
+            .title-box {
42
+                display: flex;
43
+                align-items: center;
44
+
45
+                .title-text-left {
46
+                    font-size: 22px;
47
+                    color: #444444;
48
+                    margin-right: 6px;
49
+                }
50
+
51
+                .title-text {
52
+                    font-weight: 700;
53
+                    font-size: 30px;
54
+                    color: #000;
55
+                    width: 340px;
56
+                    overflow: hidden;
57
+                    text-overflow: ellipsis;
58
+                    display: -webkit-box;
59
+                    -webkit-box-orient: vertical;
60
+                    -webkit-line-clamp: 2;
61
+                    word-break: break-all;
62
+                }
63
+            }
64
+        }
65
+
66
+        // 首选推荐产品
67
+        .first-recommend {
68
+            position: absolute;
69
+            top: 210px;
70
+            left: 50%;
71
+            transform: translateX(-50%);
72
+            width: 642px;
73
+            height: 378px;
74
+            background-color: #fcdcb6;
75
+            border-radius: 40px;
76
+            display: flex;
77
+            flex-direction: column;
78
+            align-items: center;
79
+            padding: 20px 40px 0 24px;
80
+            box-sizing: border-box;
81
+
82
+            .first-recommend-title {
83
+                display: flex;
84
+                align-items: center;
85
+                font-weight: 700;
86
+                font-size: 30px;
87
+                color: #000000;
88
+
89
+                .first-recommend-title-img {
90
+                    width: 43px;
91
+                    height: 30px;
92
+                }
93
+            }
94
+        }
95
+
96
+        // 产品信息
97
+
98
+        .first-recommend-content {
99
+            width: 100%;
100
+
101
+            .product-info {
102
+                display: flex;
103
+                padding: 20px;
104
+                align-items: center;
105
+                width: 100%;
106
+                height: 146px;
107
+
108
+                .product-avatar {
109
+                    width: 146px;
110
+                    height: 146px;
111
+                    border-radius: 20px;
112
+                    margin-right: 12px;
113
+                    background-color: red;
114
+                }
115
+
116
+                .product-detail {
117
+                    flex: 1;
118
+                    height: 100%;
119
+                    display: flex;
120
+                    flex-direction: column;
121
+                    justify-content: space-between;
122
+                    padding-bottom: 13px;
123
+                    box-sizing: border-box;
124
+
125
+                    .product-title {
126
+                        font-size: 28px;
127
+                        color: #000000;
128
+                        margin-bottom: 16px;
129
+                        display: -webkit-box;
130
+                        -webkit-box-orient: vertical;
131
+                        -webkit-line-clamp: 2;
132
+                        overflow: hidden;
133
+                        text-overflow: ellipsis;
134
+                    }
135
+
136
+                    .price-box {
137
+                        display: flex;
138
+                        align-items: center;
139
+
140
+                        .current-price {
141
+                            font-size: 32px;
142
+                            color: #FF4B4B;
143
+                            font-weight: bold;
144
+                            margin-right: 16px;
145
+
146
+                            &::before {
147
+                                content: '¥';
148
+                                font-size: 22px;
149
+                            }
150
+                        }
151
+
152
+                        .original-price {
153
+                            font-size: 22px;
154
+                            color: #ABABAB;
155
+                            line-height: 32px;
156
+                            text-decoration: line-through;
157
+                        }
158
+                    }
159
+                }
160
+            }
161
+        }
162
+
163
+        // 再次捡漏
164
+        .first-recommend-button {
165
+            width: 273px;
166
+            height: 111px;
167
+            display: flex;
168
+            align-items: center;
169
+            justify-content: center;
170
+            margin-top: 11px;
171
+            position: relative;
172
+
173
+            .first-recommend-button-img {
174
+                position: absolute;
175
+                top: 0;
176
+                left: 0;
177
+                width: 100%;
178
+                height: 100%;
179
+                z-index: 1;
180
+            }
181
+
182
+            .first-recommend-button-text {
183
+                font-weight: 700;
184
+                font-size: 28px;
185
+                color: #FFFFFF;
186
+                z-index: 2;
187
+                margin-bottom: 18px;
188
+            }
189
+        }
190
+    }
191
+
192
+    // 精选推荐
193
+    .good-recommend-content {
194
+        margin-top: 32px;
195
+        padding: 40px 26px 0 26px;
196
+        box-sizing: border-box;
197
+        display: flex;
198
+        flex-direction: column;
199
+        align-items: center;
200
+        background-color: #fff;
201
+        border-radius: 30px 30px 0 0;
202
+
203
+        .good-recommend-list-title {
204
+            display: flex;
205
+            align-items: center;
206
+            font-weight: 700;
207
+            font-size: 36px;
208
+            color: #000000;
209
+            margin-bottom: 30px;
210
+
211
+            .good-recommend-list-title-img {
212
+                width: 34px;
213
+                height: 34px;
214
+                margin-right: 12px;
215
+            }
216
+        }
217
+        // 列表
218
+        .good-recommend-list {
219
+            display: flex;
220
+            flex-wrap: wrap;
221
+            gap: 19px;
222
+            padding: 0 16px;
223
+            width: 100%;
224
+            .good-recommend-list-item {
225
+                width: calc((100% - 38px) / 3); // 确保一行显示3个商品,中间间隔19px
226
+                display: flex;
227
+                flex-direction: column;
228
+                margin-bottom: 40px;
229
+                .item-image {
230
+                    width: 220px;
231
+                    height: 213px;
232
+                    border-radius: 20px 20px 0 0;
233
+                    background-color: red;
234
+                }
235
+
236
+                .item-title {
237
+                    font-size: 18px;
238
+                    color: #000000;
239
+                    line-height: 33px;
240
+                }
241
+
242
+                .item-price {
243
+                    margin-top: 4px;
244
+                    display: flex;
245
+                    align-items: baseline;
246
+
247
+                    .price-symbol {
248
+                        font-size: 20px;
249
+                        color: #FF1D17;
250
+                    }
251
+
252
+                    .current-price {
253
+                        font-size: 30px;
254
+                        font-weight: bold;
255
+                        color: #FF1D17;
256
+                        margin-right: 4px;
257
+                    }
258
+
259
+                    .original-price {
260
+                        font-size: 14px;
261
+                        color: #ABABAB;
262
+                        line-height: 20px;
263
+                        text-decoration: line-through;
264
+                    }
265
+                }
266
+            }
267
+        }
268
+    }
269
+}

+ 3 - 0
src/pages/calculatorSub/calculatorWish/index.config.js

@@ -0,0 +1,3 @@
1
+export default definePageConfig({
2
+  navigationBarTitleText: '捡漏计算器'
3
+})

+ 89 - 0
src/pages/calculatorSub/calculatorWish/index.jsx

@@ -0,0 +1,89 @@
1
+import { Component } from "react";
2
+import { View, Image, Text, Input } from "@tarojs/components";
3
+import "./index.less";
4
+import iconOne from "../../../images/calculator/iconOne.png";
5
+import iconTwo from "../../../images/calculator/iconTwo.png";
6
+import iconThree from "../../../images/calculator/iconThree.png";
7
+export default class Index extends Component {
8
+  state = {};
9
+  componentDidMount() {}
10
+  render() {
11
+    return (
12
+      <View className="index">
13
+        <Image className="top-img" src='https://yushi.tos-cn-beijing.volces.com/calculator/wishTopImg.png' />
14
+        {/* 底部 */}
15
+        <View className="bottom-box">
16
+          <Image mode="heightFix" className="bg-img" src='https://yushi.tos-cn-beijing.volces.com/calculator/bottomImg.png' />
17
+          {/* 输入内容区域 */}
18
+          <View className="input-box">
19
+            <View className="input-box-title">
20
+              <Image className="title-icon" src={iconOne} />
21
+              <Text className="title-text">您想要的物品或服务</Text>
22
+            </View>
23
+            <View className="input-box-content">
24
+              <View className="input-box-content-box">
25
+                <Input
26
+                  className="input-box-content-input"
27
+                  placeholder="请输入你的心愿"
28
+                />
29
+              </View>
30
+              <View className="input-box-content-text">
31
+                例: 输入机票不如输入从深圳到北京的机票
32
+              </View>
33
+            </View>
34
+          </View>
35
+          <View className="input-box">
36
+            <View className="input-box-title">
37
+              <Image className="title-icon" src={iconTwo} />
38
+              <Text className="title-text">您预期的价格</Text>
39
+            </View>
40
+            <View className="input-box-content">
41
+            <View className="input-box-content-box">
42
+                <Input
43
+                  className="input-box-content-input"
44
+                  placeholder="请输入你的心愿"
45
+                />
46
+              </View>
47
+              <View className="input-box-content-text">
48
+                注意:我们是认真的!
49
+              </View>
50
+            </View>
51
+          </View>
52
+          <View className="button-box">
53
+            <Image className="button-icon" src='https://yushi.tos-cn-beijing.volces.com/calculator/buttonTwo.png' />
54
+            <View className="button-text-box">
55
+                <Text className="button-text">捡漏计算</Text>
56
+            </View>
57
+          </View>
58
+          {/* 底部捡漏列表 */}
59
+          <View className="bottom-list-box">  
60
+            <View className="bottom-list-box-title">
61
+              <Image className="title-icon" src={iconThree} />
62
+              <Text className="title-text">TA们捡了哪些漏</Text>
63
+            </View>
64
+            <View className="bottom-list-box-content">  
65
+              <View className="bottom-list-box-content-item"> 
66
+              TA想要“从北京到深圳的机票”,捡漏200元
67
+              </View>
68
+              <View className="bottom-list-box-content-item"> 
69
+              TA想要“从北京到深圳的机票”,捡漏200元
70
+              </View>
71
+              <View className="bottom-list-box-content-item"> 
72
+              TA想要“从北京到深圳的机票”,捡漏200元
73
+              </View>
74
+              <View className="bottom-list-box-content-item"> 
75
+              TA想要“从北京到深圳的机票”,捡漏200元
76
+              </View>
77
+              <View className="bottom-list-box-content-item"> 
78
+              TA想要“从北京到深圳的机票”,捡漏200元
79
+              </View>
80
+              <View className="bottom-list-box-content-item"> 
81
+              TA想要“从北京到深圳的机票”,捡漏200元
82
+              </View>
83
+            </View>
84
+          </View>
85
+        </View>
86
+      </View>
87
+    );
88
+  }
89
+}

+ 172 - 0
src/pages/calculatorSub/calculatorWish/index.less

@@ -0,0 +1,172 @@
1
+.index {
2
+    .top-img {
3
+        width: 100%;
4
+        height: 668px;
5
+    }
6
+
7
+    // 底部
8
+    .bottom-box {
9
+        width: 100%;
10
+        min-height: calc(100vh - 550px);
11
+        margin-top: -118px;
12
+        border-radius: 30px 30px 0 0;
13
+        z-index: 100;
14
+        position: relative;
15
+        overflow: hidden;
16
+        padding: 41px 0;
17
+        box-sizing: border-box;
18
+        display: flex;
19
+        flex-direction: column;
20
+        align-items: center;
21
+
22
+        .bg-img {
23
+            width: 100%;
24
+            height: 100%;
25
+            position: absolute;
26
+            top: 0;
27
+            left: 0;
28
+            z-index: -1;
29
+        }
30
+
31
+        // 输入内容区域
32
+        .input-box {
33
+            width: 100%;
34
+            height: 100%;
35
+            padding: 0 96px;
36
+            box-sizing: border-box;
37
+            margin-bottom: 20px;
38
+            display: flex;
39
+            flex-direction: column;
40
+            align-items: center;
41
+            justify-content: center;
42
+
43
+            .input-box-title {
44
+                width: 100%;
45
+                display: flex;
46
+                align-items: center;
47
+                justify-content: center;
48
+                margin-bottom: 13px;
49
+
50
+                .title-icon {
51
+                    width: 50px;
52
+                    height: 48px;
53
+                    margin-right: 10px;
54
+                }
55
+
56
+                .title-text {
57
+                    font-weight: 600;
58
+                    font-size: 32px;
59
+                    color: #D2202B;
60
+                }
61
+            }
62
+
63
+            // 输入内容
64
+            .input-box-content {
65
+                width: 100%;
66
+
67
+                .input-box-content-box {
68
+                    border: 10px solid #e87d3a;
69
+                    box-sizing: border-box;
70
+                    border-radius: 30px;
71
+                    overflow: hidden;
72
+                }
73
+
74
+                .input-box-content-input {
75
+                    width: 100%;
76
+                    height: 80px;
77
+                    background: #FFFFFF;
78
+                    text-align: center;
79
+                    font-weight: 350;
80
+                    font-size: 26px;
81
+                    padding: 0 20px;
82
+                    box-sizing: border-box;
83
+                }
84
+
85
+                .input-box-content-text {
86
+                    font-weight: 500;
87
+                    font-size: 22px;
88
+                    color: #444444;
89
+                    margin-top: 12px;
90
+                }
91
+            }
92
+        }
93
+
94
+        // 按钮
95
+        .button-box {
96
+            width: 452px;
97
+            height: 156px;
98
+            margin-top: 30px;
99
+            position: relative;
100
+
101
+            .button-icon {
102
+                position: absolute;
103
+                top: 0;
104
+                left: 0;
105
+                width: 100%;
106
+                height: 100%;
107
+            }
108
+
109
+            .button-text-box {
110
+                position: absolute;
111
+                top: 34px;
112
+                left: 50%;
113
+                transform: translateX(-50%);
114
+                font-weight: 700;
115
+                font-size: 32px;
116
+                color: #FFFFFF;
117
+                line-height: 46px;
118
+            }
119
+        }
120
+
121
+        // 底部捡漏列表
122
+        .bottom-list-box {
123
+            width: 100%;
124
+            height: 100%;
125
+            padding: 0 50px;
126
+            box-sizing: border-box;
127
+            margin-top: 44px;
128
+            display: flex;
129
+            flex-direction: column;
130
+            align-items: center;
131
+
132
+            .bottom-list-box-title {
133
+                width: 100%;
134
+                display: flex;
135
+                align-items: center;
136
+                justify-content: center;
137
+                margin-bottom: 30px;
138
+
139
+                .title-icon {
140
+                    width: 46px;
141
+                    height: 46px;
142
+                }
143
+
144
+                .title-text {
145
+                    font-weight: 700;
146
+                    font-size: 36px;
147
+                    color: #000000;
148
+                }
149
+            }
150
+
151
+            // 捡漏列表
152
+            .bottom-list-box-content {
153
+                width: 100%;
154
+                height: 100%;
155
+
156
+                .bottom-list-box-content-item {
157
+                    width: 100%;
158
+                    border-radius: 18px;
159
+                    font-weight: 500;
160
+                    font-size: 24px;
161
+                    color: #444444;
162
+                    margin-bottom: 30px;
163
+                    display: flex;
164
+                    align-items: center;
165
+                    padding: 17px 18px;
166
+                    background: linear-gradient(to right, #F9CA2E, #F1AF2C);
167
+                    box-sizing: border-box;
168
+                }
169
+            }
170
+        }
171
+    }
172
+}

+ 3 - 0
src/pages/calculatorSub/calculatorWishList/index.config.js

@@ -0,0 +1,3 @@
1
+export default definePageConfig({
2
+  navigationBarTitleText: 'TA的捡漏心愿'
3
+})

+ 56 - 0
src/pages/calculatorSub/calculatorWishList/index.jsx

@@ -0,0 +1,56 @@
1
+import { Component } from "react";
2
+import { View} from "@tarojs/components";
3
+import "./index.less";
4
+export default class Index extends Component {
5
+  state = {
6
+    wishList: [
7
+      {
8
+        title: "iPhone 15 Pro",
9
+        price: "¥8999",
10
+        time: "2024-03-20"
11
+      },
12
+      {
13
+        title: "机械键盘",
14
+        price: "¥599",
15
+        time: "2024-03-21"
16
+      },
17
+      {
18
+        title: "显示器",
19
+        price: "¥2399",
20
+        time: "2024-03-22"
21
+      },
22
+      {
23
+        title: "耳机",
24
+        price: "¥999",
25
+        time: "2024-03-23"
26
+      }
27
+    ]
28
+  };
29
+  componentDidMount() {
30
+  }
31
+  render() {
32
+    return (
33
+      <View className="index">
34
+        {/* 心愿列表 */}
35
+        <View className="wish-list">
36
+          {this.state.wishList.map((item, index) => (
37
+            <View key={index} className="item">
38
+              <View className="left">
39
+                {index+1}
40
+            </View>
41
+            <View className="right">
42
+              <View className="left-text">
43
+                <View className="title">{item.title}</View>
44
+                <View className="price">预算&emsp;{item.price}元</View>
45
+              </View>
46
+              <View className="right-text">
47
+                {item.time}
48
+              </View>
49
+            </View>
50
+            </View>
51
+          ))}
52
+        </View>
53
+      </View>
54
+    );
55
+  }
56
+}

+ 64 - 0
src/pages/calculatorSub/calculatorWishList/index.less

@@ -0,0 +1,64 @@
1
+.index {
2
+    .wish-list {
3
+        padding-top: 82px;
4
+        box-sizing: border-box;
5
+        padding-right: 40px;
6
+
7
+        .item {
8
+            display: flex;
9
+
10
+
11
+            .left {
12
+                width: 160px;
13
+                height: 100%;
14
+                font-weight: 500;
15
+                font-size: 60px;
16
+                color: #FF6200;
17
+                text-align: center;
18
+                padding-top: 20px;
19
+                box-sizing: border-box;
20
+            }
21
+
22
+            .right {
23
+                flex: 1;
24
+                display: flex;
25
+                justify-content: space-between;
26
+                align-items: center;
27
+                border-bottom: 1px solid #D8D8D8;
28
+                height: 100%;
29
+                padding: 30px 0;
30
+                box-sizing: border-box;
31
+
32
+                .left-text {
33
+                    display: flex;
34
+                    flex-direction: column;
35
+
36
+                    .title {
37
+                        font-weight: 500;
38
+                        font-size: 30px;
39
+                        color: #333333;
40
+                    }
41
+
42
+                    .price {
43
+                        font-weight: 500;
44
+                        font-size: 26px;
45
+                        color: #FC8C31;
46
+                        margin-top: 10px;
47
+                    }
48
+                }
49
+
50
+                .right-text {
51
+                    font-weight: 350;
52
+                    font-size: 24px;
53
+                    color: #999999;
54
+                }
55
+            }
56
+
57
+            &:last-child {
58
+                .right {
59
+                    border-bottom: none;
60
+                }
61
+            }
62
+        }
63
+    }
64
+}

+ 21 - 7
src/pages/index/index.jsx

@@ -42,10 +42,10 @@ export default class Index extends Component {
42 42
   };
43 43
   // 轮播图点击
44 44
   handleBannerClick = (item) => {
45
-    if(item.type_jpath==1){
45
+    if (item.type_jpath == 1) {
46 46
       Taro.navigateTo({
47
-        url: `${item.jpath}&isBanner=true`
48
-      })
47
+        url: `${item.jpath}&isBanner=true`,
48
+      });
49 49
     }
50 50
   };
51 51
   // 修改 tab 切换处理函数
@@ -66,9 +66,9 @@ export default class Index extends Component {
66 66
               Taro.pageScrollTo({
67 67
                 scrollTop: top - 40,
68 68
                 duration: 300,
69
-                complete:()=>{
69
+                complete: () => {
70 70
                   this.getProductList(true);
71
-                }
71
+                },
72 72
               });
73 73
             } else {
74 74
               console.warn("未找到 .product-list-wrap 元素");
@@ -121,6 +121,14 @@ export default class Index extends Component {
121 121
   onShareAppMessage() {
122 122
     return getShareContent();
123 123
   }
124
+  // ooo = () => {
125
+  //   Taro.requestSubscribeMessage({
126
+  //     tmplIds: ["vAYG7hbNbsD75YHpmGvF8O_Pve_1Q5AvnLBd-2JF9ys"],
127
+  //     success: function (res) {
128
+  //       console.log(res);
129
+  //     },
130
+  //   });
131
+  // };
124 132
   render() {
125 133
     const { homeData, productList, loading } = this.state;
126 134
     return (
@@ -165,12 +173,17 @@ export default class Index extends Component {
165 173
               circular
166 174
               autoplay
167 175
               indicatorDots
168
-              indicatorColor="#e8e8e8"banner
176
+              indicatorColor="#e8e8e8"
177
+              banner
169 178
               indicatorActiveColor="#ffffff"
170 179
             >
171 180
               {homeData.banner &&
172 181
                 homeData.banner.map((item) => (
173
-                  <SwiperItem onClick={() => this.handleBannerClick(item)} className="banner-item" key={item.id}>
182
+                  <SwiperItem
183
+                    onClick={() => this.handleBannerClick(item)}
184
+                    className="banner-item"
185
+                    key={item.id}
186
+                  >
174 187
                     <Image
175 188
                       className="banner-img"
176 189
                       src={item.img}
@@ -181,6 +194,7 @@ export default class Index extends Component {
181 194
             </Swiper>
182 195
           </View>
183 196
         </View>
197
+        {/* <Button onClick={this.ooo}>订阅</Button> */}
184 198
         {/* 骨架屏 */}
185 199
         <Skeleton
186 200
           isSkeletonShow={!homeData.banner && !productList.length > 0}

+ 155 - 40
src/pages/member/index.jsx

@@ -1,7 +1,7 @@
1 1
 import { Component } from "react";
2 2
 import { View, Text, Image } from "@tarojs/components";
3 3
 import { AtIcon } from "taro-ui";
4
-import { getVipInfo } from "../../service";
4
+import { getVipInfo,getUserAgreement } from "../../service";
5 5
 import { get_my_worker_info } from "../../service/money_api";
6 6
 import Taro from "@tarojs/taro";
7 7
 import "./index.less";
@@ -13,6 +13,8 @@ import withdrawable from "../../images/member/withdrawable.png";
13 13
 import order from "../../images/member/order.png";
14 14
 import avatar from "../../images/mine/avatar.png";
15 15
 import partner from "../../images/member/myPartner.png";
16
+import calculator from "../../images/member/calculator.png";
17
+import InstructionModal from "../../components/instructionModal";
16 18
 export default class Index extends Component {
17 19
   state = {
18 20
     vipInfo: {
@@ -20,9 +22,18 @@ export default class Index extends Component {
20 22
       earnings: { store_earnings_now: 0, store_earnings_all: 0 },
21 23
       draw_money: { store_earnings_now: 0 },
22 24
       partner: { partner_direct_cnt: 0 },
23
-      order: { order_all: 0, order_promotion: 0, order_pay: 0, unissued_order_cnt: 0, on_arrival_order_cnt: 0, dead_order_cnt: 0 },
25
+      order: {
26
+        order_all: 0,
27
+        order_promotion: 0,
28
+        order_pay: 0,
29
+        unissued_order_cnt: 0,
30
+        on_arrival_order_cnt: 0,
31
+        dead_order_cnt: 0,
32
+      },
24 33
     }, //会员信息
25
-    isAlipay: true,//是否签约
34
+    isAlipay: true, //是否签约
35
+    isInstructionModal: false, //是否显示伙伴说明弹窗
36
+    userAgreement: '', //会员规则
26 37
   };
27 38
 
28 39
   // 获取签约信息
@@ -30,10 +41,10 @@ export default class Index extends Component {
30 41
     const res = await get_my_worker_info();
31 42
     if (res.data.length == 0) {
32 43
       this.setState({
33
-        isAlipay: false
34
-      })
44
+        isAlipay: false,
45
+      });
35 46
     }
36
-  }
47
+  };
37 48
 
38 49
   // 获取会员首页数据
39 50
   getVipInfo = async () => {
@@ -42,6 +53,23 @@ export default class Index extends Component {
42 53
       vipInfo: res,
43 54
     });
44 55
   };
56
+  // 获取会员规则
57
+  getUserAgreement = async () => {
58
+    const res = await getUserAgreement({
59
+      type: 4,
60
+    });
61
+    this.setState({
62
+      userAgreement: res.content,
63
+    });
64
+  };
65
+  // 打开伙伴说明弹窗
66
+  handleInstructionModal = () => {
67
+    this.setState({
68
+      isInstructionModal: true,
69
+    });
70
+  };
71
+
72
+
45 73
   // 去登录
46 74
   Login = () => {
47 75
     if (!Taro.getStorageSync("session_key")) {
@@ -50,17 +78,20 @@ export default class Index extends Component {
50 78
       });
51 79
     }
52 80
   };
53
-  componentDidShow () {
81
+  componentDidShow() {
54 82
     if (Taro.getStorageSync("session_key")) {
55 83
       this.getVipInfo(); //获取会员首页数据
56 84
       this.getWorkerInfo(); //获取签约信息
57 85
     }
86
+    this.getUserAgreement(); //获取会员规则
58 87
   }
59 88
   // 去订单列表
60 89
   handleOrderClick = (type) => {
61
-    Taro.navigateTo({ url: `/pages/memberSub/earningsOrder/index?type=${type}` });
62
-  }
63
-  render () {
90
+    Taro.navigateTo({
91
+      url: `/pages/memberSub/earningsOrder/index?type=${type}`,
92
+    });
93
+  };
94
+  render() {
64 95
     const { vipInfo } = this.state;
65 96
     return (
66 97
       <View className="member">
@@ -76,7 +107,9 @@ export default class Index extends Component {
76 107
               />
77 108
 
78 109
               <View className="member-info-card-header-text">
79
-                <Text onClick={this.Login} className="user-name">{vipInfo.users.name}</Text>
110
+                <Text onClick={this.Login} className="user-name">
111
+                  {vipInfo.users.name}
112
+                </Text>
80 113
 
81 114
                 <View className="member-info-card-header-text-level">
82 115
                   <Text className="level-text">店长</Text>
@@ -84,17 +117,31 @@ export default class Index extends Component {
84 117
                 </View>
85 118
               </View>
86 119
             </View>
87
-            {/* 我的小店 */}
88
-            <View
89
-              onClick={() =>
90
-                Taro.navigateTo({
91
-                  url: `/pages/memberSub/storeManagement/index?isManager=${true}`,
92
-                })
93
-              }
94
-              className="my-shop"
95
-            >
96
-              <Image className="my-shop-icon" src={home} />
97
-              <View className="my-shop-text">我的小店</View>
120
+            <View className="member-info-card-content">
121
+              {/* 捡漏计算器 */}
122
+              <View
123
+                onClick={() =>
124
+                  Taro.navigateTo({
125
+                    url: "/pages/calculatorSub/calculator/index",
126
+                  })
127
+                }
128
+                className="my-shop"
129
+              >
130
+                <Image className="my-shop-icon" src={calculator} />
131
+                <View className="my-shop-text">捡漏计算器</View>
132
+              </View>
133
+              {/* 我的小店 */}
134
+              <View
135
+                onClick={() =>
136
+                  Taro.navigateTo({
137
+                    url: `/pages/memberSub/storeManagement/index?isManager=${true}`,
138
+                  })
139
+                }
140
+                className="my-shop"
141
+              >
142
+                <Image className="my-shop-icon" src={home} />
143
+                <View className="my-shop-text">我的小店</View>
144
+              </View>
98 145
             </View>
99 146
           </View>
100 147
           {/* 预估收益 */}
@@ -116,7 +163,14 @@ export default class Index extends Component {
116 163
                 <Text className="label">累计收益</Text>
117 164
               </View>
118 165
             </View>
119
-            <view onClick={() => Taro.navigateTo({ url: `/pages/memberSub/earningsDetail/index` })} className="estimated-income-detail">
166
+            <view
167
+              onClick={() =>
168
+                Taro.navigateTo({
169
+                  url: `/pages/memberSub/earningsDetail/index`,
170
+                })
171
+              }
172
+              className="estimated-income-detail"
173
+            >
120 174
               收益详情
121 175
               <Image className="to-detail" src={toDetail} />
122 176
             </view>
@@ -133,16 +187,21 @@ export default class Index extends Component {
133 187
                 <Text className="amount">
134 188
                   {`¥ ${vipInfo.draw_money.store_earnings_now}`}
135 189
                 </Text>
136
-                {
137
-                  !this.state.isAlipay &&
190
+                {!this.state.isAlipay && (
138 191
                   <View className="warning-icon-box">
139 192
                     <Image className="warning-icon" src={warning} />
140 193
                     <Text className="warning-text">未完成提现认证</Text>
141 194
                   </View>
195
+                )}
196
+              </View>
197
+              <View
198
+                onClick={() =>
199
+                  Taro.navigateTo({ url: `/pages/memberSub/cashOut/index` })
142 200
                 }
143
-
201
+                className="right"
202
+              >
203
+                点击提现
144 204
               </View>
145
-              <View onClick={() => Taro.navigateTo({ url: `/pages/memberSub/cashOut/index` })} className="right">点击提现</View>
146 205
             </View>
147 206
           </View>
148 207
           {/* 我的伙伴 */}
@@ -152,15 +211,38 @@ export default class Index extends Component {
152 211
                 <Image className="my-partner-icon" src={partner} />
153 212
                 <Text className="my-partner-title">我的伙伴</Text>
154 213
               </View>
155
-              <View onClick={() => Taro.navigateTo({ url: `/pages/memberSub/myPartner/index` })} className="my-partner-header-right">
214
+              <View
215
+                onClick={() =>
216
+                  Taro.navigateTo({ url: `/pages/memberSub/myPartner/index` })
217
+                }
218
+                className="my-partner-header-right"
219
+              >
156 220
                 查看更多
157
-                <AtIcon value='chevron-right' size='10' color='#A1A1A1'></AtIcon>
221
+                <AtIcon
222
+                  value="chevron-right"
223
+                  size="10"
224
+                  color="#A1A1A1"
225
+                ></AtIcon>
158 226
               </View>
159 227
             </View>
160 228
             <View className="my-partner-content">
161
-              <View onClick={() => Taro.navigateTo({ url: `/pages/memberSub/myPartner/index` })} className="my-partner-item">
229
+              {this.state.userAgreement && (
230
+                <Image
231
+                  onClick={() => this.handleInstructionModal()}
232
+                  className="partnerExplain"
233
+                  src="https://yushi.tos-cn-beijing.volces.com/calculator/partnerExplain.png"
234
+              />
235
+              )}
236
+              <View
237
+                onClick={() =>
238
+                  Taro.navigateTo({ url: `/pages/memberSub/myPartner/index` })
239
+                }
240
+                className="my-partner-item"
241
+              >
162 242
                 <Text className="label">直接伙伴</Text>
163
-                <Text className="number">{vipInfo.partner?.partner_direct_cnt || 0}</Text>
243
+                <Text className="number">
244
+                  {vipInfo.partner?.partner_direct_cnt || 0}
245
+                </Text>
164 246
               </View>
165 247
               {/* <View className="my-partner-item">
166 248
                 <Text className="label">间接伙伴</Text>
@@ -175,9 +257,16 @@ export default class Index extends Component {
175 257
                 <Image className="today-order-icon" src={order} />
176 258
                 <Text className="today-order-title">今日订单</Text>
177 259
               </View>
178
-              <View onClick={() => this.handleOrderClick(2)} className="today-order-header-right">
260
+              <View
261
+                onClick={() => this.handleOrderClick(2)}
262
+                className="today-order-header-right"
263
+              >
179 264
                 历史订单
180
-                <AtIcon value='chevron-right' size='10' color='#A1A1A1'></AtIcon>
265
+                <AtIcon
266
+                  value="chevron-right"
267
+                  size="10"
268
+                  color="#A1A1A1"
269
+                ></AtIcon>
181 270
               </View>
182 271
             </View>
183 272
 
@@ -186,29 +275,55 @@ export default class Index extends Component {
186 275
                 <Text className="label">订单总量</Text>
187 276
                 <Text className="amount">{vipInfo.order.order_all}</Text>
188 277
               </View>
189
-              <View className="order-item" onClick={() => this.handleOrderClick(2)}>
278
+              <View
279
+                className="order-item"
280
+                onClick={() => this.handleOrderClick(2)}
281
+              >
190 282
                 <Text className="label">推广订单</Text>
191 283
                 <Text className="amount">{vipInfo.order.order_promotion}</Text>
192 284
               </View>
193
-              <View className="order-item" onClick={() => this.handleOrderClick(2)}>
285
+              <View
286
+                className="order-item"
287
+                onClick={() => this.handleOrderClick(2)}
288
+              >
194 289
                 <Text className="label">已付款订单</Text>
195
-                <Text className="amount">{vipInfo.order.unissued_order_cnt}</Text>
290
+                <Text className="amount">
291
+                  {vipInfo.order.unissued_order_cnt}
292
+                </Text>
196 293
               </View>
197
-              <View className="order-item" onClick={() => this.handleOrderClick(2)}>
294
+              <View
295
+                className="order-item"
296
+                onClick={() => this.handleOrderClick(2)}
297
+              >
198 298
                 <Text className="label">已收货订单</Text>
199
-                <Text className="amount">{vipInfo.order.on_arrival_order_cnt}</Text>
299
+                <Text className="amount">
300
+                  {vipInfo.order.on_arrival_order_cnt}
301
+                </Text>
200 302
               </View>
201
-              <View className="order-item" onClick={() => this.handleOrderClick(2)}>
303
+              <View
304
+                className="order-item"
305
+                onClick={() => this.handleOrderClick(2)}
306
+              >
202 307
                 <Text className="label">已结算订单</Text>
203 308
                 <Text className="amount">{vipInfo.order.order_pay}</Text>
204 309
               </View>
205
-              <View className="order-item" onClick={() => this.handleOrderClick(2)}>
310
+              <View
311
+                className="order-item"
312
+                onClick={() => this.handleOrderClick(2)}
313
+              >
206 314
                 <Text className="label">已失效订单</Text>
207 315
                 <Text className="amount">{vipInfo.order.dead_order_cnt}</Text>
208 316
               </View>
209 317
             </View>
210 318
           </View>
211 319
         </View>
320
+        {/* 使用说明 */}
321
+        <InstructionModal
322
+          title="我的伙伴"
323
+          content={this.state.userAgreement}
324
+          isOpened={this.state.isInstructionModal}
325
+          onClose={() => this.setState({ isInstructionModal: false })}
326
+        />
212 327
       </View>
213 328
     );
214 329
   }

+ 34 - 18
src/pages/member/index.less

@@ -81,29 +81,35 @@
81 81
                 }
82 82
             }
83 83
         }
84
-
85
-        // 我的小店
86
-        .my-shop {
84
+        .member-info-card-content{
85
+            display: flex;
87 86
             width: 100%;
88
-            height: 92px;
87
+            padding: 0 140px;
88
+            box-sizing: border-box;
89 89
             background-color: #fff5dc;
90
-            display: flex;
91
-            align-items: center;
92
-            justify-content: center;
93 90
 
94
-            image {
95
-                height: 30px;
96
-                width: 30px;
97
-                margin-right: 10px;
98
-            }
99
-
100
-            .my-shop-text {
101
-                font-size: 24px;
102
-                color: #000000;
103
-                height: 100%;
91
+            // 我的小店
92
+            .my-shop {
93
+                width: 100%;
94
+                height: 92px;
104 95
                 display: flex;
105 96
                 align-items: center;
106
-                padding-top: 10px;
97
+                justify-content: center;
98
+    
99
+                image {
100
+                    height: 30px;
101
+                    width: 30px;
102
+                    margin-right: 10px;
103
+                }
104
+    
105
+                .my-shop-text {
106
+                    font-size: 24px;
107
+                    color: #000000;
108
+                    height: 100%;
109
+                    display: flex;
110
+                    align-items: center;
111
+                    height: fit-content;
112
+                }
107 113
             }
108 114
         }
109 115
     }
@@ -293,6 +299,15 @@
293 299
             display: flex;
294 300
             justify-content: space-between;
295 301
             align-items: center;
302
+            position: relative;
303
+            .partnerExplain{
304
+                position: absolute;
305
+                width: 31px;
306
+                height: 40px;
307
+                right: 30px;
308
+                top: 50%;
309
+                transform: translateY(-50%);
310
+            }
296 311
             .my-partner-item{
297 312
                 flex: 1;
298 313
                 text-align: center;
@@ -311,6 +326,7 @@
311 326
                     color: #000000;
312 327
                     line-height: 40px;
313 328
                 }
329
+
314 330
             }
315 331
         }
316 332
     }   

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

@@ -146,7 +146,7 @@ export default class Index extends Component {
146 146
           {/* 分享店铺 */}
147 147
           {!this.state.isShare && (
148 148
             <View className="share-shop">
149
-              <Button onClick={this.handleShare} openType="share">
149
+              <Button openType="share">
150 150
                 <Text>分享店铺</Text>
151 151
                 <AtIcon value="chevron-right" size="10" color="#fff"></AtIcon>
152 152
               </Button>

+ 47 - 14
src/pages/mine/index.jsx

@@ -2,7 +2,7 @@ import { Component } from "react";
2 2
 import Taro from "@tarojs/taro";
3 3
 import { View, Text, Image } from "@tarojs/components";
4 4
 import { AtList, AtListItem } from "taro-ui";
5
-import { getUserInfo } from "../../service";
5
+import { getUserInfo, getMineData } from "../../service";
6 6
 import "./index.less";
7 7
 import loginOut from "../../images/mine/loginOut.png";
8 8
 import edit from "../../images/mine/edit.png";
@@ -18,6 +18,7 @@ import levelFive from "../../images/mine/levelFive.png";
18 18
 export default class Index extends Component {
19 19
   state = {
20 20
     userInfo: {}, //用户信息
21
+    mineData: {}, //我的页面数据
21 22
     isOpened: false, //是否打开弹窗
22 23
   };
23 24
   // 退出登录
@@ -43,6 +44,7 @@ export default class Index extends Component {
43 44
     const session_key = Taro.getStorageSync("session_key");
44 45
     if (session_key) {
45 46
       this.getUserInfo();
47
+      this.getMineData();
46 48
     }
47 49
   }
48 50
   // 获取用户信息
@@ -53,6 +55,13 @@ export default class Index extends Component {
53 55
       userInfo: res,
54 56
     });
55 57
   };
58
+  // 获取我的页面数据
59
+  getMineData = async () => {
60
+    const res = await getMineData();
61
+    this.setState({
62
+      mineData: res,
63
+    });
64
+  };
56 65
   // 去登录
57 66
   Login = () => {
58 67
     if (!Taro.getStorageSync("session_key")) {
@@ -76,7 +85,7 @@ export default class Index extends Component {
76 85
     }
77 86
   };
78 87
   render() {
79
-    const { userInfo, isOpened } = this.state;
88
+    const { userInfo, isOpened, mineData } = this.state;
80 89
     return (
81 90
       <View className="index">
82 91
         {/* 个人信息 */}
@@ -107,20 +116,21 @@ export default class Index extends Component {
107 116
                       }
108 117
                       className="level-icon"
109 118
                     />
110
-                    <Text 
119
+                    <Text
111 120
                       className="level-text"
112 121
                       style={{
113
-                        color: userInfo.user_identity === 1 
114
-                          ? '#8AA6F1' 
115
-                          : userInfo.user_identity === 2 
116
-                          ? '#0077F6' 
117
-                          : userInfo.user_identity === 3 
118
-                          ? '#7D00E1' 
119
-                          : userInfo.user_identity === 4 
120
-                          ? '#FE585A' 
121
-                          : userInfo.user_identity === 5 
122
-                          ? '#E87D12' 
123
-                          : '#8AA6F1'
122
+                        color:
123
+                          userInfo.user_identity === 1
124
+                            ? "#8AA6F1"
125
+                            : userInfo.user_identity === 2
126
+                            ? "#0077F6"
127
+                            : userInfo.user_identity === 3
128
+                            ? "#7D00E1"
129
+                            : userInfo.user_identity === 4
130
+                            ? "#FE585A"
131
+                            : userInfo.user_identity === 5
132
+                            ? "#E87D12"
133
+                            : "#8AA6F1",
124 134
                       }}
125 135
                     >
126 136
                       Lv {userInfo.user_identity}
@@ -139,6 +149,29 @@ export default class Index extends Component {
139 149
             ></Image>
140 150
           </View>
141 151
         </View>
152
+        {/* 我的推荐人 */}
153
+        {mineData.user_relations?.id && (
154
+          <View className="recommend-box">
155
+            <View className="recommend-title">
156
+              <Text className="recommend-title-text">我的推荐人</Text>
157
+            </View>
158
+            <View className="line"></View>
159
+            <View className="recommend-content">
160
+              <Image
161
+                className="recommend-avatar"
162
+                src={mineData.user_relations.icon}
163
+              />
164
+              <View className="recommend-info">
165
+                <Text className="recommend-name">
166
+                  {mineData.user_relations.name}
167
+                </Text>
168
+                <Text className="recommend-id">
169
+                  ID: {mineData.user_relations.id}
170
+                </Text>
171
+              </View>
172
+            </View>
173
+          </View>
174
+        )}
142 175
         {/* 功能 */}
143 176
         <View className="function">
144 177
           <AtList hasBorder={false}>

+ 43 - 0
src/pages/mine/index.less

@@ -74,6 +74,49 @@
74 74
         }
75 75
     }
76 76
 
77
+    // 我的推荐人
78
+    .recommend-box {
79
+        width: 100%;
80
+        background: #FFFFFF;
81
+        border-radius: 20px;
82
+        margin-bottom: 25px;
83
+        padding: 12px 17px 29px 17px;
84
+        box-sizing: border-box;
85
+        font-size: 28px;
86
+        color: #000000;
87
+        .recommend-content {
88
+            display: flex;
89
+            align-items: center;
90
+            .recommend-avatar {
91
+                width: 64px;
92
+                height: 64px;
93
+                border-radius: 50%;
94
+                margin-right: 19px;
95
+                background-color: red;
96
+            }
97
+            .recommend-info {
98
+                display: flex;
99
+                flex-direction: column;
100
+                justify-content: space-between;
101
+                .recommend-name {
102
+                    font-size: 24px;
103
+                    color: #000000;
104
+                    line-height: 35px;
105
+                }
106
+                .recommend-id {
107
+                    font-size: 20px;
108
+                    color: #999999;
109
+                    line-height: 29px;
110
+                }
111
+            }
112
+        }
113
+    }
114
+    .line {
115
+        margin: 17px 0;
116
+        width: 100%;
117
+        height: 1px;
118
+        background-color: #D8D8D8;
119
+    }
77 120
     // 功能
78 121
     .function {
79 122
         border-radius: 20px;

+ 7 - 0
src/service/index.js

@@ -100,6 +100,13 @@ export const bindShareJump = data =>
100 100
     method: 'POST',
101 101
     data,
102 102
   })
103
+  // 获取我的页面数据
104
+  export const getMineData = data =>
105
+  Request({
106
+    url: '/user/get_my_page',
107
+    method: 'POST',
108
+    data,
109
+  })
103 110
 // -------------------------------------------------------会员
104 111
 // 获取会员详情
105 112
 export const getVipInfo = data =>