李志伟 преди 3 години
родител
ревизия
579133e9a5

+ 10
- 60
src/components/CollectList/MyCollect/index.jsx Целия файл

@@ -1,16 +1,8 @@
1 1
 import Taro from '@tarojs/taro'
2
-import useLike from "@/utils/hooks/useLike"
3 2
 import { View, Text } from '@tarojs/components'
4 3
 import formatPrice from "@/utils/formatPrice";
5
-import Star from '@/components/Star/Star.jsx'
6
-import position from '@/assets/icons/GuideCheck/position_logo.png'
7 4
 import SeeDetails from '@/assets/icons/GuideCheck/SeeDetails.png'
8
-import Attractions from '@/assets/icons/GuideCheck/Attractions.png'
9 5
 import baozan from '@/assets/icons/housemantj/bgood.png'
10
-import weibaozan from '@/assets/icons/housemantj/unLike.png'
11
-import food from '@/assets/icons/ProCard/food.png'
12
-import ProCard_hot from '@/assets/icons/ProCard/ProCard_hot.png'
13
-
14 6
 import CouponCard from '@/components/CouponCard'
15 7
 import Location from '@/components/Location'
16 8
 import './style.less'
@@ -20,16 +12,14 @@ const CouponMedia = CouponCard.Media
20 12
 const Action = CouponCard.Action
