魏超 5 年之前
父節點
當前提交
584e605477
共有 2 個文件被更改,包括 8 次插入5 次删除
  1. 7
    4
      src/pages/carouselFigure/advertisingList.jsx
  2. 1
    1
      src/pages/carouselFigure/carouselFigureList.jsx

+ 7
- 4
src/pages/carouselFigure/advertisingList.jsx 查看文件

@@ -59,13 +59,14 @@ const toEdit = (contentId) => () => {
59 59
       dataIndex: 'buildingName',
60 60
       key: 'buildingName',
61 61
       align: 'center',
62
+      render: (buildingName) => <span>{ buildingName === null ? '无' : buildingName }</span>
62 63
     },
63 64
     {
64 65
       title: '关联内容类型',
65 66
       dataIndex: 'contentType',
66 67
       key: 'contentType',
67 68
       align: 'center',
68
-      render: (contentType) => <span>{ contentType === 'project' ? '项目' : contentType === 'activity' ? '活动' : contentType === 'news' ? '资讯' : contentType === 'other' ? '其他' : contentType === 'help' ? '助力' : contentType === 'group' ? '拼团' : contentType === 'h5' ? 'H5活动' : '' }</span>
69
+      render: (contentType) => <span>{ contentType === 'project' ? '项目' : contentType === 'activity' ? '活动' : contentType === 'news' ? '资讯' : contentType === 'other' ? '其他' : contentType === 'help' ? '助力' : contentType === 'group' ? '拼团' : contentType === 'h5' ? 'H5活动' : '' }</span>
69 70
     },
70 71
     // {
71 72
     //   title: '发布位置',
@@ -145,12 +146,13 @@ const deleteCarouse = (contentId) => () =>{
145 146
   const changeStatus = (row) => () => {
146 147
       console.log(row)
147 148
       if(row.status === 0) {
148
-        row.status = 1
149
+        
149 150
         Modal.confirm({
150 151
           title: '确认发布此数据?',
151 152
           okText: '确定',
152 153
           cancelText: '取消',
153 154
           onOk() {
155
+            row.status = 1
154 156
               request({ ...apis.carsuseFigure.updataExtendContent,urlData:{id: row.contentId}, data: row,}).then((data) => {
155 157
                   message.info('操作成功!')
156 158
                   getList({ pageNum: 1, pageSize: 10, showType: 'screen' })
@@ -161,12 +163,13 @@ const deleteCarouse = (contentId) => () =>{
161 163
           },
162 164
         });
163 165
       }else if(row.status === 1){
164
-        row.status = 0
166
+        
165 167
         Modal.confirm({
166 168
           title: '停用后不会再显示在小程序端',
167 169
           okText: '确定',
168 170
           cancelText: '取消',
169 171
           onOk() {
172
+            row.status = 0
170 173
               request({ ...apis.carsuseFigure.updataExtendContent,urlData:{id: row.contentId}, data: row,}).then((data) => {
171 174
                   message.info('操作成功!')
172 175
                   getList({ pageNum: 1, pageSize: 10, showType: 'screen' })
@@ -225,7 +228,7 @@ const handleSubmit = (e, props) => {
225 228
               <Option value="help">助力</Option>
226 229
               <Option value="group">拼团</Option>
227 230
               <Option value="h5">H5</Option>
228
-              <Option value="">无</Option>
231
+              <Option value="nothing">无</Option>
229 232
             </Select>,
230 233
           )}
231 234
         </Form.Item>

+ 1
- 1
src/pages/carouselFigure/carouselFigureList.jsx 查看文件

@@ -227,7 +227,7 @@ const handleSubmit = (e, props) => {
227 227
               <Option value="help">助力</Option>
228 228
               <Option value="group">拼团</Option>
229 229
               <Option value="h5">H5</Option>
230
-              <Option value="">无</Option>
230
+              <Option value="nothing">无</Option>
231 231
               {/* <Option value="other">其他</Option> */}
232 232
             </Select>,
233 233
           )}