// 系统管理模块

// // 获取版本信息
// export const getVersionConfig = {
//   url: '/system/base/getVersionConfig',
//   method: 'GET'
// }

// // 更新版本信息
// export const updateVersionConfig = {
//   url: '/system/base/updateVersionConfig',
//   method: 'PUT',
//   dealReqData: ({
//     iosVersionName,
//     iosForceVersion,
//     iosAddress,
//     iosContent,

//     anVersionName,
//     anVersionCode,
//     anForceVersion,
//     anAddress,
//     anContent }) => {
//     return {
//       iosVersionName,
//       iosForceVersion,
//       iosAddress,
//       iosContent,

//       anVersionName,
//       anVersionCode,
//       anForceVersion,
//       anAddress,
//       anContent
//     }
//   }
// }

// 全局配置列表查询
export const getSysConfigList = {
  url: '/sys-config/list',
  method: 'GET',
  deleteData: ({ keyword, pageNum, pageSize }) => {
    return { keyword, pageNum, pageSize }
  }
}

// 全局配置新增
export const addSysConfig = {
  url: '/sys-config/save',
  method: 'POST',
  deleteData: (form) => {
    return form
  }
}

// 全局配置编辑
export const editSysConfig = {
  url: '/sys-config/update',
  method: 'PUT',
  deleteData: (form) => {
    return form
  }
}

// 全局配置状态启用停用
export const updateSysConfigStatus = {
  url: '/sys-config/validState/update',
  method: 'PUT',
  dealUrl: (url, { configId, updateTime, validState }) => {
    return `${url}/${configId}?updateTime=${updateTime}&validState=${validState}`
  }
}

// 全局配置详情
export const detailSysConfig = {
  url: '/sys-config',
  method: 'PUT',
  dealUrl: (url, configId) => {
    return `${url}/${configId}`
  }
}

// 全局配置删除
export const deleteSysConfig = {
  url: '/sys-config/delete',
  method: 'DELETE',
  dealUrl: (url, configId) => {
    return `${url}/${configId}`
  }
}

// 常见问题列表查询
export const getSysQuestionList = {
  url: '/sys-question/list',
  method: 'GET',
  deleteData: ({ keyword, pageNum, pageSize, navigationId }) => {
    return { keyword, pageNum, pageSize, navigationId }
  }
}

// 导航列表查询
export const getSysNavigationList = {
  url: '/sys-navigation/list',
  method: 'GET'
}

// 常见问题详情
export const detailSysQuestion = {
  url: '/sys-question',
  method: 'GET',
  dealUrl: (url, questionId) => {
    return `${url}/${questionId}`
  }
}

// 新增常见问题
export const addSysQuestion = {
  url: '/sys-question/save',
  method: 'POST',
  deleteData: ({ answer, displayOrder, navigationId, question }) => {
    return { answer, displayOrder, navigationId, question }
  }
}

// 更新常见问题
export const updateSysQuestion = {
  url: '/sys-question/update',
  method: 'PUT',
  deleteData: (form) => {
    return form
  }
}

// 删除常见问题
export const deleteSysQuestion = {
  url: '/sys-question/delete',
  method: 'DELETE',
  dealUrl: (url, questionId) => {
    return `${url}/${questionId}`
  }
}

// 新增导航
export const addNavigation = {
  url: '/sys-navigation/save',
  method: 'POST',
  deleteData: (form) => {
    return form
  }
}

// 敏感词列表查询
export const getSysSensitiveList = {
  url: '/sys-sensitive-words/list',
  method: 'GET',
  deleteData: ({ pageNum, pageSize, sensitiveWords }) => {
    return { pageNum, pageSize, sensitiveWords }
  }
}

// 新增敏感词
export const addSysSensitiveWord = {
  url: '/sys-sensitive-words/save',
  method: 'POST',
  deleteData: (form) => {
    return form
  }
}

// 删除敏感词
export const deleteSysSensitiveWord = {
  url: '/sys-sensitive-words/delete',
  method: 'DELETE',
  dealUrl: (url, sensitiveWordsId) => {
    return `${url}/${sensitiveWordsId}`
  }
}

// 测试敏感词
export const testSysSensitiveWord = {
  url: '/sys-sensitive-words/test',
  method: 'GET',
  deleteData: ({ text }) => {
    return { text }
  }
}

// 区块链管理-新增
export const chainManagementSave = {
  url: '/blockChainManagement/save',
  method: 'POST',
  deleteData: ({ blockChainName, ip, port, title, startHeight, remark }) => {
    return { blockChainName, ip, port, title, startHeight, remark }
  }
}

// 区块链管理-编辑
export const chainManagementUpdate = {
  url: '/blockChainManagement/update',
  method: 'PUT',
  deleteData: ({ blockChainId, ip, port, title, startHeight, remark, updateTime }) => {
    return { blockChainId, ip, port, title, startHeight, remark, updateTime }
  }
}

// 区块链管理-列表查询
export const chainManagementList = {
  url: '/blockChainManagement/list',
  method: 'GET'
}

// 区块链管理-启用停用
export const chainManagementValid = {
  url: '/blockChainManagement/validState/update',
  method: 'PUT',
  dealUrl: (url, { blockChainId, updateTime, validState }) => {
    return `${url}/${blockChainId}?updateTime=${updateTime}&validState=${validState}`
  }

}

// 区块链管理--删除
export const chainManagementDelete = {
  url: '/blockChainManagement/delete',
  method: 'DELETE',
  dealUrl: (url, blockChainId) => {
    return `${url}/${blockChainId}`
  }
}

// 管理通证-列表查询
export const blockChainPassList = {
  url: '/blockChainPass/list',
  method: 'GET'
}

// 管理通证-新增
export const blockChainPassSave = {
  url: '/blockChainPass/save',
  method: 'POST',
  deleteData: ({ blockChainId, passIdentification, name, remark }) => {
    return { blockChainId, passIdentification, name, remark }
  }
}

// 管理通证-编辑
export const blockChainPassUpdate = {
  url: '/blockChainPass/update',
  method: 'PUT',
  deleteData: ({ passId, name, remark, updateTime }) => {
    return { passId, name, remark, updateTime }
  }
}
// 区块链管理-启用停用
export const blockChainPassValid = {
  url: '/blockChainPass/validState/update',
  method: 'PUT',
  dealUrl: (url, { passId, updateTime, validState }) => {
    console.log('111', passId)
    return `${url}/${passId}?updateTime=${updateTime}&validState=${validState}`
  }

}

// 区块链管理--删除
export const blockChainPassDelete = {
  url: '/blockChainPass/delete',
  method: 'DELETE',
  dealUrl: (url, passId) => {
    return `${url}/${passId}`
  }
}
