const install = (Vue, vm) => { uni.$u.http.setConfig((config) => { config.baseURL = vm.$baseUrl; config.timeout = 60000; return config; }) let getUserInfo = (params = {}) => uni.$u.http.get('web/account/getUserInfo', { params }) // 获取用户信息 let wxLogin = (params = {}) => uni.$u.http.get('web/account/wxLogin', { params }) // 微信授权 let wxPhone = (data = {}) => vm.$u.http.post('web/account/wxPhone', data); // 解析微信手机号 let home = (params = {}) => uni.$u.http.get('web/home/home', { params }) // 微信授权 let createGoodsOrderPay = (params = {}) => uni.$u.http.get('web/business/createGoodsOrderPay', { params }) // 押金支付 let openLock = (params = {}) => uni.$u.http.get('web/business/openLock', { params }) // 扫码解锁 let refreshLock = (params = {}) => uni.$u.http.get('web/business/refreshLock', { params }) // 刷新解锁情况 let ridesDetail = (params = {}) => uni.$u.http.get('web/business/ridesDetail', { params }) // 骑行明细 let rentSiteList = (params = {}) => uni.$u.http.get('web/business/rentSiteList', { params }) // 租车点列表 let baseParamList = (params = {}) => uni.$u.http.get('web/business/baseParamList', { params }) // 基础配置数据 let uploadLocal = (data = {}) => vm.$u.http.post('public/uploadLocal', data); // 上传服务器本地 let saveRepair = (data = {}) => vm.$u.http.post('web/business/saveRepair', data); // 车辆问题上报 let onlineBike = (params = {}) => uni.$u.http.get('web/business/onlineBike', { params }) // 查询骑行中车辆 let transactionsPage = (data = {}) => vm.$u.http.post('web/business/transactionsPage', data); // 消费明细 let goodsOrderSettlement = (params = {}) => uni.$u.http.get('web/business/goodsOrderSettlement', { params }) // 订单结算 let getSysDict = (params = {}) => uni.$u.http.get('web/business/getSysDict', { params }) // 获取字典值信息 let discountPage = (data = {}) => uni.$u.http.post('web/business/discountPage', data) // 热销套餐 let discountDetail = (params = {}) => uni.$u.http.get('web/business/discountDetail', { params }) // 套餐详情 let createDiscountOrderPay = (params = {}) => uni.$u.http.get('web/business/createDiscountOrderPay', { params }) // 套餐购买 let eleBikeList = (params = {}) => uni.$u.http.get('web/business/eleBikeList', { params }) // 查询所有电动车信息 let eleSiteList = (params = {}) => uni.$u.http.get('web/business/eleSiteList', { params }) // 电动车站点列表 let getEleBusinessArea = (params = {}) => uni.$u.http.get('web/business/getEleBusinessArea', { params }) // 获取电动车运营区域 let getBikeChargingRule = (params = {}) => uni.$u.http.get('web/business/getBikeChargingRule', { params }) // 扫码获取车辆信息 let openElecBike = (data = {}) => uni.$u.http.post('web/business/openElecBike', data) // 电车开锁 let backElecBike = (data = {}) => uni.$u.http.post('web/business/backElecBike', data) // 电车站点还车 let pauseElecBike = (data = {}) => uni.$u.http.post('web/business/pauseElecBike', data) // 电车临时停车 let pauseOpenElecBike = (data = {}) => uni.$u.http.post('web/business/pauseOpenElecBike', data) // 电车临停开锁 let login = (data = {}) => uni.$u.http.post('web/manger/login', data) // 登录管理员账号 let logout = (data = {}) => uni.$u.http.post('web/manger/logout', data) // 退出管理员账号 let pageBikes = (data = {}) => uni.$u.http.post('web/manger/pageBikes', data) // 分页查询电车列表 let updateBikeStatus = (params = {}) => uni.$u.http.get('web/manger/updateBikeStatus/batch', { params }) // 电车批量上下架 let updateLockStatus = (params = {}) => uni.$u.http.get('web/manger/updateLockStatus/batch', { params }) // 电车批量开关锁 let scanVerify = (data = {}) => uni.$u.http.post('web/douyin/scanVerify', data) // 扫码核销 let operationCenter = (params = {}) => uni.$u.http.get('web/report/operationCenter', { params }) // 运营中心数据 let operationOrderPage = (data = {}) => uni.$u.http.post('web/report/operationOrderPage', data) // 订单列表 let forceBack = (data = {}) => uni.$u.http.post('web/business/forceBack', data) // 强制还车 let getGoodsorderCanBanlanceDTO = (params = {}) => uni.$u.http.get('web/manger/getGoodsorderCanBanlanceDTO', { params }) // 获取可退款信息 let backGoodsorder = (data = {}) => uni.$u.http.post('web/manger/backGoodsorder', data) // 退款 let overview = (params = {}) => uni.$u.http.get('web/report/overview', { params }) // 概览统计:总注册用户-今日新增-自行车-电动车数量 let incomeStat = (data = {}) => uni.$u.http.post('web/report/incomeStat', data) // 收入统计 let bikeIncome = (data = {}) => uni.$u.http.post('web/report/bikeIncome', data) // 收入车型分析 let accountLogout = (data = {}) => uni.$u.http.post('web/account/logout', data) // 会员退出登录 let orderRides = (params = {}) => uni.$u.http.get('web/report/orderRides', { params }) // 订单骑行记录 vm.$u.api = { getUserInfo, wxLogin, wxPhone, home, createGoodsOrderPay, openLock, refreshLock, ridesDetail, rentSiteList, baseParamList, uploadLocal, saveRepair, onlineBike, transactionsPage, goodsOrderSettlement, getSysDict, discountPage, discountDetail, createDiscountOrderPay, eleBikeList, eleSiteList, getEleBusinessArea, getBikeChargingRule, openElecBike, backElecBike, pauseElecBike, pauseOpenElecBike, login, logout, pageBikes, updateBikeStatus, updateLockStatus, scanVerify, operationCenter, operationOrderPage, forceBack, getGoodsorderCanBanlanceDTO, backGoodsorder, overview, incomeStat, bikeIncome, accountLogout, orderRides }; } export default { install }