From a70c74199092cd753a1f05789ad45a940e3275db Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?=E5=AD=A6=E4=B9=A0=E5=BE=88=E5=B7=AE=E5=95=A6?=
<17633066053@163.com>
Date: Tue, 11 Oct 2022 17:24:37 +0800
Subject: [PATCH] =?UTF-8?q?feat:=20:art:=20=E6=96=B0=E5=A2=9E=E5=8A=A0?=
=?UTF-8?q?=E4=B8=93=E9=A2=98=E5=8A=9F=E8=83=BD?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
manager/src/api/other.js | 9 +
.../components/lili-dialog/template/index.js | 2 +
.../lili-dialog/template/special.vue | 167 ++++++++++++++++++
manager/src/components/lili-dialog/wap.js | 5 +
manager/src/store/index.js | 3 +-
.../views/page-decoration/wap/advertising.vue | 72 ++++++--
.../page-decoration/wap/alertAdvertising.vue | 70 +++++++-
.../views/page-decoration/wap/decorate.vue | 50 +++++-
.../src/views/page-decoration/wap/main.vue | 12 +-
.../src/views/page-decoration/wap/navbar.vue | 112 ++++++++++--
.../src/views/page-decoration/wap/wapList.vue | 62 +++++--
11 files changed, 504 insertions(+), 60 deletions(-)
create mode 100644 manager/src/components/lili-dialog/template/special.vue
diff --git a/manager/src/api/other.js b/manager/src/api/other.js
index 4c3b5ab0..ff126ab2 100644
--- a/manager/src/api/other.js
+++ b/manager/src/api/other.js
@@ -90,3 +90,12 @@ export const getMemberFeedbackDetail = (id) => {
export const getMemberMessage = (params) => {
return getRequest(`/other/memberMessage`, params);
};
+
+// 弹窗广告
+export const getOpenHomeData = params => {
+ return getRequest(`/other/pageData/pageType/${params}`);
+};
+// 保存修改弹窗广告
+export const addOpenHomeData = params => {
+ return postRequest(`/other/pageData/pageType/${params}`);
+};
diff --git a/manager/src/components/lili-dialog/template/index.js b/manager/src/components/lili-dialog/template/index.js
index 83d39f35..03bdfccb 100644
--- a/manager/src/components/lili-dialog/template/index.js
+++ b/manager/src/components/lili-dialog/template/index.js
@@ -5,6 +5,7 @@ import marketing from './marketing.vue'
import pages from './pages.vue'
import goods from '../goods-dialog.vue'
import other from './other.vue'
+import special from './special.vue'
export default {
pages,
marketing,
@@ -12,4 +13,5 @@ export default {
category,
goods,
other,
+ special
}
diff --git a/manager/src/components/lili-dialog/template/special.vue b/manager/src/components/lili-dialog/template/special.vue
new file mode 100644
index 00000000..c9d592b7
--- /dev/null
+++ b/manager/src/components/lili-dialog/template/special.vue
@@ -0,0 +1,167 @@
+
+
+
+
+
+
+
+
{
+ params.pageNumber = val;
+ }
+ "
+ :current="params.pageNumber"
+ :page-size="params.pageSize"
+ class="mt_10"
+ :total="Number(totals)"
+ size="small"
+ show-elevator
+ />
+
+
+
+
+
+
+
diff --git a/manager/src/components/lili-dialog/wap.js b/manager/src/components/lili-dialog/wap.js
index 2d2d675c..140f1675 100644
--- a/manager/src/components/lili-dialog/wap.js
+++ b/manager/src/components/lili-dialog/wap.js
@@ -25,6 +25,11 @@ export default [
url: "3",
name: "pages"
},
+ {
+ title: "专题",
+ url: "4",
+ name: "special"
+ },
{
title: "其他",
url: "3",
diff --git a/manager/src/store/index.js b/manager/src/store/index.js
index 57665ece..8f2cf2cf 100644
--- a/manager/src/store/index.js
+++ b/manager/src/store/index.js
@@ -10,7 +10,8 @@ Vue.use(Vuex);
const store = new Vuex.Store({
state: {
// 状态
-
+ openStyleStore: "", // 移动端楼层装修中选择风格存储
+ openStoreId:"",
notices: "" //通知提示信息
},
mutations: {
diff --git a/manager/src/views/page-decoration/wap/advertising.vue b/manager/src/views/page-decoration/wap/advertising.vue
index 70257cc8..d4d68906 100644
--- a/manager/src/views/page-decoration/wap/advertising.vue
+++ b/manager/src/views/page-decoration/wap/advertising.vue
@@ -70,17 +70,24 @@
-
+
+
+
+
diff --git a/manager/src/views/page-decoration/wap/alertAdvertising.vue b/manager/src/views/page-decoration/wap/alertAdvertising.vue
index cddee110..c9f9b78f 100644
--- a/manager/src/views/page-decoration/wap/alertAdvertising.vue
+++ b/manager/src/views/page-decoration/wap/alertAdvertising.vue
@@ -48,7 +48,7 @@
@click="handleClickFile(item, index)"
ghost
type="primary"
- >选择照片选择链接
@@ -69,15 +69,28 @@
-
+
+
+
+
diff --git a/manager/src/views/page-decoration/wap/decorate.vue b/manager/src/views/page-decoration/wap/decorate.vue
index cb6d7cb8..aed4d755 100644
--- a/manager/src/views/page-decoration/wap/decorate.vue
+++ b/manager/src/views/page-decoration/wap/decorate.vue
@@ -139,6 +139,20 @@
+
选择照片
@@ -325,9 +339,15 @@
{{
ways.find((e) => {
return item.url.___type == e.name;
- }).title
+ }) ? ways.find((e) => {
+ return item.url.___type == e.name;
+ }).title : '发现'
}}
-
+
+
+ {{ item.url.name }}
{{ item.url.goodsName }} 1 && index !== 0) {
+ newArr = this.swapItems(arr, index, index - 1);
+ }
+ return newArr;
+ },
+ swapItems(arr, index1, index2) {
+ arr[index1] = arr.splice(index2, 1, arr[index1])[0];
+ return arr;
+ },
+ downData(arr,index) {
+ let newArr = [];
+ if (arr.length > 1 && index !== arr.length - 1) {
+ newArr = this.swapItems(arr, index, index + 1);
+ }
+ return newArr;
+ },
// 改变横纵切换title内容
changeDirection(val, data) {
if (val == "horizontal") {
@@ -558,7 +604,7 @@ export default {
title: "标题",
link: "",
url: "",
- size: this.res.options.list[0].size,
+ size: this.res.options.list[0] ? this.res.options.list[0].size : "",
model: "link",
};
this.res.options.list.push(way);
diff --git a/manager/src/views/page-decoration/wap/main.vue b/manager/src/views/page-decoration/wap/main.vue
index 62bd675e..06a82b73 100644
--- a/manager/src/views/page-decoration/wap/main.vue
+++ b/manager/src/views/page-decoration/wap/main.vue
@@ -1,7 +1,7 @@
-
+
@@ -17,8 +17,18 @@ export default {
return {
layout, // 装修模块
name: "index", // 装修的页面
+ pagetype: "INDEX",
};
},
+ mounted() {
+ if (this.$route.query.pagetype == "ALERT") {
+ this.name = "alertAdvertising";
+ }
+ if (this.$route.query.pagetype == "OPEN_SCREEN_ANIMATION") {
+ this.name = "advertising";
+ }
+ this.pagetype = this.$route.query.pagetype;
+ },
methods: {
selected(val) { // 顶部栏点击切换
this.name = val;
diff --git a/manager/src/views/page-decoration/wap/navbar.vue b/manager/src/views/page-decoration/wap/navbar.vue
index fa65a60f..7156a4f1 100644
--- a/manager/src/views/page-decoration/wap/navbar.vue
+++ b/manager/src/views/page-decoration/wap/navbar.vue
@@ -66,16 +66,16 @@ export default {
name: "index",
selected: true,
},
- // {
- // title: "全屏广告",
- // name: "advertising",
- // selected: false,
- // },
- // {
- // title: "弹窗广告",
- // name: "alertAdvertising",
- // selected: false,
- // },
+ {
+ title: "全屏广告",
+ name: "advertising",
+ selected: false,
+ },
+ {
+ title: "弹窗广告",
+ name: "ALERT",
+ selected: false,
+ },
],
submitWay: {
@@ -86,7 +86,23 @@ export default {
},
};
},
- watch: {},
+ watch: {
+ pagetype: {
+ handler(val) {
+ this.way.length = 0;
+ if (val == "INDEX") {
+ this.way.push({ title: "首页", name: "index", selected: true });
+ } else if (val == "SPECIAL") {
+ this.way.push({ title: "专题", name: "special", selected: true });
+ } else if (val == "ALERT") {
+ this.way.push({ title: "开屏广告", name: "alert", selected: true });
+ }else if (val == "OPEN_SCREEN_ANIMATION") {
+ this.way.push({ title: "app开屏页面", name: "OPEN_SCREEN_ANIMATION", selected: true });
+ }
+ },
+ immediate: true,
+ },
+ },
mounted() {},
methods: {
clickBtn(val) {
@@ -106,7 +122,10 @@ export default {
// 填写是否发布,模板名称之后保存
save() {
- if (this.$store.state.styleStore == void 0) {
+ if (
+ this.$store.state.styleStore == void 0 &&
+ (this.$route.query.pagetype && this.$route.query.pagetype != 'ALERT' && this.$route.query.pagetype != 'OPEN_SCREEN_ANIMATION')
+ ) {
this.$Message.error("请装修楼层");
return false;
}
@@ -117,18 +136,26 @@ export default {
this.submitWay.pageData = JSON.stringify(this.$store.state.styleStore);
this.submitWay.pageType = "INDEX";
+ this.submitWay.pageType = this.$route.query.pagetype || "INDEX";
+ // this.submitWay.pageType = this.pagetype;
- this.$route.query.id ? this.update() : this.submit(this.submitWay);
+ if (this.$route.query.pagetype == 'ALERT' || this.$route.query.pagetype == 'OPEN_SCREEN_ANIMATION') {
+ this.update(this.submitWay);
+ } else {
+ this.$route.query.id ? this.updateHome() : this.submit(this.submitWay);
+ }
+
+ // this.$route.query.id ? this.update() : this.submit(this.submitWay);
},
// 更新
- update() {
+ updateHome() {
this.progress = false;
API_Other.updateHome(this.$route.query.id, {
pageData: JSON.stringify(this.$store.state.styleStore),
name: this.submitWay.name,
pageShow: this.submitWay.pageShow,
- pageType: "INDEX",
+ pageType: this.submitWay.pageType,
pageClientType: "H5",
})
.then((res) => {
@@ -139,7 +166,7 @@ export default {
setTimeout(() => {
this.saveDialog = false;
this.$Message.success("修改成功");
- this.goback();
+ this.goBack();
}, 1000);
} else {
this.saveDialog = false;
@@ -150,8 +177,57 @@ export default {
.catch((error) => {});
},
+
+ // 更新
+ update(submitWay) {
+ console.log(this.$store.state.openStyleStore[0], "123123123");
+ if (this.$store.state.openStyleStore == void 0) {
+ this.$Message.error("请装修楼层!");
+ return false;
+ }
+ this.progress = false;
+
+ let id = this.$route.query.id;
+ const pagetype = this.$route.query.pagetype;
+ console.log(this.$store.state.openStyleStore, submitWay);
+ const pageType = {
+ INDEX: "INDEX",
+ ALERT: "OPEN_SCREEN_PAGE",
+ OPEN_SCREEN_ANIMATION: "OPEN_SCREEN_ANIMATION",
+ }[pagetype ? pagetype : "INDEX"];
+
+ if (pagetype) {
+ submitWay.pageData = JSON.stringify(
+ this.$store.state.openStyleStore[0]
+ );
+ submitWay.pageType = pageType;
+ id = this.$store.state.openStoreId;
+ }
+
+ API_Other.updateHome(id, submitWay)
+ .then((res) => {
+ this.num = 50;
+ if (res.success) {
+ this.num = 80;
+ /**制作保存成功动画¸ */
+ setTimeout(() => {
+ this.saveDialog = false;
+ this.$Message.success("修改成功");
+ this.goBack();
+ }, 1000);
+ } else {
+ this.saveDialog = false;
+ this.$Message.error("修改失败,请稍后重试");
+ }
+ console.log(res);
+ })
+ .catch((error) => {});
+ },
+
+
+
// 返回查询数据页面
- goback() {
+ goBack() {
this.$router.push({
path: "/decoration/wap",
});
@@ -169,7 +245,7 @@ export default {
setTimeout(() => {
this.saveDialog = false;
this.$Message.success("保存成功");
- this.goback();
+ this.goBack();
}, 1000);
} else {
this.progress = true;
diff --git a/manager/src/views/page-decoration/wap/wapList.vue b/manager/src/views/page-decoration/wap/wapList.vue
index 8d811009..66921ca5 100644
--- a/manager/src/views/page-decoration/wap/wapList.vue
+++ b/manager/src/views/page-decoration/wap/wapList.vue
@@ -1,8 +1,13 @@
-
-
{{typeItem.title}}
+
@@ -70,6 +75,14 @@ export default {
type: "SPECIAL",
title: "专题",
},
+ // {
+ // type: "ALERT",
+ // title: "开屏广告",
+ // },
+ // {
+ // type: "OPEN_SCREEN_ANIMATION",
+ // title: "app开屏页面",
+ // },
],
params: { // 请求参数
pageNumber: 1,
@@ -84,23 +97,38 @@ export default {
};
},
watch: {
- params: {
- handler(val) {
- // this.pageNumber++;
- this.init();
- },
- deep: true,
- },
+ // params: {
+ // handler(val) {
+ // // this.pageNumber++;
+ // this.init();
+ // },
+ // deep: true,
+ // },
},
mounted() {
this.init();
},
methods: {
// 切换tab
- clickType(val,index) {
- this.params.pageNumber = 1
- this.selectedIndex = index
- this.params.pageType = val;
+ clickType(val, index) {
+ if (val == "ALERT") {
+ this.$router.push({
+ path: "/floorList/main",
+ query: { pagetype: val },
+ });
+ return;
+ } else if (val == "OPEN_SCREEN_ANIMATION") {
+ this.$router.push({
+ path: "/floorList/main",
+ query: { pagetype: val },
+ });
+ return;
+ } else {
+ this.params.pageNumber = 1;
+ this.selectedIndex = index;
+ this.params.pageType = val;
+ this.init();
+ }
},
// 是否发布
changeSwitch(item) {
@@ -138,13 +166,19 @@ export default {
handleEdit(val) {
this.$router.push({
path: "/floorList/main",
- query: { id: val.id, name: val.name, type: val.pageShow },
+ query: {
+ id: val.id,
+ name: val.name,
+ type: val.pageShow,
+ pagetype: this.params.pageType,
+ },
});
},
// 添加模板
handleAdd() {
this.$router.push({
path: "/floorList/main",
+ query: { pagetype: this.params.pageType },
});
},
// 分页 改变页数