const prefix = '/api/center'

const apis = {
  user: {
    current: {
      url: `${prefix}/current`,
      method: 'GET',
      action: 'center',
    },
    login: {
      url: `${prefix}/signin`,
      method: 'POST',
      action: 'center',
      login: true
    },
    logoff: {
      url: `${prefix}/signout`,
      method: 'POST',
      action: 'center',
      logout: true
    },
    changePassword: {
      url: `${prefix}/changePassword`,
      method: 'POST',
      action: 'center'
    }
  },
  member: {
    list: {
      url: `${prefix}/taUser`,
      method: 'GET',
      action: 'center',
    },
    get: {
      url: `${prefix}/taUser/:id`,
      method: 'GET',
      action: 'center',
    },
    save: {
      url: `${prefix}/taUser`,
      method: 'POST',
      action: 'center',
    },
    update: {
      url: `${prefix}/taUser/:id`,
      method: 'PUT',
      action: 'center',
    },
    getTree: {
      url: `${prefix}/taUser/city/tree`,
      method: 'get',
      action: 'center',
    },
    miniapp: {
      edit: {
        url: `${prefix}/taMiniapp`,
        method: 'POST',
        action: 'center',
      },
      check: {
        url: `${prefix}/check/taMiniapp`,
        method: 'POST',
        action: 'center',
      }
    },
    menus: {
      url: `${prefix}/sysmodules`,
      method: 'GET',
      action: 'center',
    },
    authorize: {
      url: `${prefix}/sysmodules`,
      method: 'POST',
      action: 'center',
    },
    turn: {
      url: `${prefix}/turn/taUser/:id/:type`,
      method: 'PUT',
      action: 'center',
    },
    resetPass: {
      url: `${prefix}/password/taUser/:id`,
      method: 'PUT',
      action: 'center',
    },
  },
  image: {
    uploadForAnt: {
      url: `${prefix}/antd/image`,
      method: 'POST',
      action: 'center',
    },
    upload: {
      url: `${prefix}/image`,
      method: 'POST',
      action: 'center',
    },
    logo: {
      url: `${prefix}/logo`,
      method: 'GET',
      action: 'center',
    },
  },
  dict: {
    tplType: {
      url: `${prefix}/dict/templateType`,
      method: 'GET',
      action: 'center',
    }
  },
}

export default apis;