21 13
 export default (props) => {
22 14
   const { item, cardNavigateTo } = props
23
-  const [isLike, toggleLike] = useLike(item.isLike, 'tourist', item.targetId)
24 15
 
25 16
   const targetType = item.targetType
26
-
27 17
   const star = parseFloat(((item.sweetScore + item.environmentScore + item.serviceScore) / 3).toFixed(1));
28 18
 
29 19
   const handleDetail = () => {
30
-    targetType=="shop_package"? Taro.navigateTo({ url: `/pages/details/foodDetails/foodDetails?id=${item.shopId}` })
31
-    :targetType=="tourist"?Taro.navigateTo({ url: `/pages/details/mjDetails/sceneryDetails?id=${item.targetId}` })
32
-    :Taro.navigateTo({ url: `/pages/details/foodDetails/foodDetails?id=${item.targetId}` })
20
+    targetType == "shop_package" ? Taro.navigateTo({ url: `/pages/details/foodDetails/foodDetails?id=${item.shopId}` })
21
+      : targetType == "tourist" ? Taro.navigateTo({ url: `/pages/details/mjDetails/sceneryDetails?id=${item.targetId}` })
22
+        : Taro.navigateTo({ url: `/pages/details/foodDetails/foodDetails?id=${item.targetId}` })
33 23
   }
34 24
 
35 25
   const PayAction = <Action.Icon icon={SeeDetails} text='查看详情' onClick={handleDetail} />
@@ -37,7 +27,6 @@ export default (props) => {
37 27
   return (
38 28
 
39 29
     <View className='View-box-LR'>
40
-      <View className='left-View-box'>
41 30
         {
42 31
           targetType === "shop_package" && (
43 32
             <View style={{ margin: '15px 5px' }}>
@@ -65,11 +54,8 @@ export default (props) => {
65 54
             </View>
66 55
           )
67 56
         }
68
-      </View>
69
-      <View className='right-View-box'>
70 57
         {
71 58
           targetType !== "shop_package" && (
72
-
73 59
             <View style={{ margin: '15px 5px' }}>
74 60
               <CouponCard action={PayAction}>
75 61
                 <CouponMedia>
@@ -84,56 +70,20 @@ export default (props) => {
84 70
                     <View className='cpn-card-text' style={{ marginTop: '10rpx' }}>
85 71
                       <Text className='cpn-card-text_mn'>¥{`${formatPrice(item.averagePrice)}元`}</Text>
86 72
                     </View>
87
-                   
88
-                    <View className='cpn-md-act'> 
89
-                    <Location {...item} />
90 73
 
91
-                    <view onClick={toggleLike} className='wdscbaozan'>
92
-                   <image className='title-on' src={isLike === 1 ? baozan : weibaozan} />
93
-                   <text className='title-on-text'>爆赞 {item.likeNum}</text>
94
-                 </view>
74
+                    <View className='cpn-md-act'>
75
+                      <Location {...item} />
76
+                      <view className='wdscbaozan'>
77
+                        <image className='title-on' src={ baozan} />
78
+                        <text className='title-on-text'>爆赞 {item.likeNum}</text>
79
+                      </view>
95 80
                     </View>
96 81
                   </CouponMedia.Body>
97 82
                 </CouponMedia>
98 83
               </CouponCard>
99 84
             </View>
100
-
101
-          )
102
-          // <view class='wrapper'>
103
-          //   <view class='left-complete-one'   >
104
-          //     <view className='title-image'>
105
-          //       <image className='image-1' mode='scaleToFill' src={item.poster}></image>
106
-          //       <image className='image-2' src={item.targetType === 'tourist' ? Attractions : food}></image>
107
-          //     </view>
108
-          //     <view className='title-content'>
109
-          //       <view className='Pro-title'  >
110
-          //         <view className='title-text'>{(item.title).toString().length > 25 ? (item.title).substring(0, 25) + '...' : (item.title)}</view>
111
-          //       </view>
112
-          //       <text className='title-money' >¥{formatPrice(item.averagePrice)}元</text>
113
-          //       <view onClick={toggleLike}>
114
-          //         <image className='title-on' src={isLike === 1 ? baozan : weibaozan} />
115
-          //         <text className='title-on-text'>爆赞 {item.likeNum}</text>
116
-          //       </view>
117
-          //       <view className='title-position-on'>
118
-          //         <image className='title-position' src={position} />
119
-          //         <text className='title-position-image'>
120
-          //           {
121
-          //             item.areaPName === null ? item.areaName : (item.areaPName + '/' + item.areaName)
122
-          //           }
123
-          //         </text>
124
-          //       </view>
125
-          //     </view>
126
-          //   </view>
127
-          //   <view class='right-complete-two'>
128
-          //     <view className='right-content' onClick={() => { targetType === 'tourist' ? Taro.navigateTo({ url: `/pages/details/mjDetails/sceneryDetails?id=${item.targetId}` }) : Taro.navigateTo({ url: `/pages/details/foodDetails/foodDetails?id=${item.targetId}` }) }}>
129
-          //       <image className='right-image' src={SeeDetails} />
130
-          //       <view className='right-title'>查看详情</view>
131
-          //     </view>
132
-          //   </view>
133
-          // </view>
134
-
85
+          )          
135 86
         }
136
-      </View>
137 87
     </View>
138 88
   )
139 89
 }

+ 36
- 476
src/components/CollectList/MyCollect/style.less Целия файл

@@ -1,489 +1,49 @@
1
-@whiteColor: #fff;
2 1
 .View-box-LR {
3
-  margin: 30px 0;
4
-  .left-View-box {
5
-    .wrapper {
6
-      display: flex;
7
-      position: relative;
8
-      margin: 30px auto;
9
-      width: 100%;
10
-      // box-shadow: 0px 8px 38px 0px rgba(0, 0, 0, 0.12);
11
-      // filter: drop-shadow(5px 8px 6px rgb(202, 202, 202));
12
-      filter: drop-shadow(0 0 0.9rem rgba(0, 0, 0, 0.12));
13
-
14
-      .card-box-star {
15
-        position: absolute;
16
-        width: auto;
17
-        height: 44.3px;
18
-        position: absolute;
19
-        left: 183px;
20
-        top: 28px;
21
-        font-size: 20px;
22
-        color: @whiteColor;
23
-        .card-star-image {
24
-          padding-left: 6px;
25
-          width: 21px;
26
-          height: 21px;
27
-        }
28
-        .card-star-text {
29
-          padding-left: 10px;
30
-          font-size: 20px;
31
-          color: #333;
32
-          font-weight: 700;
33
-        }
34
-      }
35
-
36
-      .left-complete-one {
37
-        padding-top: 87px;
38
-        padding-bottom: 43px;
39
-        position: relative;
40
-        display: flex;
41
-        background: @whiteColor;
42
-        background: radial-gradient(
43
-              circle at top right,
44
-              transparent 15px,
45
-              #fff 0
46
-            )
47
-            top right,
48
-          radial-gradient(circle at bottom right, transparent 15px, #fff 0 0)
49
-            bottom right;
50
-        background-size: 100% 60%;
51
-        background-repeat: no-repeat;
52
-
53
-        width: 573px;
54
-        border-radius: 15px 0px 0px 15px;
55
-        // border-radius: 12px;
56
-
57
-        align-items: center;
58
-        .left-image-1 {
59
-          width: 145px;
60
-          height: 44px;
61
-          position: absolute;
62
-          top: 22px;
63
-        }
64
-        .left-viewText {
65
-          // background-image: url(@Image-ProCard_hot);
66
-          // width: 287px;
67
-          width: auto;
68
-          height: 44.3px;
69
-          position: absolute;
70
-          left: 1px;
71
-          top: 28px;
72
-          font-size: 24px;
73
-          color: @whiteColor;
74
-          font-weight: 600;
75
-        }
76
-        //图片
77
-        .title-image {
78
-          height: 144px;
79
-          margin-left: 20px;
80
-          border-radius: 24px;
81
-          overflow: hidden;
82
-          position: relative;
83
-          .image-1 {
84
-            width: 144px;
85
-            height: 144px;
86
-            margin: 0;
87
-          }
88
-          .image-2 {
89
-            width: 89px;
90
-            height: 34px;
91
-            position: absolute;
92
-            left: 0;
93
-          }
94
-        }
95
-        // 商品标题
96
-        .title-content {
97
-          // padding: 84px 0 56px 20px;
98
-          padding-left: 18px;
99
-
100
-          .Pro-title {
101
-            .title-text {
102
-              width: 375px;
103
-              overflow: hidden;
104
-              text-overflow: ellipsis;
105
-              display: -webkit-box; //必须要
106
-              -webkit-line-clamp: 1;
107
-              -webkit-box-orient: vertical;
108
-              word-break: break-all; /* 多出文本省略号代替 */
109
-              text-align: left;
110
-              font-size: 24px;
111
-              padding-bottom: 10px;
112
-            }
113
-          }
114
-          .title-money {
115
-            padding-top: 34px;
116
-            font-size: 24px;
117
-            // color: red;
118
-            font-weight: 800;
119
-          }
120
-          .title-money-2 {
121
-            font-size: 18px;
122
-            padding-left: 10px;
123
-            text-decoration: line-through;
124
-            color: rgba(102, 102, 102, 0.8);
125
-          }
126
-
127
-          .title-time {
128
-            font-size: 24px;
129
-            padding-top: 20px;
130
-            color: #c0c8d3;
131
-          }
132
-          .title-position-on {
133
-            display: flex;
134
-            font-size: 20px;
135
-            .title-position {
136
-              width: 18px;
137
-              height: 24px;
138
-              padding-right: 10px;
139
-              padding-top: 5px;
140
-            }
141
-            .title-position-image {
142
-              align-items: center;
143
-              font-size: 20px;
144
-              color: #333;
145
-            }
146
-            // .title-on {
147
-            //   // margin-bottom: 10px;
148
-            //   padding-top: 5px;
149
-            //   padding-left: 40px;
150
-            //   width: 21px;
151
-            //   height: 21px;
152
-            //   padding-right: 10px;
153
-            // }
154
-            .title-on-text {
155
-              align-items: center;
156
-
157
-              font-size: 20px;
158
-              color: #333;
159
-            }
160
-          }
161
-        }
162
-      }
163
-    }
2
+  margin: 30px 0;  
3
+  .cpn-card-text {
4
+    font-size: 24px;
5
+    font-weight: 400;
6
+    color: #333333;
7
+    line-height: 40px;
8
+    vertical-align: baseline;
164 9
 
165
-    .right-complete-two {
166
-      background: @whiteColor;
167
-      background: radial-gradient(
168
-            circle at top left,
169
-            transparent 15px,
170
-            #fff 0 0
171
-          )
172
-          top left,
173
-        radial-gradient(circle at bottom left, transparent 15px, #fff 0 0)
174
-          bottom left;
175
-      background-size: 100% 60%;
176
-      background-repeat: no-repeat;
177
-      width: 129px;
178
-      border-radius: 0 15px 15px 0;
179
-      position: relative;
180
-      //右面部分
181
-      .right-content {
182
-        // width: 50%;
183
-        height: 134px;
184
-        position: absolute;
185
-        top: calc(50% - 45px);
186
-        left: calc(50% - 30px);
187
-        .right-image {
188
-          width: 35px;
189
-          height: 34px;
190
-          margin-left: calc(50% - 41.5px);
191
-        }
10
+    & > text {
11
+      display: inline-block;
192 12
 
193
-        .right-title {
194
-          font-weight: 700;
195
-          width: 110px;
196
-          font-size: 24px;
197
-          padding-top: 15px;
198
-          text-align: center;
199
-          position: relative;
200
-          left: -22px;
201
-        }
13
+      & + text {
14
+        margin-left: 8px;
202 15
       }
203 16
     }
204
-    //线条
205
-    .right-complete-two::after {
206
-      content: "";
207
-      position: absolute;
208
-      top: 15px;
209
-      margin: 26px auto;
210
-      height: 70%;
211
-      border-left: 1px dashed #595959;
212
-      opacity: 0.12;
17
+    &_mn {
18
+      font-size: 24px;
19
+      font-weight: bold;
20
+      color: #333333;
213 21
     }
214
-  }
215
-  .right-View-box {
216
-    .wrapper {
217
-      display: flex;
218
-      position: relative;
219
-      margin: 30px auto;
220
-      width: 100%;
221
-      // box-shadow: 0px 8px 38px 0px rgba(0, 0, 0, 0.12);
222
-      // filter: drop-shadow(5px 8px 6px rgb(202, 202, 202));
223
-      filter: drop-shadow(0 0 0.9rem rgba(0, 0, 0, 0.12));
224
-
225
-      .card-box-star {
226
-        position: absolute;
227
-        width: auto;
228
-        height: 44.3px;
229
-        position: absolute;
230
-        left: 183px;
231
-        top: 28px;
232
-        font-size: 20px;
233
-        color: @whiteColor;
234
-        .card-star-image {
235
-          padding-left: 6px;
236
-          width: 21px;
237
-          height: 21px;
238
-        }
239
-        .card-star-text {
240
-          padding-left: 10px;
241
-          font-size: 20px;
242
-          color: #333;
243
-          font-weight: 700;
244
-        }
245
-      }
246
-
247
-      .left-complete-one {
248
-        padding-top: 41px;
249
-        padding-bottom: 45px;
250
-        position: relative;
251
-        display: flex;
252
-        background: @whiteColor;
253
-        background: radial-gradient(
254
-              circle at top right,
255
-              transparent 15px,
256
-              #fff 0
257
-            )
258
-            top right,
259
-          radial-gradient(circle at bottom right, transparent 15px, #fff 0 0)
260
-            bottom right;
261
-        background-size: 100% 60%;
262
-        background-repeat: no-repeat;
263
-
264
-        width: 573px;
265
-        border-radius: 15px 0px 0px 15px;
266
-        // border-radius: 12px;
267
-
268
-        align-items: center;
269
-        .left-image-1 {
270
-          width: 145px;
271
-          height: 44px;
272
-          position: absolute;
273
-          top: 22px;
274
-        }
275
-        .left-viewText {
276
-          // background-image: url(@Image-ProCard_hot);
277
-          // width: 287px;
278
-          width: auto;
279
-          height: 44.3px;
280
-          position: absolute;
281
-          left: 1px;
282
-          top: 28px;
283
-          font-size: 24px;
284
-          color: @whiteColor;
285
-          font-weight: 600;
286
-        }
287
-        //图片
288
-        .title-image {
289
-          height: 144px;
290
-          margin-left: 20px;
291
-          border-radius: 24px;
292
-          overflow: hidden;
293
-          position: relative;
294
-          .image-1 {
295
-            width: 144px;
296
-            height: 144px;
297
-            margin: 0;
298
-          }
299
-          .image-2 {
300
-            width: 89px;
301
-            height: 34px;
302
-            position: absolute;
303
-            left: 0;
304
-          }
305
-        }
306
-        // 商品标题
307
-        .title-content {
308
-          // padding: 84px 0 56px 20px;
309
-          padding-left: 18px;
310
-
311
-          .Pro-title {
312
-            .title-text {
313
-              width: 375px;
314
-              overflow: hidden;
315
-              text-overflow: ellipsis;
316
-              // display: -webkit-box; //必须要
317
-              -webkit-line-clamp: 1;
318
-              -webkit-box-orient: vertical;
319
-              // word-break: break-all; /* 多出文本省略号代替 */
320
-              text-align: left;
321
-              font-size: 24px;
322
-              // padding-bottom: 10px;
323
-              //
324
-            }
325
-          }
326
-          .title-money {
327
-            padding-top: 34px;
328
-            font-size: 24px;
329
-            // color: red;
330
-            font-weight: 800;
331
-          }
332
-          .title-money-2 {
333
-            font-size: 18px;
334
-            padding-left: 10px;
335
-            text-decoration: line-through;
336
-            color: rgba(102, 102, 102, 0.8);
337
-          }
338
-          .title-on {
339
-            width: 21px;
340
-            height: 21px;
341
-            padding-right: 10px;
342
-          }
343
-          .title-on-text {
344
-            align-items: center;
345 22
 
346
-            font-size: 20px;
347
-            color: #333;
348
-          }
349
-
350
-          .title-time {
351
-            font-size: 24px;
352
-            padding-top: 20px;
353
-            color: #c0c8d3;
354
-          }
355
-          .title-position-on {
356
-            display: flex;
357
-            font-size: 20px;
358
-            .title-position {
359
-              width: 18px;
360
-              height: 24px;
361
-              padding-right: 10px;
362
-              padding-top: 5px;
363
-            }
364
-            .title-position-image {
365
-              align-items: center;
366
-              font-size: 20px;
367
-              color: #333;
368
-            }
369
-            // .title-on {
370
-            //   // margin-bottom: 10px;
371
-            //   padding-top: 5px;
372
-            //   padding-left: 40px;
373
-            //   width: 21px;
374
-            //   height: 21px;
375
-            //   padding-right: 10px;
376
-            // }
377
-            .title-on-text {
378
-              align-items: center;
379
-
380
-              font-size: 20px;
381
-              color: #333;
382
-            }
383
-          }
384
-        }
385
-      }
23
+    &_rm {
24
+      font-size: 18px;
25
+      font-weight: 400;
26
+      text-decoration: line-through;
27
+      color: #666666;
386 28
     }
387
-
388
-    .right-complete-two {
389
-      background: @whiteColor;
390
-      background: radial-gradient(
391
-            circle at top left,
392
-            transparent 15px,
393
-            #fff 0 0
394
-          )
395
-          top left,
396
-        radial-gradient(circle at bottom left, transparent 15px, #fff 0 0)
397
-          bottom left;
398
-      background-size: 100% 60%;
399
-      background-repeat: no-repeat;
400
-      width: 129px;
401
-      border-radius: 0 15px 15px 0;
29
+  }
30
+  .cpn-md-act {
31
+    display: flex;
32
+    margin-top: 10px;
33
+    position: relative;
34
+    .wdscbaozan{
35
+    .title-on {
36
+      width: 28px;
37
+      height: 28px;
38
+      padding-right: 10px;
402 39
       position: relative;
403
-      //右面部分
404
-      .right-content {
405
-        // width: 50%;
406
-        height: 134px;
407
-        position: absolute;
408
-        top: calc(50% - 45px);
409
-        left: calc(50% - 30px);
410
-        .right-image {
411
-          width: 35px;
412
-          height: 34px;
413
-          margin-left: calc(50% - 41.5px);
414
-        }
415
-
416
-        .right-title {
417
-          font-weight: 700;
418
-          width: 110px;
419
-          font-size: 24px;
420
-          padding-top: 15px;
421
-          text-align: center;
422
-          position: relative;
423
-          left: -22px;
424
-        }
425
-      }
426
-    }
427
-    //线条
428
-    .right-complete-two::after {
429
-      content: "";
430
-      position: absolute;
431
-      top: 15px;
432
-      margin: 26px auto;
433
-      height: 70%;
434
-      border-left: 1px dashed #595959;
435
-      opacity: 0.12;
40
+      top: 0.1em;
436 41
     }
437
-  }
438
-}
439
-.cpn-card-text {
440
-  font-size: 24px;
441
-  font-weight: 400;
442
-  color: #333333;
443
-  line-height: 40px;
444
-  vertical-align: baseline;
445
-
446
-  & > text {
447
-    display: inline-block;
448
-
449
-    & + text {
450
-      margin-left: 8px;
42
+    .title-on-text {
43
+      align-items: center;
44
+      font-size: 22px;
45
+      color: #333;
451 46
     }
452 47
   }
453
-  &_mn {
454
-    font-size: 24px;
455
-    font-weight: bold;
456
-    color: #333333;
457
-  }
458
-
459
-  &_rm {
460
-    font-size: 18px;
461
-    font-weight: 400;
462
-    text-decoration: line-through;
463
-    color: #666666;
464
-  }
465
-}
466
-
467
-.cpn-md-act {
468
-  display: flex;
469
-  margin-top: 10px;
470
-  position: relative;
471
-
472
-  & > view {
473
-    flex: 1;
474
-  }
475
-  .wdscbaozan{
476
-  .title-on {
477
-    width: 28px;
478
-    height: 28px;
479
-    padding-right: 10px;
480
-    position: relative;
481
-    top: 0.1em;
482
-  }
483
-  .title-on-text {
484
-    align-items: center;
485
-    font-size: 22px;
486
-    color: #333;
487 48
   }
488
-}
489
-}
49
+}

+ 2
- 11
src/components/CompoentsOrder/complete/index.jsx Целия файл

@@ -123,17 +123,13 @@ export default (props) => {
123 123
   };
124 124
 
125 125
   const slideButtonTap = (e) => {
126
-
127 126
     deleteOrder(e.orderId || '').then(() => {
128 127
       Taro.showToast({
129 128
         title: '删除订单成功',
130 129
         icon: 'none',
131 130
       })
132 131
       getList();
133
-
134 132
     })
135
-
136
-
137 133
   }
138 134
 
139 135
 
@@ -447,11 +443,6 @@ export default (props) => {
447 443
           </view>
448 444
       }
449 445
     </scroll-view>
450
-  );
446
+  
447
+  )
451 448
 };
452
-
453
-//  {/* 待核销 */}
454
-
455
-//  {/* 待支付 */}
456
-
457
-//  {/* 已过期 */}

+ 4
- 1
src/pages/MineUserAll/Collect/index.jsx Целия файл

@@ -1,4 +1,4 @@
1
-
1
+import Taro, { useDidShow } from '@tarojs/taro'
2 2
 import CustomNav from '@/components/CustomNav'
3 3
 import { useState } from "react";
4 4
 import withLayout from '@/layouts'
@@ -12,6 +12,9 @@ export default withLayout((props) => {
12 12
   const { router, person, location } = props
13 13
   const [collectContent, setCollectContent] = useState([])
14 14
   const [queryParams, setQueryParams] = useState({ location: location, pageNum: 1, pageSize: 10 })
15
+  useDidShow(() => {
16
+    setQueryParams({ location: location, pageNum: 1, pageSize: 10 })
17
+  })
15 18
   return (
16 19
     <view className='page-index box-content'>
17 20
       <view className='index-navbar'>

+ 0
- 2
src/pages/MineUserAll/Collect/style.less Целия файл

@@ -1,5 +1,3 @@
1
-@whiteColor: #fff;
2
-
3 1
 .box-content {
4 2
   padding: 0 25px;
5 3
   .botton{

+ 1
- 1
src/pages/index/tabs/MineCss/style.less Целия файл

@@ -174,7 +174,7 @@
174 174
 
175 175
       .Badge-list-logo {
176 176
         width: 39px;
177
-        height: 33px;
177
+        height: 39px;
178 178
         padding: 0 30px;
179 179
       }
180 180
       .Badge-list-titme {