吃个甘蔗嚼一年 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,7 +2,7 @@ import BlackSpot from "@/assets/icons/GuideCheck/BlackSpot.png";
2 2
 import Taro from "@tarojs/taro";
3 3
 import { Button, Icon, Text, Textarea } from "@tarojs/components";
4 4
 import formatPrice from "@/utils/formatPrice";
5
-
5
+import formatTime from "@/utils/formatTime";
6 6
 import { useState, useEffect } from "react";
7 7
 import withLayout from "@/layouts";
8 8
 import { getOrderSub, refund } from "@/services/payOrder";
@@ -11,7 +11,6 @@ import food from "@/assets/icons/ProCard/food.png";
11 11
 import ProCard_hot from "@/assets/icons/ProCard/ProCard_hot.png";
12 12
 import CustomNav from "@/components/CustomNav";
13 13
 import "./style.less";
14
-import formatTime from "@/utils/formatTime";
15 14
 
16 15
 const options = [
17 16
   {
@@ -43,12 +42,7 @@ const options = [
43 42
 export default withLayout((props) => {
44 43
   const { router, person } = props;
45 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 47
   const [explain, setExplain] = useState();
54 48
 
@@ -113,59 +107,59 @@ export default withLayout((props) => {
113 107
   }, [list]);
114 108
 
115 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 114
           <image
121
-            mode="scaleToFill"
122
-            className="title-image-cup"
115
+            mode='scaleToFill'
116
+            className='title-image-cup'
123 117
             src={BlackSpot}
124 118
           />
125
-          <text className="title-title-boss">商品信息</text>
119
+          <text className='title-title-boss'>商品信息</text>
126 120
         </view>
127 121
       </view>
128 122
       {/* 商品信息结束 */}
129 123
       <view>
130 124
         {(list || []).map((item) => {
131 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 130
                   返现¥{formatPrice(item.cashback)}
137 131
                 </view>
138
-                <view className="title-image">
132
+                <view className='title-image'>
139 133
                   <image
140
-                    className="image-1"
141
-                    mode="scaleToFill"
134
+                    className='image-1'
135
+                    mode='scaleToFill'
142 136
                     src={item.poster}
143 137
                   ></image>
144
-                  <image className="image-2" src={food}></image>
138
+                  <image className='image-2' src={food}></image>
145 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 143
                       {item.packageDescription}
150
-                      <text className="title-money-2">
144
+                      <text className='title-money-2'>
151 145
                         数量:{item.amount}张
152 146
                       </text>
153 147
                     </view>
154 148
                   </view>
155
-                  <text className="title-money">
149
+                  <text className='title-money'>
156 150
                     ¥{formatPrice(item.unitPrice)}元
157
-                    <text className="title-money-2">
151
+                    <text className='title-money-2'>
158 152
                       门市价{formatPrice(item.standardPrice)}元
159 153
                     </text>
160 154
                   </text>
161
-                  <view className="title-time">
155
+                  <view className='title-time'>
162 156
                     有效期:{formatTime(item?.startTime, "yyyy/MM/dd")}-
163 157
                     {formatTime(item.endTime, "yyyy/MM/dd")}
164 158
                   </view>
165 159
                 </view>
166 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 163
               </view>
170 164
             </view>
171 165
           );
@@ -173,24 +167,24 @@ export default withLayout((props) => {
173 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 172
           <image
179
-            mode="scaleToFill"
180
-            className="title-image-cup"
173
+            mode='scaleToFill'
174
+            className='title-image-cup'
181 175
             src={BlackSpot}
182 176
           />
183
-          <text className="title-title-boss">退款原因</text>
177
+          <text className='title-title-boss'>退款原因</text>
184 178
         </view>
185 179
         {/* 退款结束 */}
186 180
       </view>
187
-      <view className="Refund-content">
181
+      <view className='Refund-content'>
188 182
         {options.map((x) => {
189 183
           return (
190 184
             <text
191 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 189
               key={x.key}
196 190
               onClick={() => viewOK(x)}
@@ -201,52 +195,52 @@ export default withLayout((props) => {
201 195
         })}
202 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 200
           <image
207
-            mode="scaleToFill"
208
-            className="title-image-cup"
201
+            mode='scaleToFill'
202
+            className='title-image-cup'
209 203
             src={BlackSpot}
210 204
           />
211
-          <text className="title-title-boss">退款说明</text>
205
+          <text className='title-title-boss'>退款说明</text>
212 206
         </view>
213 207
       </view>
214
-      <view class="section">
208
+      <view class='section'>
215 209
         <Textarea
216
-          placeholder="请补充退款说明(选填)!"
210
+          placeholder='请补充退款说明(选填)!'
217 211
           onInput={(e) => setExplain(e.detail.value)}
218
-          confirm-type="done"
212
+          confirm-type='done'
219 213
         />
220 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 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 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 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 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 235
         </text>
242 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 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 245
         </Button>
252 246
       </view>

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

@@ -78,14 +78,23 @@
78 78
       }
79 79
       //图片
80 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 87
         margin-left: 20px;
83 88
         border-radius: 24px;
84 89
         overflow: hidden;
85 90
         position: relative;
91
+
86 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 99
         .image-2 {
91 100
           width: 89px;