{"size": 1794, "ext": "js", "max_stars_repo_path": "src/api/base/region/region.js", "max_stars_repo_name": "tfpl/-bosssoft-vue-element-admin", "max_stars_repo_stars_event_min_datetime": null, "max_stars_repo_stars_event_max_datetime": null, "max_issues_repo_path": "src/api/base/region/region.js", "max_issues_repo_name": "tfpl/-bosssoft-vue-element-admin", "max_issues_repo_issues_event_min_datetime": null, "max_issues_repo_issues_event_max_datetime": null, "max_forks_repo_path": "src/api/base/region/region.js", "max_forks_repo_name": "tfpl/-bosssoft-vue-element-admin", "max_forks_repo_forks_event_min_datetime": null, "max_forks_repo_forks_event_max_datetime": null}
{"max_stars_count": null, "max_issues_count": null, "max_forks_count": null, "avg_line_length": 22.1481481481, "max_line_length": 88, "alphanum_fraction": 0.613154961}
import http from './public'
import query_string from 'querystring'
import request from '@/utils/request'

const baseUrl = '/region/'

export const region_category = () => {
  // return http.requestQuickGet('/api/region/category')
  return request({
    url: baseUrl + 'category',
    method: 'get'
  })
}

export const region_list = (page, size, params) => {
  const querys = query_string.stringify(params)
  // return http.requestQuickGet('/api/region/list/' + page + '/' + size + '?' + querys)
  return request({
    url: baseUrl + 'list/' + page + '/' + size + '?' + querys,
    method: 'get'
  })
}

export const region_province = () => {
  // return http.requestQuickGet('/api/region/province')
  return request({
    url: baseUrl + 'province',
    method: 'get'
  })
}

export const region_city = () => {
  // return http.requestQuickGet('/api/region/city')
  return request({
    url: baseUrl + 'city',
    method: 'get'
  })
}

export const addRegion = (data) => {
  // return http.requestPost('/api/region/add', params)
  console.log(data)
  return request({
    url: baseUrl + 'add',
    method: 'post',
    data
  })
}

export const editRegion = (data) => {
  // return http.requestPut('/api/region/edit', params)
  return request({
    url: baseUrl + 'edit',
    method: 'put',
    data
  })
}

export const deleteRegion = (id) => {
  // return http.requestDelete('/api/region/delete/' + id)
  return request({
    url: baseUrl + 'delete/' + id,
    method: 'delete'
  })
}

export const getGrandId = (pid) => {
  // return http.requestQuickGet('/api/region/getGrandId/' + pid)
  return request({
    url: baseUrl + 'getGrandId/' + pid,
    method: 'get'
  })
}

export const getBusIds = (pid) => {
  return request({
    url: baseUrl + 'getBusIds/' + pid,
    method: 'get'
  })
}
