mirror of
https://gitee.com/beijing_hongye_huicheng/lilishop-ui.git
synced 2025-12-20 01:45:53 +08:00
feat: ✨ pc端新增专题功能
This commit is contained in:
@@ -17,7 +17,9 @@
|
||||
<div class="item item-title">
|
||||
<div>页面名称</div>
|
||||
<div class="item-config">
|
||||
<div>状态</div>
|
||||
<div>
|
||||
<div v-if="searchForm.pageType !== 'SPECIAL'">状态</div>
|
||||
</div>
|
||||
<div>操作</div>
|
||||
</div>
|
||||
</div>
|
||||
@@ -25,30 +27,35 @@
|
||||
<div class="item" v-for="(item, index) in list" :key="index">
|
||||
<div>{{ item.name || "暂无模板昵称" }}</div>
|
||||
<div class="item-config">
|
||||
<div>
|
||||
<i-switch
|
||||
v-if="searchForm.pageType !== 'SPECIAL'"
|
||||
v-model="item.pageShow"
|
||||
@on-change="releaseTemplate(item.id)"
|
||||
>
|
||||
<span slot="open">开</span>
|
||||
<span slot="close">关</span>
|
||||
</i-switch>
|
||||
<Button
|
||||
type="info"
|
||||
placement="right"
|
||||
@click="Template(item)"
|
||||
size="small"
|
||||
>编辑</Button
|
||||
>
|
||||
<Button
|
||||
type="success"
|
||||
placement="right"
|
||||
@click="decorate(item)"
|
||||
size="small"
|
||||
>装修</Button
|
||||
>
|
||||
<Poptip confirm title="删除此模板?" @on-ok="delTemplate(item.id)">
|
||||
<Button type="error" size="small">删除</Button>
|
||||
</Poptip>
|
||||
</div>
|
||||
<div class="action">
|
||||
<Button
|
||||
type="info"
|
||||
placement="right"
|
||||
@click="Template(item)"
|
||||
size="small"
|
||||
>编辑</Button
|
||||
>
|
||||
<Button
|
||||
type="success"
|
||||
placement="right"
|
||||
@click="decorate(item)"
|
||||
size="small"
|
||||
>装修</Button
|
||||
>
|
||||
<Poptip confirm title="删除此模板?" @on-ok="delTemplate(item.id)">
|
||||
<Button type="error" size="small">删除</Button>
|
||||
</Poptip>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="no-more" v-if="list.length == 0">暂无更多模板</div>
|
||||
@@ -193,9 +200,11 @@ export default {
|
||||
|
||||
decorate(val) {
|
||||
// 装修
|
||||
const data = { id: val.id, pageShow: val.pageShow,pageType:this.searchForm.pageType }
|
||||
|
||||
this.$router.push({
|
||||
name: "renovation",
|
||||
query: { id: val.id, pageShow: val.pageShow },
|
||||
query: data,
|
||||
});
|
||||
},
|
||||
|
||||
@@ -235,6 +244,8 @@ export default {
|
||||
},
|
||||
|
||||
releaseTemplate(id) {
|
||||
console.log(id)
|
||||
// id.pageType = 'SPECIAL'
|
||||
//发布模板
|
||||
API_floor.releasePageHome(id).then((res) => {
|
||||
if (res.success) {
|
||||
@@ -303,6 +314,7 @@ export default {
|
||||
align-items: center;
|
||||
justify-content: space-between;
|
||||
> .item-config {
|
||||
|
||||
width: 250px;
|
||||
display: flex;
|
||||
justify-content: space-between;
|
||||
@@ -315,4 +327,9 @@ export default {
|
||||
.item:nth-of-type(2n + 1) {
|
||||
background: #f5f7fa;
|
||||
}
|
||||
.action{
|
||||
display: flex;
|
||||
align-items: center;
|
||||
width: 100px;
|
||||
}
|
||||
</style>
|
||||
|
||||
@@ -32,7 +32,7 @@
|
||||
</i-input>
|
||||
</div>
|
||||
</div>
|
||||
<div class="nav-con">
|
||||
<div class="nav-con" v-if="$route.query.pageType !== 'SPECIAL'">
|
||||
<div class="all-categories">全部商品分类</div>
|
||||
<ul class="nav-item">
|
||||
<li v-for="(item, index) in navList.list" :key="index">
|
||||
@@ -134,7 +134,7 @@
|
||||
<td>
|
||||
<Input
|
||||
v-model="item.url"
|
||||
:disabled="!!item.type && item.type !== 'link'"
|
||||
disabled
|
||||
/>
|
||||
</td>
|
||||
<!-- <td><Input v-model="item.sort"/></td> -->
|
||||
@@ -232,6 +232,8 @@ export default {
|
||||
},
|
||||
// 已选链接
|
||||
selectedLink(val) {
|
||||
|
||||
|
||||
if (this.showModalNav) {
|
||||
this.selectedNav.url = this.$options.filters.formatLinkType(val);
|
||||
this.selectedNav.type =
|
||||
|
||||
@@ -102,7 +102,8 @@ export default {
|
||||
const data = {
|
||||
id: this.$route.query.id,
|
||||
pageData: JSON.stringify(modelForm),
|
||||
pageShow
|
||||
// 如果是专题页面永远关闭
|
||||
pageShow: this.$route.query.pageType === 'SPECIAL' ? 'CLOSE' : pageShow,
|
||||
};
|
||||
API_floor.updateHome(this.$route.query.id, data).then((res) => {
|
||||
this.submitLoading = false
|
||||
|
||||
Reference in New Issue
Block a user