许静 5 vuotta sitten
vanhempi
commit
560d56ea97

+ 36
- 36
src/pages/channel/channelList.jsx Näytä tiedosto

@@ -80,7 +80,7 @@ const columns = [
80 80
     dataIndex: '',
81 81
     key: '',
82 82
     align: 'center',
83
-    render: (text, record) => <a style={ { color: '#66B3FF' } } onClick= {() => toedit(record.channelId)} >编辑</a>,
83
+    render: (text, record) => <a style={{ color: '#66B3FF' }} onClick={() => toedit(record.channelId)} >编辑</a>,
84 84
   },
85 85
 ];
86 86
 
@@ -93,16 +93,16 @@ function toAdd() {
93 93
     },
94 94
   });
95 95
 }
96
-  // 跳编辑页面
97
-  function toedit(channelId) {
98
-    // alert(channelId)
99
-    router.push({
100
-      pathname: '/channel/editChannel',
101
-      query: {
102
-        id: channelId,
103
-      },
104
-    });
105
-  }
96
+// 跳编辑页面
97
+function toedit(channelId) {
98
+  // alert(channelId)
99
+  router.push({
100
+    pathname: '/channel/editChannel',
101
+    query: {
102
+      id: channelId,
103
+    },
104
+  });
105
+}
106 106
 
107 107
 const header = props => {
108 108
   // eslint-disable-next-line react-hooks/rules-of-hooks
@@ -118,11 +118,11 @@ const header = props => {
118 118
       url: '/api/admin/channel',
119 119
       method: 'GET',
120 120
       params: { ...params },
121
-  // eslint-disable-next-line no-shadow
122
-  }).then(data => {
121
+      // eslint-disable-next-line no-shadow
122
+    }).then(data => {
123 123
       console.log(data)
124 124
       setData(data)
125
-  })
125
+    })
126 126
   }
127 127
   // value 的值
128 128
   function handleChange(value) {
@@ -133,25 +133,25 @@ const header = props => {
133 133
   function queryList() {
134 134
     getList({ pageNum: 1, pageSize: 10, channelId: localStorage.getItem('value') })
135 135
   }
136
- // 重置
137
- function reset() {
138
-  getList({ pageNum: 1, pageSize: 10 })
139
- }
136
+  // 重置
137
+  function reset() {
138
+    getList({ pageNum: 1, pageSize: 10 })
139
+  }
140 140
 
141
- // 跳编辑页
142
- function toEdit() {
143
-  router.push({
144
-    pathname: '/integralMall/editGoods',
145
-    query: {
146
-      a: 'b',
147
-    },
148
-  });
149
-}
141
+  // 跳编辑页
142
+  function toEdit() {
143
+    router.push({
144
+      pathname: '/integralMall/editGoods',
145
+      query: {
146
+        a: 'b',
147
+      },
148
+    });
149
+  }
150 150
 
151 151
   // 分页
152 152
   function onChange(pageNumber) {
153 153
     // eslint-disable-next-line react-hooks/rules-of-hooks
154
-      getList({ pageNum: pageNumber, pageSize: 9 })
154
+    getList({ pageNum: pageNumber, pageSize: 9 })
155 155
   }
156 156
 
157 157
   return (
@@ -160,21 +160,21 @@ const header = props => {
160 160
         <div>
161 161
           <span className={channels.selectName}>渠道名称</span>
162 162
           <Select defaultValue="请选择" style={{ width: 180 }} onChange={handleChange}>
163
-          <option value="">全部</option>
164
-              {data.channelNmae.map(Item =>
165
-                <Option value={ Item.channelId }> { Item.channelName } </Option>,
166
-              )}
167
-              {/* {listItems} */}
163
+            <option value="">全部</option>
164
+            {data.channelNmae.map(Item =>
165
+              <Option value={Item.channelId}> {Item.channelName} </Option>,
166
+            )}
167
+            {/* {listItems} */}
168 168
           </Select>
169 169
         </div>
170 170
         <div >
171
-        <Button type="primary" onClick={() => queryList() }>查询</Button>
172
-        {/* <Button onClick={() => reset() }>重置</Button> */}
171
+          <Button type="primary" onClick={() => queryList()}>查询</Button>
172
+          {/* <Button onClick={() => reset() }>重置</Button> */}
173 173
         </div>
174 174
       </div>
175 175
       <Button type="danger" onClick={toAdd} className={channels.about} >新增</Button>
176 176
       <Table dataSource={data.result.records} columns={columns} pagination={{ pageSize: 10, total: data.result.total, onChange }} />
177
-  </>
177
+    </>
178 178
   )
179 179
 }
180 180
 

+ 1
- 1
src/pages/staff/list/StaffList.jsx Näytä tiedosto

@@ -73,7 +73,7 @@ const CartBody = (props) => {
73 73
         </Button>
74 74
         <Button type="link" style={{ fontSize: '18px', color: '#cacaca', position: 'absolute', top: '50px', right: '0' }} onClick={confirm(data)}>
75 75
           {data.status === 1 ? '停用' : '启用'}
76
-                <Icon type="close-circle" style={{ color: '#C0C4CC', marginLeft: '8px' }} />
76
+                <Icon type={data.status===1?'close-circle':'form'} style={{ color: '#C0C4CC', marginLeft: '8px' }} />
77 77
         </Button>
78 78
         {/* <Button type="link" style={{ fontSize: '18px', color: '#FF925C', position: 'absolute', top: '50px', right: '0' }} onClick={confirm}>
79 79
           启用

+ 3
- 3
src/pages/staff/list/style.less Näytä tiedosto

@@ -28,20 +28,20 @@
28 28
   font-size: 20px;
29 29
   color: rgba(102, 102, 102, 1);
30 30
   position: absolute;
31
-  bottom:36px;
31
+  bottom:52px;
32 32
 }
33 33
 .statusText {
34 34
   font-size: 20px;
35 35
   color: rgba(102, 102, 102, 1);
36 36
   position: absolute;
37
-  bottom:36px;
37
+  bottom:52px;
38 38
   right: 20px;
39 39
 }
40 40
 .phoneText{
41 41
   font-size: 20px;
42 42
   color: rgba(102, 102, 102, 1);
43 43
   position: absolute;
44
-  bottom:0px;
44
+  bottom:16px;
45 45
 }
46 46
 
47 47
 .cardItem {