!7 优化楼层装修,修复结算页显示失效商品问题

Merge pull request !7 from OceansDeep/dev-gl
master
OceansDeep 2022-04-21 08:27:40 +00:00 committed by Gitee
commit 5dfcc2482c
No known key found for this signature in database
GPG Key ID: 173E9B9CA92EEF8F
21 changed files with 1132 additions and 444 deletions

View File

@ -101,7 +101,7 @@
>
<span
class="item-desc-pintuan"
v-if="promotionMap['FULL_DISCOUNT'].fullRate"
v-if="promotionMap['FULL_DISCOUNT'].fullRate && promotionMap['FULL_DISCOUNT'].fullRateFlag"
>{{ promotionMap["FULL_DISCOUNT"].fullMoney }}立享{{
promotionMap["FULL_DISCOUNT"].fullRate
}}</span

View File

@ -287,7 +287,7 @@ export default {
},
filterOrderStatus (status) { //
const ob = this.orderStatusList.filter(e => { return e.status === status });
return ob[0].name
return ob && ob[0] ? ob[0].name : status
}
}
};

View File

@ -92,7 +92,7 @@
<div class="goods-list">
<div
class="goods-item"
v-for="(goods, goodsIndex) in shop.skuList"
v-for="(goods, goodsIndex) in shop.checkedSkuList"
:key="goodsIndex"
>
<span

View File

@ -41,7 +41,7 @@ export const getPromotionGoods = (promotionId, params) => {
// 获取当前进行中的促销活动
export const getAllPromotion = params => {
return getRequest("/promotion/current", params);
return getRequest("/promotion/promotion/current", params);
};
// 获取拼团数据

Binary file not shown.

After

Width:  |  Height:  |  Size: 270 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 266 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 271 B

View File

@ -1,16 +1,24 @@
<template>
<div class="wrapper">
<Tabs :value="wap[0].title" class="tabs">
<TabPane :label="item.title" :name="item.title" @click="clickTag(item, i)" v-for="(item, i) in wap" :key="i">
<component ref="lili-component" :is="templateWay[item.name]" @selected="
(val) => {
changed = val;
}
" />
<TabPane
:label="item.title"
:name="item.title"
@click="clickTag(item, i)"
v-for="(item, i) in wap"
:key="i"
>
<component
ref="lili-component"
:is="templateWay[item.name]"
@selected="
(val) => {
changed = val;
}
"
/>
</TabPane>
</Tabs>
</div>
</template>
<script>
@ -27,7 +35,7 @@ export default {
changed: "", //
selected: 0, //
selectedLink: "", //
wap // tab
wap, // tab
};
},
watch: {
@ -44,7 +52,9 @@ export default {
});
this.wap.forEach((item) => {
item.selected = false;
if (item) {
item.selected = false;
}
});
},
methods: {},

View File

