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.
 

152 lines
3.2 KiB

let request = require('../../utils/request')
let baseUrl = getApp().globalData.cacheServerUrl
module.exports = {
// 查询浏览记录
getBrowseSearch(data) {
return request.xhr({
url: `api/v1/browse/search`,
method: `get`,
data
})
},
// 查询收藏记录
getCollectionSearch(data) {
return request.xhr({
url: `api/v1/collection/search`,
method: `get`,
data
})
},
/**
* 获取充值列表
*/
getCloudRechargeList() {
return request.xhr({
method: `get`,
// url: `api/product/page`
url: `api/v1/recharge`
})
},
/**
* 修改用户信息
* @param {*} data
*/
userUpdate(data) {
return request.xhr({
url: 'api/v1/user',
method: 'PUT',
data
})
},
/**
* 微信充值
*/
wxpay(id) {
return request.xhr({
url: `api/v1/wxpay/${id}`
})
},
/**
* 获取云币列表
*/
getCurrencyList(data) {
return request.xhr({
url: `api/v1/currency/search`,
data
})
},
/**
* 获取我的云币
*/
getMyCurrency() {
return request.xhr({
url: `api/v1/currency`,
})
},
// 获取识别身份证token
getAuthToken() {
return request.xhr({
url: `api/v1/auth/baidu/accesstoken`
})
},
//实名认证
autonym(data) {
return request.xhr(data)
},
/**
* 获取当前账号实名认证信息
*/
getCertification(){
return request.xhr({
url: `api/v1/certification`
})
},
/**
* 获取消息列表
*/
getMessageList(data) {
// console.log(data)
return request.xhr({
url: `api/v1/message/search`,
method:'get',
data
})
},
/**
* 未读消息记录
*/
getUnreadMessageList(data) {
// console.log(data)
return request.xhr({
url: `api/v1/message/unread`,
method:'get',
data
})
},
setmessage(){
return request.xhr({
url: `api/v1/message`,
method:'put'
})
},
// 我的发布
getmyequipment(data){
return request.xhr({
url: `api/v1/my/equipment`,
method:'get',
data
})
},
// 更改设备状态
setEquipmentState(data){
return request.xhr({
url: `api/v1/equipment/state/${data.value}/${data.id}`,
method:'put'
})
},
// y优惠卡
// 获取优惠卡
getCardintro(){
return request.xhr({
url: `api/v1/cardintro`,
method:'get',
})
},
getRecharge(){//充值列表
return request.xhr({
url: `api/v1/recharge`,
method:'get',
})
},
// 支付接口
wxpay(data){//充值列表
return request.xhr({
url: `api/v1/wxpay/${data.id}/${data.type}`,
method:'get',
})
}
}