common.js
1.16 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
import http from '../request/http'
module.exports = {
/**上传图片
*/
uploadImg(data) {
return http.post({
method: '/rest/upload/uploadImage',
...data
});
},
/**视频上传
*/
uploadVideo(data) {
return http.post({
method: `${common}uploadVideo`,
...data,
noSignAttr: ["file"],
});
},
/** 获取协议 */
getAgreementByKey(data) {
return http.get({method: '/rest/agreement/getAgreementByKey', ...data})
},
/** 查询车品牌(品牌-车系-车型树形结构) */
getCarBrandList() {
return http.get({method: '/rest/ropApi/getCarBrandComplete'})
},
/** 根据车系ID查询车型列表 */
getCarTypeList(csId) {
return http.get({method: '/rest/ropApi/getCarTypeList', csId});
},
/**获取图片版本号 */
getImgVersion() {
return http.getMock();
},
/**手机号密码登录 */
passwordLogin(data) {
return http.fetch('/rest/login', data)
},
/**获取用户信息 */
getLoginInfo(data) {
return http.get({method: '/rest/login/userInfo', ...data}, true)
},
/**退出登录 */
logout(data) {
return http.post({method: '/rest/login/logout', ...data})
}
};