1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
  | 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 })    // 获取字典值信息 
 |       
 |      vm.$u.api = { 
 |          getUserInfo, 
 |          wxLogin, 
 |          wxPhone, 
 |          home, 
 |          createGoodsOrderPay, 
 |          openLock, 
 |          refreshLock, 
 |          ridesDetail, 
 |          rentSiteList, 
 |          baseParamList, 
 |          uploadLocal, 
 |          saveRepair, 
 |          onlineBike, 
 |          transactionsPage, 
 |          goodsOrderSettlement, 
 |          getSysDict 
 |      }; 
 |  } 
 |    
 |  export default { install } 
 |  
  |