Procházet zdrojové kódy

Merge branch 'dev' of http://git.ycjcjy.com/shigongli/miniapp-v2 into dev

lisen před 3 roky
rodič
revize
b3b42922f1

+ 8
- 4
src/components/CollectList/MyCollect/style.less Zobrazit soubor

@@ -54,7 +54,8 @@
54 54
     background-size: 100% 60%;
55 55
     background-repeat: no-repeat;
56 56
 
57
-    width: 573px;
57
+    
58
+    width: 80%;
58 59
     border-radius: 15px 0px 0px 15px;
59 60
     // border-radius: 12px;
60 61
 
@@ -189,7 +190,7 @@
189 190
   position: relative;
190 191
   //右面部分
191 192
   .right-content {
192
-    width: 50%;
193
+    // width: 50%;
193 194
     height: 134px;
194 195
     position: absolute;
195 196
     top: calc(50% - 45px);
@@ -197,14 +198,17 @@
197 198
     .right-image {
198 199
       width: 35px;
199 200
       height: 34px;
200
-      margin-left: calc(50% - 17.5px);
201
+      margin-left: calc(50% - 41.5px);
201 202
     }
202 203
 
203 204
     .right-title {
204 205
       font-weight: 700;
206
+      width: 110px;
205 207
       font-size: 24px;
206 208
       padding-top: 15px;
207 209
       text-align: center;
210
+      position: relative;
211
+      left: -22px;
208 212
     }
209 213
   }
210 214
 }
@@ -269,7 +273,7 @@
269 273
     background-size: 100% 60%;
270 274
     background-repeat: no-repeat;
271 275
 
272
-    width: 573px;
276
+    width: 80%;
273 277
     border-radius: 15px 0px 0px 15px;
274 278
     // border-radius: 12px;
275 279
 

+ 4
- 8
src/components/CompoentsOrder/AlreadyUsed/index.jsx Zobrazit soubor

@@ -1,9 +1,4 @@
1 1
 import { useState, useEffect } from 'react'
2
-import { Button, Radio, Input } from '@tarojs/components'
3
-import image from '@/assets/icons/ProCard/8kb.jpg'
4
-import food from '@/assets/icons/ProCard/food.png'
5
-import ProCard_hot from '@/assets/icons/ProCard/ProCard_hot.png'
6
-import Evaluation from '@/assets/icons/UserCenter/Evaluation.png'
7 2
 import starOn from '@/assets/icons/GuideCheck/starOn.png'
8 3
 import starOff from '@/assets/icons/GuideCheck/starOff.png'
9 4
 import AlreadyUsedMolded from '@/components/AlreadyUsedMolded'
@@ -17,14 +12,15 @@ const score = '3.9'
17 12
 
18 13
 
19 14
 export default (props) => {
20
-  const { show, maskClosable, list } = props
15
+  const { showCutover, maskClosable, list, onClose } = props
21 16
 
22
-  const [showDialog, setShowDialog] = useState(false)
23 17
   const [CollectNub, setCollectNub] = useState(1)
24 18
 
25 19
   const ButtonCancel = () => {
20
+    onClose()
26 21
   }
27 22
   const ButtonOK = (e) => {
23
+    onClose()
28 24
 
29 25
   }
30 26
 
@@ -33,7 +29,7 @@ export default (props) => {
33 29
   }
34 30
 
35 31
   return (
36
-    <Popup show={show} maskClosable={show} onClose={ButtonCancel} className='box-content' >
32
+    <Popup show={showCutover} maskClosable={maskClosable} onClose={onClose} className='box-content' >
37 33
       <AlreadyUsedMolded list={list} />
38 34
       <view className='item-center-Number' >
39 35
         {/* 评分 */}

+ 0
- 21
src/components/CompoentsOrder/AlreadyUsed/style.less Zobrazit soubor

@@ -58,26 +58,5 @@
58 58
       color: #ffffff;
59 59
     }
60 60
   }
61
-  .OrderNumber {
62
-    // width: 234px;
63
-    height: 19px;
64
-    font-size: 20px;
65
-    font-weight: 400;
66
-    color: #666666;
67
-    line-height: 44px;
68
-  }
69
- 
70
-  .button-info {
71
-    margin-bottom: 70px;
72 61
 
73
-    .button-box {
74
-      margin: 60px 0;
75
-      width: calc(100% - 60px);
76
-      height: 88px;
77
-      line-height: 88px;
78
-      background: #274291;
79
-      border-radius: 12px;
80
-      color: @whiteColor;
81
-    }
82
-  }
83 62
 // }

