From 38d764a9a43c56ee5643a12cf646467496afa0c2 Mon Sep 17 00:00:00 2001 From: dengbw Date: Fri, 17 Mar 2023 13:45:58 +0800 Subject: [PATCH] =?UTF-8?q?=E6=B4=BB=E5=8A=A8=E5=8A=A0=E6=8A=A5=E5=90=8D?= =?UTF-8?q?=E9=A2=84=E7=BA=A6?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../activity/components/activity-edit.vue | 94 ++++++++++++++----- 1 file changed, 73 insertions(+), 21 deletions(-) diff --git a/src/views/sylive/activity/components/activity-edit.vue b/src/views/sylive/activity/components/activity-edit.vue index 39d819e..8b65988 100644 --- a/src/views/sylive/activity/components/activity-edit.vue +++ b/src/views/sylive/activity/components/activity-edit.vue @@ -185,6 +185,60 @@ 新增分享文案 + + + + + + + + + + + + + + + + + + + + + + +
+ +
+
@@ -264,24 +318,6 @@ 新增活动底部菜单 - - - - - - - - - - - - - - - - - - @@ -324,6 +360,7 @@ import EleImageUpload from 'ele-admin/es/ele-image-upload'; import request from '@/utils/request'; import { addActivity, updateActivity } from '@/api/sylive/activity'; + import { listGoods } from '@/api/sylive/goods'; export default { components: { TinymceEditor, @@ -359,11 +396,12 @@ serviceLink: '', bottoms: [], blacklist: 0, - signBespeak: 0, - barrageColor: 0, + signBespeak: { status: 0, title: '', content: '', itemId: '' }, + barrage: { color: 0, title: '' }, pay: { way: 1, price: '', img: [] } }; return { + goodsList: [], editVersion: false, editoption: { height: 300, @@ -433,6 +471,19 @@ } }, methods: { + /* 查询商品 */ + goodsQuery() { + if (!this.form.activityId) { + return false; + } + listGoods({ activityId: this.form.activityId, price: 0 }) + .then((list) => { + this.goodsList = list; + }) + .catch((e) => { + this.$message.error(e.message); + }); + }, /* 添加海报描述 */ addShareTitle() { this.form.shareTitle.push(''); @@ -697,6 +748,7 @@ if (this.form.shareTitle.length == 0) { this.form.shareTitle.push(''); } + this.goodsQuery(); } else { this.form.bottoms = []; this.form.bgImg = [];