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
1544be44
Commit
1544be44
authored
Jul 05, 2021
by
mengwenhao
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
feature:商品编辑完成
parent
16fadde5
Changes
4
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
208 additions
and
21 deletions
+208
-21
goods.js
server/controllers/goods.js
+21
-1
router.js
server/router.js
+3
-1
index.vue
src/pages/Goods/Detail/index.vue
+173
-18
goods.js
src/service/Goods/goods.js
+11
-1
No files found.
server/controllers/goods.js
View file @
1544be44
...
@@ -95,9 +95,9 @@ exports.auditReject = async ctx => {
...
@@ -95,9 +95,9 @@ exports.auditReject = async ctx => {
json
:
true
,
json
:
true
,
body
:
ctx
.
request
.
body
body
:
ctx
.
request
.
body
};
};
console
.
log
(
"审核驳回操作"
,
ctx
.
request
.
body
);
ctx
.
body
=
await
req
(
ctx
,
opts
);
ctx
.
body
=
await
req
(
ctx
,
opts
);
};
};
// 获取门店列表
exports
.
getShopsList
=
async
ctx
=>
{
exports
.
getShopsList
=
async
ctx
=>
{
const
opts
=
{
const
opts
=
{
url
:
`
${
GOODS_URI
}
/shop/background/shop_list`
,
url
:
`
${
GOODS_URI
}
/shop/background/shop_list`
,
...
@@ -106,3 +106,23 @@ exports.getShopsList = async ctx => {
...
@@ -106,3 +106,23 @@ exports.getShopsList = async ctx => {
};
};
ctx
.
body
=
await
req
(
ctx
,
opts
);
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
.
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
);
}
\ No newline at end of file
server/router.js
View file @
1544be44
...
@@ -46,7 +46,9 @@ router.get(`${API_VERSION}/goods/background/get_goods_info`, goods.getGoodsInfo)
...
@@ -46,7 +46,9 @@ 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/audit_pass`
,
goods
.
postSuccess
);
router
.
post
(
`
${
API_VERSION
}
/goods/background/check_goods_name`
,
goods
.
checkGoodsName
);
router
.
post
(
`
${
API_VERSION
}
/goods/background/check_goods_name`
,
goods
.
checkGoodsName
);
router
.
post
(
`
${
API_VERSION
}
/goods/background/audit_reject`
,
goods
.
auditReject
);
router
.
post
(
`
${
API_VERSION
}
/goods/background/audit_reject`
,
goods
.
auditReject
);
router
.
get
(
`
${
API_VERSION
}
/shop/background/shop_list`
,
goods
.
getShopsList
)
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
)
//生活号
//生活号
...
...
src/pages/Goods/Detail/index.vue
View file @
1544be44
This diff is collapsed.
Click to expand it.
src/service/Goods/goods.js
View file @
1544be44
...
@@ -55,6 +55,16 @@ export async function checkGoodsName (params) {
...
@@ -55,6 +55,16 @@ export async function checkGoodsName (params) {
}
}
// 获取门店表单
// 获取门店表单
export
async
function
getShopsList
(
params
)
{
export
async
function
getShopsList
(
params
)
{
const
res
=
await
axios
.
get
(
"api/v1/shop/background/shop_list"
,
{
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
;
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