import request from './request' import storage from './storage' //获取code export function wxgetCode(params) { return new Promise((resolve, reject) => { request.post("/user/session",params).then(result=>{ resolve(result) }).catch(err=>{ reject(err) }); }) } //登录 export function wxLogin(params) { return new Promise((resolve, reject) => { request.post("/mini/login",params).then(result=>{ resolve(result) }).catch(err=>{ reject(err) }); }) } //用户信息 export function getInfoData(){ return request.get("/getInfo") } //首页-运维工单 export function getOpsOrderOverview(stationCode){ return request.get("/mini/order/home/opsOrderOverview?stationCode=" + stationCode) } //首页-换电站供应商 export function getStationOverview(){ return request.get("/mini/station/home/stationOverview") } //下拉框-获取权限内全部站点 export function getHasStationCodeAndName(){ return request.get("/mini/station/hasStationCodeAndName") } //获取供货商列表 export function getSupplierList(params){ return request.post("/mini/supplier/list",params) } //获取站点权限内用户下拉框 export function getUserListByStationCode(stationCode){ return request.get("/system/user/getUserListByStationCode?stationCode=" + stationCode) } //工单上报 export function addOrder(params){ return request.post("/mini/order/add",params) } //个人中心首页 export function ucenterData(){ return request.post("/inquire/myData") } //个人中心联系客服 export function getService(){ return request.post("/inquire/contact/service") } //个人中心换电记录 export function exchangeRecord(params){ return request.post("/inquire/exchangeRecord",params) } //个人中心获取天数 export function getDays(){ return request.post("/user/days") } //换电记录详情 export function exchangeRecordShow(id){ return request.post(`/inquire/exchangeDetail/${id}`) } //个人中心我的车辆 export function exchangeHistoryCar(data){ return request.post("/inquire/exchangeHistorical",data) } //个人中心获取所有车辆列表 export function userCarList(data){ return request.post("/inquire/vehInfo",data) } //个人中心我的车辆详情 export function exchangeCarDetail(plate){ return request.post(`/inquire/vehDetail?plate=${plate}`) } //用stationCode获取换电编号 export function getStationExchange(params){ return request.post("/swap/getStationExchange",params) } //首页车辆信息 export function homeCar(params){ return request.post("/inquire/homeCar",params) } //首页换电站信息 export function homeStation(params){ return request.post("/inquire/homeStation",params) } //换电流程累计换电次数 export function getExchangeTimes(params){ return request.post("/exchange/record/getExchangeNum",params) } //登录用户协议 export function getAgreement(){ return request.post("/user/agreement",1) } //充电方式费率 export function chargeMethod(){ return request.get("/inquire/chargeMethod") } //充电扫码验证 export function verifyCharge(params){ return request.post("/charge/verify",params) } //个人中心充电记录 export function chargeRecord(params){ return request.post("/inquire/chargeRecord",params) } //获取指南 export function getexchangeGuide(stationCode){ return request.post(`/inquire/exchangeGuide?stationCode=${stationCode}`,) }