From efdac48dc15379fcdc6efce88a2f2021b78d86e8 Mon Sep 17 00:00:00 2001 From: raowenbin Date: Sun, 7 Apr 2024 13:47:22 +0800 Subject: [PATCH 1/7] =?UTF-8?q?=E5=88=9D=E5=A7=8B=E5=8C=96=E7=89=88?= =?UTF-8?q?=E6=9C=AC?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- deploy/litemall/application.yml | 6 +- .../litemall/admin/job/CouponJob.java | 2 +- .../admin/service/AdminGoodsService.java | 13 +- .../admin/web/AdminDashbordController.java | 9 +- .../admin/web/AdminDictController.java | 110 +++ .../admin/web/AdminUserController.java | 6 +- .../src/main/resources/application.yml | 2 +- litemall-admin/.env.production | 2 +- litemall-admin/package.json | 4 +- litemall-admin/src/router/index.js | 447 ++++------ litemall-admin/src/views/config/mall.vue | 16 +- litemall-admin/src/views/dashboard/index.vue | 20 +- litemall-admin/src/views/errorPage/404.vue | 4 +- litemall-admin/src/views/goods/create.vue | 2 +- litemall-admin/src/views/goods/list.vue | 105 ++- .../src/views/layout/components/Navbar.vue | 4 +- litemall-admin/src/views/login/index.vue | 8 +- litemall-admin/src/views/promotion/topic.vue | 80 +- litemall-admin/src/views/user/collect.vue | 26 +- litemall-admin/src/views/user/footprint.vue | 14 +- litemall-admin/src/views/user/user.vue | 52 +- litemall-admin/vue.config.js | 7 +- .../src/main/resources/application.yml | 2 +- .../src/main/resources/application-core.yml | 6 +- .../litemall/db/dao/LitemallDictMapper.java | 28 + .../litemall/db/domain/LitemallDict.java | 408 +++++++++ .../db/domain/LitemallDictExample.java | 795 ++++++++++++++++++ .../litemall/db/domain/LitemallGoods.java | 239 ++++++ .../db/domain/LitemallGoodsExample.java | 126 +++ .../litemall/db/domain/LitemallTopic.java | 199 ++++- .../db/domain/LitemallTopicExample.java | 262 +++--- .../litemall/db/domain/LitemallUser.java | 14 + .../db/domain/LitemallUserExample.java | 5 + .../litemall/db/enums/UserType.java | 19 + .../db/service/LitemallDictService.java | 90 ++ .../db/service/LitemallGoodsService.java | 12 +- .../db/service/LitemallTopicService.java | 25 +- .../db/service/LitemallUserService.java | 7 +- .../src/main/resources/application-db.yml | 10 +- .../litemall/db/dao/LitemallDictMapper.xml | 517 ++++++++++++ .../litemall/db/dao/LitemallGoodsMapper.xml | 462 +++++++++- .../litemall/db/dao/LitemallTopicMapper.xml | 386 ++++++++- .../litemall/db/dao/LitemallUserMapper.xml | 26 +- .../litemall/wx/dto/GoodsAllinone.java | 46 + .../linlinjava/litemall/wx/dto/UserInfo.java | 11 + .../litemall/wx/service/WxGoodsService.java | 327 +++++++ .../litemall/wx/web/WxAuthController.java | 8 +- .../litemall/wx/web/WxDictController.java | 68 ++ .../litemall/wx/web/WxGoodsController.java | 46 +- .../litemall/wx/web/WxStorageController.java | 7 + .../litemall/wx/web/WxTopicController.java | 67 +- litemall-wx/config/api.js | 3 +- litemall-wx/pages/auth/login/login.js | 4 +- litemall-wx/project.config.json | 648 +++++++------- 54 files changed, 4863 insertions(+), 949 deletions(-) create mode 100644 litemall-admin-api/src/main/java/org/linlinjava/litemall/admin/web/AdminDictController.java create mode 100644 litemall-db/src/main/java/org/linlinjava/litemall/db/dao/LitemallDictMapper.java create mode 100644 litemall-db/src/main/java/org/linlinjava/litemall/db/domain/LitemallDict.java create mode 100644 litemall-db/src/main/java/org/linlinjava/litemall/db/domain/LitemallDictExample.java create mode 100644 litemall-db/src/main/java/org/linlinjava/litemall/db/enums/UserType.java create mode 100644 litemall-db/src/main/java/org/linlinjava/litemall/db/service/LitemallDictService.java create mode 100644 litemall-db/src/main/resources/org/linlinjava/litemall/db/dao/LitemallDictMapper.xml create mode 100644 litemall-wx-api/src/main/java/org/linlinjava/litemall/wx/dto/GoodsAllinone.java create mode 100644 litemall-wx-api/src/main/java/org/linlinjava/litemall/wx/service/WxGoodsService.java create mode 100644 litemall-wx-api/src/main/java/org/linlinjava/litemall/wx/web/WxDictController.java diff --git a/deploy/litemall/application.yml b/deploy/litemall/application.yml index 4ef7446b..40ee1198 100644 --- a/deploy/litemall/application.yml +++ b/deploy/litemall/application.yml @@ -5,10 +5,10 @@ spring: encoding: UTF-8 datasource: druid: - url: jdbc:mysql://localhost:3306/litemall?useUnicode=true&characterEncoding=UTF-8&serverTimezone=UTC&allowPublicKeyRetrieval=true&verifyServerCertificate=false&useSSL=false + url: jdbc:mysql://124.222.53.90:3306/litemall?useUnicode=true&characterEncoding=UTF-8&serverTimezone=UTC&allowPublicKeyRetrieval=true&verifyServerCertificate=false&useSSL=false driver-class-name: com.mysql.cj.jdbc.Driver - username: litemall - password: litemall123456 + username: mysql + password: czy@2024 initial-size: 10 max-active: 50 min-idle: 10 diff --git a/litemall-admin-api/src/main/java/org/linlinjava/litemall/admin/job/CouponJob.java b/litemall-admin-api/src/main/java/org/linlinjava/litemall/admin/job/CouponJob.java index 4e09ca53..2669e67a 100644 --- a/litemall-admin-api/src/main/java/org/linlinjava/litemall/admin/job/CouponJob.java +++ b/litemall-admin-api/src/main/java/org/linlinjava/litemall/admin/job/CouponJob.java @@ -31,7 +31,7 @@ public class CouponJob { * TODO * 注意,因为是相隔一个小时检查,因此导致优惠券真正超时时间可能比设定时间延迟1个小时 */ - @Scheduled(fixedDelay = 60 * 60 * 1000) +// @Scheduled(fixedDelay = 60 * 60 * 1000) public void checkCouponExpired() { logger.info("系统开启任务检查优惠券是否已经过期"); diff --git a/litemall-admin-api/src/main/java/org/linlinjava/litemall/admin/service/AdminGoodsService.java b/litemall-admin-api/src/main/java/org/linlinjava/litemall/admin/service/AdminGoodsService.java index a049e925..62edde52 100644 --- a/litemall-admin-api/src/main/java/org/linlinjava/litemall/admin/service/AdminGoodsService.java +++ b/litemall-admin-api/src/main/java/org/linlinjava/litemall/admin/service/AdminGoodsService.java @@ -14,10 +14,7 @@ import org.springframework.transaction.annotation.Transactional; import org.springframework.util.StringUtils; import java.math.BigDecimal; -import java.util.ArrayList; -import java.util.HashMap; -import java.util.List; -import java.util.Map; +import java.util.*; import static org.linlinjava.litemall.admin.util.AdminResponseCode.GOODS_NAME_EXIST; @@ -56,7 +53,7 @@ public class AdminGoodsService { } String goodsSn = goods.getGoodsSn(); if (StringUtils.isEmpty(goodsSn)) { - return ResponseUtil.badArgument(); + goods.setGoodsSn(UUID.randomUUID().toString()); } // 品牌商可以不设置,如果设置则需要验证品牌商存在 Integer brandId = goods.getBrandId(); @@ -241,9 +238,9 @@ public class AdminGoodsService { LitemallGoodsProduct[] products = goodsAllinone.getProducts(); String name = goods.getName(); - if (goodsService.checkExistByName(name)) { - return ResponseUtil.fail(GOODS_NAME_EXIST, "商品名已经存在"); - } +// if (goodsService.checkExistByName(name)) { +// return ResponseUtil.fail(GOODS_NAME_EXIST, "商品名已经存在"); +// } // 商品表里面有一个字段retailPrice记录当前商品的最低价 BigDecimal retailPrice = new BigDecimal(Integer.MAX_VALUE); diff --git a/litemall-admin-api/src/main/java/org/linlinjava/litemall/admin/web/AdminDashbordController.java b/litemall-admin-api/src/main/java/org/linlinjava/litemall/admin/web/AdminDashbordController.java index ace32f99..07e8d51c 100644 --- a/litemall-admin-api/src/main/java/org/linlinjava/litemall/admin/web/AdminDashbordController.java +++ b/litemall-admin-api/src/main/java/org/linlinjava/litemall/admin/web/AdminDashbordController.java @@ -3,10 +3,7 @@ package org.linlinjava.litemall.admin.web; import org.apache.commons.logging.Log; import org.apache.commons.logging.LogFactory; import org.linlinjava.litemall.core.util.ResponseUtil; -import org.linlinjava.litemall.db.service.LitemallGoodsProductService; -import org.linlinjava.litemall.db.service.LitemallGoodsService; -import org.linlinjava.litemall.db.service.LitemallOrderService; -import org.linlinjava.litemall.db.service.LitemallUserService; +import org.linlinjava.litemall.db.service.*; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.validation.annotation.Validated; import org.springframework.web.bind.annotation.GetMapping; @@ -29,13 +26,15 @@ public class AdminDashbordController { @Autowired private LitemallGoodsProductService productService; @Autowired + private LitemallTopicService topicService; + @Autowired private LitemallOrderService orderService; @GetMapping("") public Object info() { int userTotal = userService.count(); int goodsTotal = goodsService.count(); - int productTotal = productService.count(); + int productTotal = topicService.count(); int orderTotal = orderService.count(); Map data = new HashMap<>(); data.put("userTotal", userTotal); diff --git a/litemall-admin-api/src/main/java/org/linlinjava/litemall/admin/web/AdminDictController.java b/litemall-admin-api/src/main/java/org/linlinjava/litemall/admin/web/AdminDictController.java new file mode 100644 index 00000000..b3081cca --- /dev/null +++ b/litemall-admin-api/src/main/java/org/linlinjava/litemall/admin/web/AdminDictController.java @@ -0,0 +1,110 @@ +package org.linlinjava.litemall.admin.web; + +import org.apache.commons.logging.Log; +import org.apache.commons.logging.LogFactory; +import org.apache.shiro.authz.annotation.RequiresPermissions; +import org.linlinjava.litemall.admin.annotation.RequiresPermissionsDesc; +import org.linlinjava.litemall.core.util.JacksonUtil; +import org.linlinjava.litemall.core.util.ResponseUtil; +import org.linlinjava.litemall.core.validator.Order; +import org.linlinjava.litemall.core.validator.Sort; +import org.linlinjava.litemall.db.domain.LitemallDict; +import org.linlinjava.litemall.db.domain.LitemallDictExample; +import org.linlinjava.litemall.db.service.LitemallDictService; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.util.StringUtils; +import org.springframework.validation.annotation.Validated; +import org.springframework.web.bind.annotation.*; + +import javax.validation.constraints.NotNull; +import java.util.List; + +/** + * 字典维护 + * @author rwb + */ +@RestController +@RequestMapping("/admin/dict") +@Validated +public class AdminDictController { + + private final Log logger = LogFactory.getLog(AdminDictController.class); + + @Autowired + private LitemallDictService dictService; + + @RequiresPermissions("admin:dict:list") + @RequiresPermissionsDesc(menu = {"配置管理", "字典配置"}, button = "查询") + @GetMapping("/list") + public Object list(String name, String code, String category, + @RequestParam(defaultValue = "1") Integer page, + @RequestParam(defaultValue = "10") Integer limit, + @Sort @RequestParam(defaultValue = "add_time") String sort, + @Order @RequestParam(defaultValue = "desc") String order) { + List dictList = dictService.querySelective(code, name, category, page, limit, sort, order); + return ResponseUtil.okList(dictList); + } + + private Object validate(LitemallDict dict) { + if (StringUtils.isEmpty(dict)) { + return ResponseUtil.badArgument(); + } + return null; + } + + @RequiresPermissions("admin:dict:create") + @RequiresPermissionsDesc(menu = {"配置管理", "字典配置"}, button = "添加") + @PostMapping("/create") + public Object create(@RequestBody LitemallDict dict) { + Object error = validate(dict); + if (error != null) { + return error; + } + dictService.add(dict); + return ResponseUtil.ok(dict); + } + + @RequiresPermissions("admin:dict:read") + @RequiresPermissionsDesc(menu = {"配置管理", "字典配置"}, button = "详情") + @GetMapping("/read") + public Object read(@NotNull Integer id) { + LitemallDict dict = dictService.findById(id); + return ResponseUtil.ok(dict); + } + + @RequiresPermissions("admin:dict:update") + @RequiresPermissionsDesc(menu = {"配置管理", "字典配置"}, button = "编辑") + @PostMapping("/update") + public Object update(@RequestBody LitemallDict dict) { + Object error = validate(dict); + if (error != null) { + return error; + } + if (dictService.updateById(dict) == 0) { + return ResponseUtil.updatedDataFailed(); + } + return ResponseUtil.ok(dict); + } + + @RequiresPermissions("admin:dict:delete") + @RequiresPermissionsDesc(menu = {"配置管理", "字典配置"}, button = "删除") + @PostMapping("/delete") + public Object delete(@RequestBody LitemallDict dict) { + Integer id = dict.getId(); + if (id == null) { + return ResponseUtil.badArgument(); + } + dictService.deleteById(id); + return ResponseUtil.ok(); + } + + @RequiresPermissions("admin:dict:batchDelete") + @RequiresPermissionsDesc(menu = {"配置管理", "字典配置"}, button = "批量删除") + @PostMapping("/batchDelete") + public Object batchDelete(@RequestBody String body) { + List ids = JacksonUtil.parseIntegerList(body, "ids"); + dictService.deleteByIds(ids); + return ResponseUtil.ok(); + } + +} diff --git a/litemall-admin-api/src/main/java/org/linlinjava/litemall/admin/web/AdminUserController.java b/litemall-admin-api/src/main/java/org/linlinjava/litemall/admin/web/AdminUserController.java index 839a83d8..a54f18f2 100644 --- a/litemall-admin-api/src/main/java/org/linlinjava/litemall/admin/web/AdminUserController.java +++ b/litemall-admin-api/src/main/java/org/linlinjava/litemall/admin/web/AdminUserController.java @@ -34,14 +34,15 @@ public class AdminUserController { @RequiresPermissions("admin:user:list") @RequiresPermissionsDesc(menu = {"用户管理", "会员管理"}, button = "查询") @GetMapping("/list") - public Object list(String username, String mobile, + public Object list(String username, String mobile, String userType, @RequestParam(defaultValue = "1") Integer page, @RequestParam(defaultValue = "10") Integer limit, @Sort @RequestParam(defaultValue = "add_time") String sort, @Order @RequestParam(defaultValue = "desc") String order) { - List userList = userService.querySelective(username, mobile, page, limit, sort, order); + List userList = userService.querySelective(username, mobile, userType, page, limit, sort, order); return ResponseUtil.okList(userList); } + @RequiresPermissions("admin:user:list") @RequiresPermissionsDesc(menu = {"用户管理", "会员管理"}, button = "详情") @GetMapping("/detail") @@ -49,6 +50,7 @@ public class AdminUserController { LitemallUser user=userService.findById(id); return ResponseUtil.ok(user); } + @RequiresPermissions("admin:user:list") @RequiresPermissionsDesc(menu = {"用户管理", "会员管理"}, button = "编辑") @PostMapping("/update") diff --git a/litemall-admin-api/src/main/resources/application.yml b/litemall-admin-api/src/main/resources/application.yml index d3ca4367..80cb1a49 100644 --- a/litemall-admin-api/src/main/resources/application.yml +++ b/litemall-admin-api/src/main/resources/application.yml @@ -5,7 +5,7 @@ spring: encoding: UTF-8 server: - port: 8083 + port: 8080 logging: level: diff --git a/litemall-admin/.env.production b/litemall-admin/.env.production index 4c05b967..3568ef10 100644 --- a/litemall-admin/.env.production +++ b/litemall-admin/.env.production @@ -4,5 +4,5 @@ NODE_ENV = production ENV = 'production' # base api -VUE_APP_BASE_API = 'https://www.example.com/admin' +VUE_APP_BASE_API = 'https://www.czyinfo.cn/admin' diff --git a/litemall-admin/package.json b/litemall-admin/package.json index 35749a43..d76851b7 100644 --- a/litemall-admin/package.json +++ b/litemall-admin/package.json @@ -100,5 +100,7 @@ "browserslist": [ "> 1%", "last 2 versions" - ] + ], + "homepage": "https://github.com/linlinjava/litemall#readme", + "main": ".eslintrc.js" } diff --git a/litemall-admin/src/router/index.js b/litemall-admin/src/router/index.js index 836d62e8..a39a972b 100644 --- a/litemall-admin/src/router/index.js +++ b/litemall-admin/src/router/index.js @@ -93,16 +93,16 @@ export const asyncRoutes = [ noCache: true } }, - { - path: 'address', - component: () => import('@/views/user/address'), - name: 'address', - meta: { - perms: ['GET /admin/address/list'], - title: '收货地址', - noCache: true - } - }, + // { + // path: 'address', + // component: () => import('@/views/user/address'), + // name: 'address', + // meta: { + // perms: ['GET /admin/address/list'], + // title: '收货地址', + // noCache: true + // } + // }, { path: 'collect', component: () => import('@/views/user/collect'), @@ -153,7 +153,7 @@ export const asyncRoutes = [ alwaysShow: true, name: 'mallManage', meta: { - title: '商场管理', + title: '平台管理', icon: 'chart' }, children: [ @@ -166,46 +166,46 @@ export const asyncRoutes = [ noCache: true } }, - { - path: 'brand', - component: () => import('@/views/mall/brand'), - name: 'brand', - meta: { - perms: ['GET /admin/brand/list', 'POST /admin/brand/create', 'GET /admin/brand/read', 'POST /admin/brand/update', 'POST /admin/brand/delete'], - title: '品牌制造商', - noCache: true - } - }, - { - path: 'category', - component: () => import('@/views/mall/category'), - name: 'category', - meta: { - perms: ['GET /admin/category/list', 'POST /admin/category/create', 'GET /admin/category/read', 'POST /admin/category/update', 'POST /admin/category/delete'], - title: '商品类目', - noCache: true - } - }, - { - path: 'order', - component: () => import('@/views/mall/order'), - name: 'order', - meta: { - perms: ['GET /admin/order/list', 'GET /admin/order/detail', 'POST /admin/order/ship', 'POST /admin/order/refund', 'POST /admin/order/delete', 'POST /admin/order/reply'], - title: '订单管理', - noCache: true - } - }, - { - path: 'aftersale', - component: () => import('@/views/mall/aftersale'), - name: 'aftersale', - meta: { - perms: ['GET /admin/aftersale/list', 'GET /admin/aftersale/detail', 'POST /admin/order/receive', 'POST /admin/aftersale/complete', 'POST /admin/aftersale/reject'], - title: '售后管理', - noCache: true - } - }, + // { + // path: 'brand', + // component: () => import('@/views/mall/brand'), + // name: 'brand', + // meta: { + // perms: ['GET /admin/brand/list', 'POST /admin/brand/create', 'GET /admin/brand/read', 'POST /admin/brand/update', 'POST /admin/brand/delete'], + // title: '第三方公司', + // noCache: true + // } + // }, + // { + // path: 'category', + // component: () => import('@/views/mall/category'), + // name: 'category', + // meta: { + // perms: ['GET /admin/category/list', 'POST /admin/category/create', 'GET /admin/category/read', 'POST /admin/category/update', 'POST /admin/category/delete'], + // title: '主播类别', + // noCache: true + // } + // }, + // { + // path: 'order', + // component: () => import('@/views/mall/order'), + // name: 'order', + // meta: { + // perms: ['GET /admin/order/list', 'GET /admin/order/detail', 'POST /admin/order/ship', 'POST /admin/order/refund', 'POST /admin/order/delete', 'POST /admin/order/reply'], + // title: '订单管理', + // noCache: true + // } + // }, + // { + // path: 'aftersale', + // component: () => import('@/views/mall/aftersale'), + // name: 'aftersale', + // meta: { + // perms: ['GET /admin/aftersale/list', 'GET /admin/aftersale/detail', 'POST /admin/order/receive', 'POST /admin/aftersale/complete', 'POST /admin/aftersale/reject'], + // title: '售后管理', + // noCache: true + // } + // }, { path: 'issue', component: () => import('@/views/mall/issue'), @@ -215,17 +215,18 @@ export const asyncRoutes = [ title: '通用问题', noCache: true } - }, - { - path: 'keyword', - component: () => import('@/views/mall/keyword'), - name: 'keyword', - meta: { - perms: ['GET /admin/keyword/list', 'POST /admin/keyword/create', 'GET /admin/keyword/read', 'POST /admin/keyword/update', 'POST /admin/keyword/delete'], - title: '关键词', - noCache: true - } } + // , + // { + // path: 'keyword', + // component: () => import('@/views/mall/keyword'), + // name: 'keyword', + // meta: { + // perms: ['GET /admin/keyword/list', 'POST /admin/keyword/create', 'GET /admin/keyword/read', 'POST /admin/keyword/update', 'POST /admin/keyword/delete'], + // title: '关键词', + // noCache: true + // } + // } ] }, @@ -236,7 +237,7 @@ export const asyncRoutes = [ alwaysShow: true, name: 'goodsManage', meta: { - title: '商品管理', + title: '主播管理', icon: 'chart' }, children: [ @@ -246,41 +247,42 @@ export const asyncRoutes = [ name: 'goodsList', meta: { perms: ['GET /admin/goods/list', 'POST /admin/goods/delete'], - title: '商品列表', - noCache: true - } - }, - { - path: 'create', - component: () => import('@/views/goods/create'), - name: 'goodsCreate', - meta: { - perms: ['POST /admin/goods/create'], - title: '商品上架', - noCache: true - } - }, - { - path: 'edit', - component: () => import('@/views/goods/edit'), - name: 'goodsEdit', - meta: { - perms: ['GET /admin/goods/detail', 'POST /admin/goods/update', 'POST /admin/goods/catAndBrand'], - title: '商品编辑', - noCache: true - }, - hidden: true - }, - { - path: 'comment', - component: () => import('@/views/goods/comment'), - name: 'goodsComment', - meta: { - perms: ['GET /admin/comment/list', 'POST /admin/comment/delete'], - title: '商品评论', + title: '主播列表', noCache: true } } + // , + // { + // path: 'create', + // component: () => import('@/views/goods/create'), + // name: 'goodsCreate', + // meta: { + // perms: ['POST /admin/goods/create'], + // title: '主播新增', + // noCache: true + // } + // }, + // { + // path: 'edit', + // component: () => import('@/views/goods/edit'), + // name: 'goodsEdit', + // meta: { + // perms: ['GET /admin/goods/detail', 'POST /admin/goods/update', 'POST /admin/goods/catAndBrand'], + // title: '主播编辑', + // noCache: true + // }, + // hidden: true + // }, + // { + // path: 'comment', + // component: () => import('@/views/goods/comment'), + // name: 'goodsComment', + // meta: { + // perms: ['GET /admin/comment/list', 'POST /admin/comment/delete'], + // title: '主播评论', + // noCache: true + // } + // } ] }, { @@ -290,48 +292,17 @@ export const asyncRoutes = [ alwaysShow: true, name: 'promotionManage', meta: { - title: '推广管理', + title: '客户管理', icon: 'chart' }, children: [ - { - path: 'ad', - component: () => import('@/views/promotion/ad'), - name: 'ad', - meta: { - perms: ['GET /admin/ad/list', 'POST /admin/ad/create', 'GET /admin/ad/read', 'POST /admin/ad/update', 'POST /admin/ad/delete'], - title: '广告管理', - noCache: true - } - }, - { - path: 'coupon', - component: () => import('@/views/promotion/coupon'), - name: 'coupon', - meta: { - perms: ['GET /admin/coupon/list', 'POST /admin/coupon/create', 'POST /admin/coupon/update', 'POST /admin/coupon/delete'], - title: '优惠券管理', - noCache: true - } - }, - { - path: 'couponDetail', - component: () => import('@/views/promotion/couponDetail'), - name: 'couponDetail', - meta: { - perms: ['GET /admin/coupon/list', 'GET /admin/coupon/listuser'], - title: '优惠券详情', - noCache: true - }, - hidden: true - }, { path: 'topic', component: () => import('@/views/promotion/topic'), name: 'topic', meta: { perms: ['GET /admin/topic/list', 'POST /admin/topic/create', 'GET /admin/topic/read', 'POST /admin/topic/update', 'POST /admin/topic/delete'], - title: '专题管理', + title: '客户列表', noCache: true } }, @@ -341,7 +312,7 @@ export const asyncRoutes = [ name: 'topicCreate', meta: { perms: ['POST /admin/topic/create'], - title: '专题创建', + title: '客户新增', noCache: true }, hidden: true @@ -352,30 +323,10 @@ export const asyncRoutes = [ name: 'topicEdit', meta: { perms: ['GET /admin/topic/read', 'POST /admin/topic/update'], - title: '专题编辑', + title: '客户编辑', noCache: true }, hidden: true - }, - { - path: 'groupon-rule', - component: () => import('@/views/promotion/grouponRule'), - name: 'grouponRule', - meta: { - perms: ['GET /admin/groupon/list', 'POST /admin/groupon/create', 'POST /admin/groupon/update', 'POST /admin/groupon/delete'], - title: '团购规则', - noCache: true - } - }, - { - path: 'groupon-activity', - component: () => import('@/views/promotion/grouponActivity'), - name: 'grouponActivity', - meta: { - perms: ['GET /admin/groupon/listRecord'], - title: '团购活动', - noCache: true - } } ] }, @@ -456,132 +407,102 @@ export const asyncRoutes = [ }, children: [ { - path: 'mall', - component: () => import('@/views/config/mall'), - name: 'configMall', - meta: { - perms: ['GET /admin/config/mall', 'POST /admin/config/mall'], - title: '商场配置', - noCache: true - } - }, - { - path: 'express', - component: () => import('@/views/config/express'), - name: 'configExpress', + path: 'dict', + component: () => import('@/views/config/dict'), + name: 'configdict', meta: { - perms: ['GET /admin/config/express', 'POST /admin/config/express'], - title: '运费配置', + perms: ['GET /admin/config/dict', 'POST /admin/config/dict'], + title: '字典配置', noCache: true } }, { - path: 'order', - component: () => import('@/views/config/order'), - name: 'configOrder', - meta: { - perms: ['GET /admin/config/order', 'POST /admin/config/order'], - title: '订单配置', - noCache: true - } - }, - { - path: 'wx', - component: () => import('@/views/config/wx'), - name: 'configWx', + path: 'mall', + component: () => import('@/views/config/mall'), + name: 'configMall', meta: { - perms: ['GET /admin/config/wx', 'POST /admin/config/wx'], - title: '小程序配置', + perms: ['GET /admin/config/mall', 'POST /admin/config/mall'], + title: '平台配置', noCache: true } } + // , + // { + // path: 'express', + // component: () => import('@/views/config/express'), + // name: 'configExpress', + // meta: { + // perms: ['GET /admin/config/express', 'POST /admin/config/express'], + // title: '运费配置', + // noCache: true + // } + // }, + // { + // path: 'order', + // component: () => import('@/views/config/order'), + // name: 'configOrder', + // meta: { + // perms: ['GET /admin/config/order', 'POST /admin/config/order'], + // title: '订单配置', + // noCache: true + // } + // }, + // { + // path: 'wx', + // component: () => import('@/views/config/wx'), + // name: 'configWx', + // meta: { + // perms: ['GET /admin/config/wx', 'POST /admin/config/wx'], + // title: '小程序配置', + // noCache: true + // } + // } ] }, - { - path: '/stat', - component: Layout, - redirect: 'noredirect', - alwaysShow: true, - name: 'statManage', - meta: { - title: '统计报表', - icon: 'chart' - }, - children: [ - { - path: 'user', - component: () => import('@/views/stat/user'), - name: 'statUser', - meta: { - perms: ['GET /admin/stat/user'], - title: '用户统计', - noCache: true - } - }, - { - path: 'order', - component: () => import('@/views/stat/order'), - name: 'statOrder', - meta: { - perms: ['GET /admin/stat/order'], - title: '订单统计', - noCache: true - } - }, - { - path: 'goods', - component: () => import('@/views/stat/goods'), - name: 'statGoods', - meta: { - perms: ['GET /admin/stat/goods'], - title: '商品统计', - noCache: true - } - } - ] - }, - { - path: 'external-link', - component: Layout, - redirect: 'noredirect', - alwaysShow: true, - name: 'externalLink', - meta: { - title: '外链', - icon: 'link' - }, - children: [ - { - path: 'https://cloud.tencent.com/product/cos', - meta: { title: '腾讯云存储', icon: 'link' } - }, - { - path: 'https://cloud.tencent.com/product/sms', - meta: { title: '腾讯云短信', icon: 'link' } - }, - { - path: 'https://pay.weixin.qq.com/index.php/core/home/login', - meta: { title: '微信支付', icon: 'link' } - }, - { - path: 'https://mpkf.weixin.qq.com/', - meta: { title: '小程序客服', icon: 'link' } - }, - { - path: 'https://www.alibabacloud.com/zh/product/oss', - meta: { title: '阿里云存储', icon: 'link' } - }, - { - path: 'https://www.qiniu.com/products/kodo', - meta: { title: '七牛云存储', icon: 'link' } - }, - { - path: 'http://www.kdniao.com/api-track', - meta: { title: '快递鸟', icon: 'link' } - } - ] - }, + // { + // path: '/stat', + // component: Layout, + // redirect: 'noredirect', + // alwaysShow: true, + // name: 'statManage', + // meta: { + // title: '统计报表', + // icon: 'chart' + // }, + // children: [ + // { + // path: 'user', + // component: () => import('@/views/stat/user'), + // name: 'statUser', + // meta: { + // perms: ['GET /admin/stat/user'], + // title: '用户统计', + // noCache: true + // } + // }, + // { + // path: 'order', + // component: () => import('@/views/stat/order'), + // name: 'statOrder', + // meta: { + // perms: ['GET /admin/stat/order'], + // title: '订单统计', + // noCache: true + // } + // }, + // { + // path: 'goods', + // component: () => import('@/views/stat/goods'), + // name: 'statGoods', + // meta: { + // perms: ['GET /admin/stat/goods'], + // title: '商品统计', + // noCache: true + // } + // } + // ] + // }, { path: '/profile', component: Layout, diff --git a/litemall-admin/src/views/config/mall.vue b/litemall-admin/src/views/config/mall.vue index a7ac934b..bc38efaf 100644 --- a/litemall-admin/src/views/config/mall.vue +++ b/litemall-admin/src/views/config/mall.vue @@ -1,26 +1,26 @@ diff --git a/litemall-admin/src/views/errorPage/404.vue b/litemall-admin/src/views/errorPage/404.vue index c3eafea0..8fba0831 100644 --- a/litemall-admin/src/views/errorPage/404.vue +++ b/litemall-admin/src/views/errorPage/404.vue @@ -9,9 +9,9 @@
OOPS!
-
版权所有 +
{{ message }}
请检查您输入的网址是否正确,请点击以下按钮返回主页或者发送错误报告
返回首页 diff --git a/litemall-admin/src/views/goods/create.vue b/litemall-admin/src/views/goods/create.vue index 312edefa..bac984a7 100644 --- a/litemall-admin/src/views/goods/create.vue +++ b/litemall-admin/src/views/goods/create.vue @@ -34,7 +34,7 @@ - +
- - - + 查找 - 添加 + 导出 +
+ +
批量删除
@@ -17,35 +18,58 @@ - - - + + + + + + + + + + + + + + - + @@ -120,6 +153,10 @@ margin-right: 0; margin-bottom: 0; } + .video { + width: 80px; + margin-right: 10px; + } .gallery { width: 80px; margin-right: 10px; @@ -234,9 +271,9 @@ export default { handleDownload() { this.downloadLoading = true import('@/vendor/Export2Excel').then(excel => { - const tHeader = ['商品ID', '商品编号', '名称', '专柜价格', '当前价格', '是否新品', '是否热品', '是否在售', '首页主图', '宣传图片列表', '商品介绍', '详细介绍', '商品图片', '商品单位', '关键字', '类目ID', '品牌商ID'] - const filterVal = ['id', 'goodsSn', 'name', 'counterPrice', 'retailPrice', 'isNew', 'isHot', 'isOnSale', 'listPicUrl', 'gallery', 'brief', 'detail', 'picUrl', 'goodsUnit', 'keywords', 'categoryId', 'brandId'] - excel.export_json_to_excel2(tHeader, this.list, filterVal, '商品信息') + const tHeader = ['主播ID', '名称', '性别(1男、2女)', '出生年月', '身高(cm)', '体重(kg)', '常住省份', '常住城市', '学历', '直播语言', '工作方式', '直播品类', '擅长品类', '账号类型', '风格要求', '时薪', '是否上架'] + const filterVal = ['id', 'name', 'sex', 'birthday', 'height', 'weight', 'currentProvince', 'currentCity', 'counterPrice', 'degree', 'language', 'workWay', 'workCategory', 'goodCategory', 'accountType', 'workStyle', 'isOnSale'] + excel.export_json_to_excel2(tHeader, this.list, filterVal, '主播信息') this.downloadLoading = false }) } diff --git a/litemall-admin/src/views/layout/components/Navbar.vue b/litemall-admin/src/views/layout/components/Navbar.vue index 991a5ac3..1746b474 100644 --- a/litemall-admin/src/views/layout/components/Navbar.vue +++ b/litemall-admin/src/views/layout/components/Navbar.vue @@ -31,7 +31,7 @@ 首页 - + 密码修改 diff --git a/litemall-admin/src/views/login/index.vue b/litemall-admin/src/views/login/index.vue index fdce0b94..32337910 100644 --- a/litemall-admin/src/views/login/index.vue +++ b/litemall-admin/src/views/login/index.vue @@ -30,7 +30,7 @@ 登录 -
+