王文博 5 سال پیش
والد
کامیت
2208a5caa0
2فایلهای تغییر یافته به همراه15 افزوده شده و 14 حذف شده
  1. 12 12
      src/pages/dc/index.js
  2. 3 2
      src/pages/dc/service.js

+ 12 - 12
src/pages/dc/index.js

@@ -23,18 +23,18 @@ class Index extends React.PureComponent {
     isClearSearch: true,
     // 这个数组里面的每一个元素就是一个搜索项
     formFields: [
-      { label: '账户ID:', type: 'input', key: 'developerId', placeholder: '请输入账户ID' },
-      {
-        label: '性别:',
-        type: 'select',
-        option: [
-          { value: '0', label: '不限' },
-          { value: '1', label: '男' },
-          { value: '2', label: '女' }
-        ],
-        key: 'sex'
-      },
-      { label: '出生日期:', type: 'datePicker', key: 'date' }
+      // { label: '账户ID:', type: 'input', key: 'developerId', placeholder: '请输入账户ID' },
+      // {
+      //   label: '性别:',
+      //   type: 'select',
+      //   option: [
+      //     { value: '0', label: '不限' },
+      //     { value: '1', label: '男' },
+      //     { value: '2', label: '女' }
+      //   ],
+      //   key: 'sex'
+      // },
+      // { label: '出生日期:', type: 'datePicker', key: 'date' }
     ],
     // 在接口请求前,可以修改给接口的入参
     beforeSearchFunc: params => {

+ 3 - 2
src/pages/dc/service.js

@@ -4,7 +4,8 @@ import { dc } from '@/conf/config'
 
 export async function addItem (params) {
   const url = `${dc}/dc/web/edit-rule`;
-  return fetchApi(url, params)
+  console.log(params)
+  return fetchApi(url, {method:'POST',body:params})
 }
 
 export async function delItem (params) {
@@ -14,5 +15,5 @@ export async function delItem (params) {
 
 export async function editItem (params) {
   const url = `${dc}/dc/web/edit-rule`;
-  return fetchApi(url, params)
+  return fetchApi(url, {method:'POST',body:params})
 }