@ -1,9 +1,14 @@
<template>
<div class="wrapper">
<div class="list">
<div class="list-item" @click="clickPromotion(item,index)" v-for="(item,index) in Object.keys(promotionList)" :key="index" :class="{active:selectedIndex == index}">
{{ typeOption[item].title}}
<div
class="list-item"
v-for="(item, index) in Object.keys(promotionList)"
:key="index"
@click="clickPromotion(item, index)"
:class="{ active: selectedIndex == index }"
>
{{ typeOption(item).title }}
</div>
<!-- <div class="list-item" >暂无活动</div> -->
@ -19,15 +24,30 @@
</div> -->
<div class="tables">
<Table
height="350"
border
tooltip
:loading="loading"
:columns="activeColumns"
:data="showPromotionList"
></Table>
<Table height="350" border tooltip :loading="loading" :columns="activeColumns" :data="showPromotionList"></Table>
<Page @on-change="(val) => {params.pageNumber = val; } " :current="params.pageNumber" :page-size="params.pageSize" class="mt_10" :total="Number(totals)" size="small" show-elevator />
<Page
@on-change="
(val) => {
params.pageNumber = val;
}
"
:current="params.pageNumber"
:page-size="params.pageSize"
class="mt_10"
:total="Number(totals)"
size="small"
show-elevator
/>
</div>
</div>
</div>
</div>
</template>
@ -47,11 +67,13 @@ export default {
selectedIndex: 0, //
promotions: "", //key
index: 999, //
params: { //
params: {
//
pageNumber: 1,
pageSize: 10,
},
pintuanColumns: [ //
pintuanColumns: [
//
{
title: "活动标题",
key: "title",
@ -89,7 +111,7 @@ export default {
"Button",
{
props: {
type: this.index == params.index ? "primary" : "",
// type: this.index == params.index ? "primary" : "",
size: "small",
},
on: {
@ -147,7 +169,7 @@ export default {
{
style: {},
},
this.$options.filters.unitPrice(params.row.price, '¥')
this.$options.filters.unitPrice(params.row.price, "¥")
);
},
},
@ -181,13 +203,12 @@ export default {
"Button",
{
props: {
type: this.index == params.index ? "primary" : "",
// type: this.index == params.index ? "primary" : "",
size: "small",
},
on: {
click: () => {
this.selectedPromotion(params);
console.log(this.index)
},
},
},
@ -233,7 +254,7 @@ export default {
"Button",
{
props: {
type: this.index == params.index ? "primary" : "",
// type: this.index == params.index ? "primary" : "",
size: "small",
},
on: {
@ -252,62 +273,6 @@ export default {
promotionData: "", //
showPromotionList: [], //
typeOption: { //
FULL_DISCOUNT: {
title: "满减",
methodsed: () => {
this.showPromotionList = [];
this.activeColumns = this.pintuanColumns;
this.params.promotionType = "FULL_DISCOUNT";
this.sortGoods("FULL_DISCOUNT");
},
},
PINTUAN: {
title: "拼团",
methodsed: (id) => {
this.showPromotionList = [];
this.activeColumns = this.pintuanColumns;
this.params.promotionType = "PINTUAN";
this.sortGoods("PINTUAN");
},
},
SECKILL: {
title: "秒杀",
methodsed: () => {
this.showPromotionList = [];
this.activeColumns = this.seckillColumns;
this.params.seckillId = this.promotionList["SECKILL"].id;
delete this.params.promotionType;
getPromotionSeckill(this.params).then((res) => {
delete this.params.seckillId;
this.showPromotionList = this.showPromotionList.concat(
res.result.records
);
this.totals = res.result.total;
console.log(this.totals);
});
},
},
COUPON: {
title: "优惠券",
methodsed: () => {
this.showPromotionList = [];
this.params.promotionType = "COUPON";
this.sortGoods("COUPON");
},
},
POINTS_GOODS: {
title: "积分商品",
methodsed: () => {
this.showPromotionList = [];
this.params.promotionType = "POINTS_GOODS";
this.sortGoods("POINTS_GOODS");
},
},
},
};
},
mounted() {
@ -317,8 +282,8 @@ export default {
params: {
handler() {
this.index = 999;
this.typeOption[this.promotions] &&
this.typeOption[this.promotions].methodsed();
this.typeOption(this.promotions) &&
this.typeOption(this.promotions).methodsed();
},
deep: true,
},
@ -326,30 +291,76 @@ export default {
methods: {
sortGoods(type) {
this.loading = true;
this.loading = false;
this.params.pageNumber - 1;
getPromotionGoods(this.promotionList[type].id, this.params).then(
(res) => {
this.loading = false;
if (res.result) {
this.$nextTick(() => {
this.showPromotionList = this.showPromotionList.concat(
res.result.records
);
console.log(this.totals);
this.totals = res.result.total;
});
}
}
);
this.showPromotionList = this.promotionList[type];
},
typeOption(type) {
//
switch (type) {
case "FULL_DISCOUNT":
return {
title: "满减",
methodsed: () => {
this.showPromotionList = [];
this.activeColumns = this.pintuanColumns;
this.sortGoods("FULL_DISCOUNT");
},
};
case "PINTUAN":
return {
title: "拼团",
methodsed: (id) => {
this.showPromotionList = [];
this.activeColumns = this.pintuanColumns;
this.sortGoods("PINTUAN");
},
};
case "KANJIA":
return {
title: "砍价",
methodsed: (id) => {
this.showPromotionList = [];
this.activeColumns = this.pintuanColumns;
this.sortGoods("KANJIA");
},
};
case "SECKILL":
return {
title: "秒杀",
methodsed: () => {
this.showPromotionList = [];
this.activeColumns = this.seckillColumns;
this.sortGoods("SECKILL");
},
};
case "COUPON":
return {
title: "优惠券",
methodsed: () => {
this.showPromotionList = [];
this.sortGoods("COUPON");
},
};
case "POINTS_GOODS":
return {
title: "积分商品",
methodsed: () => {
this.showPromotionList = [];
this.sortGoods("POINTS_GOODS");
},
};
default:
return {};
}
},
//
selectedPromotion(val) {
console.log(val);
val.row.___type = "marketing";
val.row.___promotion = this.promotions;
this.$emit("selected", [val.row]);
console.log([val.row]);
this.index = val.index;
},
@ -359,19 +370,22 @@ export default {
if (res.success) {
this.loading = false;
this.getPromotion(res);
this.clickPromotion(this.typeOption[Object.keys(res.result)[0]], 0);
// this.clickPromotion(this.typeOption[Object.keys(res.result)[0]], 0);
} else {
this.loading = false;
}
},
getPromotion(res) {
this.promotionList = res.result;
if (Object.keys(res.result).length) {
this.typeOption[Object.keys(res.result)[0]].methodsed(
this.promotionList[Object.keys(res.result)[0]].id
);
if (res.result) {
this.promotionList = res.result;
this.typeOption(Object.keys(res.result)[0]).methodsed();
}
// if (Object.keys(res.result).length) {
// this.typeOption[Object.keys(res.result)[0]].methodsed(
// this.promotionList[Object.keys(res.result)[0]].id
// );
// }
},
//
@ -379,8 +393,8 @@ export default {
this.promotions = val;
this.selectedIndex = i;
this.params.pageNumber = 1;
this.typeOption[val] &&
this.typeOption[val].methodsed(this.promotionList[val].id);
this.typeOption(val) &&
this.typeOption(val).methodsed(this.promotionList[val].id);
},
},
};

View File

@ -1,24 +1,33 @@
<template>
<div>
<Row :gutter="30">
<Col span="6" v-for="(item,index) in linkList" :key="index" v-if="(item.title !== '拼团频道' && item.title !== '签到') || $route.name !== 'renovation'">
<div class="card" :class="{'active':selectedIndex == index}" @click="handleLink(item,index)">
<Col
span="4"
v-for="(item, index) in linkList"
:key="index"
v-if="
(item.title !== '拼团频道' && item.title !== '签到') ||
$route.name !== 'renovation'
"
>
<div
class="card"
:class="{ active: selectedIndex == index }"
@click="handleLink(item, index)"
>
<Icon size="24" :type="item.icon" />
<p>{{item.title}}</p>
<p>{{ item.title }}</p>
</div>
</Col>
<!-- 外部链接只有pc端跳转 -->
<Col span="6" v-if="$route.name === 'renovation'">
<div class="card" :class="{'active':selectedIndex == linkList.length}" @click="handleLink(linkItem,linkList.length)">
<Poptip v-model="linkVisible">
<Icon size="24" :type="linkItem.icon" />
<p>{{linkItem.title}}</p>
<div slot="title">链接地址</div>
<div slot="content">
<Input type="text" @keyup="handleLink(linkItem,linkList.length)" v-model="linkItem.url" placeholder="https://"></Input>
</div>
</Poptip>
<Col span="4">
<div
class="card"
:class="{ active: selectedIndex == linkList.length }"
@click="handleLink(linkItem, linkList.length)"
>
<Icon size="24" :type="linkItem.icon" />
<p>{{ linkItem.title }}</p>
</div>
</Col>
</Row>
@ -28,7 +37,8 @@
export default {
data() {
return {
linkList: [ //
linkList: [
//
{
title: "首页",
icon: "md-home",
@ -89,13 +99,12 @@ export default {
icon: "ios-basket",
___type: "point",
},
],
linkItem: {
title: "外部链接",
icon: "ios-link",
___type: "link",
url: ''
url: "",
},
linkVisible: false, //
selectedIndex: 9999999, // index
@ -103,14 +112,9 @@ export default {
},
methods: {
handleLink(val, index) {
val = {...val,___type:'other'}
val = { ...val, ___type: "other" };
this.selectedIndex = index;
if (index === this.linkList.length) {
this.linkVisible = true
} else {
this.linkVisible = false
}
this.$emit("selected",[val])
this.$emit("selected", [val]);
},
},
};
@ -132,8 +136,8 @@ export default {
}
border: 1px solid #ededed;
}
.card:hover{
background: #ededed;
.card:hover {
background: #ededed;
}
.active {
background: #ededed;

View File

@ -3,7 +3,9 @@ import * as API_Other from "@/api/other";
// 获取楼层装修信息
export function initData(id) {
API_Other.getHomeData(id).then(res => {
debugger
homeData = res;
console.log(res)
});
}
@ -11,9 +13,10 @@ export let homeData = {};
/**
* drawer:true 广告右侧打开抽屉中显示
* drawerPromotions:true 广告右侧打开抽屉中显示
* ad_drawer:true 活动魔方右侧显示
* notAdd: true 没有添加按钮
* notLink: true 没有接功能
* notLink: true 没有接功能
* notImg: true 没有选择图片功能
* close:true 右侧关闭按钮
*/
@ -81,14 +84,20 @@ export const modelData = [
type: "title",
name: "标题栏",
img: "md-image",
// notTitle:true,
notAdd: true,
notLink: true,
notImg: true,
options: {
list: [
{
title: "标题",
color: "#000000"
color: "#fff",
title1: '领取',
color1: "#fff",
bk_color: "#FF0000",
textAlign: "center",
link: "",
url: ''
}
]
}
@ -469,22 +478,22 @@ export const modelData = [
{
title: "精选",
desc: "电子推荐",
___index:0,
___index: 0,
},
{
title: "实惠",
desc: "便宜好货",
___index:1,
___index: 1,
},
{
title: "进口",
desc: "国际自营",
___index:2,
___index: 2,
},
{
title: "推荐",
desc: "喂奶推荐",
___index:3,
___index: 3,
}
],
listWay: [
@ -494,7 +503,7 @@ export const modelData = [
title:
" 微软 (Microsoft) Xbox 无线控制器/手柄 湛蓝色 | 3.5mm耳机接口蓝牙连接 Xbox主机电脑平板通用",
type: "精选",
___index:0
___index: 0
},
{
img: "https://i.loli.net/2020/12/05/c9mptI5Pg8qJ6ny.png",
@ -502,69 +511,106 @@ export const modelData = [
"宏碁(acer) DP高清线1.2版 2K*4KDisplayPort公对公接线笔记本电脑显卡连接显示器视频线1.5米",
price: "190",
type: "精选",
___index:0
___index: 0
},
]
}
]
}
},
{
type: "notice",
name: "公告",
img: "md-image",
notAdd: false,
notLink: true,
notImg: true,
options: {
list: [
{
title: [{context: "这是一条公告"}],
color: "#666",
bk_color: "#FFF",
img: 'http://files.sxcfx.cn/upload/20220318/71e5d27aca82aeedf647052e1e4ceaaa.png'
}
]
}
},
{
type: "promotions",
name: "促销活动",
img: "md-image",
notAdd: true,
notLink: true,
notImg: true,
close: true,
options: {
list: []
}
},
{
notAdd: true,
notImg: true,
notLink: true,
drawerPromotions: true,
type: "promotionDetail",
promotionsType: "PINTUAN",
name: "拼团活动",
subBkColor: "#e1212b",
subName: "惊喜折扣",
subColor: "#fff",
img: "md-image",
options: {
list: []
}
},
{
notAdd: true,
notImg: true,
notLink: true,
drawerPromotions: true,
type: "promotionDetail",
promotionsType: "LIVE",
name: "直播活动",
subBkColor: "#e1212b",
subName: "优惠好价",
subColor: "#fff",
img: "md-image",
options: {
list: []
}
},
{
notAdd: true,
notImg: true,
notLink: true,
drawerPromotions: true,
type: "promotionDetail",
promotionsType: "SECKILL",
name: "秒杀活动",
subBkColor: "#e1212b",
subName: "x点场",
subColor: "#fff",
img: "md-image",
options: {
list: []
}
},
{
notAdd: true,
notImg: true,
notLink: true,
drawerPromotions: true,
type: "promotionDetail",
promotionsType: "KANJIA",
name: "砍价活动",
subBkColor: "#e1212b",
subName: "超值好物",
subColor: "#fff",
img: "md-image",
options: {
list: []
}
}
// TODO 第一版本隐藏暂无此功能
// {
// notAdd: true,
// notImg: true,
// type: "joinGroup",
// name: "拼团活动",
// img: "md-image",
// options: {
// list: [
// {
// title: "测试拼团"
// }
// ]
// }
// },
// {
// notAdd: true,
// notImg: true,
// type: "integral",
// name: "积分活动",
// img: "md-image",
// options: {
// list: [
// {
// title: "测试积分"
// }
// ]
// }
// },
// {
// notAdd: true,
// notImg: true,
// type: "spike",
// name: "秒杀活动",
// img: "md-image",
// options: {
// list: [
// {
// title: "测试秒杀"
// }
// ]
// }
// },
// {
// notAdd: true,
// notImg: true,
// type: "group",
// name: "团购活动",
// img: "md-image",
// options: {
// list: [
// {
// title: "测试团购"
// }
// ]
// }
// }
];

View File

@ -1,117 +1,163 @@
/deep/ .ivu-modal-mask,.ivu-modal-wrap{
/deep/ .ivu-modal-mask,
.ivu-modal-wrap {
z-index: 800;
}
.decorate-view-link{
font-size: 12px;
margin: 0 4px;
color: #999;
.decorate-view-link {
font-size: 12px;
margin: 0 4px;
color: #999;
}
.decorate-view-style {
border: 1px solid #ededed;
background: #f7f7fa;
text-align: center;
width: 100%;
padding: 30px 0 0 0;
margin-bottom: 20px;
cursor: pointer;
> .select-style {
background: #ededed;
padding: 15px 0;
font-size: 15px;
}
}
.decorate-border {
border: 1px solid #ededed;
margin: 10px 0;
padding: 0 10px;
}
.drawer {
width: 100%;
display: flex;
flex-wrap: wrap;
> .drawer-item {
cursor: pointer;
border: 1px solid #ededed;
background: #f9f0ff;
width: 170px;
margin-right: 14px;
color: #9254de;
margin-bottom: 14px;
border-radius: 0.8em;
height: 60px;
display: flex;
align-items: center;
flex-direction: column;
justify-content: center;
}
}
.hidden-input {
display: none;
}
.decorate {
padding: 0 20px;
height: calc(100vh - 120px);
overflow-y: auto;
padding-bottom: 120px;
}
.decorate-title {
height: 50px;
line-height: 50px;
font-weight: bold;
}
.decorate-list {
overflow: hidden;
}
.decorate-view {
display: flex;
margin: 20px 0;
align-items: center;
}
.decorate-item-box {
background: #fff;
padding: 10px;
border: 1px solid #ededed;
}
.decorate-item-title {
height: 40px;
display: flex;
align-items: center;
justify-content: space-between;
line-height: 40px;
padding: 0 10px;
}
.decorate-view-title {
margin-right: 10px;
}
.decorate-item {
border: 1px solid #ededed;
background: #f7f7fa;
text-align: center;
width: 100%;
padding: 30px 0 0 0;
margin-bottom: 20px;
cursor: pointer;
>.select-style {
background: #ededed;
border-top-left-radius: 0.4em;
margin-bottom: 20px;
border-top-right-radius: 0.4em;
padding: 15px 0;
font-size: 15px;
}
.show-image {
max-width: 50px;
}
.tips {
font-size: 12px;
color: #999;
> span {
color: $theme_color;
}
}
.selectBtn {
margin-left: 10px;
}
.bing-goods-list {
}
.decorate-border {
border: 1px solid #ededed;
margin: 10px 0;
padding: 0 10px;
}
.drawer {
width: 100%;
display: flex;
flex-wrap: wrap;
>.drawer-item {
cursor: pointer;
border: 1px solid #ededed;
background: #f9f0ff;
width: 170px;
margin-right: 14px;
color: #9254de;
margin-bottom: 14px;
border-radius: 0.8em;
height: 60px;
display: flex;
> .bing-goods-item {
width: 50px;
height: 50px;
> img {
width: 100%;
height: 100%;
display: block;
}
align-items: center;
flex-direction: column;
justify-content: center;
}
}
.hidden-input {
display: none;
}
.decorate {
padding: 0 20px;
height: calc(100vh - 120px);
overflow-y: auto;
padding-bottom: 120px;
}
.decorate-title {
height: 50px;
line-height: 50px;
font-weight: bold;
}
.decorate-list {
overflow: hidden;
}
.decorate-view {
display: flex;
margin: 12px 0;
align-items: center;
}
.decorate-item-box {
background: #fff;
padding: 10px;
border: 1px solid #ededed;
}
.decorate-item-title {
height: 40px;
display: flex;
align-items: center;
justify-content: space-between;
line-height: 40px;
padding: 0 10px;
}
.decorate-view-title {
margin-right: 10px;
}
.decorate-item {
background: #ededed;
border-top-left-radius: 0.4em;
margin-bottom: 20px;
border-top-right-radius: 0.4em;
}
.show-image {
max-width: 50px;
}
.tips {
font-size: 12px;
color: #999;
>span {
color: $theme_color;
}
}
.selectBtn {
margin-left: 10px;
}
.bing-goods-list {
display: flex;
>.bing-goods-item {
width: 50px;
height: 50px;
>img {
width: 100%;
height: 100%;
display: block;
}
}
}
.align-text {
width: 30px;
height: 30px;
display: block;
}
.card-box {
display: flex;
}
.decorate-notice {
margin-top: 10px;
}
.card {}
.card:hover {
background: #ededed;
}
.active {
background: #ededed;
}

View File

@ -6,11 +6,24 @@
style="margin-left: 20px"
size="small"
ghost
v-if="res.type == 'tpl_ad_list' || res.type == 'tpl_activity_list' || res.drawer"
v-if="
res.type == 'tpl_ad_list' ||
res.type == 'tpl_activity_list' ||
res.drawer
"
type="primary"
@click="selectStyle()"
>选择风格</Button
>
<Button
style="margin-left: 20px"
size="small"
ghost
v-if="res.type == 'promotions' || res.drawerPromotions"
type="primary"
@click="selectPromotions()"
>选择促销活动</Button
>
</div>
<!-- 右侧显示抽屉 -->
@ -29,17 +42,48 @@
</div>
</Drawer>
<!-- 右侧显示抽屉 -->
<Drawer
title="选择促销活动(最多只能展示两个活动)"
:closable="false"
width="400"
v-model="promotionsFlag"
>
<div class="drawer">
<div
class="drawer-item"
@click="clickDrawer(item, index)"
v-for="(item, index) in modelData"
:key="index"
v-if="item.drawerPromotions"
>
<img src alt />
<span>{{ item.name }}</span>
</div>
</div>
</Drawer>
<!-- 卡片集合 -->
<div
class="decorate-list"
v-if="(res.type != 'tpl_ad_list' && res.type != 'tpl_activity_list') || res.drawer"
v-if="
(res.type != 'tpl_ad_list' &&
res.type != 'tpl_activity_list' &&
res.type != 'promotions') ||
res.drawer ||
res.drawerPromotions
"
>
<div class="decorate-item" v-for="(item, index) in res.options.list" :key="index">
<div
class="decorate-item"
v-for="(item, index) in res.options.list"
:key="index"
>
<div class="decorate-item-title">
<div>卡片</div>
<Icon
@click="closeDecorate(index)"
v-if="res.close"
v-if="res.close || res.type == 'promotionDetail'"
size="20"
color="#e1251b"
type="md-close-circle"
@ -77,14 +121,19 @@
title_item.___index == bindGoods.___index ||
title_item.title == bindGoods.type
"
v-for="(bindGoods, bindGoodsIndex) in res.options.list[0].listWay"
v-for="(bindGoods, bindGoodsIndex) in res.options.list[0]
.listWay"
:key="bindGoodsIndex"
>
{{ bindGoods.title }},
</div>
</div>
<div>
<Button @click="bindGoodsId(title_item)" size="small" ghost type="primary"
<Button
@click="bindGoodsId(title_item)"
size="small"
ghost
type="primary"
>选择商品</Button
>
</div>
@ -111,18 +160,137 @@
>
</div>
</div>
<div
class="decorate-view"
v-if="item.title != void 0 && !res.notTitle && res.type == 'title'"
>
<div class="decorate-view-title">文字对齐方式</div>
<div class="card-box">
<div
class="card"
:class="{ active: textAlign == 'left' }"
@click="changeTextAlign('left')"
>
<img
:src="require('@/assets/align-text-left.png')"
class="align-text"
alt=""
/>
</div>
<div
class="card"
:class="{ active: textAlign == 'center' }"
@click="changeTextAlign('center')"
>
<img
:src="require('@/assets/align-text-center.png')"
class="align-text"
alt=""
/>
</div>
<!-- <div
class="card"
:class="{ active: textAlign == 'right' }"
@click="changeTextAlign('right')"
>
<img
:src="require('@/assets/align-text-right.png')"
class="align-text"
alt=""
/>
</div> -->
</div>
</div>
<div
class="decorate-view"
v-if="
item.title != void 0 &&
!res.notTitle &&
(res.type == 'title' ||
res.type == 'notice' ||
res.type == 'promotionDetail')
"
>
<div class="decorate-view-title">背景颜色</div>
<div class="decorate-view">
<ColorPicker v-model="item.bk_color" />
<Input v-model="item.bk_color" />
</div>
</div>
<!-- 填写标题 -->
<div class="decorate-view" v-if="item.title != void 0 && !res.notTitle">
<div
class="decorate-view"
v-if="item.title != void 0 && !res.notTitle && res.type != 'notice'"
>
<div class="decorate-view-title">菜单标题</div>
<div>
<Input v-model="item.title" style="width: 200px" />
</div>
</div>
<div
class="decorate-view"
v-if="
item.title != void 0 &&
!res.notTitle &&
(res.type == 'title' || res.type == 'notice')
"
>
<div class="decorate-view-title">标题颜色</div>
<div class="decorate-view">
<ColorPicker v-model="item.color" />
<Input v-model="item.color" />
</div>
</div>
<!-- 填写小标题 -->
<div
class="decorate-view"
v-if="item.title1 != void 0 && !res.notTitle"
>
<div class="decorate-view-title">小标题</div>
<div>
<Input v-model="item.title1" style="width: 200px" />
</div>
</div>
<div
class="decorate-view"
v-if="item.title1 != void 0 && !res.notTitle"
>
<div class="decorate-view-title">小标题颜色</div>
<div class="decorate-view">
<ColorPicker v-model="item.color1" />
<Input v-model="item.color1" />
</div>
</div>
<div
class="decorate-view"
v-if="res.type === 'notice' && !res.notTitle"
>
<div class="decorate-view-title">公告内容</div>
<div>
<div
v-for="(t, tindex) in item.title"
:key="tindex"
class="decorate-notice"
>
<Input v-model="t.context" style="width: 200px" />
<Icon
@click="removeNotice(tindex)"
size="16"
type="md-close-circle"
/>
</div>
</div>
</div>
<!-- 填写链接 -->
<div class="decorate-view" v-if="!res.notLink">
<div class="decorate-view-title">选择链接</div>
<div v-if="item.url.length != 0" class="decorate-view-link">
<div
v-if="item.url && item.url.length != 0"
class="decorate-view-link"
>
已选链接
<span>
@ -133,38 +301,73 @@
}}
-
<!-- 当选择完链接之后的商品名称 -->
<span v-if="item.url.___type == 'goods'"> {{ item.url.goodsName }}</span>
<span v-if="item.url.___type == 'goods'">
{{ item.url.goodsName }}</span
>
<!-- 当选择完链接之后的分类回调 -->
<span v-if="item.url.___type == 'category'"> {{ item.url.name }}</span>
<span v-if="item.url.___type == 'category'">
{{ item.url.name }}</span
>
<!-- 当选择完链接之后的店铺回调 -->
<span v-if="item.url.___type == 'shops'"> {{ item.url.memberName }}</span>
<span v-if="item.url.___type == 'shops'">
{{ item.url.memberName }}</span
>
<!-- 当选择完链接之后的其他回调 -->
<span v-if="item.url.___type == 'other'"> {{ item.url.title }}</span>
<span v-if="item.url.___type == 'other'">
{{ item.url.title }}</span
>
<!-- 当选择完活动之后的其他回调 -->
<span v-if="item.url.___type == 'marketing'">
<span v-if="item.url.___promotion == 'SECKILL'"> </span>
<span v-if="item.url.___promotion == 'FULL_DISCOUNT'"> </span>
<span v-if="item.url.___promotion == 'FULL_DISCOUNT'">
满减
</span>
<span v-if="item.url.___promotion == 'PINTUAN'"> </span>
{{ item.url.title || item.url.goodsName }}
</span>
<!-- 当选择完活动之后的其他回调 -->
<span v-if="item.url.___type == 'pages'"> {{ item.url.title }}</span>
<span v-if="item.url.___type == 'pages'">
{{ item.url.title }}</span
>
</span>
</div>
<div>
<Button ghost size="small" type="primary" @click="clickLink(item, index)"
<Button
ghost
size="small"
type="primary"
@click="clickLink(item, index)"
>选择链接</Button
>
</div>
</div>
<!-- 链接地址-->
<div
class="decorate-view"
v-if="item.url && item.url.___type == 'other'"
>
<div class="decorate-view-title">外部链接</div>
<div>
<Input v-model="item.url.url" style="width: 200px" />
</div>
</div>
<p v-if="item.url && item.url.___type == 'other'">
(如非同域名下则在小程序与公众号中无效)
</p>
</div>
</div>
</div>
<Button
v-if="res.type != 'tpl_ad_list' && res.type != 'tpl_activity_list' && !res.notAdd"
v-if="
res.type != 'tpl_ad_list' &&
res.type != 'tpl_activity_list' &&
!res.notAdd
"
type="primary"
@click="addDecorate()"
@click="addDecorate(res.type)"
ghost
>添加</Button
>
@ -194,6 +397,8 @@ export default {
picModelFlag: false, //
linkType: "goods", // dialog
styleFlag: false, //广
textAlign: this.res.options.list[0].textAlign || "center", //
promotionsFlag: false, //广
selectedLinkIndex: "", //
modelData, //
selectedGoods: "", //
@ -213,15 +418,12 @@ export default {
selectStyle() {
this.styleFlag = !this.styleFlag;
},
selectPromotions() {
this.promotionsFlag = !this.promotionsFlag;
},
//
selectedLink(val) {
//
if (val) {
delete val.intro;
delete val.mobileIntro;
}
this.selectedLinks.url = val;
},
//
selectedGoodsData(val) {
@ -257,6 +459,10 @@ export default {
this.$refs.liliDialog.flag = true;
},
changeTextAlign(val) {
this.res.options.list[0].textAlign = val;
this.textAlign = val;
},
//
clickLink(val, index) {
this.selectedLinks = val;
@ -275,15 +481,21 @@ export default {
});
},
//
addDecorate() {
let way = {
img: "https://picsum.photos/id/264/200/200",
title: "标题",
link: "",
url: "",
size: this.res.options.list[0]?.size,
};
this.res.options.list.push(way);
addDecorate(type) {
if (type === "notice") {
this.res.options.list[0].title.push({
content: "",
});
} else {
let way = {
img: "https://picsum.photos/id/264/200/200",
title: "标题",
link: "",
url: "",
size: this.res.options.list[0]?.size,
};
this.res.options.list.push(way);
}
},
//
callbackSelected(val) {
@ -296,6 +508,11 @@ export default {
this.selectedGoods = item;
this.picModelFlag = true;
},
removeNotice(index) {
this.$nextTick(() => {
this.res.options.list[0].title.splice(index, 1);
});
},
//
closeDecorate(index) {
this.$nextTick(() => {

View File

@ -15,7 +15,7 @@
>
<li
v-for="(model, index) in modelData"
v-if="!model.drawer"
v-if="!model.drawer && !model.drawerPromotions"
:key="index"
class="model-item"
>
@ -77,7 +77,8 @@ import templates from "./template/index";
import Draggable from "vuedraggable";
import { modelData } from "./config";
import decorate from "./decorate";
import * as API_Other from '@/api/other'
import * as API_Other from "@/api/other";
import * as API_Promotions from "@/api/promotion";
export default {
components: {
Draggable,
@ -89,10 +90,12 @@ export default {
modelData, //
qrcode: "", //
selected: 0, //
contentData: { //
contentData: {
//
list: [],
},
decorateData: "", //
decoratePromotionsData: "", //
};
},
watch: {
@ -108,21 +111,14 @@ export default {
},
methods: {
enableBindGoodsShow(){
},
//
init() {
if (!this.$route.query.id) return false;
API_Other.getHomeData(this.$route.query.id).then(res=>{
this.contentData = JSON.parse(res.result.pageData)
API_Other.getHomeData(this.$route.query.id).then((res) => {
this.contentData = JSON.parse(res.result.pageData);
this.handleComponent( this.contentData.list[0], 0)
})
this.handleComponent(this.contentData.list[0], 0);
});
},
//
@ -136,7 +132,6 @@ export default {
this.$nextTick(() => {
this.decorateData = "";
console.log(this.contentData.list.length);
//
if (this.contentData.list.length > 1) {
//
@ -156,29 +151,86 @@ export default {
//
handleComponent(val, index) {
console.warn(val)
this.selected = index;
this.$set(this, "decorateData", val);
},
//
handleDrawer(val) {
let newIndex = this.selected;
if (val.promotionsType) {
if (this.contentData.list[newIndex].options.list.length >= 2) {
this.$Message.error("最多只能展示两个活动");
return;
}
if (val.promotionsType === "LIVE") {
API_Promotions.getLiveList({
status: "START",
pageSize: 1,
}).then((res) => {
if (res.success && res.result.size > 0) {
API_Promotions.getLiveInfo(res.result.records[0].id).then(
(res) => {
if (res.success) {
this.contentData.list[newIndex].options.list.push({
type: val.promotionsType,
title: val.name,
title1: val.subName,
color1: val.subColor,
bk_color: val.subBkColor,
data: res.result.commodityList
? res.result.commodityList.splice(0,2)
: [],
});
}
}
);
}
});
} else {
API_Promotions.getAllPromotion().then((res) => {
let exist = this.contentData.list[newIndex].options.list.find(
(i) => i.type === val.promotionsType
);
this.decorateData = "";
if (res.success && !exist) {
this.contentData.list[newIndex].options.list.push({
data: res.result[val.promotionsType]
? res.result[val.promotionsType].splice(0,2)
: [],
type: val.promotionsType,
title1: val.subName,
color1: val.subColor,
bk_color: val.subBkColor,
title: val.name,
});
}
});
}
this.$set(this.contentData.list, newIndex, {
...val,
options: {
...this.contentData.list[newIndex].options,
},
//
model: val.type,
});
} else {
this.decorateData = "";
this.$set(this.contentData.list, newIndex, {
...val,
options: {
...val.options,
},
this.$set(this.contentData.list, newIndex, {
...val,
options: {
...val.options,
},
//
model: val.type,
});
this.contentData.list = JSON.parse(JSON.stringify(this.contentData.list));
this.$set(this, "decorateData", this.contentData.list[newIndex]);
//
model: val.type,
});
this.contentData.list = JSON.parse(
JSON.stringify(this.contentData.list)
);
this.$set(this, "decorateData", this.contentData.list[newIndex]);
}
},
//

View File

@ -12,20 +12,24 @@ import tpl_flex_four from "./tpl_flex_four";
import tpl_text_picture from "./tpl_text_picture";
import tpl_menu from "./tpl_menu";
import tpl_search from "./tpl_search";
import tpl_join_group from "./tpl_join_group";
import tpl_promotion_detail from "./tpl_promotion_detail";
import tpl_integral from "./tpl_integral";
import tpl_spike from "./tpl_spike";
import tpl_group from "./tpl_group";
import tpl_ad_list from "./tpl_view_list";
import tpl_activity_list from './tpl_view_list'
import tpl_goods from "./tpl_goods";
import tpl_notice from "./tpl_notice";
import tpl_promotions from "./tpl_promotions";
export default {
notice: tpl_notice,
carousel: tpl_banner,
title: tpl_title,
leftOneRightTwo: tpl_left_one_right_two,
leftTwoRightOne: tpl_left_two_right_one,
topOneBottomTwo:tpl_top_one_bottom_two,
topTwoBottomOne:tpl_top_two_bottom_one,
topOneBottomTwo: tpl_top_one_bottom_two,
topTwoBottomOne: tpl_top_two_bottom_one,
flexThree: tpl_flex_three,
flexFive: tpl_flex_five,
flexFour: tpl_flex_four,
@ -33,12 +37,13 @@ export default {
textPicture: tpl_text_picture,
menu: tpl_menu,
search: tpl_search,
joinGroup: tpl_join_group,
promotionDetail: tpl_promotion_detail,
flexOne: tpl_flex_one,
goods: tpl_goods,
integral:tpl_integral,
spike:tpl_spike,
group:tpl_group,
integral: tpl_integral,
spike: tpl_spike,
group: tpl_group,
tpl_ad_list,
tpl_activity_list
promotions: tpl_promotions,
tpl_activity_list,
};

View File

@ -1,38 +1,39 @@
<template>
<div class="layout">
<div class="menu-list">
<div class="menu-item" v-for="(item,index) in res.list" :key="index">
<div>
<img class="menu-img" :src="item.img" alt="">
</div>
<div class="menu-title">{{item.title}}</div>
</div>
<div class="layout">
<div class="menu-list">
<div class="menu-item" v-for="(item, index) in res.list" :key="index">
<div>
<img class="menu-img" :src="item.img" alt="" />
</div>
<div class="menu-title">{{ item.title }}</div>
</div>
</div>
</div>
</template>
<script>
export default {
props:['res']
}
props: ["res"],
};
</script>
<style lang="scss" scoped>
@import "./tpl.scss";
.menu-list{
display: flex;
align-items: center;
flex-wrap: wrap;
@import "./tpl.scss";
.menu-list {
display: flex;
align-items: center;
justify-content: space-between;
flex-wrap: wrap;
>.menu-item{
text-align: center;
width: 20%;
margin:10px 0;
}
}
.menu-img{
width: 44px;
height: 44px;
}
.menu-title{
font-size: 12px;
}
> .menu-item {
text-align: center;
width: 20%;
margin: 10px 0;
}
}
.menu-img {
width: 44px;
height: 44px;
}
.menu-title {
font-size: 12px;
}
</style>

View File

@ -0,0 +1,61 @@
<template>
<div class="layout">
<div class="background" :style="{ backgroundColor: res.list[0].bk_color }">
<img :src="res.list[0].img" alt="" style="float:left;width: 20px;height: 20px;margin-top: 10px;margin-left: 10px;margin-right: 10px">
<div class="title" :style="{ color: res.list[0].color }">
{{ context }}
</div>
</div>
</div>
</template>
<script>
export default {
title: "公告",
props: ["res"],
data() {
return {
index: 0,
context: "",
}
},
mounted() {
this.context = this.res.list[0].title[this.index].context;
setInterval(() => {
this.context = this.res.list[0].title[this.index].context;
if (this.index < this.res.list[0].title.length - 1) {
this.index++;
} else {
this.index = 0;
}
}, 3000);
},
};
</script>
<style lang="scss" scoped>
@import "./tpl.scss";
.background {
position: absolute;
z-index: 2;
width: 100%;
height: 42px;
text-align: left;
font-size: 10px;
background-size: cover;
}
.layout {
text-align: center;
position: relative;
height: 42px;
display: flex;
align-items: center;
justify-content: center;
background: #ffffff;
}
.title {
line-height: 42px;
font-size: 10px;
font-weight: bold;
}
</style>

View File

@ -0,0 +1,137 @@
<template>
<div class="layout">
<div class="join-list">
<div
v-for="(item, index) in res.list"
:key="index"
class="join-list-item"
>
<div>
<div class="join-title">
<div>{{ item.title }}</div>
<div
class="sub"
:style="{
backgroundColor: item.bk_color,
color: item.color1,
borderColor: item.bk_color,
}"
>
{{ item.title1 }}
</div>
</div>
<div class="join-box">
<div
class="join-item"
v-for="(i, _index) in item.data"
:key="_index"
>
<div class="item-img-box">
<img
class="item-img"
:src="i.thumbnail ? i.thumbnail : i.goodsImage"
alt
/>
</div>
<div
class="ellipsis"
:class="{ 'max-width': res.list.length <= 1 }"
>
{{ i.goodsName ? i.goodsName : i.name }}
</div>
<div class="item-price">
<span>{{ i.price ? i.price : i.originalPrice }}</span>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</template>
<script>
export default {
props: ["res"],
};
</script>
<style lang="scss" scoped>
@import "./tpl.scss";
.join-box {
display: flex;
}
.join-list {
width: 100%;
display: flex;
overflow: hidden;
}
.join-list-item {
flex: 1;
}
.ellipsis {
overflow: hidden;
text-overflow: ellipsis;
white-space: nowrap;
width: 54px; // 1
font-size: 11px;
}
.max-width {
width: 158px !important;
}
.item-price {
> span {
font-size: 14px;
font-weight: 500;
color: #e1212b;
}
}
.join-item {
flex: 1;
}
.item-img {
width: 75px;
height: 75px;
margin: 0 auto;
display: block;
}
.item-img-box {
position: relative;
}
.item-line-through {
> span {
font-size: 10px;
font-weight: 400;
text-decoration: line-through;
color: #999;
}
}
.item-position-tips {
position: absolute;
right: 0;
color: #fff;
font-size: 12px;
bottom: 0;
}
.join-title {
display: flex;
justify-content: space-between;
align-items: center;
background: #fff;
height: 50px;
> div:nth-of-type(1) {
font-size: 15px;
font-weight: bold;
}
> div:nth-of-type(2) {
font-size: 10px;
color: #fff;
border: 2px solid;
border-radius: 8px;
text-align: center;
width: 30%;
}
.sub {
background-color: #e1212b;
margin-right: 40px;
}
}
</style>

View File

@ -0,0 +1,30 @@
<template>
<div class="layout">
<div class="flex-two">
请选择促销活动(最多只能展示两个活动)
</div>
</div>
</template>
<script>
export default {
title: "两张横图",
props: ["res"],
};
</script>
<style lang="scss" scoped>
@import "./tpl.scss";
.flex-two {
width: 100%;
display: flex;
height: 110px;
overflow: hidden;
}
.flex-item {
width: 50%;
> img {
display: block;
max-width: 100%;
height: 100%;
}
}
</style>

View File

@ -1,9 +1,26 @@
<template>
<div class="layout">
<div class="background">
<div class="layout" :style="{ textAlign: res.list[0].textAlign }">
<div class="background" :style="{ backgroundColor: res.list[0].bk_color }">
<div class="title" :style="{ color: res.list[0].color }">
{{ res.list[0].title }}
</div>
<div
style="
position: absolute;
right: 10px;
top: 2px;
color: #fff;
line-height: 42px;
font-size: 10px;
"
>
<a
:href="res.list[0].url"
:style="{ color: res.list[0].color1 }"
style="text-decoration: none"
>{{ res.list[0].title1 }}</a
>
</div>
</div>
</div>
</template>
@ -11,13 +28,14 @@
<script>
export default {
title: "标题栏",
props: ["res"]
props: ["res"],
};
</script>
<style lang="scss" scoped>
@import "./tpl.scss";
.background {
background: url("../../../../assets/title.png") no-repeat;
background-color: rgb(255, 87, 62);
/*background: url("../../../../assets/title.png") no-repeat;*/
position: absolute;
z-index: 2;
width: 100%;
@ -37,7 +55,8 @@ export default {
}
.title {
line-height: 42px;
font-size: 15px;
font-size: 18px;
font-weight: bold;
margin-left: 4px;
}
</style>

View File

@ -53,11 +53,19 @@
<span class="describe">消费达到当前金额可以参与优惠</span>
</FormItem>
<FormItem label="优惠方式">
<RadioGroup type="button" button-style="solid" v-model="form.discountType">
<Radio :disabled="form.promotionStatus != 'NEW'" label="fullMinusFlag"
<RadioGroup
type="button"
button-style="solid"
v-model="form.discountType"
>
<Radio
:disabled="form.promotionStatus != 'NEW'"
label="fullMinusFlag"
>减现金</Radio
>
<Radio :disabled="form.promotionStatus != 'NEW'" label="fullRateFlag"
<Radio
:disabled="form.promotionStatus != 'NEW'"
label="fullRateFlag"
>打折</Radio
>
</RadioGroup>
@ -102,7 +110,9 @@
v-model="form.couponFlag"
>送优惠券</Checkbox
>
<Checkbox :disabled="form.promotionStatus != 'NEW'" v-model="form.giftFlag"
<Checkbox
:disabled="form.promotionStatus != 'NEW'"
v-model="form.giftFlag"
>送赠品</Checkbox
>
<Checkbox
@ -125,9 +135,12 @@
:loading="couponLoading"
style="width: 280px"
>
<Option v-for="item in couponList" :value="item.id" :key="item.id">{{
item.couponName
}}</Option>
<Option
v-for="item in couponList"
:value="item.id"
:key="item.id"
>{{ item.couponName }}</Option
>
</Select>
</FormItem>
<FormItem v-if="form.giftFlag" label="赠品" prop="giftId">
@ -140,9 +153,14 @@
:loading="giftLoading"
style="width: 280px"
>
<Option v-for="item in giftList" :value="item.id" :key="item.id">{{
item.goodsName
}}</Option>
<Option
v-for="item in giftList"
:value="item.id"
:key="item.id"
>
{{ item.goodsName }}
</Option
>
</Select>
</FormItem>
<FormItem v-if="form.pointFlag" label="赠积分" prop="point">
@ -155,17 +173,26 @@
/>
</FormItem>
<FormItem label="使用范围" prop="scopeType">
<RadioGroup type="button" button-style="solid" v-model="form.scopeType">
<RadioGroup
type="button"
button-style="solid"
v-model="form.scopeType"
>
<Radio :disabled="form.promotionStatus != 'NEW'" label="ALL"
>全品类</Radio
>
<Radio :disabled="form.promotionStatus != 'NEW'" label="PORTION_GOODS"
<Radio
:disabled="form.promotionStatus != 'NEW'"
label="PORTION_GOODS"
>指定商品</Radio
>
</RadioGroup>
</FormItem>
<FormItem style="width: 100%" v-if="form.scopeType == 'PORTION_GOODS'">
<FormItem
style="width: 100%"
v-if="form.scopeType == 'PORTION_GOODS'"
>
<div
style="display: flex; margin-bottom: 10px"
v-if="form.promotionStatus == 'NEW'"
@ -196,7 +223,7 @@
<template slot-scope="{ index }" slot="action">
<Button
type="error"
:disabled="form.promotionStatus != 'NEW' && id"
:disabled="form.promotionStatus != 'NEW' && !!id"
size="small"
ghost
@click="delGoods(index)"
@ -210,7 +237,7 @@
<Button type="text" @click="closeCurrentPage"></Button>
<Button
type="primary"
:disabled="form.promotionStatus != 'NEW' && id"
:disabled="form.promotionStatus != 'NEW' && !!id"
:loading="submitLoading"
@click="handleSubmit"
>提交</Button
@ -220,7 +247,10 @@
</div>
</Form>
</Card>
<sku-select ref="skuSelect" @selectedGoodsData="selectedGoodsData"></sku-select>
<sku-select
ref="skuSelect"
@selectedGoodsData="selectedGoodsData"
></sku-select>
</div>
</template>
@ -280,7 +310,10 @@ export default {
promotionName: [{ required: true, message: "活动名称不能为空" }],
rangeTime: [{ required: true, message: "请选择活动时间" }],
description: [{ required: true, message: "请填写活动描述" }],
price: [{ required: true, message: "请输入面额" }, { validator: checkPrice }],
price: [
{ required: true, message: "请输入面额" },
{ validator: checkPrice },
],
consumptionLimit: [{ required: true, validator: checkWeight }],
fullMoney: [{ required: true, validator: checkWeight }],
fullMinus: [
@ -318,7 +351,10 @@ export default {
key: "price",
minWidth: 40,
render: (h, params) => {
return h("div", this.$options.filters.unitPrice(params.row.price, "¥"));
return h(
"div",
this.$options.filters.unitPrice(params.row.price, "¥")
);
},
},
{
@ -343,8 +379,8 @@ export default {
if (this.id) {
this.getDetail();
}
this.getCouponList();
this.getGiftList();
await this.getCouponList();
await this.getGiftList();
},
methods: {
//
@ -390,14 +426,19 @@ export default {
this.$refs.form.validate((valid) => {
if (valid) {
const params = JSON.parse(JSON.stringify(this.form));
const strat = this.$options.filters.unixToDate(this.form.rangeTime[0] / 1000);
const end = this.$options.filters.unixToDate(this.form.rangeTime[1] / 1000);
const strat = this.$options.filters.unixToDate(
this.form.rangeTime[0] / 1000
);
const end = this.$options.filters.unixToDate(
this.form.rangeTime[1] / 1000
);
params.startTime = strat;
params.endTime = end;
if (
params.scopeType == "PORTION_GOODS" &&
(!params.promotionGoodsList || params.promotionGoodsList.length == 0)
(!params.promotionGoodsList ||
params.promotionGoodsList.length == 0)
) {
this.$Modal.warning({ title: "提示", content: "请选择指定商品" });
return;
@ -463,9 +504,11 @@ export default {
this.selectedGoods.forEach(function (e) {
ids.push(e.id);
});
this.form.promotionGoodsList = this.form.promotionGoodsList.filter((item) => {
return !ids.includes(item.id);
});
this.form.promotionGoodsList = this.form.promotionGoodsList.filter(
(item) => {
return !ids.includes(item.id);
}
);
},
});
},
@ -511,7 +554,10 @@ export default {
let params = {
pageSize: 10,
pageNumber: 1,
goodsName: query,
id: query === this.form.giftId ? this.form.giftId : null,
goodsName: query === this.form.giftId ? null : query,
marketEnable: "UPPER",
authFlag: "PASS"
};
this.giftLoading = true;
getGoodsSkuListDataSeller(params).then((res) => {