Commit 1d5bb5c5 authored by lihui's avatar lihui

feat: 自提点

parents fa7a5964 f53b665e
......@@ -33,6 +33,28 @@ exports.pindanGoods = async ctx => {
ctx.body = await req(ctx, opts);
};
// 查看商品详情
exports.markGoodsInfo = async ctx => {
const url = `${ACTIVITY_URI}/goods/background/marketing_goods_info`;
const opts = {
url,
method: "GET"
};
ctx.body = await req(ctx, opts);
};
// 编辑商品
exports.editGoods = async ctx => {
const url = `${ACTIVITY_URI}/goods/background/edit_goods`;
const opts = {
url,
method: "POST",
json: true,
body: ctx.request.body
};
ctx.body = await req(ctx, opts);
};
// 获取活动过列表
exports.getActivityList = async ctx => {
const url = `${ACTIVITY_URI}/marketing/background/marketing_list`;
......
......@@ -76,5 +76,8 @@ router.post(`${API_VERSION}/marketing/background/delete_take_place`, activity.de
router.get(`${API_VERSION}/goods/background/ota_list`, activity.getBusinessList);
router.post(`${API_VERSION}/goods/background/add_goods`, activity.addGoods);
router.get(`${API_VERSION}/goods/background/pindan_goods`, activity.pindanGoods);
router.get(`${API_VERSION}/goods/background/marketing_goods_info`, activity.markGoodsInfo);
router.post(`${API_VERSION}/goods/background/edit_goods`, activity.editGoods);
module.exports = router;
......@@ -94,5 +94,9 @@ export default {
};
</script>
<style>
<style scoped>
.infoEditing{
width: 64%;
margin: 0 auto;
}
</style>
\ No newline at end of file
......@@ -14,7 +14,11 @@
</el-steps>
<div class="content">
<infoEditing ref="infoEdit" v-if="active === 1" />
<addProduc ref="addProduc" v-else-if="active === 2" />
<addProduc
ref="addProduc"
v-else-if="active === 2"
:editInfo="infoEditArr"
/>
<spellOrderSet v-else />
</div>
<div class="stepsBtn">
......@@ -109,12 +113,12 @@ export default {
.steps /deep/ .el-step.is-horizontal .el-step__line {
top: 25px;
}
.content,
.stepsBtn {
width: 100%;
margin: 20px auto;
}
.stepsBtn {
width: 64%;
text-align: center;
margin-top: 50px;
}
......
......@@ -21,6 +21,21 @@ export async function pindanGoods(params) {
});
return res;
}
// 查看商品详情
export async function markGoodsInfo(params) {
const res = await axios.get("/api/v1/goods/background/marketing_goods_info", {
params
});
return res;
}
// 编辑商品详情
export async function editGoods(params) {
const res = await axios.post("/api/v1/goods/background/edit_goods",params);
return res;
}
class ActivityService {
// 获取活动列表
static async getActivityList(params) {
......
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