+ 7
- 2
src/components/CompoentsOrder/complete/index.jsx Zobrazit soubor

@@ -72,10 +72,15 @@ export default (props) => {
72 72
   };
73 73
 
74 74
   const [show, setShow] = useState(false)
75
+  const [showCutover, setShowCutover] = useState(false)
75 76
 
77
+  const onClose = () => {
78
+    setShowCutover(false)
79
+  }
76 80
   //评价
77 81
   const evaluation = () => {
78
-    setShow(true)
82
+    setShowCutover(true)
83
+
79 84
   }
80 85
 
81 86
   useEffect(() => {
@@ -129,7 +134,7 @@ export default (props) => {
129 134
         list.length == 0 ?
130 135
           <NoData /> :
131 136
           <view className='complete-boxs'>
132
-            <AlreadyUsed show={show} maskClosable={show} list={list} />
137
+            <AlreadyUsed showCutover={showCutover} maskClosable={showCutover} onClose={onClose} list={list} />
133 138
             {list.map((item, index) => {
134 139
               /* 待支付 */
135 140
               if (item.status === 0) {

+ 2
- 263
src/components/CompoentsOrder/complete/style.less Zobrazit soubor

@@ -288,268 +288,7 @@
288 288
         color: #ffffff;
289 289
       }
290 290
     }
291
-    .OrderNumber {
292
-      // width: 234px;
293
-      height: 19px;
294
-      font-size: 20px;
295
-      font-weight: 400;
296
-      color: #666666;
297
-      line-height: 44px;
298
-    }
299
-    .wrapper {
300
-      margin-top: 40px;
301
-      display: flex;
302
-      position: relative;
303
-      // margin-top: 600px;
304
-      margin: 30px auto;
305
-      width: 700px;
306
-  
307
-      // box-shadow: 0px 8px 38px 0px rgba(0, 0, 0, 0.12);
308
-      // filter: drop-shadow(5px 8px 6px rgb(202, 202, 202));
309
-      filter: drop-shadow(0 0 0.9rem rgba(0, 0, 0, 0.12));
310
-      .card-box-star {
311
-        position: absolute;
312
-        width: auto;
313
-        height: 44.3px;
314
-        position: absolute;
315
-        left: 200px;
316
-        top: 28px;
317
-        font-size: 20px;
318
-        color: @whiteColor;
319
-        .card-star-image {
320
-          padding-left: 6px;
321
-          width: 21px;
322
-          height: 21px;
323
-        }
324
-        .card-star-text {
325
-          padding-left: 10px;
326
-          font-size: 20px;
327
-          color: #333;
328
-          font-weight: 700;
329
-        }
330
-      }
331
-  
332
-      .left-complete-one {
333
-        padding-top: 85px;
334
-        padding-bottom: 43px;
335
-        position: relative;
336
-        display: flex;
337
-        background: @whiteColor;
338
-        background: radial-gradient(
339
-              circle at top right,
340
-              transparent 15px,
341
-              @whiteColor 0
342
-            )
343
-            top right,
344
-          radial-gradient(circle at bottom right, transparent 15px, @whiteColor 0)
345
-            bottom right;
346
-        background-size: 100% 60%;
347
-        background-repeat: no-repeat;
348
-  
349
-        width: 573px;
350
-        border-radius: 15px 0px 0px 15px;
351
-        // border-radius: 12px;
352
-  
353
-        align-items: center;
354
-        .left-image-1 {
355
-          width: 145px;
356
-          height: 44px;
357
-          position: absolute;
358
-          top: 22px;
359
-        }
360
-        .left-viewText {
361
-          // background-image: url(@Image-ProCard_hot);
362
-          // width: 287px;
363
-          width: auto;
364
-          height: 44.3px;
365
-          position: absolute;
366
-          left: 1px;
367
-          top: 28px;
368
-          font-size: 20px;
369
-          color: @whiteColor;
370
-        }
371
-        //图片
372
-        .title-image {
373
-          width: 145px;
374
-          margin-left: 20px;
375
-          border-radius: 24px;
376
-          overflow: hidden;
377
-          position: relative;
378
-          .image-1 {
379
-            width: 100%;
380
-            height: 145px;
381
-          }
382
-          .image-2 {
383
-            width: 89px;
384
-            height: 34px;
385
-            position: absolute;
386
-            left: 0;
387
-            top: 0;
388
-          }
389
-        }
390
-        // 商品标题
391
-        .title-content {
392
-          // padding: 84px 0 56px 20px;
393
-          padding-left: 18px;
394
-  
395
-          .Pro-title {
396
-            .title-text {
397
-              width: 375px;
398
-              overflow: hidden;
399
-              text-overflow: ellipsis;
400
-              // display: -webkit-box; //必须要
401
-              -webkit-line-clamp: 1;
402
-              -webkit-box-orient: vertical;
403
-              // word-break: break-all; /* 多出文本省略号代替 */
404
-              text-align: left;
405
-              font-size: 24px;
406
-              // padding-bottom: 10px;
407
-            }
408
-          }
409
-          .title-money {
410
-            // padding-top: 34px;
411
-            font-size: 24px;
412
-            // color: red;
413
-            font-weight: 800;
414
-          }
415
-          .title-money-2 {
416
-            height: 19px;
417
-            font-size: 20px;
418
-            font-weight: 400;
419
-            color: #333333;
420
-            padding-left: 40px;
421
-          }
422
-  
423
-          .title-time {
424
-            font-size: 24px;
425
-            // padding-top: 20px;
426
-            color: #c0c8d3;
427
-          }
428
-          .title-position-on {
429
-            display: flex;
430
-            font-size: 20px;
431
-            .title-position {
432
-              width: 18px;
433
-              height: 24px;
434
-              padding-right: 10px;
435
-              padding-top: 5px;
436
-            }
437
-            .title-position-image {
438
-              align-items: center;
439
-              font-size: 20px;
440
-              color: #333;
441
-            }
442
-            .title-on {
443
-              // margin-bottom: 10px;
444
-              padding-top: 5px;
445
-              padding-left: 40px;
446
-              width: 21px;
447
-              height: 21px;
448
-              padding-right: 10px;
449
-            }
450
-            .title-on-text {
451
-              align-items: center;
452
-  
453
-              font-size: 20px;
454
-              color: #333;
455
-            }
456
-          }
457
-        }
458
-      }
459
-      // .left-complete-one:nth-child(2) {
460
-      //   background: rgb(182, 0, 0);
461
-      //   padding-top: 10px;
462
-      // }
463
-    }
464
-  
465
-    .right-complete-two {
466
-      background: @whiteColor;
467
-      background: radial-gradient(
468
-            circle at top left,
469
-            transparent 15px,
470
-            @whiteColor 0
471
-          )
472
-          top left,
473
-        radial-gradient(circle at bottom left, transparent 15px, @whiteColor 0)
474
-          bottom left;
475
-      background-size: 100% 60%;
476
-      background-repeat: no-repeat;
477
-      width: 129px;
478
-      border-radius: 0 15px 15px 0;
479
-      position: relative;
480
-      //右面部分
481
-      .right-content {
482
-        // width: 100px;
483
-        height: 120px;
484
-        position: absolute;
485
-        top: 50%;
486
-        left: 50%;
487
-        transform: translate(-50%, -50%);
488
-        // border: 1px solid red;
489
-        .right-image-2 {
490
-          width: 76px;
491
-          height: 66px;
492
-          margin-top: 1em;
493
-        }
494
-        .right-number {
495
-          // width: 32px;
496
-          // font-size: 20px;
497
-          // border-radius: 4px;
498
-          // border: 2px solid #999;
499
-          // margin: auto;
500
-          // text-align: center;
501
-        }
502
-        .right-image {
503
-          // float: convert();
504
-          width: 35px;
505
-          height: 34px;
506
-          margin: 0 auto;
507
-          align-items: center;
508
-          margin: auto;
509
-          padding-left: 8px;
510
-          // text-align: center;
511
-        }
512
-  
513
-        .right-title {
514
-          font-weight: 700;
515
-          font-size: 24px;
516
-          padding-top: 15px;
517
-          text-align: center;
518
-        }
519
-      }
520
-    }
521
-    //线条
522
-    .right-complete-two::after {
523
-      content: "";
524
-      position: absolute;
525
-      top: 15px;
526
-      margin: 26px auto;
527
-      height: 70%;
528
-      border-left: 1px dashed #595959;
529
-    }
530
-    .foot {
531
-      width: 100%;
532
-      height: 26px;
533
-      font-size: 28px;
534
-      font-weight: 400;
535
-      color: #c0c8d3;
536
-      line-height: 34px;
537
-      margin-top: 40px;
538
-      text-align: center;
539
-    }
540
-  
541
-    .button-info {
542
-      margin-bottom: 70px;
543
-  
544
-      .button-box {
545
-        margin: 60px 0;
546
-        width: calc(100% - 60px);
547
-        height: 88px;
548
-        line-height: 88px;
549
-        background: #274291;
550
-        border-radius: 12px;
551
-        color: @whiteColor;
552
-      }
553
-    }
554 291
   }
555 292
 }
293
+
294
+

+ 42
- 42
src/pages/TobeShop/index.jsx Zobrazit soubor

@@ -21,7 +21,7 @@ import formatTime from '@/utils/formatTime'
21 21
 import "./style.less";
22 22
 
23 23
 export default withLayout((props) => {
24
-  const { router, person } = props;
24
+  const { router, person, location } = props;
25 25
   const { id, subOrderId } = props.router.params;
26 26
   const [showDialog, setShowDialog] = useState(false);
27 27
   //核销
@@ -34,7 +34,7 @@ export default withLayout((props) => {
34 34
 
35 35
 
36 36
   const getShop = () => {
37
-    getShopDetail(id).then(e => {
37
+    getShopDetail(id, { location: location }).then(e => {
38 38
       setShopContent(e)
39 39
 
40 40
     })
@@ -106,92 +106,92 @@ export default withLayout((props) => {
106 106
   };
107 107
 
108 108
   return (
109
-    <view className="shop-Eat">
110
-      <CustomNav title="到店核销" />
109
+    <view className='shop-Eat'>
110
+      <CustomNav title='到店核销' />
111 111
       <Popup show={showDialog} maskClosable={false}>
112
-        <view className="Consumption-Now">您即将核销1张套餐券!</view>
113
-        <text className="Consumption-text">核销后套餐券不退不换</text>
114
-        <text className="Consumption-text">请核对无误后再点击确认!</text>
115
-        <view className="buy-button-box">
116
-          <button className="button-Cancel" onClick={ButtonCancel}>
112
+        <view className='Consumption-Now'>您即将核销1张套餐券!</view>
113
+        <text className='Consumption-text'>核销后套餐券不退不换</text>
114
+        <text className='Consumption-text'>请核对无误后再点击确认!</text>
115
+        <view className='buy-button-box'>
116
+          <button className='button-Cancel' onClick={ButtonCancel}>
117 117
             取消
118 118
           </button>
119
-          <button className="button-OK" onClick={ButtonOK}>
119
+          <button className='button-OK' onClick={ButtonOK}>
120 120
             确定
121 121
           </button>
122 122
         </view>
123 123
       </Popup>
124 124
       <Popup show={Consumption} maskClosable={false}>
125
-        <view className="Perfection-image-view">
126
-          <image src={Perfection} className="Perfection-image" />
125
+        <view className='Perfection-image-view'>
126
+          <image src={Perfection} className='Perfection-image' />
127 127
         </view>
128 128
         <text>核销完成!请与店铺确认!</text>
129
-        <view className="buy-button-box">
130
-          <button className="button-OK" onClick={PerfectionOK}>
129
+        <view className='buy-button-box'>
130
+          <button className='button-OK' onClick={PerfectionOK}>
131 131
             完成
132 132
           </button>
133 133
         </view>
134 134
       </Popup>
135 135
       <view>
136
-        <view className="position-header">
137
-          <image className="position-LocationBig" src={LocationBig} />
138
-          <text cla="position-LocationBig-text">
136
+        <view className='position-header'>
137
+          <image className='position-LocationBig' src={LocationBig} />
138
+          <text cla='position-LocationBig-text'>
139 139
             当前所在店铺:{shopContent?.shopName || []}
140 140
           </text>
141 141
         </view>
142
-        <view className="shop-image">
142
+        <view className='shop-image'>
143 143
           <image
144
-            mode="scaleToFill"
145
-            className="shop-title-image-cup"
144
+            mode='scaleToFill'
145
+            className='shop-title-image-cup'
146 146
             src={BlackSpot}
147 147
           />
148
-          <text className="shop-title-title">请选择你要核销的套餐</text>
148
+          <text className='shop-title-title'>请选择你要核销的套餐</text>
149 149
         </view>
150 150
         <view>
151 151
           {(list || []).map((item) => {
152 152
 
153 153
             return (
154
-              <view class="wrapper" key={item.verifyNo} onClick={() => setChecked(item.verifyNo)}>
155
-                <view class="left-complete-one">
156
-                  <view className="Check_OK-box">
157
-                    <image className="Check_OK-image" src={item.verifyNo == checked ? Check_OK : Check_NO} />
154
+              <view class='wrapper' key={item.verifyNo} onClick={() => setChecked(item.verifyNo)}>
155
+                <view class='left-complete-one'>
156
+                  <view className='Check_OK-box'>
157
+                    <image className='Check_OK-image' src={item.verifyNo == checked ? Check_OK : Check_NO} />
158 158
                   </view>
159
-                  <image className="left-image-1" src={ProCard_hot}></image>
160
-                  <view className="left-viewText">返现¥{item.cashback}</view>
161
-                  <view className="title-image">
159
+                  <image className='left-image-1' src={ProCard_hot}></image>
160
+                  <view className='left-viewText'>返现¥{item.cashback}</view>
161
+                  <view className='title-image'>
162 162
                     <image
163
-                      className="image-1"
164
-                      mode="scaleToFill"
163
+                      className='image-1'
164
+                      mode='scaleToFill'
165 165
                       src={item.poster}
166 166
                     ></image>
167
-                    <image className="image-2" src={food}></image>
167
+                    <image className='image-2' src={food}></image>
168 168
                   </view>
169
-                  <view className="title-content">
170
-                    <view className="Pro-title">
171
-                      <view className="title-text">
169
+                  <view className='title-content'>
170
+                    <view className='Pro-title'>
171
+                      <view className='title-text'>
172 172
                         {item.description}
173
-                        <text className="title-money-2">数量:1张</text>
173
+                        <text className='title-money-2'>数量:1张</text>
174 174
                       </view>
175 175
                     </view>
176
-                    <text className="title-money">
177
-                      ¥{formatPrice(item.actualPrice)}元<text className="title-money-2">门市价{formatPrice(item.standPrice)}元</text>
176
+                    <text className='title-money'>
177
+                      ¥{formatPrice(item.actualPrice)}元<text className='title-money-2'>门市价{formatPrice(item.standPrice)}元</text>
178 178
                     </text>
179
-                    <view className="title-time">
179
+                    <view className='title-time'>
180 180
                       有效期:{formatTime(item?.createDate, "yyyy/MM/dd")}-
181 181
                       {formatTime(item?.expireDate, "yyyy/MM/dd")}
182 182
                     </view>
183 183
                   </view>
184 184
                 </view>
185
-                <view class="right-complete-two">
186
-                  <view className="right-content"></view>
185
+                <view class='right-complete-two'>
186
+                  <view className='right-content'></view>
187 187
                 </view>
188 188
               </view>
189 189
             );
190 190
           })}
191 191
         </view>
192 192
 
193
-        <view className="button-info">
194
-          <Button className="button-box" disabled={!checked} onClick={ShowMoldeOn}>
193
+        <view className='button-info'>
194
+          <Button className='button-box' disabled={!checked} onClick={ShowMoldeOn}>
195 195
             确定核销
196 196
           </Button>
197 197
         </view>

+ 1
- 1
src/pages/TobeShop/style.less Zobrazit soubor

@@ -141,7 +141,7 @@
141 141
         width: 145px;
142 142
         height: 44px;
143 143
         position: absolute;
144
-        margin-left: 88px;
144
+        margin-left: 85px;
145 145
         top: 22px;
146 146
       }
147 147
       .left-viewText {

+ 13
- 3
src/services/payOrder.js Zobrazit soubor

@@ -30,7 +30,7 @@ export const payOrder = (id) => request(`/order/${id}/pay`, { method: 'post' })
30 30
 * @param {*} id 
31 31
 * @returns 
32 32
 */
33
-export const refund = (id,data) => request(`/order/${id}/refund`, { method: 'delete' ,data})
33
+export const refund = (id, data) => request(`/order/${id}/refund`, { method: 'delete', data })
34 34
 
35 35
 /**
36 36
 * 获取子订单列表
@@ -51,12 +51,22 @@ export const getMineOrder = () => request(`/orderSub/summary/mine`)
51 51
 * @param {*} params
52 52
 * @returns 
53 53
 */
54
-export const getVerifyTargetList = (params) => request(`/verifyTarget`,{ params })
54
+export const getVerifyTargetList = (params) => request(`/verifyTarget`, { params })
55 55
 
56 56
 /**
57 57
 * 核销
58 58
 * @param {*} id
59 59
 * @returns 
60 60
 */
61
-export const putVerifyTarget = (id) => request(`/verifyTarget/${id}`,{ method: 'put' })
61
+export const putVerifyTarget = (id) => request(`/verifyTarget/${id}`, { method: 'put' })
62
+
63
+
64
+
65
+/**
66
+* 评价
67
+* @param {*} id
68
+* @returns 
69
+*/
70
+export const orderEvaluation = (targetType, targetId) => request(`/${targetType}/${targetId}/evaluate`, { method: 'post' })
71
+
62 72