restapi.js
2.35 KB
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
47
48
49
50
51
52
53
54
55
56
57
58
59
60
const restapi = require('../../../utils/restapi.js');
module.exports = {
/**
* 爱车追踪-获取爱车位置
*/
getVehiclePosition: function (userId, success, fail) {
restapi.req('/web-dj-weapp/smartcar/getVehiclePosition', { userId: userId }, { 'content-type': 'application/x-www-form-urlencoded' }, 'POST', 'json', 'text', success, fail)
},
/**
* 我的里程-分页获取日里程列表
*/
getDayWheelPathList: function (obj, success, fail) {
restapi.req('/web-dj-weapp/journey/getDailyWheelPathList', obj, { 'content-type': 'application/x-www-form-urlencoded' }, 'POST', 'json', 'text', success, fail)
},
/**
* 我的里程-分页获取月里程列表
*/
getMonthWheelPathList: function (obj, success, fail) {
restapi.req('/web-dj-weapp/journey/getMonthWheelPathList', obj, { 'content-type': 'application/x-www-form-urlencoded' }, 'POST', 'json', 'text', success, fail)
},
/**
* 我的里程-获取日里程卡片信息
*/
getDailyJourneyCardInfo: function (userId, date, success, fail) {
restapi.req('/web-dj-weapp/journey/getDailyJourneyCardInfo', { userId: userId, time: date }, { 'content-type': 'application/x-www-form-urlencoded' }, 'POST', 'json', 'text', success, fail)
},
/**
* 我的里程-获取月里程卡片信息
*/
getMonthJourneyCardInfo: function (userId, date, success, fail) {
restapi.req('/web-dj-weapp/journey/getMonthJourneyCardInfo', { userId: userId, time: date }, { 'content-type': 'application/x-www-form-urlencoded' }, 'POST', 'json', 'text', success, fail)
},
/**
* 获取近四个月有轨迹的日期
*/
getJouneyDays: function (userId, success, fail) {
restapi.req('/web-dj-weapp/journey/getJouneyDays', { userId: userId }, { 'content-type': 'application/x-www-form-urlencoded' }, 'POST', 'json', 'text', success, fail);
},
/**
* 获取轨迹详情
*/
getJourneyById: function (journeyId, success, fail) {
restapi.req('/web-dj-weapp/smartcar/getJourneyById', { journeyId: journeyId }, { 'content-type': 'application/x-www-form-urlencoded' }, 'POST', 'json', 'text', success, fail);
},
/**
* 获取门店信息
*/
getMerchantById(merchantId, success) {
restapi.req('/web-dj-weapp/personal/merchant', { merchantId: merchantId }, {}, 'GET', 'json', 'text', success);
},
}