Commit 777f0c1b authored by mengwenhao's avatar mengwenhao

feature:图片上传格式化

parent 58b89060
...@@ -77,7 +77,7 @@ exports.postSuccess = async ctx => { ...@@ -77,7 +77,7 @@ exports.postSuccess = async ctx => {
}; };
ctx.body = await req(ctx, opts); ctx.body = await req(ctx, opts);
}; };
// 检查商品名称是否被占用
exports.checkGoodsName = async ctx => { exports.checkGoodsName = async ctx => {
const opts = { const opts = {
url: `${GOODS_URI}/goods/background/check_goods_name`, url: `${GOODS_URI}/goods/background/check_goods_name`,
...@@ -85,9 +85,9 @@ exports.checkGoodsName = async ctx => { ...@@ -85,9 +85,9 @@ exports.checkGoodsName = async ctx => {
json: true, json: true,
body: ctx.request.body body: ctx.request.body
}; };
ctx.body = req(ctx, opts); ctx.body = await req(ctx, opts);
}; };
// 审核拒绝
exports.auditReject = async ctx => { exports.auditReject = async ctx => {
const opts = { const opts = {
url: `${GOODS_URI}/goods/background/audit_reject`, url: `${GOODS_URI}/goods/background/audit_reject`,
...@@ -98,3 +98,11 @@ exports.auditReject = async ctx => { ...@@ -98,3 +98,11 @@ exports.auditReject = async ctx => {
console.log("审核驳回操作", ctx.request.body); console.log("审核驳回操作", ctx.request.body);
ctx.body = await req(ctx, opts); 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);
};
...@@ -45,7 +45,8 @@ router.post(`${API_VERSION}/goods/background/offline`, goods.putOffline); ...@@ -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.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)
//生活号 //生活号
......
This diff is collapsed.
.list { .goods {
margin-top: 30px; width: 100%;
} height: 100%;
.list .goods {
margin-top: 30px;
padding: 0 30px; padding: 0 30px;
} }
.list .goods .search_condition { .goods .search_condition {
display: flex; display: flex;
justify-content: space-between; justify-content: space-between;
flex-wrap: wrap; flex-wrap: wrap;
align-items: center; align-items: center;
} }
.list .goods .search_condition .search_button { .goods .search_condition .search_button {
display: flex; display: flex;
align-items: center; align-items: center;
justify-self: flex-end; 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; display: flex;
justify-content: space-around; justify-content: space-around;
} }
.list .goods .commodity_list { .goods .commodity_list {
margin-top: 30px; margin-top: 30px;
} }
.list .goods .pagination { .goods .pagination {
margin-top: 30px; margin-top: 30px;
} }
.list { .goods {
margin-top: 30px; width: 100%;
.goods { height: 100%;
margin-top: 30px;
padding: 0 30px; padding: 0 30px;
.search_condition { .search_condition {
display: flex; display: flex;
...@@ -24,5 +23,4 @@ ...@@ -24,5 +23,4 @@
.pagination { .pagination {
margin-top: 30px; margin-top: 30px;
} }
}
} }
<template> <template>
<div class="list">
<el-card class="goods"> <el-card class="goods">
<!-- 筛选区 --> <!-- 筛选区 -->
<el-form <el-form
...@@ -214,7 +213,6 @@ ...@@ -214,7 +213,6 @@
> >
</el-pagination> </el-pagination>
</el-card> </el-card>
</div>
</template> </template>
<style lang="less" src="./index.less" scope></style> <style lang="less" src="./index.less" scope></style>
......
...@@ -53,3 +53,8 @@ export async function checkGoodsName (params) { ...@@ -53,3 +53,8 @@ export async function checkGoodsName (params) {
); );
return res; return res;
} }
// 获取门店表单
export async function getShopsList (params) {
const res = await axios.get("api/v1/shop/background/shop_list", { params });
return res;
}
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment