lilishop-uniapp/api/common.js

33 lines
620 B
JavaScript
Raw Normal View History

2021-12-20 17:34:45 +08:00
/**
* 公共API
*/
import { http, Method } from "@/utils/request.js";
import api from "@/config/api.js";
/**
* 获取地区数据
* @param id
*/
export function getRegionsById(id = 0) {
return http.request({
2022-02-10 18:57:17 +08:00
url: `${api.common}/common/region/item/${id}`,
2021-12-20 17:34:45 +08:00
method: Method.GET,
message: false,
});
}
// 获取IM接口前缀
export function getIMDetail() {
return http.request({
url: `${api.common}/IM`,
method: Method.GET,
message: false,
});
}
/**
* 文件上传地址
* @type {string}
*/
2022-02-10 18:57:17 +08:00
export const upload = api.common + "/common/upload/file";