product.js
1.64 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
import { http } from '@/main'
const path = 'dj.api.'
const path2 = 'dj.smartcarlife.api.'
// 获取素材详情
const getProductInfo = (params) => {
params.method = `scrm.api.boutiquecoupon.rop.router.twoCityTale`
params.routerMethod = `${path}goodsinfo.get.byId`
return http({
url: 'rop-scrm-boutiquecoupon/router',
method: 'POST',
data: params,
sign: true
})
}
// 获取场景下类目
const getProductTypeBySceneId = (params) => {
params.method = `scrm.api.boutiquecoupon.rop.router.twoCityTale`
params.routerMethod = `${path}goodsCategoryConfiguration.queryGoodsCategoryBySceneId`
return http({
url: 'rop-scrm-boutiquecoupon/router',
method: 'POST',
data: params,
sign: true
})
}
// 查询产品列表
const getGoodsList = (params) => {
params.method = `scrm.api.boutiquecoupon.rop.router.twoCityTale`
params.routerMethod = `${path}goodsinfo.list`
return http({
url: 'rop-scrm-boutiquecoupon/router',
method: 'POST',
data: params,
sign: true
})
}
//查询服务商所有商品列表
const getfwsGoodsList = (params) => {
params.method = `scrm.api.partner.goods.list`
return http({
url: 'rop-scrm-partner/router',
method: 'POST',
data: params,
sign: true
})
}
// 添加自采订单
const addSelfOrder = (params) => {
params.method = `scrm.api.boutiquecoupon.rop.router.twoCityTale`
params.routerMethod = `dj.api.smarcarlife.purchaseOrder.selfAddOrEdit`
return http({
url: 'rop-scrm-boutiquecoupon/router',
method: 'POST',
data: params,
sign: true
})
}
export default { addSelfOrder,getGoodsList,getProductInfo, getProductTypeBySceneId ,getfwsGoodsList}