Commit d03fe8f4 by liimin

调整api目录结构

1 parent 0119ca6d
import http from './request/http'
import apis from './module/index'
const common = 'scrm.api.carlife.common.'
module.exports = {
...apis,
common: {
/**上传图片
*/
uploadImg(data) {
return http.post({
method: `${common}uploadImg`,
...data,
noSignAttr: ['file']
})
},
/**视频上传
*/
uploadVideo(data) {
return http.post({
method: `${common}uploadVideo`,
...data,
noSignAttr: ['file']
})
},
// /**根据sceneId 查参数 */
// getSceneById(data) {
// return http.post('dj.api.smartcarlife.common.getSceneById', data)
// },
/** 首页、发现列表 搜索接口 */
search(data) {
return http.post({
method: 'scrm.api.carlife.weapp.homeSearch.search',
pageSize: 10,
...data
})
},
/** 根据sap编码获取商户详情 */
getBySapCode(data) {
return http.post({
method: `scrm.api.carlife.merchant.getBySapCode`,
...data,
}, true)
},
/**获取图片版本号 */
getImgVersion() {
return http.getMock()
},
}
}
\ No newline at end of file
import apiModules from './module/index'
module.exports = apiModules
\ No newline at end of file
import http from '../request/http'
const common = 'scrm.api.carlife.common.'
module.exports = {
/**上传图片
*/
uploadImg(data) {
return http.post({
method: `${common}uploadImg`,
...data,
noSignAttr: ["file"],
});
},
/**视频上传
*/
uploadVideo(data) {
return http.post({
method: `${common}uploadVideo`,
...data,
noSignAttr: ["file"],
});
},
// /**根据sceneId 查参数 */
// getSceneById(data) {
// return http.post('dj.api.smartcarlife.common.getSceneById', data)
// },
/** 首页、发现列表 搜索接口 */
search(data) {
return http.post({
method: "scrm.api.carlife.weapp.homeSearch.search",
pageSize: 10,
...data,
});
},
/** 根据sap编码获取商户详情 */
getBySapCode(data) {
return http.fetch(`scrm.api.carlife.merchant.getBySapCode`,data);
},
/**获取图片版本号 */
getImgVersion() {
return http.getMock();
},
};
import http from "../request/http";
module.exports = {
// 智能名片详情
getCardDetail(data) {
// return api.post(
// {
// method: `entmicro.api.business.card.cardDetail`,
// ...data,
// },
// true
// );
return http.fetch(`entmicro.api.business.card.cardDetail`,data);
},
}
\ No newline at end of file
import wechatApi from './wechat'
import entmicroApi from './entmicro'
import userApi from './user'
import homeApi from './home'
import discoveryApi from './discovery'
......@@ -8,10 +7,10 @@ import mineApi from './mine'
import systemApi from './system'
import couponsApi from './coupons'
import equityApi from './equity'
import common from './common'
module.exports = {
wechatApi,
entmicroApi,
userApi,
homeApi,
discoveryApi,
......@@ -19,5 +18,6 @@ module.exports = {
mineApi,
systemApi,
couponsApi,
equityApi
equityApi,
common
}
\ No newline at end of file
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!