新增移动端公告横纵向设置,我的足迹以及秒杀活动展示优化

master
lemon橪 2022-07-13 09:37:59 +08:00
parent 954cd1cda9
commit eeadfc1db9
4 changed files with 42 additions and 10 deletions

View File

@ -1,5 +1,5 @@
<template>
<div class="seckill">
<div class="seckill" v-if="goodsList.length">
<div class="aside hover-pointer" @click="goToSeckill">
<div class="title">{{ actName }}</div>
<div class="hour">

View File

@ -111,8 +111,8 @@ export default {
this.spinShow = true;
tracksList(this.params).then((res) => {
this.spinShow = false;
if (res.success && res.result) {
this.list = res.result;
if (res.success && res.result.records.length) {
this.list = res.result.records;
} else {
this.list = [];
}

View File

@ -532,6 +532,7 @@ export const modelData = [
title: [{context: "这是一条公告"}],
color: "#666",
bk_color: "#FFF",
direction:"horizontal",
img: 'http://files.sxcfx.cn/upload/20220318/71e5d27aca82aeedf647052e1e4ceaaa.png'
}
]

View File

@ -217,6 +217,23 @@
<Input v-model="item.bk_color" />
</div>
</div>
<div
class="decorate-view"
v-if="item.title != void 0 && !res.notTitle && res.type == 'notice'"
>
<div class="decorate-view-title">方向</div>
<div class="decorate-view">
<Select
style="width: 200px"
@on-change="changeDirection($event, item)"
v-model="item.direction"
>
{{item.direction}}
<Option label="横向" value="horizontal"></Option>
<Option label="纵向" value="vertical"></Option>
</Select>
</div>
</div>
<!-- 填写标题 -->
<div
@ -364,10 +381,11 @@
v-if="
res.type != 'tpl_ad_list' &&
res.type != 'tpl_activity_list' &&
!res.notAdd
!res.notAdd &&
res.direction != 'horizontal'
"
type="primary"
@click="addDecorate(res.type)"
@click="addDecorate(res.type, res)"
ghost
>添加</Button
>
@ -414,6 +432,14 @@ export default {
},
props: ["res"],
methods: {
// title
changeDirection(val, data) {
if (val == "horizontal") {
const props = {...data}
data.title = []
data.title.push( props.title[0]);
}
},
//
selectStyle() {
this.styleFlag = !this.styleFlag;
@ -455,7 +481,7 @@ export default {
},
//
liliDialogFlag(flag) {
this.$refs.liliDialog.clearGoodsSelected()
this.$refs.liliDialog.clearGoodsSelected();
this.$refs.liliDialog.goodsFlag = flag;
this.$refs.liliDialog.flag = true;
},
@ -482,11 +508,16 @@ export default {
});
},
//
addDecorate(type) {
addDecorate(type, data) {
if (type === "notice") {
console.log(data)
if (data.options.list[0].direction == "vertical") {
this.res.options.list[0].title.push({
content: "",
});
} else {
this.$Message.error("仅纵向支持多添加");
}
} else {
let way = {
img: "https://picsum.photos/id/264/200/200",