From 37c14459ce8ffc7d4e921344df08fd71d5504051 Mon Sep 17 00:00:00 2001 From: liupopo Date: Wed, 31 Jan 2024 09:55:45 +0800 Subject: [PATCH] =?UTF-8?q?=E8=BD=AE=E6=92=AD=E5=9B=BE?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/api/lpk/banner.js | 40 + src/layout/components/Sidebar/index.vue | 1051 ++++++++++---------- src/router/index.js | 908 ++++++++--------- src/views/appletBanner/appletBannerAdd.vue | 253 +++++ src/views/appletBanner/index.vue | 258 +++++ src/views/orderreserve/index.vue | 1 + 6 files changed, 1551 insertions(+), 960 deletions(-) create mode 100644 src/api/lpk/banner.js create mode 100644 src/views/appletBanner/appletBannerAdd.vue create mode 100644 src/views/appletBanner/index.vue diff --git a/src/api/lpk/banner.js b/src/api/lpk/banner.js new file mode 100644 index 0000000..91b802d --- /dev/null +++ b/src/api/lpk/banner.js @@ -0,0 +1,40 @@ +import request from '@/utils/request' + +export default { + + // 查询分页列表 + listPage: function(params) { + return request({ + url: '/adminapi/banner/pageList', + method: 'post', + data: params, + }) + }, + + // 新增、保存 + saveNotice: function(data) { + return request({ + url: '/adminapi/banner/saveOrUpdate', + method: 'post', + data: data + }); + }, + + // 初始化 + noticeInit: function(data) { + return request({ + url: '/adminapi/banner/noticeInit/' + data, + method: 'get' + }); + }, + + + // 修改是否可见 + updateAppletUseTo: function(sid, isEnable) { + return request({ + url: '/adminapi/banner/isDisplayed/' + sid + "/" + isEnable + }); + }, + + +} diff --git a/src/layout/components/Sidebar/index.vue b/src/layout/components/Sidebar/index.vue index d7f22b4..c5f98e3 100644 --- a/src/layout/components/Sidebar/index.vue +++ b/src/layout/components/Sidebar/index.vue @@ -1,527 +1,554 @@ - ] - } - }, - computed: { - ...mapGetters(['sidebar']), - // routes() { - // f4d2e507-c4ed-451c-b364-04c08f962045 - // console.log('78979789', this.$router.options.routes) - // return this.$router.options.routes - // }, - activeMenu() { - // const route = this.$route - // const { - // meta, - // path - // } = route - // // if set path, the sidebar will highlight the path you set - // if (meta.activeMenu) { - // return meta.activeMenu - // } - return '/index' - }, - showLogo() { - return this.$store.state.settings.sidebarLogo - }, - variables() { - return variables - }, - isCollapse() { - return !this.sidebar.opened - } - }, - created() { - this.postHuoquyonghu() - }, - methods: { - // 获取用户信息 - postHuoquyonghu() { - // var token = getStorage() - // loginDetails(token).then((response) => { - // console.log('resss', response) - // if (response.code === '200') { - // this.YongHuid = response.data - // this.params.userSid = this.YongHuid.sid - // getrolemenus(this.params).then((res) => { - // const userRoles = this.resRouter(res.data) - this.routes.push({ - path: '*', - redirect: '/404', - hidden: true - }) - console.log('左侧菜单', this.routes) - return this.routes - // }) - // } - // }) - }, - resRouter(menus) { - // 递归,将后台传来数组 - for (var i = 0; i < menus.length; i++) { - if (menus[i].children && menus[i].children.length != 0) { - this.resRouter(menus[i].children) - } - if (menus[i].children.length == 0) { - delete menus[i].children - delete menus[i].redirect - } - if (menus[i].component == '') { - console.log('55555', menus[i]) - menus[i] = { - path: menus[i].path, - component: '', - redirect: menus[i].path, - children: [menus[i]] - } - } else { - // menus[i] = { - // path: menus[i].path, - // component: '', - // redirect: menus[i].path, - // children: [menus[i]], - // } - } - } - this.routes = menus - console.log('左侧菜单', this.routes) - return menus - } - } - } - \ No newline at end of file diff --git a/src/router/index.js b/src/router/index.js index 8755ae9..d7b075d 100644 --- a/src/router/index.js +++ b/src/router/index.js @@ -10,272 +10,272 @@ import Layout from '@/layout' import codemenu from './modules/codemenu' export const constantRoutes = [{ - path: '/', - redirect: 'login' - }, - { - path: '/login', - component: () => import('@/views/login/login.vue'), - name: 'login' + path: '/', + redirect: 'login' + }, + { + path: '/login', + component: () => import('@/views/login/login.vue'), + name: 'login' - }, + }, - // { - // path: '/', - // redirect: 'userInfo/index' - // }, - // { - // path: '/index', - // component: () => import('@/views/userInfo/index.vue'), - // name: 'index' + // { + // path: '/', + // redirect: 'userInfo/index' + // }, + // { + // path: '/index', + // component: () => import('@/views/userInfo/index.vue'), + // name: 'index' - // }, + // }, - { - path: '/index', - component: Layout, - redirect: '/index', - children: [{ - path: '/index', - component: () => - import('@/views/index.vue'), - name: 'index', - meta: { - title: '主页', - noCache: true, - affix: true - } - }] - }, + { + path: '/index', + component: Layout, + redirect: '/index', + children: [{ + path: '/index', + component: () => + import('@/views/index.vue'), + name: 'index', + meta: { + title: '主页', + noCache: true, + affix: true + } + }] + }, - { - path: '/userInfo', - component: Layout, - redirect: null, - meta: { - title: '用户信息' - }, - children: [{ - path: '/userInfo/index', - component: () => - import('@/views/userInfo/index.vue'), - name: 'index', - meta: { - title: '用户信息列表' - } - }, ] - }, { - path: '/pms', - component: Layout, - redirect: null, - meta: { - title: '商品管理' - }, - children: [{ - path: 'product', - name: 'product', - component: () => import('@/views/pms/product/index'), - meta: { - title: '商品列表', - icon: 'product-list' - } - }, - { - path: 'addProduct', - name: 'addProduct', - component: () => import('@/views/pms/product/add'), - meta: { - title: '添加商品', - icon: 'product-add' - } - }, { - path: 'updateProduct', - name: 'updateProduct', - component: () => import('@/views/pms/product/update'), - meta: { - title: '修改商品', - icon: 'product-add' - }, - hidden: true - }, { - path: 'productRecycle', - name: 'productRecycle', - component: () => import('@/views/pms/product/index'), - meta: { - title: '商品回收站', - icon: 'product-recycle' - }, - hidden: true - },{ - path: 'brand', - component: () => - import('@/views/pms/brand/index.vue'), - name: 'brand', - meta: { - title: '品牌管理' - } - }, - { - path: 'addBrand', - name: 'addBrand', - component: () => import('@/views/pms/brand/add'), - meta: { - title: '添加品牌' - }, - hidden: true - }, - { - path: 'updateBrand', - name: 'updateBrand', - component: () => import('@/views/pms/brand/update'), - meta: { - title: '编辑品牌' - }, - hidden: true - }, - { - path: 'productCate', - component: () => - import('@/views/pms/productCate/index'), - name: 'productCate', - meta: { - title: '商品分类' - } - }, - { - path: 'addProductCate', - name: 'addProductCate', - component: () => import('@/views/pms/productCate/add'), - meta: { - title: '添加商品分类' - }, - hidden: true - }, - { - path: 'updateProductCate', - name: 'updateProductCate', - component: () => import('@/views/pms/productCate/update'), - meta: { - title: '修改商品分类' - }, - hidden: true - }, - { - path: 'productAttr', - component: () => - import('@/views/pms/productAttr/index'), - name: 'giftCard', - meta: { - title: '商品类型' - } - }, + { + path: '/userInfo', + component: Layout, + redirect: null, + meta: { + title: '用户信息' + }, + children: [{ + path: '/userInfo/index', + component: () => + import('@/views/userInfo/index.vue'), + name: 'index', + meta: { + title: '用户信息列表' + } + }, ] + }, { + path: '/pms', + component: Layout, + redirect: null, + meta: { + title: '商品管理' + }, + children: [{ + path: 'product', + name: 'product', + component: () => import('@/views/pms/product/index'), + meta: { + title: '商品列表', + icon: 'product-list' + } + }, + { + path: 'addProduct', + name: 'addProduct', + component: () => import('@/views/pms/product/add'), + meta: { + title: '添加商品', + icon: 'product-add' + } + }, { + path: 'updateProduct', + name: 'updateProduct', + component: () => import('@/views/pms/product/update'), + meta: { + title: '修改商品', + icon: 'product-add' + }, + hidden: true + }, { + path: 'productRecycle', + name: 'productRecycle', + component: () => import('@/views/pms/product/index'), + meta: { + title: '商品回收站', + icon: 'product-recycle' + }, + hidden: true + }, { + path: 'brand', + component: () => + import('@/views/pms/brand/index.vue'), + name: 'brand', + meta: { + title: '品牌管理' + } + }, + { + path: 'addBrand', + name: 'addBrand', + component: () => import('@/views/pms/brand/add'), + meta: { + title: '添加品牌' + }, + hidden: true + }, + { + path: 'updateBrand', + name: 'updateBrand', + component: () => import('@/views/pms/brand/update'), + meta: { + title: '编辑品牌' + }, + hidden: true + }, + { + path: 'productCate', + component: () => + import('@/views/pms/productCate/index'), + name: 'productCate', + meta: { + title: '商品分类' + } + }, + { + path: 'addProductCate', + name: 'addProductCate', + component: () => import('@/views/pms/productCate/add'), + meta: { + title: '添加商品分类' + }, + hidden: true + }, + { + path: 'updateProductCate', + name: 'updateProductCate', + component: () => import('@/views/pms/productCate/update'), + meta: { + title: '修改商品分类' + }, + hidden: true + }, + { + path: 'productAttr', + component: () => + import('@/views/pms/productAttr/index'), + name: 'giftCard', + meta: { + title: '商品类型' + } + }, - ] - }, { - path: '/marketingCard', - component: Layout, - redirect: '/marketingCard/applet', - children: [ + ] + }, { + path: '/marketingCard', + component: Layout, + redirect: '/marketingCard/applet', + children: [ - { - path: '/marketingCard/applet', - component: () => import('@/views/marketingCard/applet.vue'), - name: 'applet', - meta: { - title: '小程序礼包设置', - noCache: true - } - }, { - path: '/marketingCard/newUserGift', - component: () => import('@/views/marketingCard/newUserGift.vue'), - name: 'newUserGift', - meta: { - title: '新人推荐礼包设置', - noCache: true - } - },{ - path: '/marketingCard/index', - component: () => import('@/views/marketingCard/index.vue'), - name: 'index', - meta: { - title: '礼包设置', - noCache: true - } - }, + { + path: '/marketingCard/applet', + component: () => import('@/views/marketingCard/applet.vue'), + name: 'applet', + meta: { + title: '小程序礼包设置', + noCache: true + } + }, { + path: '/marketingCard/newUserGift', + component: () => import('@/views/marketingCard/newUserGift.vue'), + name: 'newUserGift', + meta: { + title: '新人推荐礼包设置', + noCache: true + } + }, { + path: '/marketingCard/index', + component: () => import('@/views/marketingCard/index.vue'), + name: 'index', + meta: { + title: '礼包设置', + noCache: true + } + }, - { - path: '/marketingCard/pickupCardSet', - component: () => import('@/views/marketingCard/pickupCardSet.vue'), - name: 'pickupCardSet', - meta: { - title: '个人卡设置', - noCache: true - } - }, - { - path: '/marketingCard/corporateCardSet', - component: () => import('@/views/marketingCard/corporateCardSet.vue'), - name: 'corporateCardSet', - meta: { - title: '企业卡设置', - noCache: true - } - }, - // { - // path: '/marketingCard/grantRecords', - // component: () => import('@/views/marketingCard/grantRecords.vue'), - // name: 'grantRecords', - // meta: { - // title: '发放记录', - // noCache: true - // } - // }, - // { - // path: '/marketingCard/carList', - // component: () => import('@/views/marketingCard/carList.vue'), - // name: 'carList', - // meta: { - // title: '提货卡列表', - // noCache: true - // } - // }, - ] - }, { - path: '/cardManage', - component: Layout, - redirect: '/cardManage/person', - children: [{ - path: '/cardManage/person', - component: () => import('@/views/cardManage/person.vue'), - name: 'person', - meta: { - title: '个人卡统计', - noCache: true - } - }, + { + path: '/marketingCard/pickupCardSet', + component: () => import('@/views/marketingCard/pickupCardSet.vue'), + name: 'pickupCardSet', + meta: { + title: '个人卡设置', + noCache: true + } + }, + { + path: '/marketingCard/corporateCardSet', + component: () => import('@/views/marketingCard/corporateCardSet.vue'), + name: 'corporateCardSet', + meta: { + title: '企业卡设置', + noCache: true + } + }, + // { + // path: '/marketingCard/grantRecords', + // component: () => import('@/views/marketingCard/grantRecords.vue'), + // name: 'grantRecords', + // meta: { + // title: '发放记录', + // noCache: true + // } + // }, + // { + // path: '/marketingCard/carList', + // component: () => import('@/views/marketingCard/carList.vue'), + // name: 'carList', + // meta: { + // title: '提货卡列表', + // noCache: true + // } + // }, + ] + }, { + path: '/cardManage', + component: Layout, + redirect: '/cardManage/person', + children: [{ + path: '/cardManage/person', + component: () => import('@/views/cardManage/person.vue'), + name: 'person', + meta: { + title: '个人卡统计', + noCache: true + } + }, - { - path: '/cardManage/enterprise', - component: () => import('@/views/cardManage/enterprise.vue'), - name: 'enterprise', - meta: { - title: '企业卡统计', - noCache: true - } - }, - { - path: '/cardManage/giftCard', - component: () => import('@/views/cardManage/giftCard.vue'), - name: 'giftCard', - meta: { - title: '福利卡统计', - noCache: true - } - }, - ] - }, { + { + path: '/cardManage/enterprise', + component: () => import('@/views/cardManage/enterprise.vue'), + name: 'enterprise', + meta: { + title: '企业卡统计', + noCache: true + } + }, + { + path: '/cardManage/giftCard', + component: () => import('@/views/cardManage/giftCard.vue'), + name: 'giftCard', + meta: { + title: '福利卡统计', + noCache: true + } + }, + ] + }, { path: '/pickupPoint', component: Layout, redirect: '/pickupPoint/index', @@ -300,7 +300,7 @@ export const constantRoutes = [{ meta: { title: '优惠券管理' } - },{ + }, { path: '/coupon/add', component: () => import('@/views/coupon/add.vue'), @@ -310,210 +310,222 @@ export const constantRoutes = [{ } }] }, - { - path: '/network', - component: Layout, - redirect: '/network/index', - children: [{ - path: '/network/index', - component: () => - import('@/views/network/index.vue'), - name: 'index', - meta: { - title: '支行管理' - } - }, ] - }, + { + path: '/network', + component: Layout, + redirect: '/network/index', + children: [{ + path: '/network/index', + component: () => + import('@/views/network/index.vue'), + name: 'index', + meta: { + title: '支行管理' + } + }, ] + }, - { - path: '/commodity', - component: Layout, - redirect: '/commodity/index', - children: [{ - path: '/commodity/index', - component: () => - import('@/views/commodity/index.vue'), - name: 'index', - meta: { - title: '商品信息' - } - }, ] - }, - { - path: '/order', - component: Layout, - redirect: '/order/index', - children: [{ - path: '/order/index', - component: () => - import('@/views/order/index.vue'), - name: 'index', - meta: { - title: '订单统计' - } - }, { - path: '/order/distributionCount', - component: () => - import('@/views/order/distributionCount.vue'), - name: 'distributionCount', - meta: { - title: '网点配货统计' - } - }, { - path: '/order/subBranch', - component: () => - import('@/views/order/subBranch.vue'), - name: 'subBranch', - meta: { - title: '支行配货统计' - } - }, - { - path: '/order/allDistributionCount', - component: () => - import('@/views/order/allDistributionCount.vue'), - name: 'allDistributionCount', - meta: { - title: '总配货统计' - } - } - ] - }, - { - path: '/orderreserve', - component: Layout, - redirect: '/orderreserve/index', - children: [{ - path: '/orderreserve/index', - component: () => - import('@/views/orderreserve/index.vue'), - name: 'OrderreserveIndex', - meta: { - title: '预约单统计' - } - }, { - path: '/orderreserve/distributionCount', - component: () => - import('@/views/orderreserve/distributionCount.vue'), - name: 'OrderreserveDistributionCount', - meta: { - title: '网点配货统计' - } - }, { - path: '/orderreserve/subBranch', - component: () => - import('@/views/orderreserve/subBranch.vue'), - name: 'OrderreserveSubBranch', - meta: { - title: '支行配货统计' - } - }, - { - path: '/orderreserve/allDistributionCount', - component: () => - import('@/views/orderreserve/allDistributionCount.vue'), - name: 'OrderreserveAllDistributionCount', - meta: { - title: '总配货统计' - } - } - ] - }, { - path: '/statisticalReport', - component: Layout, - redirect: '/statisticalReport/index', - children: [{ - path: '/statisticalReport/index', - component: () => import('@/views/statisticalReport/index.vue'), - name: 'index', - meta: { - title: '提货卡汇总', - noCache: true - } - }, - { - path: '/statisticalReport/collectionSummary', - component: () => import('@/views/statisticalReport/collectionSummary.vue'), - name: 'collectionSummary', - meta: { - title: '提货汇总', - noCache: true - } - }, - { - path: '/statisticalReport/deliveryDetails', - component: () => import('@/views/statisticalReport/deliveryDetails.vue'), - name: 'deliveryDetails', - meta: { - title: '客户提货明细', - noCache: true - } - } - ] - }, - { - path: '/print', - component: Layout, - redirect: '/print/index', - children: [{ - path: '/print/index', - component: () => - import('@/views/print/index.vue'), - name: 'index', - meta: { - title: '打印电子卡' - } - }, { - path: '/print/enterpriseCrad', - component: () => - import('@/views/print/enterpriseCrad.vue'), - name: 'enterpriseCrad', - meta: { - title: '打印企业卡' - } - }, ] - }, - { - path: '/appletNotice', - component: Layout, - redirect: '/appletNotice/index', - children: [{ - path: '/appletNotice/index', - component: () => - import('@/views/appletNotice/index.vue'), - name: 'index', - meta: { - title: '小程序通告' - } - }, ] - }, + { + path: '/commodity', + component: Layout, + redirect: '/commodity/index', + children: [{ + path: '/commodity/index', + component: () => + import('@/views/commodity/index.vue'), + name: 'index', + meta: { + title: '商品信息' + } + }, ] + }, + { + path: '/order', + component: Layout, + redirect: '/order/index', + children: [{ + path: '/order/index', + component: () => + import('@/views/order/index.vue'), + name: 'index', + meta: { + title: '订单统计' + } + }, { + path: '/order/distributionCount', + component: () => + import('@/views/order/distributionCount.vue'), + name: 'distributionCount', + meta: { + title: '网点配货统计' + } + }, { + path: '/order/subBranch', + component: () => + import('@/views/order/subBranch.vue'), + name: 'subBranch', + meta: { + title: '支行配货统计' + } + }, + { + path: '/order/allDistributionCount', + component: () => + import('@/views/order/allDistributionCount.vue'), + name: 'allDistributionCount', + meta: { + title: '总配货统计' + } + } + ] + }, + { + path: '/orderreserve', + component: Layout, + redirect: '/orderreserve/index', + children: [{ + path: '/orderreserve/index', + component: () => + import('@/views/orderreserve/index.vue'), + name: 'OrderreserveIndex', + meta: { + title: '预约单统计' + } + }, { + path: '/orderreserve/distributionCount', + component: () => + import('@/views/orderreserve/distributionCount.vue'), + name: 'OrderreserveDistributionCount', + meta: { + title: '网点配货统计' + } + }, { + path: '/orderreserve/subBranch', + component: () => + import('@/views/orderreserve/subBranch.vue'), + name: 'OrderreserveSubBranch', + meta: { + title: '支行配货统计' + } + }, + { + path: '/orderreserve/allDistributionCount', + component: () => + import('@/views/orderreserve/allDistributionCount.vue'), + name: 'OrderreserveAllDistributionCount', + meta: { + title: '总配货统计' + } + } + ] + }, { + path: '/statisticalReport', + component: Layout, + redirect: '/statisticalReport/index', + children: [{ + path: '/statisticalReport/index', + component: () => import('@/views/statisticalReport/index.vue'), + name: 'index', + meta: { + title: '提货卡汇总', + noCache: true + } + }, + { + path: '/statisticalReport/collectionSummary', + component: () => import('@/views/statisticalReport/collectionSummary.vue'), + name: 'collectionSummary', + meta: { + title: '提货汇总', + noCache: true + } + }, + { + path: '/statisticalReport/deliveryDetails', + component: () => import('@/views/statisticalReport/deliveryDetails.vue'), + name: 'deliveryDetails', + meta: { + title: '客户提货明细', + noCache: true + } + } + ] + }, + { + path: '/print', + component: Layout, + redirect: '/print/index', + children: [{ + path: '/print/index', + component: () => + import('@/views/print/index.vue'), + name: 'index', + meta: { + title: '打印电子卡' + } + }, { + path: '/print/enterpriseCrad', + component: () => + import('@/views/print/enterpriseCrad.vue'), + name: 'enterpriseCrad', + meta: { + title: '打印企业卡' + } + }, ] + }, { + path: '/appletNotice', + component: Layout, + redirect: '/appletNotice/index', + children: [{ + path: '/appletNotice/index', + component: () => + import('@/views/appletNotice/index.vue'), + name: 'index', + meta: { + title: '小程序通告' + } + }, ] + }, { + path: '/appletBanner', + component: Layout, + redirect: '/appletBanner/index', + children: [{ + path: '/appletBanner/index', + component: () => + import('@/views/appletBanner/index.vue'), + name: 'AppletBannerIndex', + meta: { + title: '小程序轮播图' + } + }, ] + }, - ...codemenu, - { - path: '/404', - component: () => - import('@/views/404'), - hidden: true - } - // 404 page must be placed at the end !!! - // { path: '*', redirect: '/404', hidden: true } + ...codemenu, + { + path: '/404', + component: () => + import('@/views/404'), + hidden: true + } + // 404 page must be placed at the end !!! + // { path: '*', redirect: '/404', hidden: true } ] const createRouter = () => new Router({ - // mode: 'history', // require service support - scrollBehavior: () => ({ - y: 0 - }), - routes: constantRoutes + // mode: 'history', // require service support + scrollBehavior: () => ({ + y: 0 + }), + routes: constantRoutes }) const router = createRouter() // Detail see: https://github.com/vuejs/vue-router/issues/1234#issuecomment-357941465 export function resetRouter() { - const newRouter = createRouter() - router.matcher = newRouter.matcher // reset router + const newRouter = createRouter() + router.matcher = newRouter.matcher // reset router } export default router diff --git a/src/views/appletBanner/appletBannerAdd.vue b/src/views/appletBanner/appletBannerAdd.vue new file mode 100644 index 0000000..ae50c0c --- /dev/null +++ b/src/views/appletBanner/appletBannerAdd.vue @@ -0,0 +1,253 @@ + + + + diff --git a/src/views/appletBanner/index.vue b/src/views/appletBanner/index.vue new file mode 100644 index 0000000..fbd5069 --- /dev/null +++ b/src/views/appletBanner/index.vue @@ -0,0 +1,258 @@ + + + + diff --git a/src/views/orderreserve/index.vue b/src/views/orderreserve/index.vue index 716d710..1479d75 100644 --- a/src/views/orderreserve/index.vue +++ b/src/views/orderreserve/index.vue @@ -60,6 +60,7 @@ +