Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
O
op-web-service
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
bp
op-web-service
Commits
45347a81
Commit
45347a81
authored
Jul 07, 2021
by
pengyunqian
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'dev' of
https://git.yidian-inc.com:8021/bp/op-web-service
into pyq
parents
f067fb6d
579f3ce5
Changes
21
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
21 changed files
with
1976 additions
and
506 deletions
+1976
-506
config.js
server/config.js
+5
-25
goods.js
server/controllers/goods.js
+109
-12
router.js
server/router.js
+17
-6
pageconfig.js
src/config/pageconfig.js
+4
-4
main.js
src/main.js
+1
-1
index.vue
src/pages/Enterprise/Audit/index.vue
+2
-1
index.css
src/pages/Goods/Detail/index.css
+0
-25
index.less
src/pages/Goods/Detail/index.less
+34
-10
index.vue
src/pages/Goods/Detail/index.vue
+1125
-47
index.css
src/pages/Goods/List/index.css
+26
-0
index.less
src/pages/Goods/List/index.less
+19
-20
index.vue
src/pages/Goods/List/index.vue
+231
-184
index.vue
src/pages/Goods/Retail/index.vue
+157
-145
User.vue
src/pages/Goods/components/PageHeader/User.vue
+54
-0
config.js
src/pages/Goods/components/PageHeader/config.js
+13
-0
index.vue
src/pages/Goods/components/PageHeader/index.vue
+56
-0
index.less
src/pages/Goods/layout/index.less
+9
-0
index.vue
src/pages/Goods/layout/index.vue
+21
-0
index.js
src/router/Goods/index.js
+7
-3
index.js
src/router/index.js
+16
-16
goods.js
src/service/Goods/goods.js
+70
-7
No files found.
server/config.js
View file @
45347a81
const
env
=
process
.
env
.
NODE_ENV
||
"development"
;
const
port
=
process
.
env
.
PORT
||
8055
;
const
LOGIN_URI
=
{
development
:
"http://bp-test.ini.yidian-inc.com "
,
test
:
"http://web-rest.int.yidian-inc.com"
,
production
:
"http://web-rest.int.yidian-inc.com"
};
const
PANDORA_URI
=
{
development
:
"http://pandora.yidian-inc.com"
,
test
:
"http://pandora.yidian-inc.com"
,
...
...
@@ -14,29 +8,15 @@ const PANDORA_URI = {
};
const
API_INTERNAL_URI
=
{
development
:
"http://bp-test.ini.yidian-inc.com"
,
test
:
"http://bp-test.ini.yidian-inc.com"
,
production
:
"http://bp-test.ini.yidian-inc.com"
};
const
GOODS_URI
=
{
development
:
"http://bp-dev.ini.yidian-inc.com"
,
test
:
"http://bp-test.ini.yidian-inc.com"
,
production
:
"http://bp-test.ini.yidian-inc.com"
};
const
IDGEN_URI
=
{
development
:
"https://bp-test.go2yd.com"
,
test
:
"http://idgen-test.ini.yidian-inc.com"
,
production
:
"http://idgen-test.ini.yidian-inc.com"
};
'development'
:
"http://bp-dev.ini.yidian-inc.com"
,
'test'
:
"http://bp-test.ini.yidian-inc.com"
,
'production'
:
"http://bp.int.yidian-inc.com"
}
module
.
exports
=
{
env
:
env
,
port
:
port
,
LOGIN_URI
:
LOGIN_URI
[
env
],
API_INTERNAL_URI
:
API_INTERNAL_URI
[
env
],
PANDORA_URI
:
PANDORA_URI
[
env
],
IDGEN_URI
:
IDGEN_URI
[
env
],
GOODS_URI
:
GOODS_URI
[
env
]
GOODS_URI
:
API_INTERNAL_URI
[
env
]
};
server/controllers/goods.js
View file @
45347a81
const
GOODS_URI
=
require
(
"../config.js"
).
GOODS_URI
;
const
req
=
require
(
"../utils/request"
).
httpReq
;
/**
/**
* 示例
* exports.方法名 = async ctx => {
* const url = `${设置好的域名}/向服务端发送的请求地址`;
...
...
@@ -15,12 +15,64 @@ const req = require("../utils/request").httpReq;
* ctx.body = await req(ctx,opts); 将发送请求后的数据传递给前端页面
* };
*/
// 获取分类
exports
.
getCategoryList
=
async
ctx
=>
{
const
url
=
`
${
GOODS_URI
}
/goods/background/get_goods_category_list`
;
const
opts
=
{
url
,
method
:
"GET"
};
ctx
.
body
=
await
req
(
ctx
,
opts
);
};
// 获取商品列表
exports
.
getList
=
async
ctx
=>
{
const
url
=
`
${
GOODS_URI
}
/goods/background/get_goods_list`
;
const
opts
=
{
url
,
method
:
"GET"
,
qs
:
ctx
.
request
.
query
};
ctx
.
body
=
await
req
(
ctx
,
opts
);
};
// 商品上架
exports
.
putOnline
=
async
ctx
=>
{
const
url
=
`
${
GOODS_URI
}
/goods/background/online`
;
const
opts
=
{
url
,
method
:
"POST"
,
json
:
true
,
body
:
ctx
.
request
.
body
};
ctx
.
body
=
await
req
(
ctx
,
opts
);
};
// 商品下架
exports
.
putOffline
=
async
ctx
=>
{
const
url
=
`
${
GOODS_URI
}
/goods/background/offline`
;
const
opts
=
{
url
,
method
:
"POST"
,
json
:
true
,
body
:
ctx
.
request
.
body
};
ctx
.
body
=
await
req
(
ctx
,
opts
);
};
// 获取商品详情列表
exports
.
getGoodsInfo
=
async
ctx
=>
{
const
url
=
`
${
GOODS_URI
}
/goods/background/get_goods_info`
;
const
opts
=
{
url
,
method
:
"GET"
,
qs
:
ctx
.
request
.
query
};
ctx
.
body
=
await
req
(
ctx
,
opts
);
};
// 商品审核通过
exports
.
postSuccess
=
async
ctx
=>
{
const
opts
=
{
url
:
`
${
GOODS_URI
}
/goods/background/audit_pass`
,
method
:
"POST"
,
json
:
true
,
body
:
ctx
.
request
.
body
};
ctx
.
body
=
await
req
(
ctx
,
opts
);
};
...
...
@@ -33,12 +85,20 @@ exports.getMarketingList = async ctx => {
json
:
true
,
body
:
ctx
.
request
.
body
};
const
res
=
await
req
(
ctx
,
opts
);
console
.
log
(
res
);
ctx
.
body
=
res
;
ctx
.
body
=
await
req
(
ctx
,
opts
);
};
// 检查商品名称是否被占用
exports
.
checkGoodsName
=
async
ctx
=>
{
const
opts
=
{
url
:
`
${
GOODS_URI
}
/goods/background/check_goods_name`
,
method
:
"POST"
,
json
:
true
,
body
:
ctx
.
request
.
body
};
ctx
.
body
=
await
req
(
ctx
,
opts
);
};
// 获取查询活动列表
exports
.
getFindGoodsList
=
async
ctx
=>
{
exports
.
getFindGoodsList
=
async
ctx
=>
{
const
url
=
`
${
GOODS_URI
}
/marketing/background/goods_list`
;
const
opts
=
{
url
,
...
...
@@ -46,9 +106,19 @@ exports.getFindGoodsList = async ctx =>{
json
:
true
,
body
:
ctx
.
request
.
body
};
const
res
=
await
req
(
ctx
,
opts
);
ctx
.
body
=
res
;
ctx
.
body
=
await
req
(
ctx
,
opts
);
};
// 审核拒绝
exports
.
auditReject
=
async
ctx
=>
{
const
opts
=
{
url
:
`
${
GOODS_URI
}
/goods/background/audit_reject`
,
method
:
"POST"
,
json
:
true
,
body
:
ctx
.
request
.
body
};
ctx
.
body
=
await
req
(
ctx
,
opts
);
}
// 添加活动列表
exports
.
getAddMarketingList
=
async
ctx
=>
{
const
url
=
`
${
GOODS_URI
}
/marketing/background/add_marketing`
;
...
...
@@ -58,9 +128,27 @@ exports.getAddMarketingList = async ctx => {
json
:
true
,
body
:
ctx
.
request
.
body
};
const
res
=
await
req
(
ctx
,
opts
);
ctx
.
body
=
res
;
ctx
.
body
=
await
req
(
ctx
,
opts
);
};
// 获取门店列表
exports
.
getShopsList
=
async
ctx
=>
{
const
opts
=
{
url
:
`
${
GOODS_URI
}
/shop/background/shop_list`
,
method
:
"GET"
,
qs
:
ctx
.
request
.
query
};
ctx
.
body
=
await
req
(
ctx
,
opts
);
};
// 添加门店
exports
.
addShop
=
async
ctx
=>
{
const
opts
=
{
url
:
`
${
GOODS_URI
}
/shop/background/add_shop`
,
method
:
"POST"
,
json
:
true
,
body
:
ctx
.
request
.
body
};
ctx
.
body
=
await
req
(
ctx
,
opts
);
}
// 查看列表详情
exports
.
getMarketingInfo
=
async
ctx
=>
{
const
url
=
`
${
GOODS_URI
}
/marketing/background/marketing_info`
;
...
...
@@ -70,8 +158,17 @@ exports.getMarketingInfo = async ctx => {
json
:
true
,
body
:
ctx
.
request
.
body
};
const
res
=
await
req
(
ctx
,
opts
);
ctx
.
body
=
res
;
ctx
.
body
=
await
req
(
ctx
,
opts
);
};
// 修改商品
exports
.
editGoods
=
async
ctx
=>
{
const
opts
=
{
url
:
`
${
GOODS_URI
}
/goods/background/edit_goods`
,
method
:
"POST"
,
json
:
true
,
body
:
ctx
.
request
.
body
}
ctx
.
body
=
await
req
(
ctx
,
opts
);
};
// 开启关闭状态
exports
.
updateMarketingList
=
async
ctx
=>
{
...
...
server/router.js
View file @
45347a81
...
...
@@ -10,7 +10,7 @@ const goods = require('./controllers/goods');
const
router
=
Router
();
const
API_VERSION
=
"/api/v1"
;
router
.
get
(
'/'
,
static
.
index
)
router
.
get
(
/^
\/
op.*/
,
static
.
index
)
router
.
get
(
`
${
API_VERSION
}
/fetch_user`
,
system
.
fetch_user
);
router
.
get
(
`
${
API_VERSION
}
/user/:type`
,
user
.
query
)
...
...
@@ -38,13 +38,24 @@ router.post(`${API_VERSION}/op_commit`, enterprise.opCommit);
router
.
post
(
`
${
API_VERSION
}
/op_business_update`
,
enterprise
.
opBusinessUpdate
);
/* 商品管理 */
router
.
get
(
`
${
API_VERSION
}
/get_goods_category_list`
,
goods
.
getCategoryList
);
router
.
get
(
`
${
API_VERSION
}
/goods/background/get_goods_list`
,
goods
.
getList
);
router
.
post
(
`
${
API_VERSION
}
/goods/background/online`
,
goods
.
putOnline
);
router
.
post
(
`
${
API_VERSION
}
/goods/background/offline`
,
goods
.
putOffline
);
router
.
get
(
`
${
API_VERSION
}
/goods/background/get_goods_info`
,
goods
.
getGoodsInfo
);
router
.
post
(
`
${
API_VERSION
}
/goods/background/audit_pass`
,
goods
.
postSuccess
);
router
.
post
(
`
${
API_VERSION
}
/goods/background/check_goods_name`
,
goods
.
checkGoodsName
);
router
.
post
(
`
${
API_VERSION
}
/goods/background/audit_reject`
,
goods
.
auditReject
);
router
.
get
(
`
${
API_VERSION
}
/shop/background/shop_list`
,
goods
.
getShopsList
);
router
.
post
(
`
${
API_VERSION
}
/shop/background/add_shop`
,
goods
.
addShop
);
router
.
post
(
`
${
API_VERSION
}
/goods/background/edit_goods`
,
goods
.
editGoods
)
router
.
get
(
`
${
API_VERSION
}
/get_goods_category_list`
,
goods
.
getCategoryList
)
// 营销活动
router
.
post
(
`
${
API_VERSION
}
/get_marketing_list`
,
goods
.
getMarketingList
)
router
.
post
(
`
${
API_VERSION
}
/get_addmarketing_list`
,
goods
.
getAddMarketingList
)
router
.
post
(
`
${
API_VERSION
}
/get_find_goods_list`
,
goods
.
getFindGoodsList
)
router
.
post
(
`
${
API_VERSION
}
/get_marketing_info`
,
goods
.
getMarketingInfo
)
router
.
post
(
`
${
API_VERSION
}
/update_marketing_list`
,
goods
.
updateMarketingList
)
router
.
post
(
`
${
API_VERSION
}
/get_marketing_list`
,
goods
.
getMarketingList
)
router
.
post
(
`
${
API_VERSION
}
/get_addmarketing_list`
,
goods
.
getAddMarketingList
)
router
.
post
(
`
${
API_VERSION
}
/get_find_goods_list`
,
goods
.
getFindGoodsList
)
router
.
post
(
`
${
API_VERSION
}
/get_marketing_info`
,
goods
.
getMarketingInfo
)
router
.
post
(
`
${
API_VERSION
}
/update_marketing_list`
,
goods
.
updateMarketingList
)
//生活号
router
.
post
(
`
${
API_VERSION
}
/merchant/lifeinner/life_info`
,
life
.
get_life_info
)
router
.
get
(
`
${
API_VERSION
}
/merchant/lifeinner/life_list`
,
life
.
get_life_list
)
...
...
src/config/pageconfig.js
View file @
45347a81
...
...
@@ -4,22 +4,22 @@ export const HEADER_CONFIG = {
logo
:
'http://si1.go2yd.com/get-image/0ZAJxXeZ6iu'
,
menuItems
:
[
{
path
:
'/enterprise/certification'
,
path
:
'/
op/
enterprise/certification'
,
name
:
'企业认证管理'
,
key
:
'enterprise'
,
},
{
path
:
'/lifeNo'
,
path
:
'/
op/
lifeNo'
,
name
:
'生活号管理'
,
key
:
'lifeNo'
,
},
{
path
:
'/roleManageRole'
,
path
:
'/
op/
roleManageRole'
,
name
:
'角色管理'
,
key
:
'role'
,
},
{
path
:
'/user'
,
path
:
'/
op/
user'
,
name
:
'用户管理'
,
key
:
'user'
,
}
...
...
src/main.js
View file @
45347a81
...
...
@@ -32,7 +32,7 @@ router.beforeResolve(async (to, from, next) => {
}
if
(
!
checkPathAuth
(
to
.
path
))
{
router
.
push
(
'/403'
)
router
.
push
(
{
name
:
'Forbidden'
}
)
}
else
{
next
()
}
...
...
src/pages/Enterprise/Audit/index.vue
View file @
45347a81
...
...
@@ -196,7 +196,7 @@
<el-table-column
align=
"center"
label=
"提交时间"
prop=
"
update
_time"
prop=
"
submit
_time"
></el-table-column>
<el-table-column
align=
"center"
...
...
@@ -413,6 +413,7 @@ export default {
async
getHistory
()
{
const
res
=
await
getLog
({
enterprise_auth_record_id
:
this
.
auditId
});
if
(
res
.
code
!==
0
)
return
this
.
$message
.
error
(
res
.
reason
);
console
.
log
(
"提交历史"
,
res
);
this
.
historyList
=
[...
res
.
result
];
},
...
...
src/pages/Goods/Detail/index.css
deleted
100644 → 0
View file @
f067fb6d
.detail
{
margin-top
:
30px
;
}
.detail
.state
{
display
:
flex
;
align-items
:
center
;
}
.detail
.state
.update_time
{
margin
:
0
20px
;
}
.detail
.message
{
display
:
flex
;
}
.detail
.message
.message_form
{
width
:
50%
;
}
.detail
.message
.message_image
{
width
:
50%
;
}
.message_border
{
border
:
1px
solid
#000000
;
border-radius
:
10px
;
padding
:
30px
;
margin
:
10px
0
;
}
src/pages/Goods/Detail/index.less
View file @
45347a81
.detail {
margin-top: 30px
;
height: 100%
;
.state {
display: flex;
align-items: center;
justify-content: flex-start;
.some_state {
display: inline;
}
.update_time {
margin: 0 20px;
}
}
.message {
display: flex;
.message_form {
width: 50%;
}
.message_image {
width: 50%;
}
justify-content: flex-start;
}
}
.message_border {
border: 1px solid #000000;
border-radius: 10px;
padding: 30px;
margin: 10px 0;
}
.width50p {
width: 50%;
padding: 20px;
}
.el-textarea .el-textarea__inner {
resize: none;
}
.operationButton {
margin-top: 30px;
display: flex;
justify-content: center;
}
.deep_place {
.el-form-item__content {
display: flex;
align-items: center;
}
a {
margin-left: 10px;
text-align: center;
width: 200px;
border-radius: 20px;
color: #fff;
background-color: #199ffb;
}
}
src/pages/Goods/Detail/index.vue
View file @
45347a81
This diff is collapsed.
Click to expand it.
src/pages/Goods/List/index.css
0 → 100644
View file @
45347a81
.goods
{
width
:
100%
;
height
:
100%
;
padding
:
0
30px
;
}
.goods
.search_condition
{
display
:
flex
;
justify-content
:
space-between
;
flex-wrap
:
wrap
;
align-items
:
center
;
}
.goods
.search_condition
.search_button
{
display
:
flex
;
align-items
:
center
;
justify-self
:
flex-end
;
}
.goods
.search_condition
.search_button
.el-form-item__content
{
display
:
flex
;
justify-content
:
space-around
;
}
.goods
.commodity_list
{
margin-top
:
30px
;
}
.goods
.pagination
{
margin-top
:
30px
;
}
src/pages/Goods/List/index.less
View file @
45347a81
.list {
margin-top: 30px;
.commodity {
margin-top: 30px;
padding: 0 30px;
.search_condition {
.goods {
width: 100%;
height: 100%;
padding: 0 30px;
.search_condition {
display: flex;
justify-content: space-between;
flex-wrap: wrap;
align-items: center;
.search_button {
display: flex;
justify-content: flex-start;
flex-wrap: wrap;
align-items: center;
.search_button {
justify-self: flex-end;
.el-form-item__content {
display: flex;
align-items: center;
.el-form-item__content {
display: flex;
justify-content: space-around;
}
justify-content: space-around;
}
}
.commodity_list {
margin-top: 30px;
}
.pagination {
margin-top: 30px;
}
}
.commodity_list {
margin-top: 30px;
}
.pagination {
margin-top: 30px;
}
}
src/pages/Goods/List/index.vue
View file @
45347a81
This diff is collapsed.
Click to expand it.
src/pages/Goods/Retail/index.vue
View file @
45347a81
This diff is collapsed.
Click to expand it.
src/pages/Goods/components/PageHeader/User.vue
0 → 100644
View file @
45347a81
<
template
>
<el-dropdown>
<div
class=
"user-info"
>
<el-avatar
:src=
"userInfo.avatar || DEFAULT_AVATAR"
size=
"small"
></el-avatar>
<span
class=
"user-name"
>
{{
userInfo
.
name
}}
</span>
</div>
<template
#
dropdown
>
<el-dropdown-menu>
<el-dropdown-item>
<i
class=
"el-icon-message"
></i>
{{
userInfo
.
email
}}
</el-dropdown-item>
<el-dropdown-item>
<span><a
class=
"link"
href=
"//pandora.yidian-inc.com/"
>
返回pandora工具平台
</a></span>
</el-dropdown-item>
</el-dropdown-menu>
</
template
>
</el-dropdown>
</template>
<
script
>
import
{
mapState
}
from
'vuex'
import
{
HEADER_CONFIG
}
from
'@/config/pageconfig'
;
export
default
{
computed
:
mapState
({
userInfo
:
state
=>
(
state
.
userInfo
||
{}),
}),
data
()
{
return
{
DEFAULT_AVATAR
:
HEADER_CONFIG
.
miscellaneous
.
defaultAvatar
,
};
},
};
</
script
>
<
style
lang=
"less"
scoped
>
.user-info {
display: flex;
align-items: center;
}
.user-name {
margin-left: 12px;
color: #fff;
}
</
style
>
src/pages/Goods/components/PageHeader/config.js
0 → 100644
View file @
45347a81
const
headerConfig
=
[
{
name
:
"商品管理"
,
path
:
"/op/goods/list"
},
{
name
:
"分销"
,
path
:
"/op/goods/retail"
},
];
export
default
headerConfig
;
\ No newline at end of file
src/pages/Goods/components/PageHeader/index.vue
0 → 100644
View file @
45347a81
<
template
>
<div
id=
"pageheader"
>
<div
class=
"line"
></div>
<el-menu
class=
"header-menu"
mode=
"horizontal"
:router=
"true"
background-color=
"#545c64"
text-color=
"#fff"
:default-active=
"activeMenu"
active-text-color=
"#ffd04b"
unique-opened
>
<el-menu-item
v-for=
"item in headerConfig"
:index=
"item.path"
:key=
"item.path"
>
{{
item
.
name
}}
</el-menu-item>
<el-menu-item
key=
"usermenu"
class=
"user-menu"
>
<user></user>
</el-menu-item>
</el-menu>
</div>
</
template
>
<
script
>
import
headerConfig
from
"./config"
;
import
User
from
"./User.vue"
;
export
default
{
name
:
"PageHeader"
,
components
:
{
User
},
data
()
{
return
{
headerConfig
};
},
computed
:
{
activeMenu
()
{
return
this
.
$route
.
path
;
}
},
beforeMount
()
{
},
methods
:
{}
};
</
script
>
<
style
lang=
"less"
>
</
style
>
src/pages/Goods/layout/index.less
0 → 100644
View file @
45347a81
.layout {
display: flex;
flex-direction: column;
height: 100%;
}
.main {
flex: 1;
}
src/pages/Goods/layout/index.vue
0 → 100644
View file @
45347a81
<
template
>
<div
class=
"layout"
>
<!-- 页面公共 header -->
<page-header
class=
"page-header"
></page-header>
<!-- 页面主体部分 -->
<div
class=
"main"
>
<slot></slot>
</div>
</div>
</
template
>
<
script
>
import
PageHeader
from
'../components/PageHeader'
;
export
default
{
components
:
{
PageHeader
},
};
</
script
>
<
style
lang=
"less"
src=
"./index.less"
></
style
>
src/router/Goods/index.js
View file @
45347a81
...
...
@@ -3,17 +3,21 @@
*/
const
goodsRouters
=
[
{
path
:
"/goods/list"
,
path
:
"/op/goods"
,
redirect
:
"/op/goods/list"
},
{
path
:
"/op/goods/list"
,
name
:
"GoodsList"
,
component
:
()
=>
import
(
/* webpackChunkName: "goods" */
"@/pages/Goods/List"
)
},
{
path
:
"/goods/detail"
,
path
:
"/
op/
goods/detail"
,
name
:
"GoodsDetail"
,
component
:
()
=>
import
(
/* webpackChunkName: "goods" */
"@/pages/Goods/Detail"
)
},
{
path
:
"/goods/retail"
,
path
:
"/
op/
goods/retail"
,
name
:
"GoodsRetail"
,
component
:
()
=>
import
(
/* webpackChunkName: "goods" */
"@/pages/Goods/Retail"
)
}
...
...
src/router/index.js
View file @
45347a81
import
{
createRouter
,
createWebH
ashH
istory
}
from
"vue-router"
;
import
{
createRouter
,
createWebHistory
}
from
"vue-router"
;
import
LifeNo
from
"../pages/Life-no/index.vue"
;
import
LifeNoDetail
from
"../pages/Life-no/life-no-detail.vue"
;
...
...
@@ -13,24 +13,24 @@ import goodsRouter from "./Goods/index";
const
routes
=
[
{
path
:
"/"
,
path
:
"/
op/enterprise
"
,
redirect
:
"/enterprise/certification"
},
{
path
:
"/404"
,
path
:
"/
op/
404"
,
name
:
"NotFound"
,
component
:
()
=>
import
(
/* webpackChunkName: "enterprise" */
"@/pages/Catch/notFound"
)
},
{
path
:
"/403"
,
path
:
"/
op/
403"
,
name
:
"Forbidden"
,
component
:
()
=>
import
(
/* webpackChunkName: "enterprise" */
"@/pages/Catch/forbidden"
)
},
// 企业认证管理
{
path
:
"/enterprise/certification"
,
path
:
"/
op/
enterprise/certification"
,
name
:
"Certification"
,
component
:
()
=>
import
(
...
...
@@ -41,7 +41,7 @@ const routes = [
}
},
{
path
:
"/enterprise/audit"
,
path
:
"/
op/
enterprise/audit"
,
name
:
"Audit"
,
component
:
()
=>
import
(
/* webpackChunkName: "enterprise" */
"@/pages/Enterprise/Audit"
),
...
...
@@ -50,7 +50,7 @@ const routes = [
}
},
{
path
:
"/enterprise/establish"
,
path
:
"/
op/
enterprise/establish"
,
name
:
"Establish"
,
component
:
()
=>
import
(
...
...
@@ -62,7 +62,7 @@ const routes = [
},
//生活号管理
{
path
:
"/lifeNo"
,
path
:
"/
op/
lifeNo"
,
name
:
"LifeNo"
,
component
:
LifeNo
,
meta
:
{
...
...
@@ -70,24 +70,24 @@ const routes = [
}
},
{
path
:
"/lifeNoDetail"
,
path
:
"/
op/
lifeNoDetail"
,
name
:
"LifeNoDetail"
,
component
:
LifeNoDetail
},
//用户管理
{
path
:
"/user"
,
name
:
"User"
,
path
:
"/
op/
user"
,
name
:
"
/op/
User"
,
component
:
User
},
{
path
:
"/userDetail"
,
path
:
"/
op/
userDetail"
,
name
:
"UserDetail"
,
component
:
UserDetail
},
//角色管理
{
path
:
"/roleAddRole"
,
path
:
"/
op/
roleAddRole"
,
name
:
"AddRole"
,
component
:
AddRole
,
meta
:
{
...
...
@@ -96,7 +96,7 @@ const routes = [
}
},
{
path
:
"/roleManageRole"
,
path
:
"/
op/
roleManageRole"
,
name
:
"ManageRole"
,
component
:
ManageRole
,
meta
:
{
...
...
@@ -105,7 +105,7 @@ const routes = [
}
},
{
path
:
"/roleRoleDetail"
,
path
:
"/
op/
roleRoleDetail"
,
name
:
"RoleDetail"
,
component
:
RoleDetail
,
meta
:
{
...
...
@@ -118,7 +118,7 @@ const routes = [
console
.
log
(
routes
);
const
router
=
createRouter
({
history
:
createWebH
ashH
istory
(),
history
:
createWebHistory
(),
routes
});
...
...
src/service/Goods/goods.js
View file @
45347a81
import
axios
from
"@/utils/request"
;
// 获取商品分类
列表
export
async
function
getGoodsList
()
{
// 获取商品分类
项
export
async
function
getGoodsList
()
{
const
res
=
await
axios
.
get
(
"/api/v1/get_goods_category_list"
);
return
res
;
}
// 获取商品列表
export
async
function
getList
(
params
)
{
const
res
=
await
axios
.
get
(
"/api/v1/goods/background/get_goods_list"
,
{
params
});
return
res
;
}
// 商品上架
export
async
function
putOnline
(
query
)
{
const
res
=
await
axios
.
post
(
"/api/v1/goods/background/online"
,
{
goods_spu_id
:
query
});
return
res
;
}
// 商品下架
export
async
function
putOffline
(
query
)
{
const
res
=
await
axios
.
post
(
"/api/v1/goods/background/offline"
,
{
goods_spu_id
:
query
});
return
res
;
}
// 获取商品详情列表
export
async
function
getGoodsInfo
(
params
)
{
const
res
=
await
axios
.
get
(
"/api/v1/goods/background/get_goods_info"
,
{
params
});
return
res
;
}
// 商品详情-审核通过
export
async
function
postSuccess
(
query
)
{
const
res
=
await
axios
.
post
(
"/api/v1/goods/background/audit_pass"
,
{
goods_spu_id
:
query
});
return
res
;
}
// 审核拒绝
export
async
function
auditReject
(
query
)
{
const
res
=
await
axios
.
post
(
"/api/v1/goods/background/audit_reject"
,
query
);
return
res
;
}
// 商品详情-检查商品名称是否重复
export
async
function
checkGoodsName
(
params
)
{
const
res
=
await
axios
.
post
(
"/api/v1/goods/background/check_goods_name"
,
params
);
return
res
;
}
// 获取门店表单
export
async
function
getShopsList
(
params
)
{
const
res
=
await
axios
.
get
(
"/api/v1/shop/background/shop_list"
,
{
params
});
return
res
;
}
// 添加门店信息
export
async
function
postAddShop
(
query
)
{
const
res
=
await
axios
.
post
(
"/api/v1/shop/background/add_shop"
,
query
);
return
res
;
}
export
async
function
editGoods
(
query
)
{
const
res
=
await
axios
.
post
(
"/api/v1/goods/background/edit_goods"
,
query
);
return
res
;
}
// 获取营销活动列表
export
async
function
getMarketingList
(
params
)
{
export
async
function
getMarketingList
(
params
)
{
const
res
=
await
axios
.
post
(
"/api/v1/get_marketing_list"
,
params
);
return
res
;
}
// 获取查询商品列表
export
async
function
getFindGoodsList
(
params
)
{
export
async
function
getFindGoodsList
(
params
)
{
const
res
=
await
axios
.
post
(
"/api/v1/get_find_goods_list"
,
params
);
return
res
;
}
// 获取添加活动列表
export
async
function
getAddMarketingList
(
params
)
{
export
async
function
getAddMarketingList
(
params
)
{
const
res
=
await
axios
.
post
(
"/api/v1/get_addmarketing_list"
,
params
);
return
res
;
}
// 获取查看列表
export
async
function
getMarketingInfo
(
marketing_id
)
{
export
async
function
getMarketingInfo
(
marketing_id
)
{
const
res
=
await
axios
.
post
(
"/api/v1/get_marketing_info"
,
marketing_id
);
return
res
;
}
// 获取开启关闭
export
async
function
updateMarketingList
(
params
)
{
export
async
function
updateMarketingList
(
params
)
{
const
res
=
await
axios
.
post
(
"/api/v1/update_marketing_list"
,
params
);
return
res
;
}
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
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 comment