From 8cec0e6ab8c4f1ec76da2009ded4df080530dc24 Mon Sep 17 00:00:00 2001 From: mabo Date: Sat, 31 Jul 2021 15:49:54 +0800 Subject: [PATCH] =?UTF-8?q?=E5=95=86=E5=AE=B6=E7=AB=AF=E5=88=97=E8=A1=A8?= =?UTF-8?q?=E9=A1=B5=E7=BC=93=E5=AD=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- seller/src/libs/routerJson.js | 565 +++++------------- seller/src/libs/util.js | 14 +- seller/src/styles/table-common.scss | 8 - seller/src/views/Main.vue | 9 +- .../views/distribution/distributionGoods.vue | 2 +- .../views/distribution/distributionOrder.vue | 2 +- .../views/goods/goods-seller/draftGoods.vue | 4 +- seller/src/views/goods/goods-seller/goods.vue | 4 +- .../shrinkable-menu/shrinkable-menu.vue | 1 - seller/src/views/member/memberComment.vue | 4 +- .../order/after-order/orderComplaint.vue | 9 +- .../after-order/orderComplaintDetail.vue | 9 +- .../order/after-order/returnGoodsOrder.vue | 9 +- .../order/after-order/returnMoneyOrder.vue | 10 +- .../after-order/reurnGoodsOrderDetail.vue | 7 + seller/src/views/order/order/orderDetail.vue | 7 + seller/src/views/order/order/orderList.vue | 9 +- .../views/order/order/virtualOrderList.vue | 9 +- .../views/order/receiptManager/receipt.vue | 4 +- seller/src/views/promotion/coupon/coupon.vue | 5 +- .../src/views/promotion/fullCut/fullCut.vue | 7 +- seller/src/views/promotion/live/live.vue | 2 +- .../src/views/promotion/pintuan/pintuan.vue | 9 +- .../views/promotion/pintuan/pintuanGoods.vue | 7 + .../src/views/promotion/seckill/seckill.vue | 15 +- .../views/promotion/seckill/seckillGoods.vue | 7 + .../views/shop/bill/accountStatementBill.vue | 9 +- seller/src/views/shop/bill/billDetail.vue | 13 +- seller/src/views/shop/bill/storeBill.vue | 10 +- seller/src/views/statistics/order.vue | 2 +- 30 files changed, 279 insertions(+), 493 deletions(-) diff --git a/seller/src/libs/routerJson.js b/seller/src/libs/routerJson.js index 6a4e6b24..f01c1975 100644 --- a/seller/src/libs/routerJson.js +++ b/seller/src/libs/routerJson.js @@ -1,511 +1,313 @@ -export const result = [ - { +export const result = [{ name: "lili", - level: 0, type: -1, title: "商品", path: "", component: "", - icon: "md-home", - isMenu: true, - url: "", - description: "", - permTypes: [], - children: [ - { - name: "goods-list", - - level: 1, - type: 0, - title: "商品管理", - path: "", - component: "Main", - icon: "md-person", - isMenu: true, - url: "", - permTypes: [], - children: [ - { - name: "goods-operation", - - level: 2, - type: 0, - title: "商品发布", - path: "goods-operation", - component: "goods-operation", - icon: "md-person", - isMenu: true, - url: "", - children: null, - permTypes: [] + children: [{ + name: "goods-list", + level: 1, + type: 0, + title: "商品管理", + path: "", + component: "Main", + children: [{ + name: "goods-operation", + level: 2, + type: 0, + title: "商品发布", + path: "goods-operation", + component: "goods-operation", + children: null, + }, + { + name: "goods", + level: 2, + type: 0, + title: "商品列表", + path: "goods", + component: "goods/goods-seller/goods", + children: null, + }, + { + path: "template-goods", + props: { + type: "TEMPLATE" }, - { - name: "goods", - - level: 2, - type: 0, - title: "商品列表", - path: "goods", - component: "goods/goods-seller/goods", - icon: "md-person", - isMenu: true, - url: "", - children: null, - permTypes: [] - }, - // { - // name: "daft-goods", - // - // level: 2, - // type: 0, - // title: "草稿商品", - // path: "daft-goods", - // component: "goods/goods-seller/draftGoods", - // icon: "md-person", - // isMenu: true, - // url: "", - // children: null, - // permTypes: [] - // }, - - { - path: "template-goods", - props: {type: "TEMPLATE"}, - - level: 2, - type: 0, - title: "商品模版", - component: "goods/goods-seller/draftGoods", - icon: "md-person", - isMenu: true, - url: "", - name: "template-goods", - children: null, - permTypes: [] - }, - { - name: "category", - - level: 2, - type: 0, - title: "店铺分类", - path: "category", - component: "goods/goods-manage/category", - icon: "md-person", - isMenu: true, - url: "", - children: null, - permTypes: [] - } - ] - } - ] + level: 2, + type: 0, + title: "商品模版", + component: "goods/goods-seller/draftGoods", + name: "template-goods", + children: null, + }, + { + name: "category", + level: 2, + type: 0, + title: "店铺分类", + path: "category", + component: "goods/goods-manage/category", + children: null, + } + ] + }] }, - { name: "order", - level: 0, type: -1, title: "订单", path: "", component: "", - icon: "md-home", - isMenu: true, - url: "", description: "", - permTypes: [], - children: [ - { + children: [{ name: "order", - level: 1, type: 0, title: "订单管理", path: "/order", component: "Main", - icon: "md-person", - isMenu: true, - url: "", - permTypes: [], - children: [ - { + children: [{ name: "orderList", - level: 2, type: 0, + keepAlive: true, title: "商品订单", path: "orderList", component: "order/order/orderList", - icon: "md-person", - isMenu: true, - url: "", children: null, - permTypes: [] }, { name: "virtualOrderList", - level: 2, type: 0, + keepAlive: true, title: "虚拟订单", path: "virtualOrderList", component: "order/order/virtualOrderList", - icon: "md-person", - isMenu: true, - url: "", - children: null, - permTypes: [] + children: null } ] }, { name: "memberComment", - level: 1, type: 0, title: "评价管理", path: "/order", component: "Main", - icon: "md-person", - isMenu: true, - url: "", - permTypes: [], - children: [ - { - name: "memberComment", - - level: 2, - type: 0, - title: "评价管理", - path: "memberComment", - component: "member/memberComment", - icon: "md-person", - isMenu: true, - url: "", - children: null, - permTypes: [] - } - ] + children: [{ + name: "memberComment", + level: 2, + type: 0, + title: "评价管理", + path: "memberComment", + component: "member/memberComment", + children: null, + }] }, { name: "order", - level: 1, type: 0, title: "售后管理", path: "/order", component: "Main", - icon: "md-person", - isMenu: true, - url: "", - permTypes: [], - children: [ - { + children: [{ name: "returnGoodsOrder", - level: 2, type: 0, + keepAlive: true, title: "退货管理", path: "returnGoodsOrder", component: "order/after-order/returnGoodsOrder", - icon: "md-person", - isMenu: true, - url: "", - permTypes: [], children: null }, { name: "returnMoneyOrder", - level: 2, type: 0, + keepAlive: true, title: "退款管理", path: "returnMoneyOrder", component: "order/after-order/returnMoneyOrder", - icon: "md-person", - isMenu: true, - url: "", - permTypes: [], children: null }, { name: "orderComplaint", - level: 2, type: 0, + keepAlive: true, title: "投诉管理", path: "orderComplaint", component: "order/after-order/orderComplaint", - icon: "md-person", - isMenu: true, - url: "", - permTypes: [], children: null } ] } ] }, - { name: "bill", - level: 0, type: -1, title: "财务", path: "", component: "", - icon: "md-home", - isMenu: true, - url: "", - description: "", - permTypes: [], - children: [ - { + children: [{ name: "bill", - level: 1, type: 0, title: "财务管理", path: "/bill", component: "Main", - icon: "md-person", - isMenu: true, - url: "", - permTypes: [], - children: [ - { + children: [{ name: "accountStatementBill", - level: 2, type: 0, + keepAlive: true, title: "财务对账", path: "accountStatementBill", component: "shop/bill/accountStatementBill", - icon: "md-person", - isMenu: true, - url: "", - permTypes: [], children: null }, { name: "storeBill", - level: 2, type: 0, + keepAlive: true, title: "店铺结算", path: "storeBill", component: "shop/bill/storeBill", - icon: "md-person", - isMenu: true, - url: "", - permTypes: [], children: null } ] }, - { name: "receiptManager", - level: 1, type: 0, title: "发票管理", path: "/bill", component: "Main", - icon: "md-person", - isMenu: true, - url: "", - permTypes: [], - children: [ - { - name: "receipt", - - level: 2, - type: 0, - title: "发票管理", - path: "receipt", - component: "order/receiptManager/receipt", - icon: "md-person", - isMenu: true, - url: "", - children: null, - permTypes: [] - } - ] + children: [{ + name: "receipt", + level: 2, + type: 0, + title: "发票管理", + path: "receipt", + component: "order/receiptManager/receipt", + children: null + }] } ] }, { name: "promotion", - level: 0, type: -1, title: "营销", path: "", component: "", - icon: "md-home", - isMenu: true, - url: "", - description: "", - permTypes: [], - children: [ - { + children: [{ name: "promotion", - level: 1, type: 0, title: "平台活动", path: "/promotion", component: "Main", - icon: "md-person", - isMenu: true, - url: "", - permTypes: [], - children: [ - { + children: [{ name: "pintuan", - level: 2, type: 0, + keepAlive: true, title: "拼团活动", path: "pintuan", component: "promotion/pintuan/pintuan", - icon: "md-person", - isMenu: true, - url: "", - permTypes: [], children: null }, { name: "seckill", - level: 2, type: 0, + keepAlive: true, title: "秒杀活动", path: "seckill", component: "promotion/seckill/seckill", - icon: "md-person", - isMenu: true, - url: "", - permTypes: [], children: null } ] }, { name: "lives", - level: 1, type: 0, title: "直播活动", path: "/promotion", component: "Main", - icon: "md-person", - isMenu: true, - url: "", - permTypes: [], - children: [ - { + children: [{ name: "live", - level: 2, type: 0, title: "直播管理", path: "live", component: "promotion/live/live", - icon: "md-person", - isMenu: true, - url: "", - permTypes: [], children: null }, { name: "liveGoods", - level: 2, type: 0, title: "直播商品", path: "liveGoods", component: "promotion/live/liveGoods", - icon: "md-person", - isMenu: true, - url: "", - permTypes: [], children: null } ] }, { name: "storePromotion", - level: 1, type: 0, title: "商家活动", path: "/storePromotion", component: "Main", - icon: "md-person", - isMenu: true, - url: "", - permTypes: [], - children: [ - { + children: [{ name: "full-cut", - level: 2, type: 0, title: "满额活动", path: "full-cut", component: "promotion/fullCut/fullCut", - icon: "md-person", - isMenu: true, - url: "", - permTypes: [], children: null }, { name: "coupon", - level: 2, type: 0, title: "优惠券", path: "coupon", component: "promotion/coupon/coupon", - icon: "md-person", - isMenu: true, - url: "", - permTypes: [], children: null }, - ] }, { name: "distribution", - level: 1, type: 0, title: "分销管理", path: "/distribution", component: "Main", - icon: "md-person", - isMenu: true, - url: "", - permTypes: [], - children: [ - { + children: [{ name: "distributionGoods", level: 2, type: 0, title: "分销商品", path: "distributionGoods", component: "distribution/distributionGoods", - icon: "md-person", - isMenu: true, - url: "", - permTypes: [], children: null }, { @@ -515,17 +317,12 @@ export const result = [ title: "分销订单", path: "distributionOrder", component: "distribution/distributionOrder", - icon: "md-person", - isMenu: true, - url: "", - permTypes: [], children: null } ] } ] }, - { name: "statistics", level: 0, @@ -533,68 +330,43 @@ export const result = [ title: "统计", path: "", component: "", - icon: "md-home", - isMenu: true, - url: "", - description: "", - permTypes: [], - children: [ - { - name: "statistics", - level: 1, - type: 0, - title: "统计管理", - path: "/statistics", - component: "Main", - icon: "md-person", - isMenu: true, - url: "", - permTypes: [], - children: [ - { - name: "goodsStatistics", - level: 2, - type: 0, - title: "商品统计", - path: "goodsStatistics", - component: "statistics/goods", - icon: "md-person", - isMenu: true, - url: "", - permTypes: [], - children: null - }, - { - name: "orderStatistics", - level: 2, - type: 0, - title: "订单统计", - path: "orderStatistics", - component: "statistics/order", - icon: "md-person", - isMenu: true, - url: "", - permTypes: [], - children: null - }, - { - name: "trafficStatistics", - level: 2, - type: 0, - title: "流量统计", - path: "trafficStatistics", - component: "statistics/traffic", - icon: "md-person", - isMenu: true, - url: "", - permTypes: [], - children: null - }, - ] - } - ] + children: [{ + name: "statistics", + level: 1, + type: 0, + title: "统计管理", + path: "/statistics", + component: "Main", + children: [{ + name: "goodsStatistics", + level: 2, + type: 0, + title: "商品统计", + path: "goodsStatistics", + component: "statistics/goods", + children: null + }, + { + name: "orderStatistics", + level: 2, + type: 0, + title: "订单统计", + path: "orderStatistics", + component: "statistics/order", + children: null + }, + { + name: "trafficStatistics", + level: 2, + type: 0, + title: "流量统计", + path: "trafficStatistics", + component: "statistics/traffic", + children: null + }, + ] + }] }, - { name: "settings", level: 0, @@ -602,22 +374,14 @@ export const result = [ title: "设置", path: "", component: "", - icon: "md-home", - isMenu: true, - url: "", description: "", - children: [ - { + children: [{ name: "user-manage", level: 1, type: 0, title: "页面设置", path: "user-manage", component: "sys/user-manage/userManage", - icon: "md-person", - isMenu: true, - url: "", - permTypes: [], children: [] }, { @@ -627,22 +391,13 @@ export const result = [ title: "配送设置", path: "", component: "Main", - icon: "md-person", - isMenu: true, - url: "", - permTypes: [], - children: [ - { + children: [{ name: "shipTemplate", level: 2, type: 0, title: "配送模板", path: "shipTemplate", component: "shop/ship/shipTemplate", - icon: "md-person", - isMenu: true, - url: "", - permTypes: [], children: null }, { @@ -652,10 +407,6 @@ export const result = [ title: "物流公司", path: "logistics", component: "shop/ship/logistics", - icon: "md-person", - isMenu: true, - url: "", - permTypes: [], children: null } ] @@ -667,88 +418,52 @@ export const result = [ title: "店铺管理", path: "/shop", component: "Main", - icon: "md-person", - isMenu: true, - url: "", description: "", - children: [ - { + children: [{ name: "shopSetting", - level: 2, type: 0, title: "店铺设置", path: "shopSetting", component: "shop/shopSetting", - icon: "md-log-in", - isMenu: true, - url: null, - description: null, children: null, - permTypes: [] }, { name: "shopAddress", - level: 2, type: 0, title: "自提管理", path: "shopAddress", component: "shop/shopAddress", - icon: "md-log-in", - isMenu: true, - url: null, - description: null, children: null, - permTypes: [] } - ] } ] }, { name: "messages", - level: 0, type: -1, title: "消息", path: "", component: "", - icon: "md-home", - isMenu: true, - url: "", - description: "", - children: [ - { - name: "user-manage", - - level: 1, + children: [{ + name: "user-manage", + level: 1, + type: 0, + title: "系统消息", + path: "user-manage", + component: "sys/user-manage/userManage", + children: [{ + name: "message_index", + level: 2, type: 0, title: "系统消息", - path: "user-manage", - component: "sys/user-manage/userManage", - icon: "md-person", - isMenu: true, - url: "", - permTypes: [], - children: [ - { - name: "message_index", - - level: 2, - type: 0, - title: "系统消息", - path: "message", - component: "message", - icon: "md-person", - isMenu: true, - url: "", - permTypes: [], - children: null - } - ] - } - ] + path: "message", + component: "message", + children: null + }] + }] } ]; diff --git a/seller/src/libs/util.js b/seller/src/libs/util.js index f850e358..3f28faae 100644 --- a/seller/src/libs/util.js +++ b/seller/src/libs/util.js @@ -1,7 +1,4 @@ -import axios from 'axios'; -import { getMenuList } from '@/api/index'; import lazyLoading from './lazyLoading.js'; -import router from '@/router/index'; import Cookies from "js-cookie"; import { result } from './routerJson.js'; @@ -233,7 +230,6 @@ util.openNewPage = function (vm, name, argu, query) { if (query) { tag.query = query; } - console.log(tag); vm.$store.commit('increateTag', tag); } } @@ -399,7 +395,6 @@ util.initMenuData = function (vm, data) { let nav = { name: e.name, title: e.title, - icon: e.icon } navList.push(nav); }) @@ -450,20 +445,17 @@ util.initRouterNode = function (routers, data) { // data为所有子菜单数 for (var item of data) { let menu = Object.assign({}, item); - // menu.component = import(`@/views/${menu.component}.vue`); menu.component = lazyLoading(menu.component); if (item.children && item.children.length > 0) { menu.children = []; util.initRouterNode(menu.children, item.children); } - let meta = {}; - // 给页面添加权限、标题、第三方网页链接 - meta.permTypes = menu.permTypes ? menu.permTypes : null; + // 给页面添加标题 meta.title = menu.title ? menu.title + " - lilishop商家后台" : null; - meta.url = menu.url ? menu.url : null; - meta.firstRouterName = item.firstRouterName + meta.firstRouterName = menu.firstRouterName + meta.keepAlive = menu.keepAlive ? true : false menu.meta = meta; routers.push(menu); diff --git a/seller/src/styles/table-common.scss b/seller/src/styles/table-common.scss index e03d6086..10e830c4 100644 --- a/seller/src/styles/table-common.scss +++ b/seller/src/styles/table-common.scss @@ -11,14 +11,6 @@ .select-clear { margin-left: 10px; } - - .page { - margin-top: 2vh; - } - - .drop-down { - margin-left: 5px; - } } .tree-list { diff --git a/seller/src/views/Main.vue b/seller/src/views/Main.vue index 378a1c36..4947c187 100644 --- a/seller/src/views/Main.vue +++ b/seller/src/views/Main.vue @@ -39,9 +39,12 @@
- - + + + + +
@@ -65,7 +68,7 @@ export default { data() { return { sliceNum: 5, // 展示nav数量 - userInfo: "", // 用户信息 + userInfo: {}, // 用户信息 navType: 1, // nav类型 }; }, diff --git a/seller/src/views/distribution/distributionGoods.vue b/seller/src/views/distribution/distributionGoods.vue index 10af2831..2b60b06f 100644 --- a/seller/src/views/distribution/distributionGoods.vue +++ b/seller/src/views/distribution/distributionGoods.vue @@ -35,7 +35,7 @@ - + diff --git a/seller/src/views/distribution/distributionOrder.vue b/seller/src/views/distribution/distributionOrder.vue index 4252592e..533c6257 100644 --- a/seller/src/views/distribution/distributionOrder.vue +++ b/seller/src/views/distribution/distributionOrder.vue @@ -12,7 +12,7 @@
- + diff --git a/seller/src/views/goods/goods-seller/draftGoods.vue b/seller/src/views/goods/goods-seller/draftGoods.vue index 8456bd3d..16a95f11 100644 --- a/seller/src/views/goods/goods-seller/draftGoods.vue +++ b/seller/src/views/goods/goods-seller/draftGoods.vue @@ -60,7 +60,7 @@ class="mt_10" sortable="custom" > - + { return h("img", { diff --git a/seller/src/views/goods/goods-seller/goods.vue b/seller/src/views/goods/goods-seller/goods.vue index 453300c2..2bd27468 100644 --- a/seller/src/views/goods/goods-seller/goods.vue +++ b/seller/src/views/goods/goods-seller/goods.vue @@ -64,7 +64,7 @@ - + @@ -664,7 +664,7 @@ export default { mounted() { this.init(); }, - activated() { + mounted() { this.init(); }, }; diff --git a/seller/src/views/main-components/shrinkable-menu/shrinkable-menu.vue b/seller/src/views/main-components/shrinkable-menu/shrinkable-menu.vue index c73d90c2..ded3e958 100644 --- a/seller/src/views/main-components/shrinkable-menu/shrinkable-menu.vue +++ b/seller/src/views/main-components/shrinkable-menu/shrinkable-menu.vue @@ -50,7 +50,6 @@ export default { // 监听路由变化 $route: { handler: function (val, oldVal) { - console.log(val); if (val.meta.firstRouterName && val.meta.firstRouterName !== this.currNav) { this.selectNav(val.meta.firstRouterName) } diff --git a/seller/src/views/member/memberComment.vue b/seller/src/views/member/memberComment.vue index a8197c62..1d2661d8 100644 --- a/seller/src/views/member/memberComment.vue +++ b/seller/src/views/member/memberComment.vue @@ -49,7 +49,7 @@ ref="table" class="mt_10" > - + - + diff --git a/seller/src/views/promotion/seckill/seckillGoods.vue b/seller/src/views/promotion/seckill/seckillGoods.vue index 72ab5695..abc4e101 100644 --- a/seller/src/views/promotion/seckill/seckillGoods.vue +++ b/seller/src/views/promotion/seckill/seckillGoods.vue @@ -395,6 +395,13 @@ export default { mounted() { this.init(); }, + // 如果是从详情页返回列表页,修改列表页keepAlive为true,确保不刷新页面 + beforeRouteLeave(to, from, next){ + if(to.name === 'seckill') { + to.meta.keepAlive = true + } + next() + } };