结对作业05

前端和后端的连接

import request from '@/utils/request'
import qs from 'qs'

// 查询买票预览表列表
export function listBeijingsubway(query) {
  return request({
    url: '/system-manage-service/system/beijingsubway/list',
    method: 'get',
    params: query
  })
}

// 查询买票预览表详细
export function getBeijingsubway(id) {
  return request({
    url: '/system-manage-service/system/beijingsubway/getInfo',
    method: 'get',
    // URL 中的查询参数
    params: {id}
  })
}

// 新增买票预览表
export function addBeijingsubway(data) {
  return request({
    url: '/system-manage-service/system/beijingsubway/add',
    method: 'post',
    data: data
  })
}

// 修改买票预览表
export function updateBeijingsubway(data) {
  return request({
    url: '/system-manage-service/system/beijingsubway/edit',
    method: 'post',
    data: data
  })
}

// 删除买票预览表
export function delBeijingsubway(ids) {
  return request({
    url: '/system-manage-service/system/beijingsubway/remove',
    method: 'post',
    headers: {
        //关键
        'Content-Type': 'application/x-www-form-urlencoded; charset=UTF-8'
    },
    data: qs.stringify({ids}, { indices: false })
  })
}

// uniapp删除买票预览表
export function deleteBeijingsubway(ids) {
  return request({
    url: '/system-manage-service/system/beijingsubway/delete',
    method: 'post',
    headers: {
      //关键
      'Content-Type': 'application/x-www-form-urlencoded; charset=UTF-8'
    },
    data: {ids}
  })
}
import request from '@/utils/request'
import qs from 'qs'

// 查询整条线路列表
export function listLines(query) {
  return request({
    url: '/system-manage-service/system/lines/list',
    method: 'get',
    params: query
  })
}

// 查询整条线路详细
export function getLines(id) {
  return request({
    url: '/system-manage-service/system/lines/getInfo',
    method: 'get',
    // URL 中的查询参数
    params: {id}
  })
}

// 新增整条线路
export function addLines(data) {
  return request({
    url: '/system-manage-service/system/lines/add',
    method: 'post',
    data: data
  })
}

// 修改整条线路
export function updateLines(data) {
  return request({
    url: '/system-manage-service/system/lines/edit',
    method: 'post',
    data: data
  })
}

// 删除整条线路
export function delLines(ids) {
  return request({
    url: '/system-manage-service/system/lines/remove',
    method: 'post',
    headers: {
        //关键
        'Content-Type': 'application/x-www-form-urlencoded; charset=UTF-8'
    },
    data: qs.stringify({ids}, { indices: false })
  })
}

// uniapp删除整条线路
export function deleteLines(ids) {
  return request({
    url: '/system-manage-service/system/lines/delete',
    method: 'post',
    headers: {
      //关键
      'Content-Type': 'application/x-www-form-urlencoded; charset=UTF-8'
    },
    data: {ids}
  })
}
import request from '@/utils/request'
import qs from 'qs'

// 查询地铁线路和站点列表
export function listStations(query) {
  return request({
    url: '/system-manage-service/system/stations/list',
    method: 'get',
    params: query
  })
}

// 查询地铁线路和站点详细
export function getStations(id) {
  return request({
    url: '/system-manage-service/system/stations/getInfo',
    method: 'get',
    // URL 中的查询参数
    params: {id}
  })
}

// 新增地铁线路和站点
export function addStations(data) {
  return request({
    url: '/system-manage-service/system/stations/add',
    method: 'post',
    data: data
  })
}

// 修改地铁线路和站点
export function updateStations(data) {
  return request({
    url: '/system-manage-service/system/stations/edit',
    method: 'post',
    data: data
  })
}

// 删除地铁线路和站点
export function delStations(ids) {
  return request({
    url: '/system-manage-service/system/stations/remove',
    method: 'post',
    headers: {
      //关键
      'Content-Type': 'application/x-www-form-urlencoded; charset=UTF-8'
    },
    data: qs.stringify({ids}, { indices: false })
  })
}

// uniapp删除地铁线路和站点
export function deleteStations(ids) {
  return request({
    url: '/system-manage-service/system/stations/delete',
    method: 'post',
    headers: {
      //关键
      'Content-Type': 'application/x-www-form-urlencoded; charset=UTF-8'
    },
    data: {ids}
  })
}

 

posted @ 2024-04-14 16:23  艾鑫4646  阅读(4)  评论(0编辑  收藏  举报