Преглед изворни кода

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

吃个甘蔗嚼一年 пре 3 година
родитељ
комит
a7fcd04e21

BIN
src/assets/icons/UserCenter/evaluated.png Прегледај датотеку


+ 23
- 11
src/components/CompoentsOrder/OrderCard/index.jsx Прегледај датотеку

@@ -6,6 +6,8 @@ import QRcode from "@/assets/icons/UserCenter/QRcode.png";
6 6
 import refund from "@/assets/icons/GuideCheck/refund.png";
7 7
 import Pay from "@/assets/icons/GuideCheck/Pay_logo.png";
8 8
 import Null from "@/assets/icons/UserCenter/null_logo.png";
9
+import Evaluated from "@/assets/icons/UserCenter/evaluated.png";
10
+import Refund from "@/assets/icons/UserCenter/Refund.png";
9 11
 import Evaluation from "@/assets/icons/UserCenter/Evaluation.png";
10 12
 import './style.less'
11 13
 
@@ -14,7 +16,7 @@ const CouponMedia = CouponCard.Media
14 16
 const Action = CouponCard.Action
15 17
 
16 18
 export default (props) => {
17
-  const { item, setShowCutover, show } = props
19
+  const { item, setShowCutover, show, sh } = props
18 20
 
19 21
   const handleDetail = () => {
20 22
     if (item.status === 0) {
@@ -50,18 +52,27 @@ export default (props) => {
50 52
     show(val)
51 53
     setShowCutover(true)
52 54
   }
55
+  //售后
56
+  const handleRefund = (item) => {
57
+    Taro.navigateTo({
58
+      url: `/pages/MineUserAll/RefundMoney/CheckRefund/index?id=${item.orderId}`,
59
+    });
60
+  };
53 61
   const PayAction =
54
-    item.status === 0 ? <Action.Icon icon={Pay} text='支付' onClick={handleDetail} /> :
55
-      item.status === 1 && item.isVerified == false ? <Action.Icon icon={QRcode} text='扫码核销' onClick={() => onWriteOff(item)} /> :
56
-        item.status === 2 && item.isVerified == false ? <Action.Image image={refund} /> :
57
-          item.status === 9 ? <Action.Image image={Null} /> :
58
-            item.isVerified == true && item.isEvaluated == 3 ? <Action.Image image={Null} /> :
59
-              item.isVerified == true ? <Action.Icon icon={Evaluation} text='评价' onClick={() => evaluation(item)} /> : ''
62
+    sh == '1' ? <Action.Icon icon={Refund} text='售后/退款' onClick={() => handleRefund(item)} /> :
63
+      item.status === 0 ? <Action.Icon icon={Pay} text='支付' onClick={handleDetail} /> :
64
+        item.status === 1 && item.isVerified == false ? <Action.Icon icon={QRcode} text='扫码核销' onClick={() => onWriteOff(item)} /> :
65
+          item.status === 2 && item.isVerified == false ? <Action.Image image={refund} /> :
66
+            item.status === 9 ? <Action.Image image={Null} /> :
67
+              item.isVerified == true && item.isEvaluated == 3 ? <Action.Image image={Evaluated} /> :
68
+                item.isVerified == true ? <Action.Icon icon={Evaluation} text='评价' onClick={() => evaluation(item)} /> : ''
60 69
 
61 70
 
62 71
   return (
63 72
     <>
64
-      <view className='OrderNumber'>订单编号:{item.orderId}</view>
73
+      {
74
+        sh != '1' ? <view className='OrderNumber'>订单编号:{item.orderId}</view> : ''
75
+      }
65 76
       <CouponCard action={PayAction}>
66 77
         <CouponMedia>
67 78
           <CouponMedia.Header
@@ -83,9 +94,10 @@ export default (props) => {
83 94
               <View className='cpn-md-act'>
84 95
                 <view className={item.isVerified == 1 ? 'title-time' : ''}>
85 96
                   {
86
-                    item.isVerified == 1 ? '核销时间 :' + formatTime(item?.verifiedDate, "yyyy/MM/dd") :
87
-                      '有效期:' + formatTime(item?.startTime, "yyyy/MM/dd") + '-' +
88
-                      formatTime(item.endTime, "yyyy/MM/dd")
97
+                    sh == 1 ? '有效期:' + formatTime(item.endTime, "yyyy/MM/dd") :
98
+                      item.isVerified == 1 ? '核销时间 :' + formatTime(item?.verifiedDate, "yyyy/MM/dd") :
99
+                        '有效期:' + formatTime(item?.startTime, "yyyy/MM/dd") + '-' +
100
+                        formatTime(item.endTime, "yyyy/MM/dd")
89 101
                   }
90 102
                 </view>
91 103
               </View>

+ 1
- 5
src/components/CompoentsOrder/complete/style.less Прегледај датотеку

@@ -11,13 +11,9 @@
11 11
   margin: 20px auto;
12 12
   padding: 0 30px;
13 13
   .foot {
14
-    width: 100%;
15
-    height: 26px;
16 14
     font-size: 28px;
17
-    font-weight: 400;
18 15
     color: #c0c8d3;
19
-    line-height: 34px;
20
-    margin-top: 40px;
16
+    margin: 40px 0;
21 17
     text-align: center;
22 18
   }
23 19
 }

+ 2
- 58
src/pages/MineUserAll/RefundMoney/CheckRefund/style.less Прегледај датотеку

@@ -3,7 +3,6 @@
3 3
 .box-content {
4 4
   width: 100%;
5 5
   padding: 0 30px;
6
-
7 6
   .Refund-Content-box {
8 7
     .title-image {
9 8
       margin-top: 39px;
@@ -28,16 +27,10 @@
28 27
 
29 28
   .wrapper {
30 29
     margin: auto;
31
-
32 30
     margin-top: 40px;
33 31
     display: flex;
34 32
     position: relative;
35
-    // margin-top: 600px;
36
-    // margin: 30px auto;
37
-    // width: 100%;
38 33
     width: calc(100% -25px);
39
-    // box-shadow: 0px 8px 38px 0px rgba(0, 0, 0, 0.12);
40
-    // filter: drop-shadow(5px 8px 6px rgb(202, 202, 202));
41 34
     filter: drop-shadow(0 0 0.9rem rgba(0, 0, 0, 0.12));
42 35
     .card-box-star {
43 36
       position: absolute;
@@ -73,11 +66,8 @@
73 66
           right;
74 67
       background-size: 100% 60%;
75 68
       background-repeat: no-repeat;
76
-
77 69
       width: 573px;
78 70
       border-radius: 15px 0px 0px 15px;
79
-      // border-radius: 12px;
80
-
81 71
       align-items: center;
82 72
       .left-image-1 {
83 73
         width: 145px;
@@ -86,8 +76,6 @@
86 76
         top: 22px;
87 77
       }
88 78
       .left-viewText {
89
-        // background-image: url(@Image-ProCard_hot);
90
-        // width: 287px;
91 79
         width: auto;
92 80
         height: 44.3px;
93 81
         position: absolute;
@@ -105,8 +93,6 @@
105 93
         position: relative;
106 94
 
107 95
         .image-1 {
108
-          // width: 100%;
109
-          // height: 145px;
110 96
           width: 144px;
111 97
           height: 144px;
112 98
           margin: 0;
@@ -121,7 +107,6 @@
121 107
       }
122 108
       // 商品标题
123 109
       .title-content {
124
-        // padding: 84px 0 56px 20px;
125 110
         padding-left: 18px;
126 111
 
127 112
         .Pro-title {
@@ -129,19 +114,16 @@
129 114
             width: 375px;
130 115
             overflow: hidden;
131 116
             text-overflow: ellipsis;
132
-            // display: -webkit-box; //必须要
117
+            //必须要
133 118
             -webkit-line-clamp: 1;
134 119
             -webkit-box-orient: vertical;
135
-            // word-break: break-all; /* 多出文本省略号代替 */
120
+             /* 多出文本省略号代替 */
136 121
             text-align: left;
137 122
             font-size: 24px;
138
-            // padding-bottom: 10px;
139 123
           }
140 124
         }
141 125
         .title-money {
142
-          // padding-top: 34px;
143 126
           font-size: 24px;
144
-          // color: red;
145 127
           display: inline-block;
146 128
           font-weight: 800;
147 129
           margin: 15px auto;
@@ -157,7 +139,6 @@
157 139
 
158 140
         .title-time {
159 141
           font-size: 24px;
160
-          // padding-top: 20px;
161 142
           color: #c0c8d3;
162 143
         }
163 144
         .title-position-on {
@@ -175,7 +156,6 @@
175 156
             color: #333;
176 157
           }
177 158
           .title-on {
178
-            // margin-bottom: 10px;
179 159
             padding-top: 5px;
180 160
             padding-left: 40px;
181 161
             width: 21px;
@@ -206,31 +186,19 @@
206 186
     position: relative;
207 187
     //右面部分
208 188
     .right-content {
209
-      // width: 100px;
210 189
       height: 120px;
211 190
       position: absolute;
212 191
       top: 50%;
213 192
       left: 50%;
214 193
       transform: translate(-50%, -50%);
215
-      // border: 1px solid red;
216 194
 
217
-      .right-number {
218
-        // width: 32px;
219
-        // font-size: 20px;
220
-        // border-radius: 4px;
221
-        // border: 2px solid #999;
222
-        // margin: auto;
223
-        // text-align: center;
224
-      }
225 195
       .right-image {
226
-        // float: convert();
227 196
         width: 36px;
228 197
         height: 36px;
229 198
         margin: 0 auto;
230 199
         align-items: center;
231 200
         margin: auto;
232 201
         padding-left: 8px;
233
-        // text-align: center;
234 202
       }
235 203
 
236 204
       .right-title {
@@ -249,12 +217,10 @@
249 217
       width: 295px;
250 218
       height: 60px;
251 219
       border: 1px solid #999999;
252
-
253 220
       border-radius: 30px;
254 221
       font-size: 24px;
255 222
       font-weight: bold;
256 223
       color: #666666;
257
-
258 224
       text-align: center;
259 225
       line-height: 60px;
260 226
     }
@@ -262,12 +228,10 @@
262 228
       width: 198px;
263 229
       height: 60px;
264 230
       border: 1px solid #999999;
265
-
266 231
       border-radius: 30px;
267 232
       font-size: 24px;
268 233
       font-weight: bold;
269 234
       color: #666666;
270
-
271 235
       text-align: center;
272 236
       line-height: 60px;
273 237
       display: inline-block;
@@ -279,12 +243,10 @@
279 243
       width: 507px;
280 244
       height: 60px;
281 245
       border: 1px solid #999999;
282
-
283 246
       border-radius: 30px;
284 247
       font-size: 24px;
285 248
       font-weight: bold;
286 249
       color: #666666;
287
-
288 250
       text-align: center;
289 251
       line-height: 60px;
290 252
     }
@@ -304,7 +266,6 @@
304 266
     }
305 267
     .Refund-star-view5 {
306 268
       display: inline-block;
307
-
308 269
       width: 220px;
309 270
       height: 60px;
310 271
       background: #ffffff;
@@ -318,7 +279,6 @@
318 279
     }
319 280
     .Refund-star-view6 {
320 281
       display: inline-block;
321
-
322 282
       width: 257px;
323 283
       height: 60px;
324 284
       background: #ffffff;
@@ -331,7 +291,6 @@
331 291
       line-height: 60px;
332 292
       margin-left: 30px;
333 293
     }
334
-
335 294
     /* 点击以后的样式 */
336 295
     .bg2 {
337 296
       color: #274190;
@@ -356,15 +315,12 @@
356 315
   }
357 316
 
358 317
   .money-title {
359
-    // display: inline-block;
360 318
     margin: 40px 0;
361 319
     width: 86%;
362 320
     padding-bottom: 20px;
363
-    // height: 29px;
364 321
     font-size: 30px;
365 322
     font-weight: bold;
366 323
     color: #202020;
367
-    // border-bottom: 1px solid ;
368 324
     background: #ffffff;
369 325
     box-shadow: 0px 2px 0px 0px rgba(0, 0, 0, 0.12);
370 326
   }
@@ -385,7 +341,6 @@
385 341
       border-radius: 50%;
386 342
     }
387 343
     .ul-li-textname {
388
-      // width: 177px;
389 344
       display: inline-block;
390 345
       height: 19px;
391 346
       font-size: 20px;
@@ -396,7 +351,6 @@
396 351
 
397 352
   .button-info {
398 353
     margin-bottom: 70px;
399
-
400 354
     .button-box {
401 355
       margin: 60px 0;
402 356
       width: calc(100% - 60px);
@@ -408,14 +362,4 @@
408 362
       margin-bottom: 2em;
409 363
     }
410 364
   }
411
-
412
-  //线条
413
-  // .right-complete-two::after {
414
-  //   content: "";
415
-  //   position: absolute;
416
-  //   top: 15px;
417
-  //   margin: 26px auto;
418
-  //   height: 70%;
419
-  //   border-left: 1px dashed #595959;
420
-  // }
421 365
 }

+ 6
- 73
src/pages/MineUserAll/RefundMoney/index.jsx Прегледај датотеку

@@ -1,21 +1,12 @@
1 1
 import { useState, useEffect } from "react";
2 2
 import Taro, { useDidShow } from "@tarojs/taro";
3
-import food from "@/assets/icons/ProCard/food.png";
4
-import ProCard_hot from "@/assets/icons/ProCard/ProCard_hot.png";
5 3
 import withLayout from "@/layouts";
6
-
7
-import Null from "@/assets/icons/UserCenter/null_logo.png";
8
-import Refund from "@/assets/icons/UserCenter/Refund.png";
9
-
10
-import starOn from "@/assets/icons/GuideCheck/starOn.png";
11
-import starOff from "@/assets/icons/GuideCheck/starOff.png";
12
-
4
+import OrderCard from '@/components/CompoentsOrder/OrderCard'
13 5
 import { getOrderSub } from "@/services/payOrder";
14
-import formatTime from '@/utils/formatTime'
15 6
 import CustomNav from "@/components/CustomNav";
16 7
 import "./style.less";
17 8
 
18
-const scoreList = new Array(5).fill(0);
9
+
19 10
 export default withLayout((props) => {
20 11
   const { router, person } = props;
21 12
   const [list, setList] = useState([]);
@@ -44,11 +35,6 @@ export default withLayout((props) => {
44 35
     });
45 36
   };
46 37
 
47
-  const handleRefund2 = (item) => {
48
-    Taro.navigateTo({
49
-      url: `/pages/MineUserAll/RefundMoney/CheckRefund/index?id=${item.orderId}`,
50
-    });
51
-  };
52 38
   const pageRefresh = () => {
53 39
     // 页面下拉刷新回调
54 40
     setPull(true);
@@ -82,9 +68,9 @@ export default withLayout((props) => {
82 68
   useEffect(() => {
83 69
     getList();
84 70
   }, [pageNum]);
85
-
71
+    
86 72
   return (
87
-    <view className='box-content'>      
73
+    <view className='box-content'>
88 74
       <view className='index-navbar'>
89 75
         <CustomNav title='售后退款' />
90 76
       </view>
@@ -100,61 +86,8 @@ export default withLayout((props) => {
100 86
         <view className='View-box-Card'>
101 87
           {(list || []).map((item) => {
102 88
             return (
103
-              <view class='wrapper' key={item.orderId}>
104
-                <view class='left-complete-one'>
105
-                  <image className='left-image-1' src={ProCard_hot}></image>
106
-
107
-                  <view className='left-viewText'>
108
-                    返现¥{item.cashback / 100}
109
-                  </view>
110
-                  {/* 评分 */}
111
-                  <view className='card-box-star'>
112
-                    {scoreList.map((_, index) => {
113
-                      const src = index + 1 <= item.score ? starOn : starOff;
114
-                      return (
115
-                        <image
116
-                          className='card-star-image'
117
-                          key={index}
118
-                          src={src}
119
-                        />
120
-                      );
121
-                    })}
122
-                    <text className='card-star-text'>
123
-                      {item.score?.toFixed(1)}
124
-                    </text>
125
-                  </view>
126
-                  <view className='title-image'>
127
-                    <image
128
-                      className='image-1'
129
-                      mode='scaleToFill'
130
-                      src={item.poster}
131
-                    ></image>
132
-                    <image className='image-2' src={food}></image>
133
-                  </view>
134
-                  <view className='title-content'>
135
-                    <view className='Pro-title'>
136
-                      <view className='title-text'>
137
-                        {item.packageDescription}
138
-                        <text className='title-money-2'>
139
-                          数量:{item.amount}张
140
-                        </text>
141
-                      </view>
142
-                    </view>
143
-                    <text className='title-money'>
144
-                      ¥{item.unitPrice / 100}元
145
-                    </text>
146
-                    <view className='title-time'>有效期:{formatTime(item?.endTime, "yyyy/MM/dd")}</view>
147
-                  </view>
148
-                </view>
149
-                <view class='right-complete-two' onClick={() => handleRefund2(item)}>
150
-                  <view className='right-content'>
151
-                    {/* <image className='right-image-two' src={Null} /> */}
152
-                    <image className='right-image' src={Refund} />
153
-                    <view className='right-title'>售后/退款</view>
154
-                  </view>
155
-                </view>
156
-              </view>
157
-            );
89
+              <OrderCard item={item}  key={item.orderId} sh='1' />              
90
+            )            
158 91
           })}
159 92
           <view className='foot'>这是我的底线</view>
160 93
         </view>

+ 2
- 225
src/pages/MineUserAll/RefundMoney/style.less Прегледај датотеку

@@ -2,235 +2,12 @@
2 2
 
3 3
 .box-content {
4 4
   width: 100%;
5
+  padding: 0 30px;
5 6
   .View-box-Card {
6
-    .wrapper {
7
-      width: calc(100% -25px);
8
-      margin-left: 25px;
9
-      margin-top: 40px;
10
-      display: flex;
11
-      position: relative;
12
-      // margin-top: 600px;
13
-      // margin: 30px auto;
14
-      // box-shadow: 0px 8px 38px 0px rgba(0, 0, 0, 0.12);
15
-      // filter: drop-shadow(5px 8px 6px rgb(202, 202, 202));
16
-      filter: drop-shadow(0 0 0.9rem rgba(0, 0, 0, 0.12));
17
-      .card-box-star {
18
-        position: absolute;
19
-        width: auto;
20
-        height: 44.3px;
21
-        position: absolute;
22
-        left: 200px;
23
-        top: 28px;
24
-        font-size: 20px;
25
-        color: @whiteColor;
26
-        .card-star-image {
27
-          padding-left: 6px;
28
-          width: 21px;
29
-          height: 21px;
30
-        }
31
-        .card-star-text {
32
-          padding-left: 10px;
33
-          font-size: 20px;
34
-          color: #333;
35
-          font-weight: 700;
36
-        }
37
-      }
38
-
39
-      .left-complete-one {
40
-        padding-top: 87px;
41
-        padding-bottom: 43px;
42
-        position: relative;
43
-        display: flex;
44
-        background: @whiteColor;
45
-        background: radial-gradient(
46
-              circle at top right,
47
-              transparent 15px,
48
-              #fff 0
49
-            )
50
-            top right,
51
-          radial-gradient(circle at bottom right, transparent 15px, #fff 0)
52
-            bottom right;
53
-        background-size: 100% 60%;
54
-        background-repeat: no-repeat;
55
-
56
-        width: 573px;
57
-        border-radius: 15px 0px 0px 15px;
58
-        // border-radius: 12px;
59
-
60
-        align-items: center;
61
-        .left-image-1 {
62
-          width: 145px;
63
-          height: 44px;
64
-          position: absolute;
65
-          top: 22px;
66
-        }
67
-        .left-viewText {
68
-          // background-image: url(@Image-ProCard_hot);
69
-          // width: 287px;
70
-          width: auto;
71
-          height: 44.3px;
72
-          position: absolute;
73
-          left: 1px;
74
-          top: 28px;
75
-          font-size: 20px;
76
-          color: @whiteColor;
77
-        }
78
-        //图片
79
-        .title-image {
80
-          // width: 145px;
81
-          // margin-left: 20px;
82
-          // border-radius: 24px;
83
-          // overflow: hidden;
84
-          // position: relative;
85
-          height: 144px;
86
-          margin-left: 20px;
87
-          border-radius: 24px;
88
-          overflow: hidden;
89
-          position: relative;
90
-
91
-          .image-1 {
92
-            // width: 100%;
93
-            // height: 145px;
94
-            width: 144px;
95
-            height: 144px;
96
-            margin: 0;
97
-          }
98
-          .image-2 {
99
-            width: 89px;
100
-            height: 34px;
101
-            position: absolute;
102
-            left: 0;
103
-            top: 0;
104
-          }
105
-        }
106
-        // 商品标题
107
-        .title-content {
108
-          // padding: 84px 0 56px 20px;
109
-          padding-left: 18px;
110
-
111
-          .Pro-title {
112
-            .title-text {
113
-              width: 375px;
114
-              overflow: hidden;
115
-              text-overflow: ellipsis;
116
-              -webkit-line-clamp: 1;
117
-              -webkit-box-orient: vertical;
118
-              text-align: left;
119
-              font-size: 24px;
120
-            }
121
-          }
122
-          .title-money {
123
-            // padding-top: 34px;
124
-            font-size: 24px;
125
-            // color: red;
126
-            display: inline-block;
127
-            font-weight: 800;
128
-            margin: 10px auto;
129
-          }
130
-          .title-money-2 {
131
-            height: 19px;
132
-            font-size: 20px;
133
-            font-weight: 400;
134
-            color: #333333;
135
-            padding-left: 50px;
136
-          }
137
-
138
-          .title-time {
139
-            font-size: 24px;
140
-            // padding-top: 20px;
141
-            color: #c0c8d3;
142
-          }
143
-          .title-position-on {
144
-            display: flex;
145
-            font-size: 20px;
146
-            .title-position {
147
-              width: 18px;
148
-              height: 24px;
149
-              padding-right: 10px;
150
-              padding-top: 5px;
151
-            }
152
-            .title-position-image {
153
-              align-items: center;
154
-              font-size: 20px;
155
-              color: #333;
156
-            }
157
-            .title-on {
158
-              // margin-bottom: 10px;
159
-              padding-top: 5px;
160
-              padding-left: 40px;
161
-              width: 21px;
162
-              height: 21px;
163
-              padding-right: 10px;
164
-            }
165
-            .title-on-text {
166
-              align-items: center;
167
-              font-size: 20px;
168
-              color: #333;
169
-            }
170
-          }
171
-        }
172
-      }
173
-    }
174
-
175
-    .right-complete-two {
176
-      background: @whiteColor;
177
-      background: radial-gradient(circle at top left, transparent 15px, #fff 0)
178
-          top left,
179
-        radial-gradient(circle at bottom left, transparent 15px, #fff 0) bottom
180
-          left;
181
-      background-size: 100% 60%;
182
-      background-repeat: no-repeat;
183
-      width: 129px;
184
-      border-radius: 0 15px 15px 0;
185
-      position: relative;
186
-      //右面部分
187
-      .right-content {
188
-        height: 134px;
189
-        position: absolute;
190
-        top: calc(50% - 45px);
191
-        left: calc(50% - 30px);
192
-        .right-image {
193
-          width: 35px;
194
-          height: 34px;
195
-          margin-left: calc(50% - 41.5px);
196
-          // text-align: center;
197
-        }
198
-
199
-        .right-title {
200
-          font-weight: 700;
201
-          width: 110px;
202
-          font-size: 24px;
203
-          padding-top: 15px;
204
-          text-align: center;
205
-          position: relative;
206
-          left: -22px;
207
-        }
208
-      }
209
-    }
210
-    //线条
211
-    .right-complete-two::after {
212
-      content: "";
213
-      position: absolute;
214
-      top: 15px;
215
-      margin: 26px auto;
216
-      height: 70%;
217
-      border-left: 1px dashed #595959;
218
-      opacity: 0.12;
219
-    }
220
-    //已过期logo
221
-    .right-image-two {
222
-      margin-top: 30px;
223
-      width: 76px;
224
-      height: 66px;
225
-    }
226 7
     .foot {
227
-      width: 100%;
228
-      height: 26px;
229 8
       font-size: 28px;
230
-      font-weight: 400;
231 9
       color: #c0c8d3;
232
-      line-height: 34px;
233
-      margin-top: 40px;
10
+      margin: 40px 0;
234 11
       text-align: center;
235 12
     }
236 13
   }