吃个甘蔗嚼一年 3 年之前
父節點
當前提交
f9d406c08e
共有 2 個文件被更改,包括 71 次插入68 次删除
  1. 59
    65
      src/pages/MineUserAll/RefundMoney/CheckRefund/index.jsx
  2. 12
    3
      src/pages/MineUserAll/RefundMoney/style.less

+ 59
- 65
src/pages/MineUserAll/RefundMoney/CheckRefund/index.jsx 查看文件

2
 import Taro from "@tarojs/taro";
2
 import Taro from "@tarojs/taro";
3
 import { Button, Icon, Text, Textarea } from "@tarojs/components";
3
 import { Button, Icon, Text, Textarea } from "@tarojs/components";
4
 import formatPrice from "@/utils/formatPrice";
4
 import formatPrice from "@/utils/formatPrice";
5
-
5
+import formatTime from "@/utils/formatTime";
6
 import { useState, useEffect } from "react";
6
 import { useState, useEffect } from "react";
7
 import withLayout from "@/layouts";
7
 import withLayout from "@/layouts";
8
 import { getOrderSub, refund } from "@/services/payOrder";
8
 import { getOrderSub, refund } from "@/services/payOrder";
11
 import ProCard_hot from "@/assets/icons/ProCard/ProCard_hot.png";
11
 import ProCard_hot from "@/assets/icons/ProCard/ProCard_hot.png";
12
 import CustomNav from "@/components/CustomNav";
12
 import CustomNav from "@/components/CustomNav";
13
 import "./style.less";
13
 import "./style.less";
14
-import formatTime from "@/utils/formatTime";
15
 
14
 
