import request from '@/utils/request'
import config from '@/utils/config'

export function logIN(query) {
  return request({
    url: config.BASE_URL + '/login',
    method: 'post',
    params: query
  })
}
export function getUserMkt(query) {
  return request({
    url: config.BASE_URL + '/getUserMkt',
    method: 'get',
    params: query
  })
}
export function getAdminPermission(query) {
  return request({
    url: config.BASE_URL + '/getAdminPermission',
    method: 'get',
    params: query
  })
}

export function fetchList(query) {
  return request({
    url: config.BASE_URL + '/getMMList',
    method: 'get',
    params: query
  })
}
export function queryServiceUserStockCondition(query) {
  return request({
    url: config.BASE_URL + '/queryServiceUserStockCondition',
    method: 'post',
    params: query
  })
}
export function stockQueryList(query) {
  return request({
    url: config.BASE_URL + '/queryServiceUserStock',
    method: 'get',
    params: query
  })
}
export function seachList(query) {
  return request({
    url: config.BASE_URL + '/queryMMList',
    method: 'post',
    params: query
  })
}
export function idcardCheck(query) {
  return request({
    url: config.BASE_URL + '/IDCardCheck',
    method: 'get',
    params: query
  })
}
export function SaltCheck(query) {
  return request({
    url: config.BASE_URL + '/SaltCheck',
    method: 'get',
    params: query
  })
}

export function addmmInfo(query) {
  return request({
    url: config.BASE_URL + '/addjlServiceUser',
    method: 'post',
    params: query
  })
}
export function getNP(query) {
  return request({
    url: config.BASE_URL + '/getNP',
    method: 'get',
    params: query
  })
}
export function getProvince() {
  return request({
    url: config.BASE_URL + '/getProvince',
    method: 'get'
  })
}
export function findMM(query) {
  return request({
    url: config.BASE_URL + '/getjlServiceUser',
    method: 'get',
    params: query
  })
}
// trains
export function getAllTrains() {
  return request({
    url: config.BASE_URL + '/getAllTrains',
    method: 'get'
  })
}
export function addMMTrains(query) {
  return request({
    url: config.BASE_URL + '/addMmInfoTrain',
    method: 'POST',
    params: query
  })
}
export function findtrains(query) {
  return request({
    url: config.BASE_URL + '/getInfoTrains',
    method: 'get',
    params: query
  })
}
export function deletetrains(query) {
  return request({
    url: config.BASE_URL + '/deleteMmInfoTrain',
    method: 'get',
    params: query
  })
}
export function updatetrains(query) {
  return request({
    url: config.BASE_URL + '/updateMmInfoTrain',
    method: 'post',
    params: query
  })
}
// certificate
export function getAllcertificates() {
  return request({
    url: config.BASE_URL + '/getCertificates',
    method: 'get'
  })
}
export function addMMcertificates(query) {
  return request({
    url: config.BASE_URL + '/addMmInfoCertificate',
    method: 'POST',
    params: query
  })
}
export function findcertificates(query) {
  return request({
    url: config.BASE_URL + '/getInfoCertificates',
    method: 'get',
    params: query
  })
}
export function deletecertificates(query) {
  return request({
    url: config.BASE_URL + '/deleteMmInfoCertificate',
    method: 'get',
    params: query
  })
}
export function updatecertificates(query) {
  return request({
    url: config.BASE_URL + '/updateMmInfoCertificate',
    method: 'post',
    params: query
  })
}
// stock
export function getMmStock(query) {
  return request({
    url: config.BASE_URL + '/getMmStock',
    method: 'get',
    params: query
  })
}
export function delMmStock(query) {
  return request({
    url: config.BASE_URL + '/deleteMmStock',
    method: 'get',
    params: query
  })
}
export function getdelMMStocklist(query) { // 删除后刷新问题
  return request({
    url: config.BASE_URL + '/getdelMMStocklist',
    method: 'POST',
    params: query
  })
}
export function refMMStock(query) {
  return request({
    url: config.BASE_URL + '/refMMStock',
    method: 'get',
    params: query
  })
}
export function addMMCalendar(query) {
  return request({
    url: config.BASE_URL + '/addMmStock',
    method: 'POST',
    params: query
  })
}
export function checkStockDate(query) {
  return request({
    url: config.BASE_URL + '/checkStockDate',
    method: 'POST',
    params: query
  })
}
export function fetchArticle() {
  return request({
    url: '/article/detail',
    method: 'get'
  })
}
export function fetchPv(pv) {
  return request({
    url: '/article/pv',
    method: 'get',
    params: { pv }
  })
}
export function createArticle(data) {
  return request({
    url: '/article/create',
    method: 'post',
    data
  })
}
export function updateArticle(data) {
  return request({
    url: '/article/update',
    method: 'post',
    data
  })
}
export function getEthnicGroup() {
  return request({
    url: config.BASE_URL + '/getJlEthnicGroup',
    method: 'get'
  })
}

