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
777f0c1b
Commit
777f0c1b
authored
Jul 01, 2021
by
mengwenhao
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
feature:图片上传格式化
parent
58b89060
Changes
7
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
7 changed files
with
475 additions
and
323 deletions
+475
-323
goods.js
server/controllers/goods.js
+11
-3
router.js
server/router.js
+2
-1
index.vue
src/pages/Goods/Detail/index.vue
+224
-80
index.css
src/pages/Goods/List/index.css
+8
-10
index.less
src/pages/Goods/List/index.less
+19
-21
index.vue
src/pages/Goods/List/index.vue
+206
-208
goods.js
src/service/Goods/goods.js
+5
-0
No files found.
server/controllers/goods.js
View file @
777f0c1b
...
...
@@ -77,7 +77,7 @@ exports.postSuccess = async ctx => {
};
ctx
.
body
=
await
req
(
ctx
,
opts
);
};
// 检查商品名称是否被占用
exports
.
checkGoodsName
=
async
ctx
=>
{
const
opts
=
{
url
:
`
${
GOODS_URI
}
/goods/background/check_goods_name`
,
...
...
@@ -85,9 +85,9 @@ exports.checkGoodsName = async ctx => {
json
:
true
,
body
:
ctx
.
request
.
body
};
ctx
.
body
=
req
(
ctx
,
opts
);
ctx
.
body
=
await
req
(
ctx
,
opts
);
};
// 审核拒绝
exports
.
auditReject
=
async
ctx
=>
{
const
opts
=
{
url
:
`
${
GOODS_URI
}
/goods/background/audit_reject`
,
...
...
@@ -98,3 +98,11 @@ exports.auditReject = async ctx => {
console
.
log
(
"审核驳回操作"
,
ctx
.
request
.
body
);
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
);
};
server/router.js
View file @
777f0c1b
...
...
@@ -45,7 +45,8 @@ 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
.
post
(
`
${
API_VERSION
}
/goods/background/audit_reject`
,
goods
.
auditReject
);
router
.
get
(
`
${
API_VERSION
}
/shop/background/shop_list`
,
goods
.
getShopsList
)
//生活号
...
...
src/pages/Goods/Detail/index.vue
View file @
777f0c1b
This diff is collapsed.
Click to expand it.
src/pages/Goods/List/index.css
View file @
777f0c1b
.list
{
margin-top
:
30px
;
}
.list
.goods
{
margin-top
:
30px
;
.goods
{
width
:
100%
;
height
:
100%
;
padding
:
0
30px
;
}
.
list
.
goods
.search_condition
{
.goods
.search_condition
{
display
:
flex
;
justify-content
:
space-between
;
flex-wrap
:
wrap
;
align-items
:
center
;
}
.
list
.
goods
.search_condition
.search_button
{
.goods
.search_condition
.search_button
{
display
:
flex
;
align-items
:
center
;
justify-self
:
flex-end
;
}
.
list
.
goods
.search_condition
.search_button
.el-form-item__content
{
.goods
.search_condition
.search_button
.el-form-item__content
{
display
:
flex
;
justify-content
:
space-around
;
}
.
list
.
goods
.commodity_list
{
.goods
.commodity_list
{
margin-top
:
30px
;
}
.
list
.
goods
.pagination
{
.goods
.pagination
{
margin-top
:
30px
;
}
src/pages/Goods/List/index.less
View file @
777f0c1b
.list {
margin-top: 30px;
.goods {
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: space-between;
flex-wrap: wrap;
align-items: center;
.search_button {
justify-self: flex-end;
.el-form-item__content {
display: flex;
align-items: center;
justify-self: flex-end;
.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 @
777f0c1b
This diff is collapsed.
Click to expand it.
src/service/Goods/goods.js
View file @
777f0c1b
...
...
@@ -53,3 +53,8 @@ export async function checkGoodsName (params) {
);
return
res
;
}
// 获取门店表单
export
async
function
getShopsList
(
params
)
{
const
res
=
await
axios
.
get
(
"api/v1/shop/background/shop_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