Browse Source

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

李志伟 3 years ago
parent
commit
ff0c1f94ec

+ 3
- 1
src/pages/MineUserAll/RefundMoney/CheckRefund/index.jsx View File

92
       refundReason: explain,
92
       refundReason: explain,
93
     }).then((res) => {
93
     }).then((res) => {
94
       Taro.hideLoading();
94
       Taro.hideLoading();
95
-      Taro.navigateTo({ url: '/pages/MineUserAll/AllOrder/index?tabJump=0' })
95
+      Taro.navigateBack({
96
+        delta: 1
97
+      })
96
       Taro.showToast({
98
       Taro.showToast({
97
         title: "退款成功",
99
         title: "退款成功",
98
         icon: "none",
100
         icon: "none",

+ 19
- 13
src/pages/MineUserAll/RefundMoney/index.jsx View File

12
 export default withLayout((props) => {
12
 export default withLayout((props) => {
13
   const { router, person } = props;
13
   const { router, person } = props;
14
   const [list, setList] = useState([]);
14
   const [list, setList] = useState([]);
15
+  const [IsPull, setPull] = useState(false);
15
   const [pageNum, setNumber] = useState(1);
16
   const [pageNum, setNumber] = useState(1);
16
   const [HasNextPage, setHasNextPage] = useState(true);
17
   const [HasNextPage, setHasNextPage] = useState(true);
18
+  const [isFirst, setFirst] = useState(true)
19
+  useDidShow(() => {
20
+    if (!isFirst) {
21
+      getList();
22
+    }
23
+  })
24
+
17
   const [loading, setLoading] = useState(false)
25
   const [loading, setLoading] = useState(false)
18
 
26
 
19
   const getList = () => {
27
   const getList = () => {
20
     setLoading(true)
28
     setLoading(true)
29
+    setFirst(false)
21
     setHasNextPage(false);
30
     setHasNextPage(false);
22
     getOrderSub({
31
     getOrderSub({
23
       pageNum,
32
       pageNum,
29
         pageNum === 1 ? res.records || [] : list.concat(res.records || [])
38
         pageNum === 1 ? res.records || [] : list.concat(res.records || [])
30
       );
39
       );
31
       setHasNextPage(res.current < res.pages);
40
       setHasNextPage(res.current < res.pages);
41
+      setPull(false);
32
       setLoading(false)
42
       setLoading(false)
33
-
34
     }).catch(e => {
43
     }).catch(e => {
35
       setLoading(false)
44
       setLoading(false)
36
     })
45
     })
37
   };
46
   };
38
 
47
 
39
 
48
 
49
+
40
   const pageLoadMore = () => {
50
   const pageLoadMore = () => {
41
     // 页面上拉加载更多
51
     // 页面上拉加载更多
42
     if (HasNextPage) {
52
     if (HasNextPage) {
56
       <view className='index-navbar'>
66
       <view className='index-navbar'>
57
         <CustomNav title='售后退款' />
67
         <CustomNav title='售后退款' />
58
       </view>
68
       </view>
59
-      <scroll-view
60
-        scrollY
61
-        style='height: calc(100vh - 176rpx);'
62
-        onscrolltolower={pageLoadMore}
63
-      >
64
-        <SpinBox loading={loading} className='index-container' >
65
-
69
+      <SpinBox loading={loading} className='index-container' >
70
+        <scroll-view
71
+          scrollY
72
+          style='height: calc(100vh - 176rpx);'
73
+          onscrolltolower={pageLoadMore}
74
+        >
66
           <view className='View-box-Card'>
75
           <view className='View-box-Card'>
67
-
68
             {(list || []).map((item) => {
76
             {(list || []).map((item) => {
69
               return (
77
               return (
70
                 <OrderCard item={item} key={item.orderId} sh='1' />
78
                 <OrderCard item={item} key={item.orderId} sh='1' />
71
               )
79
               )
72
             })}
80
             })}
73
             <view className='foot'>这是我的底线</view>
81
             <view className='foot'>这是我的底线</view>
74
-
75
           </view>
82
           </view>
76
-        </SpinBox>
77
-
78
-      </scroll-view>
83
+        </scroll-view>
84
+      </SpinBox>
79
     </view>
85
     </view>
80
   );
86
   );
81
 });
87
 });