restapi.js
3.99 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
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
const restapi = require('../../../utils/restapi.js');
module.exports = {
/** 获取车联网+数据*/
getSmartPlusModules: function (merchantId, success, fail) {
restapi.req('/web-dj-weapp/smartplus/getSmartPlusModules', { merchantId: merchantId }, {}, 'GET', 'json', 'text', success, fail);
},
/** 获取绑定信息*/
getBindingInfo: function (merchantId, success, fail) {
restapi.req('/web-dj-weapp/home/getBindInfoByCondition', { merchantId: merchantId }, {}, 'GET', 'json', 'text', success, fail);
},
/**
* 请求设备列表
*/
getDeviceList: function (success, fail) {
restapi.req('/web-dj-weapp/smartcar/listDevice', {}, { 'content-type': 'application/x-www-form-urlencoded' }, 'POST', 'json', 'text', success, fail);
},
/**
* 切换设备
*/
checkDevice: function (presentDevice, success, failed) {
restapi.req('/web-dj-weapp/smartcar/checkDevice', presentDevice, {}, 'Get', 'json', 'text', success, failed);
},
/**
* 爱车追踪-获取爱车位置
*/
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)
},
/**
* 检查设备状态
*/
checkDeviceStatus: function (userId, success, fail) {
restapi.req('/web-dj-weapp/smartcar/checkDeviceStatus', { userId: userId }, { 'content-type': 'application/x-www-form-urlencoded' }, 'POST', 'json', 'text', success, fail);
},
/**
* 获取设备绑定信息
*/
getDeviceBindInfo: function (sourcefrom, success, fail) {
restapi.req('/web-dj-weapp/device/getBindInfo', { sourcefrom: sourcefrom }, { 'content-type': 'application/x-www-form-urlencoded' }, 'GET', 'json', 'text', success, fail)
},
/**
* 获取近四个月有轨迹的日期
*/
getJouneyDays: function (userId, success, fail) {
restapi.req('/web-dj-weapp/mileage/getJouneyDays', { userId: userId }, { 'content-type': 'application/x-www-form-urlencoded' }, 'POST', 'json', 'text', success, fail);
},
/**
* 获取车智能助手数据
*/
getSmartCarindexInfo: function (userId, success, fail) {
restapi.req('/web-dj-weapp/smartcar/getIndexInfo', { userId: userId }, {}, 'GET', 'json', 'text', success, fail);
},
/**
* 获取车智能助手应用
*/
getSmartCarApp: function (userId, success, fail) {
restapi.req('/web-dj-weapp/smartcar/getSmartCarApp', { userId: userId }, {}, 'GET', 'json', 'text', success, fail);
},
/**
* 获取门店信息
*/
getMerchantById(merchantId, success) {
restapi.req('/web-dj-weapp/personal/merchant', { merchantId: merchantId }, {}, 'GET', 'json', 'text', success);
},
/**
* 车智能跳转H5
*/
smartCarJumpToH5(redirectUrl, success, fail) {
restapi.req('/web-dj-weapp/smartcar/route', { redirectUrl: redirectUrl }, {}, 'GET', 'json', 'text', success, fail);
},
/**
* 获取小程序应用信息
* merchantId:商户号
*/
getAppInfo: function (merchantId, success, fail) {
restapi.req('/web-dj-weapp/appinfo/get', { merchantId: merchantId }, {}, 'GET', 'json', 'text', success, fail);
},
/**
* 获取车联网广告图
* merchantId:商户号
*/
getCarBanner: function (success, fail) {
restapi.req('/web-dj-weapp/smartcar/smartCarBanner', {}, {}, 'GET', 'json', 'text', success, fail);
},
/**
* 获取获取默认嘀嘀号
*/
getTempleUserID: function (success, fail) {
restapi.req('/web-dj-weapp/smartcar/getTempleUserID', {}, {}, 'GET', 'json', 'text', success, fail);
},
/** 获取车辆信息 */
getVehicles(success, fail) {
restapi.req('/web-dj-weapp/home/getVehicles', {}, {}, 'GET', 'json', 'text', success, fail)
},
/** 获取地址 */
getCarPosition(userId,success, fail) {
restapi.req('/web-dj-weapp/remoteVideo/getCarPosition', {userId: userId}, {}, 'GET', 'json', 'text', success, fail)
}
}