16
 const options = [
15
 const options = [
17
   {
16
   {
43
 export default withLayout((props) => {
42
 export default withLayout((props) => {
44
   const { router, person } = props;
43
   const { router, person } = props;
45
   const { id } = props.router.params;
44
   const { id } = props.router.params;
46
-  const [view, setView] = useState(true);
47
-  const [view2, setView2] = useState(false);
48
-  const [view3, setView3] = useState(false);
49
-  const [view4, setView4] = useState(false);
50
-  const [view5, setView5] = useState(false);
51
-  const [view6, setView6] = useState(false);
45
+
52
   // 说明
46
   // 说明
53
   const [explain, setExplain] = useState();
47
   const [explain, setExplain] = useState();
54
 
48
 
113
   }, [list]);
107
   }, [list]);
114
 
108
 
115
   return (
109
   return (
116
-    <view className="box-content">
117
-      <CustomNav title="售后退款" />
118
-      <view className="Refund-Content-box">
119
-        <view className="title-image">
110
+    <view className='box-content'>
111
+      <CustomNav title='售后退款' />
112
+      <view className='Refund-Content-box'>
113
+        <view className='title-image'>
120
           <image
114
           <image
121
-            mode="scaleToFill"
122
-            className="title-image-cup"
115
+            mode='scaleToFill'
116
+            className='title-image-cup'
123
             src={BlackSpot}
117
             src={BlackSpot}
124
           />
118
           />
125
-          <text className="title-title-boss">商品信息</text>
119
+          <text className='title-title-boss'>商品信息</text>
126
         </view>
120
         </view>
127
       </view>
121
       </view>
128
       {/* 商品信息结束 */}
122
       {/* 商品信息结束 */}
129
       <view>
123
       <view>
130
         {(list || []).map((item) => {
124
         {(list || []).map((item) => {
131
           return (
125
           return (
132
-            <view class="wrapper" key={item.orderId}>
133
-              <view class="left-complete-one">
134
-                <image className="left-image-1" src={ProCard_hot}></image>
135
-                <view className="left-viewText">
126
+            <view class='wrapper' key={item.orderId}>
127
+              <view class='left-complete-one'>
128
+                <image className='left-image-1' src={ProCard_hot}></image>
129
+                <view className='left-viewText'>
136
                   返现¥{formatPrice(item.cashback)}
130
                   返现¥{formatPrice(item.cashback)}
137
                 </view>
131
                 </view>
138
-                <view className="title-image">
132
+                <view className='title-image'>
139
                   <image
133
                   <image
140
-                    className="image-1"
141
-                    mode="scaleToFill"
134
+                    className='image-1'
135
+                    mode='scaleToFill'
142
                     src={item.poster}
136
                     src={item.poster}
143
                   ></image>
137
                   ></image>
144
-                  <image className="image-2" src={food}></image>
138
+                  <image className='image-2' src={food}></image>
145
                 </view>
139
                 </view>
146
-                <view className="title-content">
147
-                  <view className="Pro-title">
148
-                    <view className="title-text">
140
+                <view className='title-content'>
141
+                  <view className='Pro-title'>
142
+                    <view className='title-text'>
149
                       {item.packageDescription}
143
                       {item.packageDescription}
150
-                      <text className="title-money-2">
144
+                      <text className='title-money-2'>
151
                         数量:{item.amount}张
145
                         数量:{item.amount}张
152
                       </text>
146
                       </text>
153
                     </view>
147
                     </view>
154
                   </view>
148
                   </view>
155
-                  <text className="title-money">
149
+                  <text className='title-money'>
156
                     ¥{formatPrice(item.unitPrice)}元
150
                     ¥{formatPrice(item.unitPrice)}元
157
-                    <text className="title-money-2">
151
+                    <text className='title-money-2'>
158
                       门市价{formatPrice(item.standardPrice)}元
152
                       门市价{formatPrice(item.standardPrice)}元
159
                     </text>
153
                     </text>
160
                   </text>
154
                   </text>
161
-                  <view className="title-time">
155
+                  <view className='title-time'>
162
                     有效期:{formatTime(item?.startTime, "yyyy/MM/dd")}-
156
                     有效期:{formatTime(item?.startTime, "yyyy/MM/dd")}-
163
                     {formatTime(item.endTime, "yyyy/MM/dd")}
157
                     {formatTime(item.endTime, "yyyy/MM/dd")}
164
                   </view>
158
                   </view>
165
                 </view>
159
                 </view>
166
               </view>
160
               </view>
167
-              <view class="right-complete-two">
168
-                <view className="right-content"></view>
161
+              <view class='right-complete-two'>
162
+                <view className='right-content'></view>
169
               </view>
163
               </view>
170
             </view>
164
             </view>
171
           );
165
           );
173
       </view>
167
       </view>
174
 
168
 
175
       {/* 卡片结束 */}
169
       {/* 卡片结束 */}
176
-      <view className="Refund-Content-box">
177
-        <view className="title-image">
170
+      <view className='Refund-Content-box'>
171
+        <view className='title-image'>
178
           <image
172
           <image
179
-            mode="scaleToFill"
180
-            className="title-image-cup"
173
+            mode='scaleToFill'
174
+            className='title-image-cup'
181
             src={BlackSpot}
175
             src={BlackSpot}
182
           />
176
           />
183
-          <text className="title-title-boss">退款原因</text>
177
+          <text className='title-title-boss'>退款原因</text>
184
         </view>
178
         </view>
185
         {/* 退款结束 */}
179
         {/* 退款结束 */}
186
       </view>
180
       </view>
187
-      <view className="Refund-content">
181
+      <view className='Refund-content'>
188
         {options.map((x) => {
182
         {options.map((x) => {
189
           return (
183
           return (
190
             <text
184
             <text
191
               className={`Refund-star-view${x.key} ${checkeds.indexOf(x.key) > -1
185
               className={`Refund-star-view${x.key} ${checkeds.indexOf(x.key) > -1
192
-                  ? "bg2"
193
-                  : `Refund-star-view${x.key}`
186
+                ? "bg2"
187
+                : `Refund-star-view${x.key}`
194
                 }`}
188
                 }`}
195
               key={x.key}
189
               key={x.key}
196
               onClick={() => viewOK(x)}
190
               onClick={() => viewOK(x)}
201
         })}
195
         })}
202
       </view>
196
       </view>
203
 
197
 
204
-      <view className="Refund-Content-box">
205
-        <view className="title-image">
198
+      <view className='Refund-Content-box'>
199
+        <view className='title-image'>
206
           <image
200
           <image
207
-            mode="scaleToFill"
208
-            className="title-image-cup"
201
+            mode='scaleToFill'
202
+            className='title-image-cup'
209
             src={BlackSpot}
203
             src={BlackSpot}
210
           />
204
           />
211
-          <text className="title-title-boss">退款说明</text>
205
+          <text className='title-title-boss'>退款说明</text>
212
         </view>
206
         </view>
213
       </view>
207
       </view>
214
-      <view class="section">
208
+      <view class='section'>
215
         <Textarea
209
         <Textarea
216
-          placeholder="请补充退款说明(选填)!"
210
+          placeholder='请补充退款说明(选填)!'
217
           onInput={(e) => setExplain(e.detail.value)}
211
           onInput={(e) => setExplain(e.detail.value)}
218
-          confirm-type="done"
212
+          confirm-type='done'
219
         />
213
         />
220
       </view>
214
       </view>
221
-      <view className="money-title">
215
+      <view className='money-title'>
222
         实付金额:{" "}
216
         实付金额:{" "}
223
-        <text className="money-name">{formatPrice(totalPrice.charges)}元</text>
217
+        <text className='money-name'>{formatPrice(totalPrice.charges)}元</text>
224
       </view>
218
       </view>
225
-      <view className="money-title">
219
+      <view className='money-title'>
226
         已获返现:{" "}
220
         已获返现:{" "}
227
-        <text className="money-name">{formatPrice(totalPrice.cashback)}元</text>
221
+        <text className='money-name'>{formatPrice(totalPrice.cashback)}元</text>
228
       </view>
222
       </view>
229
-      <view className="money-title">
223
+      <view className='money-title'>
230
         退款金额:{" "}
224
         退款金额:{" "}
231
-        <text className="money-name">{formatPrice(totalPrice.refundPrice)}元</text>
225
+        <text className='money-name'>{formatPrice(totalPrice.refundPrice)}元</text>
232
       </view>
226
       </view>
233
-      <view className="ul-li-text">
234
-        <view className="ul-li-view"></view>
235
-        <text className="ul-li-textname">退款金额不可修改</text>
227
+      <view className='ul-li-text'>
228
+        <view className='ul-li-view'></view>
229
+        <text className='ul-li-textname'>退款金额不可修改</text>
236
       </view>
230
       </view>
237
-      <view className="ul-li-text">
238
-        <view className="ul-li-view"></view>
239
-        <text className="ul-li-textname">
231
+      <view className='ul-li-text'>
232
+        <view className='ul-li-view'></view>
233
+        <text className='ul-li-textname'>
240
           下单获得返现金额,会在退款时被扣除;
234
           下单获得返现金额,会在退款时被扣除;
241
         </text>
235
         </text>
242
       </view>
236
       </view>
243
-      <view className="ul-li-text">
244
-        <view className="ul-li-view"></view>
245
-        <text className="ul-li-textname">退款将在七个工作日内原路退还。</text>
237
+      <view className='ul-li-text'>
238
+        <view className='ul-li-view'></view>
239
+        <text className='ul-li-textname'>退款将在七个工作日内原路退还。</text>
246
       </view>
240
       </view>
247
 
241
 
248
-      <view className="button-info">
249
-        <Button className="button-box" onClick={() => onRefund()}>
242
+      <view className='button-info'>
243
+        <Button className='button-box' onClick={() => onRefund()}>
250
           提交申请
244
           提交申请
251
         </Button>
245
         </Button>
252
       </view>
246
       </view>

+ 12
- 3
src/pages/MineUserAll/RefundMoney/style.less 查看文件

78
       }
78
       }
79
       //图片
79
       //图片
80
       .title-image {
80
       .title-image {
81
-        width: 145px;
81
+        // width: 145px;
82
+        // margin-left: 20px;
83
+        // border-radius: 24px;
84
+        // overflow: hidden;
85
+        // position: relative;
86
+        height: 144px;
82
         margin-left: 20px;
87
         margin-left: 20px;
83
         border-radius: 24px;
88
         border-radius: 24px;
84
         overflow: hidden;
89
         overflow: hidden;
85
         position: relative;
90
         position: relative;
91
+
86
         .image-1 {
92
         .image-1 {
87
-          width: 100%;
88
-          height: 145px;
93
+          // width: 100%;
94
+          // height: 145px;
95
+          width: 144px;
96
+          height: 144px;
97
+          margin: 0;
89
         }
98
         }
90
         .image-2 {
99
         .image-2 {
91
           width: 89px;
100
           width: 89px;