Skip to content
Toggle navigation
Projects
Groups
Snippets
Help
saas
/
mini-program
/
hmd
This project
Loading...
Sign in
Toggle navigation
Go to a project
Project
Repository
Issues
0
Merge Requests
0
Pipelines
Wiki
Settings
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Commit d03fe8f4
authored
Jul 18, 2023
by
liimin
Browse Files
Options
Browse Files
Tag
Download
Email Patches
Plain Diff
调整api目录结构
1 parent
0119ca6d
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
48 additions
and
67 deletions
api/index.js
api/module/common.js
api/module/entmicro.js
api/module/index.js
api/index.js
View file @
d03fe8f
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
api/module/common.js
0 → 100644
View file @
d03fe8f
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
();
},
};
api/module/entmicro.js
deleted
100644 → 0
View file @
0119ca6
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
api/module/index.js
View file @
d03fe8f
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
Write
Preview
Markdown
is supported
Attach a file
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to post a comment