李志伟 před 3 roky
rodič
revize
5b891a2fdd
1 změnil soubory, kde provedl 7 přidání a 17 odebrání
  1. 7
    17
      src/components/CompoentsOrder/complete/index.jsx

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

28
   })
28
   })
29
 
29
 
30
   useEffect(() => {
30
   useEffect(() => {
31
-    if (pageNum) {
31
+    if (pageNum.pageNum) {
32
       getList();
32
       getList();
33
     }
33
     }
34
   }, [pageNum]);
34
   }, [pageNum]);
39
     getOrderSub({
39
     getOrderSub({
40
       ...pageNum,
40
       ...pageNum,
41
       pageSize: 10,
41
       pageSize: 10,
42
-      ...(type !== undefined ? dict[type] : null),
42
+      isVerified: '',
43
+      ...(type !== undefined ? dict[type] : {}),
43
     }).then((res) => {
44
     }).then((res) => {
44
-      if (pageNum === 1) {
45
-        setList(res.records || [])
46
-      } else {
47
-        setList(res.records || [])
48
-      }
49
-      // setList(
50
-      //   pageNum === 1 ? res.records || [] : list.concat(res.records || [])
51
-      // );
45
+      setList(
46
+        pageNum.pageNum === 1 ? res.records || [] : list.concat(res.records || [])
47
+      );
52
       setHasNextPage(res.current < res.pages);
48
       setHasNextPage(res.current < res.pages);
53
       setLoading(false)
49
       setLoading(false)
54
 
50
 
80
         title: '删除订单成功',
76
         title: '删除订单成功',
81
         icon: 'none',
77
         icon: 'none',
82
       })
78
       })
83
-      getOrderSub({
84
-        ...pageNum,
85
-        pageSize: 10,
86
-        ...(type !== undefined ? dict[type] : null),
87
-      }).then((res) => {
88
-        setList(res.records || [])
89
-      })
79
+      setNumber({ pageNum: 1 })
90
     })
80
     })
91
   }
81
   }
92
 
82