Commit f53b665e authored by your yuchenglong's avatar your yuchenglong

update:查看商品详情,编辑商品详情

parent b09f2bb6
......@@ -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`;
......
......@@ -72,5 +72,8 @@ router.post(`${API_VERSION}/marketing/background/marketing_info`, activity.check
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,7 @@
</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">
......@@ -22,8 +22,7 @@
>上一步</el-button
>
<el-button @click="next" v-show="active < 3" style="margin-right: 20px"
>下一步</el-button
>
>下一步</el-button>
<el-button @click="cancel" v-show="active == 1">取消</el-button>
<el-button @click="confirmRelease" v-show="active == 3" type="primary"
>确认发布</el-button
......@@ -109,12 +108,12 @@ export default {
.steps /deep/ .el-step.is-horizontal .el-step__line {
top: 25px;
}
.content,
.stepsBtn {
width: 64%;
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