Commit 777f0c1b authored by mengwenhao's avatar mengwenhao

feature:图片上传格式化

parent 58b89060
......@@ -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);
};
......@@ -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)
//生活号
......
This diff is collapsed.
.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;
}
.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;
}
}
This diff is collapsed.
......@@ -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;
}
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