diff --git a/buyer/src/components/fixed/index.vue b/buyer/src/components/fixed/index.vue index c0221dfc..aa4cb442 100644 --- a/buyer/src/components/fixed/index.vue +++ b/buyer/src/components/fixed/index.vue @@ -10,6 +10,7 @@ diff --git a/buyer/src/components/header/Header.vue b/buyer/src/components/header/Header.vue index e3e65679..31662b75 100644 --- a/buyer/src/components/header/Header.vue +++ b/buyer/src/components/header/Header.vue @@ -124,9 +124,27 @@ export default { } }, methods: { - goToPay() { // 跳转购物车 - let url = this.$router.resolve({ - path: '/cart' + goToPay() { + if (!this.userInfo.username) { + Modal.confirm({ + title: '温馨提示', + content: '请登录后执行此操作', + okText: '立即登录', + cancelText: '取消', + onOk: () => { + this.$router.push({ + path: '/login', + query: { + rePath: '/cart', + query: JSON.stringify(this.$route.query || {}), + }, + }); + }, + }); + return; + } + const url = this.$router.resolve({ + path: '/cart', }); window.open(url.href, '_blank'); }, @@ -169,16 +187,29 @@ export default { } }, shopEntry() { - // 店铺入驻 if (storage.getItem('accessToken')) { - let routeUrl = this.$router.resolve({ + const routeUrl = this.$router.resolve({ path: '/shopEntry', - query: {id: 1} + query: { id: 1 }, }); window.open(routeUrl.href, '_blank'); - } else { - this.$router.push('login'); + return; } + Modal.confirm({ + title: '温馨提示', + content: '请登录后执行此操作', + okText: '立即登录', + cancelText: '取消', + onOk: () => { + this.$router.push({ + path: '/login', + query: { + rePath: '/shopEntry', + query: JSON.stringify({ id: 1 }), + }, + }); + }, + }); }, handleCartDropdownVisible(visible) { if (visible) { diff --git a/buyer/src/components/indexDecorate/modelList/Carousel.vue b/buyer/src/components/indexDecorate/modelList/Carousel.vue index fb4fe430..16f08125 100644 --- a/buyer/src/components/indexDecorate/modelList/Carousel.vue +++ b/buyer/src/components/indexDecorate/modelList/Carousel.vue @@ -51,7 +51,7 @@ -->
-
登录
+
登录
注册
@@ -84,6 +84,7 @@ - - diff --git a/seller/src/views/shop/wap/advertising.vue b/seller/src/views/shop/wap/advertising.vue deleted file mode 100644 index 43679a3d..00000000 --- a/seller/src/views/shop/wap/advertising.vue +++ /dev/null @@ -1,216 +0,0 @@ - - - diff --git a/seller/src/views/shop/wap/alertAdvertising.vue b/seller/src/views/shop/wap/alertAdvertising.vue deleted file mode 100644 index eb3823ad..00000000 --- a/seller/src/views/shop/wap/alertAdvertising.vue +++ /dev/null @@ -1,233 +0,0 @@ - - - diff --git a/seller/src/views/shop/wap/index.js b/seller/src/views/shop/wap/index.js index 37aa9768..37dca4b2 100644 --- a/seller/src/views/shop/wap/index.js +++ b/seller/src/views/shop/wap/index.js @@ -1,17 +1,7 @@ -import index from './index.vue' //首页 - -import advertising from './advertising.vue' //全屏活动 -import alertAdvertising from './alertAdvertising.vue' //弹窗活动 - - +import index from "./index.vue"; const templates = { - index, + index, +}; - advertising, - alertAdvertising -} - - - -export default templates +export default templates; diff --git a/seller/src/views/shop/wap/index.vue b/seller/src/views/shop/wap/index.vue index e97219de..bf52b77e 100644 --- a/seller/src/views/shop/wap/index.vue +++ b/seller/src/views/shop/wap/index.vue @@ -81,7 +81,6 @@ import Draggable from "vuedraggable"; import { modelData } from "./config"; import decorate from "./decorate"; import * as API_Other from "@/api/other"; -import * as API_Promotions from "@/api/promotion"; export default { components: { Draggable, @@ -192,80 +191,17 @@ export default { }, // 右侧栏回调 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, - pageNumber: 1, - }).then((listRes) => { - const records = listRes.result?.records || []; - if (!listRes.success || records.length === 0) { - this.$Message.warning("暂无进行中的直播活动"); - return; - } - API_Promotions.getLiveInfo(records[0].id).then((infoRes) => { - if (infoRes.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: infoRes.result.commodityList - ? infoRes.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 - ); - - 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.contentData.list[newIndex] = { - ...val, - options: { - ...this.contentData.list[newIndex].options, - }, - model: val.type, - }; - } else { - this.decorateData = ""; - - this.contentData.list[newIndex] = { - ...val, - options: { - ...val.options, - }, - model: val.type, - }; - this.contentData.list = JSON.parse( - JSON.stringify(this.contentData.list) - ); - this["decorateData"] = this.contentData.list[newIndex]; - } + const newIndex = this.selected; + this.decorateData = ""; + this.contentData.list[newIndex] = { + ...val, + options: { + ...val.options, + }, + model: val.type, + }; + this.contentData.list = JSON.parse(JSON.stringify(this.contentData.list)); + this.decorateData = this.contentData.list[newIndex]; }, // 封装拖拽参数 diff --git a/seller/src/views/shop/wap/main.vue b/seller/src/views/shop/wap/main.vue index 9b3ea637..60ddf2eb 100644 --- a/seller/src/views/shop/wap/main.vue +++ b/seller/src/views/shop/wap/main.vue @@ -22,13 +22,7 @@ export default { }; }, 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; + this.pagetype = this.$route.query.pagetype || "INDEX"; }, methods: { selected(val) { diff --git a/seller/src/views/shop/wap/navbar.vue b/seller/src/views/shop/wap/navbar.vue index cfd6bb24..d0d5c6ac 100644 --- a/seller/src/views/shop/wap/navbar.vue +++ b/seller/src/views/shop/wap/navbar.vue @@ -68,22 +68,11 @@ export default { num: 20, // 提交进度 saveDialog: false, // 加载状态 way: [ - // 装修tab栏切换 { title: "首页", name: "index", selected: true, }, - { - title: "全屏广告", - name: "advertising", - selected: false, - }, - { - title: "弹窗广告", - name: "ALERT", - selected: false, - }, ], submitWay: { @@ -102,10 +91,6 @@ export default { 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, @@ -144,7 +129,7 @@ export default { save() { if ( this.$store.state.styleStore == void 0 && - (this.$route.query.pagetype && this.$route.query.pagetype != 'ALERT' && this.$route.query.pagetype != 'OPEN_SCREEN_ANIMATION') + this.$route.query.pagetype != 'SPECIAL' ) { this.$Message.error("请装修楼层"); return false; @@ -155,17 +140,9 @@ export default { : (this.submitWay.pageShow = "CLOSE"); 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.submitWay.pageType = this.$route.query.pagetype || "INDEX"; - 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); + this.$route.query.id ? this.updateHome() : this.submit(this.submitWay); }, // 更新 diff --git a/seller/vue.config.js b/seller/vue.config.js index eb39840d..01ba27ae 100644 --- a/seller/vue.config.js +++ b/seller/vue.config.js @@ -31,6 +31,17 @@ module.exports = { }, devServer: { port: configs.port, + client: { + overlay: { + runtimeErrors: (error) => { + const message = error?.message || ""; + if (message.includes("ResizeObserver loop")) { + return false; + } + return true; + }, + }, + }, }, productionSourceMap: false, configureWebpack: {