export function queryEditServiceUser(query) {
  return request({
    url: config.BASE_URL + '/queryEditServiceUser',
    method: 'post',
    params: query
  })
}

export function getBranches() {
  return request({
    url: config.BASE_URL + '/getBranches',
    method: 'get'
  })
}

export function getZodiac() {
  return request({
    url: config.BASE_URL + '/getZodiac',
    method: 'get'
  })
}
export function upDateStatus(query) {
  return request({
    url: config.BASE_URL + '/upDateStatus',
    method: 'post',
    params: query
  })
}
export function getConstellation() {
  return request({
    url: config.BASE_URL + '/getConstellation',
    method: 'get'
  })
}
export function updatejlServiceUser(query) {
  return request({
    url: config.BASE_URL + '/updatejlServiceUser',
    method: 'post',
    params: query
  })
}

export function uploadImg(query) {
  return request({
    url: config.BASE_URL + '/uploadImg',
    method: 'post',
    params: query
  })
}
export function getMmInfoResume(query) {
  return request({
    url: config.BASE_URL + '/getMmInfoResume',
    method: 'get',
    params: query
  })
}
export function ListImg(query) {
  return request({
    url: config.BASE_URL + '/queryPhoto',
    method: 'post',
    params: query
  })
}
export function queryPayPhoto(query) {
  return request({
    url: config.BASE_URL + '/queryPayPhoto',
    method: 'get',
    params: query
  })
}
export function queryOrderPayPhoto(query) {
  return request({
    url: config.BASE_URL + '/queryOrderPayPhoto',
    method: 'post',
    params: query
  })
}

export function deletePhoto(query) {
  return request({
    url: config.BASE_URL + '/deletePhoto',
    method: 'post',
    params: query
  })
}
export function deletePayPhoto(query) {
  return request({
    url: config.BASE_URL + '/deletePayPhoto',
    method: 'get',
    params: query
  })
}
export function deleteCustomerPayVoucherAll(query) {
  return request({
    url: config.BASE_URL + '/deleteCustomerPayVoucherAll',
    method: 'get',
    params: query
  })
}
export function deleteOrderPayPhoto(query) {
  return request({
    url: config.BASE_URL + '/deleteOrderPayPhoto',
    method: 'post',
    params: query
  })
}
export function createResume(query) {
  return request({
    url: config.BASE_URL + '/createResume',
    method: 'post',
    params: query
  })
}
export function getResumeOne(query) {
  return request({
    url: config.BASE_URL + '/getResumeOne',
    method: 'get',
    params: query
  })
}
export function lockMmStocks(query) {
  return request({
    url: config.BASE_URL + '/lockMmStocks',
    method: 'get',
    params: query
  })
}
export function insertJlServiceUserLog(query) {
  return request({
    url: config.BASE_URL + '/insertJlServiceUserLog',
    method: 'POST',
    params: query
  })
}
export function getJlServiceUserLog(query) {
  return request({
    url: config.BASE_URL + '/getJlServiceUserLog',
    method: 'get',
    params: query
  })
}
export function getjlServiceUsers() {
  return request({
    url: config.BASE_URL + '/getjlServiceUsers',
    method: 'get'
  })
}
export function JlAdminupdate(query) {
  return request({
    url: config.BASE_URL + '/JlAdminupdate',
    method: 'POST',
    params: query
  })
}
