You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 

165 lines
3.6 KiB

let request = require('../../utils/request')
module.exports = {
// /**
// *
// * @param {jsCode,userInfo} data
// */
// login(data){
// return request.xhr({
// url: `api/v1/login`,
// method: `post`,
// data
// })
// },
// getUser(){
// return request.xhr({
// url: `api/user`
// })
// }
// 获取设备分类
getEquipmentCategory() {
return request.xhr({
url: `api/v1/dict/pid/1`,
})
},
// 获取设备品牌
getEquipmentBrand() {
return request.xhr({
url: `api/v1/dict/pid/2`,
})
},
// 获取年限
getyearsList() {
return request.xhr({
url: `api/v1/dict/8/years`,
})
},
// 获取臂长
getboom_list() {
return request.xhr({
url: `api/v1/dict/pid/3`,
})
},
// 获取底盘
getchassis_list() {
return request.xhr({
url: `api/v1/dict/pid/4`,
})
},
// 获取装载方量
getvolume_list() {
return request.xhr({
url: `api/v1/dict/pid/5`,
})
},
// 获取最大传输量
getmaxtransmission_list() {
return request.xhr({
url: `api/v1/dict/pid/6`,
})
},
// 分页查询设备列表
/**
*
* @param {key,categoryId,brandId,jobId,currentPage,pageSize} data
*/
getEquipmentSearch(data) {
return request.xhr({
url: `api/v1/equipment/search`,
method: `get`,
data
})
},
// 根据id获取设备详情
getEquipmentById(id) {
return request.xhr({
url: `api/v1/equipment/${id}`,
method: `get`
})
},
/**
* 收藏
*/
addCollection(id) {
return request.xhr({
url: `api/v1/collection/add/${id}`,
method: 'post',
//data
})
},
/**
* 取消收藏
*/
cancelCollection(id) {
return request.xhr({
url: `api/v1/collection/cancel/${id}`,
method: 'PUT',
})
},
// 获取电话
getPhone(id) {
return request.xhr({
url: `api/v1/equipment/phone/${id}`,
method: `get`
// data
})
},
/**
* 刷新
*/
refreshMyJobRec(id) {
return request.xhr({
url: `api/v1/equipment/refresh/${id}`,
method: 'PUT'
})
},
/**
* 置顶
*/
upthrustTop(id) {
return request.xhr({
url: `api/v1/equipment/top/${id}`,
method: 'PUT'
})
},
// -----------------------------
// 根据code获取品牌
getgetbrand_list(data) {
return request.xhr({
url: `api/v1/dict/2/${data}`,
method: `get`
})
},
// 添加设备信息
addequipment(data) {
return request.xhr({
url: `api/v1/equipment`,
method: 'post',
data
})
},
// 编辑设备信息
eidtequipment(data){
return request.xhr({
url: `api/v1/equipment`,
method: 'put',
data
})
},
// 卖家主页,根据id查用户信息列表
getEquipmentListbyid(data){
return request.xhr({
url: `api/v1/equipment/userid`,
method: 'get',
data
})
},
// 获取最近一次发布时候的联系人和电话
get_newshowinfo(){
return request.xhr({
url: `api/v1/equipment/history`,
method: 'get'
})
}
}