Просмотр исходного кода

新增商家活动配置和商家短信包配置

嘀嘀嘀 1 год назад
Родитель
Сommit
ebb7616cfe

+ 281 - 279
src/router/index.js

@@ -1,279 +1,281 @@
-/**
- * 全站路由配置
- *
- * 建议:
- * 1. 代码中路由统一使用name属性跳转(不使用path属性)
- */
-import Vue from 'vue'
-import Router from 'vue-router'
-import http from '@/utils/httpRequest'
-import { isURL } from '@/utils/validate'
-import { clearLoginInfo } from '@/utils'
-
-Vue.use(Router)
-
-// 开发环境不使用懒加载, 因为懒加载页面太多的话会造成webpack热更新太慢, 所以只有生产环境使用懒加载
-const _import = require('./import-' + process.env.NODE_ENV)
-
-// 全局路由(无需嵌套上左右整体布局)
-const globalRoutes = [
-  { path: '/404', component: _import('common/404'), name: '404', meta: { title: '404未找到' } },
-  { path: '/login', component: _import('common/login'), name: 'login', meta: { title: '登录' } }
-]
-
-// 主入口路由(需嵌套上左右整体布局)
-const mainRoutes = {
-  path: '/',
-  component: _import('main'),
-  name: 'main',
-  redirect: { name: 'home' },
-  meta: { title: '主入口整体布局' },
-  children: [
-    // 通过meta对象设置路由展示方式
-    // 1. isTab: 是否通过tab展示内容, true: 是, false: 否
-    // 2. iframeUrl: 是否通过iframe嵌套展示内容, '以http[s]://开头': 是, '': 否
-    // 提示: 如需要通过iframe嵌套展示内容, 但不通过tab打开, 请自行创建组件使用iframe处理!
-    { path: '/home', component: _import('common/home'), name: 'home', meta: { title: '首页' } },
-	{ path: '/userList', component: _import('user/userList'), name: 'userList', meta: { title: '用户列表',isTab: true} },
-	{ path: '/allocationList', component: _import('allocation/allocationList'), name: 'allocationList', meta: { title: '配置列表',isTab: true} },
-	{ path: '/financeList', component: _import('finance/financeList'), name: 'financeList', meta: { title: '财务中心',isTab: true} },
-	{ path: '/message', component: _import('message/message'), name: 'message', meta: { title: '消息中心',isTab: true} },
-	{ path: '/taskConfig', component: _import('taskConfig/taskConfig'), name: 'taskConfig', meta: { title: '任务配置',isTab: true} },
-	{ path: '/bannerList', component: _import('banner/bannerList'), name: 'bannerList', meta: { title: '商城配置',isTab: true} },
-	{ path: '/mission', component: _import('mission/mission'), name: 'mission', meta: { title: '订单中心',isTab: true} },
-	{ path: '/system', component: _import('mission/system'), name: 'system', meta: { title: '系统任务',isTab: true} },
-	{ path: '/missionsye', component: _import('sysmission/missionsye'), name: 'missionsye', meta: { title: '活动派送',isTab: true} },
-	{ path: '/materialsList', component: _import('materials/materialsList'), name: 'materialsList', meta: { title: '好物圈',isTab: true} },
-	{ path: '/missionAdd', component: _import('sysmission/missionAdd'), name: 'missionAdd', meta: { title: '发布任务',isTab: false} },
-	{ path: '/missionRedact', component: _import('sysmission/missionRedact'), name: 'missionRedact', meta: { title: '修改任务',isTab: false} },
-	{ path: '/userDetail', component: _import('user/userDetail'), name: 'userDetail', meta: { title: '用户详情',isTab: false} },
-	{ path: '/userDetail1', component: _import('user/userDetail1'), name: 'userDetail1', meta: { title: '用户详情',isTab: false} },
-	{ path: '/missionDetails', component: _import('mission/missionDetails'), name: 'missionDetails', meta: { title: '任务详情',isTab: false} },
-	{ path: '/fitmentList', component: _import('fitment/fitmentList'), name: 'fitmentList', meta: { title: '首页装修',isTab: false} },
-	
-	{ path: '/coupon', component: _import('coupon/coupon'), name: 'coupon', meta: { title: '优惠券管理',isTab: true} },
-  { path: '/couponList', component: _import('coupon/couponList'), name: 'couponList', meta: { title: '优惠券列表',isTab: true} },
-
-	{ path: '/missionComplain', component: _import('mission/missionComplain'), name: 'missionComplain', meta: { title: '任务投诉',isTab: true} },
-
-
-  {path: '/classifyAdmin', component: _import('selfShop/classifyAdmin'), name: 'classifyAdmin', meta: {title: '商品分类', isTab: true}},
-  {path: '/orderAdmin', component: _import('selfShop/orderAdmin'), name: 'orderAdmin', meta: {title: '自营订单', isTab: true}},
-  {path: '/addressAamin', component: _import('selfShop/addressAamin'), name: 'addressAamin', meta: {title: '地址管理', isTab: true}},
-  {path: '/shopAdmin', component: _import('selfShop/shopAdmin'), name: 'shopAdmin', meta: {title: '商品管理', isTab: true}},
-  {path: '/fenxiaoOrder', component: _import('selfShop/fenxiaoOrder'), name: 'fenxiaoOrder', meta: {title: '分销订单', isTab: true},},
-  {path: '/disposeOrder', component: _import('selfShop/disposeOrder'), name: 'disposeOrder', meta: {title: '待处理订单', isTab: true},},
-  {path: '/shopConfig', component: _import('selfShop/shopConfig'), name: 'shopConfig', meta: {title: '自营商城配置', isTab: true}},
-  {path: '/shopPublish', component: _import('selfShop/shopPublish'), name: 'shopPublish', meta: {title: '发布商品', isTab: false}},
-  {path: '/shopAmend', component: _import('selfShop/shopAmend'), name: 'shopAmend', meta: {title: '修改商品', isTab: false}},
-  {path: '/specification', component: _import('selfShop/specification'), name: 'specification', meta: {title: '商品规格', isTab: true}},
-  {path: '/orderDetails', component: _import('selfShop/orderDetails'), name: 'orderDetails', meta: {title: '订单详情', isTab: true}},
-
-  {path: '/shopsList', component: _import('shopsList/shopsList'), name: 'shopsList', meta: {title: '商铺中心', isTab: true}},
-  {path: '/shopDatas', component: _import('shopsList/shopDatas'), name: 'shopDatas', meta: {title: '商铺数据', isTab: false}},
-
-  {path: '/shopsListAdmin', component: _import('shopsList/shopAdmin'), name: 'shopsListAdmin', meta: {title: '商铺商品管理', isTab: false}},
-  {path: '/shopsOrder', component: _import('shopsList/shopsOrder'), name: 'shopsOrder', meta: { title: '商铺订单',isTab: false} },
-  {path: '/topupmoney', component: _import('topupmoney/topupmoney'), name: 'topupmoney', meta: {title: '充值配置', isTab: true}},
-
-  {path: '/shopsListSm', component: _import('shopManagement/shopsList'), name: 'shopsListSm', meta: {title: '商铺中心', isTab: false}},
-  {path: '/shopsListAdminSm', component: _import('shopManagement/shopAdmin'), name: 'shopsListAdminSm', meta: {title: '商铺商品管理', isTab: true}},
-  {path: '/missionSm', component: _import('shopManagement/mission'), name: 'missionSm', meta: { title: '订单中心',isTab: false} },
-  {path: '/shopsOrderSm', component: _import('shopManagement/shopsOrder'), name: 'shopsOrderSm', meta: { title: '商铺订单',isTab: true} },
-  {path: '/shopDatasSm', component: _import('shopsList/shopDatas'), name: 'shopDatasSm', meta: {title: '商铺数据', isTab: true}},
-  {path: '/shopAutonym', component: _import('shopAutonym/shopAutonym'), name: 'shopAutonym', meta: { title: '商户审核',isTab: true} },
-
-  {path: '/missionRun', component: _import('runErrands/mission'), name: 'missionRun', meta: { title: '跑腿任务',isTab: true} },
-  {path: '/orderCenterRun', component: _import('runErrands/orderCenter'), name: 'orderCenterRun', meta: { title: '跑腿订单',isTab: true} },
-
-  {path: '/duanxinlistRun', component: _import('runErrands/duanxinlist'), name: 'duanxinlistRun', meta: { title: '短信记录',isTab: true} },
-  {path: '/duanxinmobanRun', component: _import('runErrands/duanxinmoban'), name: 'duanxinmobanRun', meta: { title: '短信模板记录',isTab: true} },
-
-  {path: '/financeListRun', component: _import('runErrands/financeList'), name: 'financeListRun', meta: { title: '跑腿财务中心',isTab: true} },
-  {path: '/business', component: _import('business/business'), name: 'business', meta: {title: '申诉中心', isTab: true}},
-  {path: '/autonym', component: _import('autonym/autonym'), name: 'autonym', meta: { title: '实名认证',isTab: true} },
-  {path: '/riderScheduling',component: _import('riderScheduling/riderScheduling'),name: 'riderScheduling',meta: {title: '骑手调度', isTab: true}},
-
-  {path: '/messageRun', component: _import('runErrands/message'), name: 'messageRun', meta: { title: '消息中心',isTab: true} },
-  {path: '/feedback', component: _import('runErrands/feedback'), name: 'feedback', meta: {title: '反馈中心', isTab: true}},
-  {path: '/serviceType', component: _import('serviceType/serviceType'), name: 'serviceType', meta: {title: '同城服务类型', isTab: true}},
-  {path: '/riderTop', component: _import('riderTop/riderTop'), name: 'riderTop', meta: {title: '骑手排行榜', isTab: true}},
-  {path: '/materialLink', component: _import('allocation/materialLink'), name: 'materialLink', meta: {title: '帮助中心', isTab: true}},
-  {path: '/vueMchat',component: _import('vueMchat/vueMchat'),name: 'vueMchat',meta: {title: '聊天会话',isTab: true}},
- 
-  {path: '/app', component: _import('app/app'), name: 'app', meta: { title: '升级配置', isTab: true } },
-  {path: '/memberDetails',component: _import('members/memberDetails'),name: 'memberDetails',meta: {title: '会员配置',isTab: true}},
-  {path: '/vipPrivilege',component: _import('members/vipPrivilege'),name: 'vipPrivilege',meta: {title: '会员特权',isTab: true}},
-  {path: '/bondList', component: _import('shopsList/bondList'), name: 'bondList', meta: {title: '保证金明细', isTab: false}},
-  {path: '/pingjiaList', component: _import('shopsList/pingjiaList'), name: 'pingjiaList', meta: {title: '评价明细', isTab: false}},
-  {path: '/shopWallet', component: _import('shopsList/shopWallet'), name: 'shopWallet', meta: {title: '商铺钱包', isTab: false}},
-  {path: '/bannerListRun', component: _import('runErrands/bannerList'), name: 'bannerListRun', meta: {title: '跑腿首页装修', isTab: true}},
-	// 2022.11.07 新增
-	{ path: '/comment', component: _import('comment/comment'), name: 'comment', meta: { title: '评价中心',isTab: true} },
-	{ path: '/chatRecord',component: _import('chatRecord/chatRecord'),name: 'chatRecord',meta: {title: '聊天记录',isTab: true}},
-	{ path: '/integral', component: _import('integral/integral'), name: 'integral', meta: { title: '活动管理',isTab: true} },
-	{ path: '/integralDetail', component: _import('integral/integralDetail'), name: 'integralDetail', meta: { title: '活动详情',isTab: false} },
-	
-	{ path: '/couponShop', component: _import('coupon/couponShop'), name: 'couponShop', meta: { title: '优惠券管理',isTab: false} },
-  {path: '/commentList', component: _import('message/commentList'), name: 'commentList', meta: {title: '评价列表', isTab: true}},
-	],
-  beforeEnter (to, from, next) {
-    let token = Vue.cookie.get('token')
-    if (!token || !/\S/.test(token)) {
-      clearLoginInfo()
-      next({ name: 'login' })
-    }
-    next()
-  }
-}
-
-const router = new Router({
-  mode: 'hash', //  hash
-  scrollBehavior(to,from,savedPosition){
-
-  if (savedPosition){
-
-  return savedPosition // 按下 后退/前进 按钮时,类似浏览器的原生表现
-
-  }else {
-
-  return {x:0,y:0} // 让页面滚动到顶部
-
-  }
-
-  },
-  isAddDynamicMenuRoutes: false, // 是否已经添加动态(菜单)路由
-  routes: globalRoutes.concat(mainRoutes)
-})
-
-router.beforeEach((to, from, next) => {
-  let userId = Vue.cookie.get('userId')
-  let menuList = sessionStorage.getItem("menuList");
-  // 添加动态(菜单)路由
-  // 1. 已经添加 or 全局路由, 直接访问
-  // 2. 获取菜单列表, 添加并保存本地存储
-  console.log(userId,'测试',menuList)
-  if(userId!='' && menuList &&( menuList=='[]' || menuList.length==0)){
-    console.log(userId,'测试1221')
-  	http({
-  		url: http.adornUrl('sys/menu/nav'),
-  		method: 'get',
-  		params: http.adornParams()
-  	}).then(({data}) => {
-  		if (data && data.code === 0) {
-  			fnAddDynamicMenuRoutes(data.menuList)
-  			router.options.isAddDynamicMenuRoutes = true
-  			sessionStorage.setItem('menuList', JSON.stringify(data.menuList || '[]'))
-  			sessionStorage.setItem('permissions', JSON.stringify(data.permissions || '[]'))
-
-  			next({...to, replace: true})
-  		} else {
-  			sessionStorage.setItem('menuList', '[]')
-  			sessionStorage.setItem('permissions', '[]')
-  			next()
-  		}
-  	}).catch((e) => {
-  		console.log(`%c${e} 请求菜单列表和权限失败,跳转至登录页!!`, 'color:blue')
-  		router.push({name: 'login'})
-  	})
-  }else if (router.options.isAddDynamicMenuRoutes || fnCurrentRouteType(to, globalRoutes) === 'global') {
-    console.log(userId,'测试12')
-    next()
-  } else {
-    console.log(userId,'测试123')
-    http({
-      url: http.adornUrl('sys/menu/nav'),
-      method: 'get',
-      params: http.adornParams()
-    }).then(({data}) => {
-      if (data && data.code === 0) {
-        fnAddDynamicMenuRoutes(data.menuList)
-        router.options.isAddDynamicMenuRoutes = true
-        sessionStorage.setItem('menuList', JSON.stringify(data.menuList || '[]'))
-        sessionStorage.setItem('permissions', JSON.stringify(data.permissions || '[]'))
-        next({ ...to, replace: true })
-      } else {
-        sessionStorage.setItem('menuList', '[]')
-        sessionStorage.setItem('permissions', '[]')
-        next()
-      }
-    }).catch((e) => {
-      console.log(`%c${e} 请求菜单列表和权限失败,跳转至登录页!!`, 'color:blue')
-      router.push({ name: 'login' })
-    })
-  }
-})
-
-/**
- * 判断当前路由类型, global: 全局路由, main: 主入口路由
- * @param {*} route 当前路由
- */
-function fnCurrentRouteType (route, globalRoutes = []) {
-  var temp = []
-  for (var i = 0; i < globalRoutes.length; i++) {
-    if (route.path === globalRoutes[i].path) {
-      return 'global'
-    } else if (globalRoutes[i].children && globalRoutes[i].children.length >= 1) {
-      temp = temp.concat(globalRoutes[i].children)
-    }
-  }
-  return temp.length >= 1 ? fnCurrentRouteType(route, temp) : 'main'
-}
-
-/**
- * 添加动态(菜单)路由
- * @param {*} menuList 菜单列表
- * @param {*} routes 递归创建的动态(菜单)路由
- */
-function fnAddDynamicMenuRoutes (menuList = [], routes = []) {
-  var temp = []
-  console.log(menuList,'list列表')
-  for (var i = 0; i < menuList.length; i++) {
-    if (menuList[i].list && menuList[i].list.length >= 1) {
-      temp = temp.concat(menuList[i].list)
-    } else if (menuList[i].url && /\S/.test(menuList[i].url)) {
-      menuList[i].url = menuList[i].url.replace(/^\//, '')
-      var route = {
-        path: menuList[i].url.replace('/', '-'),
-        component: null,
-        name: menuList[i].url.replace('/', '-'),
-        meta: {
-          menuId: menuList[i].menuId,
-          title: menuList[i].name,
-          isDynamic: true,
-          isTab: true,
-          iframeUrl: ''
-        }
-      }
-      // url以http[s]://开头, 通过iframe展示
-      if (isURL(menuList[i].url)) {
-        route['path'] = `i-${menuList[i].menuId}`
-        route['name'] = `i-${menuList[i].menuId}`
-        route['meta']['iframeUrl'] = menuList[i].url
-      } else {
-        try {
-          route['component'] = _import(`modules/${menuList[i].url}`) || null
-        } catch (e) {}
-      }
-      routes.push(route)
-    }
-  }
-  console.log(temp,'路由')
-  if (temp.length >= 1) {
-    fnAddDynamicMenuRoutes(temp, routes)
-  } else {
-    mainRoutes.name = 'main-dynamic'
-    mainRoutes.children = routes
-    router.addRoutes([
-      mainRoutes,
-      { path: '*', redirect: { name: '404' } }
-    ])
-    sessionStorage.setItem('dynamicMenuRoutes', JSON.stringify(mainRoutes.children || '[]'))
-    console.log('\n')
-    console.log('%c!<-------------------- 动态(菜单)路由 s -------------------->', 'color:blue')
-    console.log(mainRoutes.children)
-    console.log('%c!<-------------------- 动态(菜单)路由 e -------------------->', 'color:blue')
-  }
-}
-
-export default router
+/**
+ * 全站路由配置
+ *
+ * 建议:
+ * 1. 代码中路由统一使用name属性跳转(不使用path属性)
+ */
+import Vue from 'vue'
+import Router from 'vue-router'
+import http from '@/utils/httpRequest'
+import { isURL } from '@/utils/validate'
+import { clearLoginInfo } from '@/utils'
+
+Vue.use(Router)
+
+// 开发环境不使用懒加载, 因为懒加载页面太多的话会造成webpack热更新太慢, 所以只有生产环境使用懒加载
+const _import = require('./import-' + process.env.NODE_ENV)
+
+// 全局路由(无需嵌套上左右整体布局)
+const globalRoutes = [
+  { path: '/404', component: _import('common/404'), name: '404', meta: { title: '404未找到' } },
+  { path: '/login', component: _import('common/login'), name: 'login', meta: { title: '登录' } }
+]
+
+// 主入口路由(需嵌套上左右整体布局)
+const mainRoutes = {
+  path: '/',
+  component: _import('main'),
+  name: 'main',
+  redirect: { name: 'home' },
+  meta: { title: '主入口整体布局' },
+  children: [
+    // 通过meta对象设置路由展示方式
+    // 1. isTab: 是否通过tab展示内容, true: 是, false: 否
+    // 2. iframeUrl: 是否通过iframe嵌套展示内容, '以http[s]://开头': 是, '': 否
+    // 提示: 如需要通过iframe嵌套展示内容, 但不通过tab打开, 请自行创建组件使用iframe处理!
+    { path: '/home', component: _import('common/home'), name: 'home', meta: { title: '首页' } },
+	{ path: '/userList', component: _import('user/userList'), name: 'userList', meta: { title: '用户列表',isTab: true} },
+	{ path: '/allocationList', component: _import('allocation/allocationList'), name: 'allocationList', meta: { title: '配置列表',isTab: true} },
+	{ path: '/financeList', component: _import('finance/financeList'), name: 'financeList', meta: { title: '财务中心',isTab: true} },
+	{ path: '/message', component: _import('message/message'), name: 'message', meta: { title: '消息中心',isTab: true} },
+	{ path: '/taskConfig', component: _import('taskConfig/taskConfig'), name: 'taskConfig', meta: { title: '任务配置',isTab: true} },
+	{ path: '/bannerList', component: _import('banner/bannerList'), name: 'bannerList', meta: { title: '商城配置',isTab: true} },
+	{ path: '/mission', component: _import('mission/mission'), name: 'mission', meta: { title: '订单中心',isTab: true} },
+	{ path: '/system', component: _import('mission/system'), name: 'system', meta: { title: '系统任务',isTab: true} },
+	{ path: '/missionsye', component: _import('sysmission/missionsye'), name: 'missionsye', meta: { title: '活动派送',isTab: true} },
+	{ path: '/materialsList', component: _import('materials/materialsList'), name: 'materialsList', meta: { title: '好物圈',isTab: true} },
+	{ path: '/missionAdd', component: _import('sysmission/missionAdd'), name: 'missionAdd', meta: { title: '发布任务',isTab: false} },
+	{ path: '/missionRedact', component: _import('sysmission/missionRedact'), name: 'missionRedact', meta: { title: '修改任务',isTab: false} },
+	{ path: '/userDetail', component: _import('user/userDetail'), name: 'userDetail', meta: { title: '用户详情',isTab: false} },
+	{ path: '/userDetail1', component: _import('user/userDetail1'), name: 'userDetail1', meta: { title: '用户详情',isTab: false} },
+	{ path: '/missionDetails', component: _import('mission/missionDetails'), name: 'missionDetails', meta: { title: '任务详情',isTab: false} },
+	{ path: '/fitmentList', component: _import('fitment/fitmentList'), name: 'fitmentList', meta: { title: '首页装修',isTab: false} },
+
+	{ path: '/coupon', component: _import('coupon/coupon'), name: 'coupon', meta: { title: '优惠券管理',isTab: true} },
+  { path: '/couponList', component: _import('coupon/couponList'), name: 'couponList', meta: { title: '优惠券列表',isTab: true} },
+  { path: '/huodongList', component: _import('coupon/huodongList'), name: 'huodongList', meta: { title: '活动参与记录',isTab: true} },
+
+	{ path: '/missionComplain', component: _import('mission/missionComplain'), name: 'missionComplain', meta: { title: '任务投诉',isTab: true} },
+
+
+  {path: '/classifyAdmin', component: _import('selfShop/classifyAdmin'), name: 'classifyAdmin', meta: {title: '商品分类', isTab: true}},
+  {path: '/orderAdmin', component: _import('selfShop/orderAdmin'), name: 'orderAdmin', meta: {title: '自营订单', isTab: true}},
+  {path: '/addressAamin', component: _import('selfShop/addressAamin'), name: 'addressAamin', meta: {title: '地址管理', isTab: true}},
+  {path: '/shopAdmin', component: _import('selfShop/shopAdmin'), name: 'shopAdmin', meta: {title: '商品管理', isTab: true}},
+  {path: '/fenxiaoOrder', component: _import('selfShop/fenxiaoOrder'), name: 'fenxiaoOrder', meta: {title: '分销订单', isTab: true},},
+  {path: '/disposeOrder', component: _import('selfShop/disposeOrder'), name: 'disposeOrder', meta: {title: '待处理订单', isTab: true},},
+  {path: '/shopConfig', component: _import('selfShop/shopConfig'), name: 'shopConfig', meta: {title: '自营商城配置', isTab: true}},
+  {path: '/shopPublish', component: _import('selfShop/shopPublish'), name: 'shopPublish', meta: {title: '发布商品', isTab: false}},
+  {path: '/shopAmend', component: _import('selfShop/shopAmend'), name: 'shopAmend', meta: {title: '修改商品', isTab: false}},
+  {path: '/specification', component: _import('selfShop/specification'), name: 'specification', meta: {title: '商品规格', isTab: true}},
+  {path: '/orderDetails', component: _import('selfShop/orderDetails'), name: 'orderDetails', meta: {title: '订单详情', isTab: true}},
+
+  {path: '/shopsList', component: _import('shopsList/shopsList'), name: 'shopsList', meta: {title: '商铺中心', isTab: true}},
+  {path: '/shopDatas', component: _import('shopsList/shopDatas'), name: 'shopDatas', meta: {title: '商铺数据', isTab: false}},
+
+  {path: '/shopsListAdmin', component: _import('shopsList/shopAdmin'), name: 'shopsListAdmin', meta: {title: '商铺商品管理', isTab: false}},
+  {path: '/shopsOrder', component: _import('shopsList/shopsOrder'), name: 'shopsOrder', meta: { title: '商铺订单',isTab: false} },
+  {path: '/topupmoney', component: _import('topupmoney/topupmoney'), name: 'topupmoney', meta: {title: '充值配置', isTab: true}},
+
+  {path: '/shopsListSm', component: _import('shopManagement/shopsList'), name: 'shopsListSm', meta: {title: '商铺中心', isTab: false}},
+  {path: '/shopsListAdminSm', component: _import('shopManagement/shopAdmin'), name: 'shopsListAdminSm', meta: {title: '商铺商品管理', isTab: true}},
+  {path: '/missionSm', component: _import('shopManagement/mission'), name: 'missionSm', meta: { title: '订单中心',isTab: false} },
+  {path: '/shopsOrderSm', component: _import('shopManagement/shopsOrder'), name: 'shopsOrderSm', meta: { title: '商铺订单',isTab: true} },
+  {path: '/shopDatasSm', component: _import('shopsList/shopDatas'), name: 'shopDatasSm', meta: {title: '商铺数据', isTab: true}},
+  {path: '/shopAutonym', component: _import('shopAutonym/shopAutonym'), name: 'shopAutonym', meta: { title: '商户审核',isTab: true} },
+  {path: '/shopduanxinlistRun', component: _import('shopManagement/duanxinlist'), name: 'shopduanxinlistRun', meta: { title: '商家短信记录',isTab: true} },
+
+  {path: '/missionRun', component: _import('runErrands/mission'), name: 'missionRun', meta: { title: '跑腿任务',isTab: true} },
+  {path: '/orderCenterRun', component: _import('runErrands/orderCenter'), name: 'orderCenterRun', meta: { title: '跑腿订单',isTab: true} },
+
+  {path: '/duanxinlistRun', component: _import('runErrands/duanxinlist'), name: 'duanxinlistRun', meta: { title: '短信记录',isTab: true} },
+  {path: '/duanxinmobanRun', component: _import('runErrands/duanxinmoban'), name: 'duanxinmobanRun', meta: { title: '短信模板记录',isTab: true} },
+
+  {path: '/financeListRun', component: _import('runErrands/financeList'), name: 'financeListRun', meta: { title: '跑腿财务中心',isTab: true} },
+  {path: '/business', component: _import('business/business'), name: 'business', meta: {title: '申诉中心', isTab: true}},
+  {path: '/autonym', component: _import('autonym/autonym'), name: 'autonym', meta: { title: '实名认证',isTab: true} },
+  {path: '/riderScheduling',component: _import('riderScheduling/riderScheduling'),name: 'riderScheduling',meta: {title: '骑手调度', isTab: true}},
+
+  {path: '/messageRun', component: _import('runErrands/message'), name: 'messageRun', meta: { title: '消息中心',isTab: true} },
+  {path: '/feedback', component: _import('runErrands/feedback'), name: 'feedback', meta: {title: '反馈中心', isTab: true}},
+  {path: '/serviceType', component: _import('serviceType/serviceType'), name: 'serviceType', meta: {title: '同城服务类型', isTab: true}},
+  {path: '/riderTop', component: _import('riderTop/riderTop'), name: 'riderTop', meta: {title: '骑手排行榜', isTab: true}},
+  {path: '/materialLink', component: _import('allocation/materialLink'), name: 'materialLink', meta: {title: '帮助中心', isTab: true}},
+  {path: '/vueMchat',component: _import('vueMchat/vueMchat'),name: 'vueMchat',meta: {title: '聊天会话',isTab: true}},
+
+  {path: '/app', component: _import('app/app'), name: 'app', meta: { title: '升级配置', isTab: true } },
+  {path: '/memberDetails',component: _import('members/memberDetails'),name: 'memberDetails',meta: {title: '会员配置',isTab: true}},
+  {path: '/vipPrivilege',component: _import('members/vipPrivilege'),name: 'vipPrivilege',meta: {title: '会员特权',isTab: true}},
+  {path: '/bondList', component: _import('shopsList/bondList'), name: 'bondList', meta: {title: '保证金明细', isTab: false}},
+  {path: '/pingjiaList', component: _import('shopsList/pingjiaList'), name: 'pingjiaList', meta: {title: '评价明细', isTab: false}},
+  {path: '/shopWallet', component: _import('shopsList/shopWallet'), name: 'shopWallet', meta: {title: '商铺钱包', isTab: false}},
+  {path: '/bannerListRun', component: _import('runErrands/bannerList'), name: 'bannerListRun', meta: {title: '跑腿首页装修', isTab: true}},
+	// 2022.11.07 新增
+	{ path: '/comment', component: _import('comment/comment'), name: 'comment', meta: { title: '评价中心',isTab: true} },
+	{ path: '/chatRecord',component: _import('chatRecord/chatRecord'),name: 'chatRecord',meta: {title: '聊天记录',isTab: true}},
+	{ path: '/integral', component: _import('integral/integral'), name: 'integral', meta: { title: '活动管理',isTab: true} },
+	{ path: '/integralDetail', component: _import('integral/integralDetail'), name: 'integralDetail', meta: { title: '活动详情',isTab: false} },
+
+	{ path: '/couponShop', component: _import('coupon/couponShop'), name: 'couponShop', meta: { title: '优惠券管理',isTab: false} },
+  {path: '/commentList', component: _import('message/commentList'), name: 'commentList', meta: {title: '评价列表', isTab: true}},
+	],
+  beforeEnter (to, from, next) {
+    let token = Vue.cookie.get('token')
+    if (!token || !/\S/.test(token)) {
+      clearLoginInfo()
+      next({ name: 'login' })
+    }
+    next()
+  }
+}
+
+const router = new Router({
+  mode: 'hash', //  hash
+  scrollBehavior(to,from,savedPosition){
+
+  if (savedPosition){
+
+  return savedPosition // 按下 后退/前进 按钮时,类似浏览器的原生表现
+
+  }else {
+
+  return {x:0,y:0} // 让页面滚动到顶部
+
+  }
+
+  },
+  isAddDynamicMenuRoutes: false, // 是否已经添加动态(菜单)路由
+  routes: globalRoutes.concat(mainRoutes)
+})
+
+router.beforeEach((to, from, next) => {
+  let userId = Vue.cookie.get('userId')
+  let menuList = sessionStorage.getItem("menuList");
+  // 添加动态(菜单)路由
+  // 1. 已经添加 or 全局路由, 直接访问
+  // 2. 获取菜单列表, 添加并保存本地存储
+  console.log(userId,'测试',menuList)
+  if(userId!='' && menuList &&( menuList=='[]' || menuList.length==0)){
+    console.log(userId,'测试1221')
+  	http({
+  		url: http.adornUrl('sys/menu/nav'),
+  		method: 'get',
+  		params: http.adornParams()
+  	}).then(({data}) => {
+  		if (data && data.code === 0) {
+  			fnAddDynamicMenuRoutes(data.menuList)
+  			router.options.isAddDynamicMenuRoutes = true
+  			sessionStorage.setItem('menuList', JSON.stringify(data.menuList || '[]'))
+  			sessionStorage.setItem('permissions', JSON.stringify(data.permissions || '[]'))
+
+  			next({...to, replace: true})
+  		} else {
+  			sessionStorage.setItem('menuList', '[]')
+  			sessionStorage.setItem('permissions', '[]')
+  			next()
+  		}
+  	}).catch((e) => {
+  		console.log(`%c${e} 请求菜单列表和权限失败,跳转至登录页!!`, 'color:blue')
+  		router.push({name: 'login'})
+  	})
+  }else if (router.options.isAddDynamicMenuRoutes || fnCurrentRouteType(to, globalRoutes) === 'global') {
+    console.log(userId,'测试12')
+    next()
+  } else {
+    console.log(userId,'测试123')
+    http({
+      url: http.adornUrl('sys/menu/nav'),
+      method: 'get',
+      params: http.adornParams()
+    }).then(({data}) => {
+      if (data && data.code === 0) {
+        fnAddDynamicMenuRoutes(data.menuList)
+        router.options.isAddDynamicMenuRoutes = true
+        sessionStorage.setItem('menuList', JSON.stringify(data.menuList || '[]'))
+        sessionStorage.setItem('permissions', JSON.stringify(data.permissions || '[]'))
+        next({ ...to, replace: true })
+      } else {
+        sessionStorage.setItem('menuList', '[]')
+        sessionStorage.setItem('permissions', '[]')
+        next()
+      }
+    }).catch((e) => {
+      console.log(`%c${e} 请求菜单列表和权限失败,跳转至登录页!!`, 'color:blue')
+      router.push({ name: 'login' })
+    })
+  }
+})
+
+/**
+ * 判断当前路由类型, global: 全局路由, main: 主入口路由
+ * @param {*} route 当前路由
+ */
+function fnCurrentRouteType (route, globalRoutes = []) {
+  var temp = []
+  for (var i = 0; i < globalRoutes.length; i++) {
+    if (route.path === globalRoutes[i].path) {
+      return 'global'
+    } else if (globalRoutes[i].children && globalRoutes[i].children.length >= 1) {
+      temp = temp.concat(globalRoutes[i].children)
+    }
+  }
+  return temp.length >= 1 ? fnCurrentRouteType(route, temp) : 'main'
+}
+
+/**
+ * 添加动态(菜单)路由
+ * @param {*} menuList 菜单列表
+ * @param {*} routes 递归创建的动态(菜单)路由
+ */
+function fnAddDynamicMenuRoutes (menuList = [], routes = []) {
+  var temp = []
+  console.log(menuList,'list列表')
+  for (var i = 0; i < menuList.length; i++) {
+    if (menuList[i].list && menuList[i].list.length >= 1) {
+      temp = temp.concat(menuList[i].list)
+    } else if (menuList[i].url && /\S/.test(menuList[i].url)) {
+      menuList[i].url = menuList[i].url.replace(/^\//, '')
+      var route = {
+        path: menuList[i].url.replace('/', '-'),
+        component: null,
+        name: menuList[i].url.replace('/', '-'),
+        meta: {
+          menuId: menuList[i].menuId,
+          title: menuList[i].name,
+          isDynamic: true,
+          isTab: true,
+          iframeUrl: ''
+        }
+      }
+      // url以http[s]://开头, 通过iframe展示
+      if (isURL(menuList[i].url)) {
+        route['path'] = `i-${menuList[i].menuId}`
+        route['name'] = `i-${menuList[i].menuId}`
+        route['meta']['iframeUrl'] = menuList[i].url
+      } else {
+        try {
+          route['component'] = _import(`modules/${menuList[i].url}`) || null
+        } catch (e) {}
+      }
+      routes.push(route)
+    }
+  }
+  console.log(temp,'路由')
+  if (temp.length >= 1) {
+    fnAddDynamicMenuRoutes(temp, routes)
+  } else {
+    mainRoutes.name = 'main-dynamic'
+    mainRoutes.children = routes
+    router.addRoutes([
+      mainRoutes,
+      { path: '*', redirect: { name: '404' } }
+    ])
+    sessionStorage.setItem('dynamicMenuRoutes', JSON.stringify(mainRoutes.children || '[]'))
+    console.log('\n')
+    console.log('%c!<-------------------- 动态(菜单)路由 s -------------------->', 'color:blue')
+    console.log(mainRoutes.children)
+    console.log('%c!<-------------------- 动态(菜单)路由 e -------------------->', 'color:blue')
+  }
+}
+
+export default router

+ 91 - 91
src/utils/httpRequest.js

@@ -1,91 +1,91 @@
-import Vue from 'vue'
-import axios from 'axios'
-import router from '@/router'
-import qs from 'qs'
-import merge from 'lodash/merge'
-import { clearLoginInfo } from '@/utils'
-
-const http = axios.create({
-  timeout: 1000 * 30,
-  // withCredentials: true,
-  headers: {
-    'Content-Type': 'application/json; charset=utf-8'
-  }
-})
-
-/**
- * 请求拦截
- */
-http.interceptors.request.use(config => {
-  config.headers['token'] = Vue.cookie.get('token') // 请求头带上token
-  return config
-}, error => {
-  return Promise.reject(error)
-})
-
-/**
- * 响应拦截
- */
-http.interceptors.response.use(response => {
-  if (response.data && response.data.code === 401) { // 401, token失效
-  sessionStorage.clear()
-    clearLoginInfo()
-    router.push({ name: 'login' })
-  }
-  return response
-}, error => {
-  return Promise.reject(error)
-})
-
-/**
- * 请求地址处理
- * @param {*} actionName action方法名称
- */
-http.adornUrl = (actionName) => {
-  // 非生产环境 && 开启代理, 接口前缀统一使用[/proxyApi/]前缀做代理拦截!
-  // return (process.env.NODE_ENV !== 'production' && process.env.OPEN_PROXY ? '/proxyApi/' : window.SITE_CONFIG.baseUrl) + actionName
-	return 'https://mxys.chuanghai-tech.com/sqx_fast/' + actionName
-  // return 'https://www.daweilinli.com/sqx_fast/' + actionName
-	// return 'http://192.168.0.131:8171/sqx_fast/' + actionName
-}
-
-http.adornUrl2 = (actionName) => {
-  // 非生产环境 && 开启代理, 接口前缀统一使用[/tao/]前缀做代理拦截!
-  // return (process.env.NODE_ENV !== 'production' && process.env.OPEN_PROXY ? '/tao/' : window.SITE_CONFIG.baseUrl) + actionName
-	return '/api' + actionName
-}
-http.adornWss = (actionName) => {
-  // 非生产环境 && 开启代理, 接口前缀统一使用[/proxyApi/]前缀做代理拦截!
-  // return (process.env.NODE_ENV !== 'production' && process.env.OPEN_PROXY ? '/proxyApi/' : window.SITE_CONFIG.baseUrl) + actionName
-	return 'wss://mxys.chuanghai-tech.com/wss/' + actionName
-	// return 'http://192.168.0.119:8171/sqx_fast/' + actionName
-}
-/**
- * get请求参数处理
- * @param {*} params 参数对象
- * @param {*} openDefultParams 是否开启默认参数?
- */
-http.adornParams = (params = {}, openDefultParams = false) => {
-  var defaults = {
-    't': new Date().getTime()
-  }
-  return openDefultParams ? merge(defaults, params) : params
-}
-
-/**
- * post请求数据处理
- * @param {*} data 数据对象
- * @param {*} openDefultdata 是否开启默认数据?
- * @param {*} contentType 数据格式
- *  json: 'application/json; charset=utf-8'
- *  form: 'application/x-www-form-urlencoded; charset=utf-8'
- */
-http.adornData = (data = {}, openDefultdata = false, contentType = 'json') => {
-  var defaults = {
-    't': new Date().getTime()
-  }
-  data = openDefultdata ? merge(defaults, data) : data
-  return contentType === 'json' ? JSON.stringify(data) : qs.stringify(data)
-}
-
-export default http
+import Vue from 'vue'
+import axios from 'axios'
+import router from '@/router'
+import qs from 'qs'
+import merge from 'lodash/merge'
+import { clearLoginInfo } from '@/utils'
+
+const http = axios.create({
+  timeout: 1000 * 30,
+  // withCredentials: true,
+  headers: {
+    'Content-Type': 'application/json; charset=utf-8'
+  }
+})
+
+/**
+ * 请求拦截
+ */
+http.interceptors.request.use(config => {
+  config.headers['token'] = Vue.cookie.get('token') // 请求头带上token
+  return config
+}, error => {
+  return Promise.reject(error)
+})
+
+/**
+ * 响应拦截
+ */
+http.interceptors.response.use(response => {
+  if (response.data && response.data.code === 401) { // 401, token失效
+  sessionStorage.clear()
+    clearLoginInfo()
+    router.push({ name: 'login' })
+  }
+  return response
+}, error => {
+  return Promise.reject(error)
+})
+
+/**
+ * 请求地址处理
+ * @param {*} actionName action方法名称
+ */
+http.adornUrl = (actionName) => {
+  // 非生产环境 && 开启代理, 接口前缀统一使用[/proxyApi/]前缀做代理拦截!
+  // return (process.env.NODE_ENV !== 'production' && process.env.OPEN_PROXY ? '/proxyApi/' : window.SITE_CONFIG.baseUrl) + actionName
+	// return 'https://mxys.chuanghai-tech.com/sqx_fast/' + actionName
+  return 'https://www.daweilinli.com/sqx_fast/' + actionName
+	// return 'http://192.168.0.131:8171/sqx_fast/' + actionName
+}
+
+http.adornUrl2 = (actionName) => {
+  // 非生产环境 && 开启代理, 接口前缀统一使用[/tao/]前缀做代理拦截!
+  // return (process.env.NODE_ENV !== 'production' && process.env.OPEN_PROXY ? '/tao/' : window.SITE_CONFIG.baseUrl) + actionName
+	return '/api' + actionName
+}
+http.adornWss = (actionName) => {
+  // 非生产环境 && 开启代理, 接口前缀统一使用[/proxyApi/]前缀做代理拦截!
+  // return (process.env.NODE_ENV !== 'production' && process.env.OPEN_PROXY ? '/proxyApi/' : window.SITE_CONFIG.baseUrl) + actionName
+	return 'wss://mxys.chuanghai-tech.com/wss/' + actionName
+	// return 'http://192.168.0.119:8171/sqx_fast/' + actionName
+}
+/**
+ * get请求参数处理
+ * @param {*} params 参数对象
+ * @param {*} openDefultParams 是否开启默认参数?
+ */
+http.adornParams = (params = {}, openDefultParams = false) => {
+  var defaults = {
+    't': new Date().getTime()
+  }
+  return openDefultParams ? merge(defaults, params) : params
+}
+
+/**
+ * post请求数据处理
+ * @param {*} data 数据对象
+ * @param {*} openDefultdata 是否开启默认数据?
+ * @param {*} contentType 数据格式
+ *  json: 'application/json; charset=utf-8'
+ *  form: 'application/x-www-form-urlencoded; charset=utf-8'
+ */
+http.adornData = (data = {}, openDefultdata = false, contentType = 'json') => {
+  var defaults = {
+    't': new Date().getTime()
+  }
+  data = openDefultdata ? merge(defaults, data) : data
+  return contentType === 'json' ? JSON.stringify(data) : qs.stringify(data)
+}
+
+export default http

Разница между файлами не показана из-за своего большого размера
+ 1288 - 1286
src/views/banner/bannerList.vue


+ 234 - 0
src/views/coupon/huodongList.vue

@@ -0,0 +1,234 @@
+<template>
+  <el-tabs v-model="activeName" @tab-click="handleClick">
+    <el-tab-pane label="活动参与记录" name="seventh">
+      <div style="position: relative;display: inline-block;margin: 10px 0px;">
+        <el-input style="width: 200px;" @keydown.enter.native="animeDat" placeholder="请输入活动标题"
+          v-model="activyName">
+        </el-input>&nbsp;&nbsp
+      </div>
+      <div style="position: relative;display: inline-block;margin: 10px 0px;">
+        <el-input style="width: 200px;" @keydown.enter.native="animeDat" placeholder="请输入商户名称"
+          v-model="shopName">
+        </el-input>&nbsp;&nbsp
+      </div>
+      <!-- <div style="position: relative;display: inline-block;margin: 10px 0px;">
+        <el-input style="width: 200px;" @keydown.enter.native="animeDat" placeholder="请输入订单id"
+          v-model="orderId">
+        </el-input>&nbsp;&nbsp
+      </div> -->
+      <div style="position: relative;display: inline-block;margin: 10px 0px;">
+        <el-input style="width: 200px;" @keydown.enter.native="animeDat" placeholder="请输入用户手机号"
+          v-model="phone">
+        </el-input>&nbsp;&nbsp
+      </div>
+      <!-- <div style="position: relative;display: inline-block;margin: 10px 0px;">
+        <span>状态:</span>
+        <el-select v-model="state" style="width:150px;margin-left: 10px;" @change="animeDat(state)">
+          <el-option v-for="item in typeList" :key="item.value" :label="item.label" :value="item.value"></el-option>
+        </el-select>&nbsp;&nbsp;&nbsp;
+      </div> -->
+      <div style="position: relative;display: inline-block;margin: 10px 0px;">
+        <span>活动类型:</span>
+        <el-select v-model="huoType" style="width:150px;margin-left: 10px;" @change="animeDat(huoType)">
+          <el-option v-for="item in huotype" :key="item.value" :label="item.label" :value="item.value"></el-option>
+        </el-select>&nbsp;&nbsp;&nbsp;
+      </div>
+
+      <div style="position: relative;display: inline-block;margin-right:2%;">
+        <el-button style="margin-left:15px;" size="mini" type="primary" icon="document" @click="animeDat">查询
+        </el-button>
+        <el-button style="margin-left:15px;" size="mini" type="primary" icon="document" @click="cleans">重置
+        </el-button>
+      </div>
+      <el-table v-loading="tableDataLoading" :data="tableData.list">
+        <el-table-column fixed prop="id" label="编号">
+        </el-table-column>
+        <el-table-column fixed prop="orderId" label="订单号">
+        </el-table-column>
+        <!-- <el-table-column fixed prop="nickName" label="昵称" width="150">
+          <template slot-scope="scope">
+            <span style="color: #f56c6c;cursor: pointer;" @click="updataDetails(scope.row)">{{scope.row.nickName ? scope.row.nickName : '未绑定'}}</span>
+          </template>
+        </el-table-column> -->
+        <el-table-column label="头像" prop="userImg">
+          <template slot-scope="scope">
+            <img v-if="scope.row.avatar==null" src="~@/assets/img/avatar.png" alt="" width="40" height="40">
+            <img v-else :src="scope.row.userImg" alt="" width="40" height="40">
+          </template>
+        </el-table-column>
+        <el-table-column prop="userPhone" label="手机号">
+        </el-table-column>
+        <el-table-column prop="shopName" label="商户名称">
+        </el-table-column>
+        <el-table-column prop="activityTitle" label="活动名称">
+        </el-table-column>
+        <el-table-column prop="activityType" label="活动类型">
+          <template slot-scope="scope">
+            <span v-if="scope.row.activityType=='1'">普通活动</span>
+            <span v-else-if="scope.row.activityType=='2'">时段优惠</span>
+            <span v-else-if="scope.row.activityType=='3'">满额优惠</span>
+            <span v-else-if="scope.row.activityType=='4'">全场优惠</span>
+          </template>
+        </el-table-column>
+        <el-table-column prop="activityImg" label="图片">
+          <template slot-scope="scope">
+            <img :src="scope.row.activityImg" alt="" width="40" height="40">
+          </template>
+        </el-table-column>
+        <el-table-column prop="activityContent" label="活动内容">
+        </el-table-column>
+        <el-table-column prop="createTime" label="下单时间">
+        </el-table-column>
+        <!-- <el-table-column prop="expirationTime" label="过期时间"> -->
+        <!-- </el-table-column> -->
+        <el-table-column label="状态">
+          <template slot-scope="scope">已使用
+          </template>
+        </el-table-column>
+      </el-table>
+      <div style="text-align: center;margin-top: 10px;">
+        <el-pagination @size-change="handleSizeChange" @current-change="handleCurrentChange"
+          :page-sizes="[10, 20, 30,50,100]" :page-size="limit" :current-page="page" layout="total,sizes, prev, pager, next"
+          :total="tableData.totalCount">
+        </el-pagination>
+      </div>
+    </el-tab-pane>
+  </el-tabs>
+</template>
+
+<script>
+  export default {
+    data() {
+      return {
+        limit: 10,
+        page: 1,
+        state: '',
+        huoType:'',
+        title: '',
+        id: '',
+        content: '',
+        activeName: 'seventh',
+        tableDataLoading: false,
+        dialogFormVisible1: false,
+        dialogFormVisible2: false,
+        dialogFormVisible: false,
+        tableData: [],
+        typeList:[
+          {
+            value:'',
+            label:'全部'
+          },
+          {
+            value:0,
+            label:'未支付'
+          },
+          {
+            value:1,
+            label:'已支付'
+          }
+        ],
+        huotype:[{
+						value: '',
+						label: '全部活动'
+					},{
+						value: 1,
+						label: '普通活动'
+					},
+					{
+						value: 2,
+						label: '时段优惠'
+					},
+					{
+						value: 3,
+						label: '满额优惠'
+					},{
+						value: 4,
+						label: '全场优惠'
+					}
+        ],
+        phone:'',
+		    shopName:'',
+        activyName:'',
+        orderId:'',
+      }
+    },
+    methods: {
+      // 详情跳转
+      updataDetails(row) {
+        this.$router.push({
+          path: '/userDetail',
+          query: {
+            userId: row.userId
+          }
+        });
+      },
+      handleSizeChange(val) {
+        this.limit = val;
+        this.dataSelect()
+      },
+      handleCurrentChange(val) {
+        this.page = val;
+        this.dataSelect()
+      },
+      handleClick(tab, event) {
+        this.page = 1
+        this.limit = 10
+        this.dataSelect()
+      },
+      // 获取数据列表
+      dataSelect() {
+        this.tableDataLoading = true
+        this.$http({
+          url: this.$http.adornUrl('admin/activity-part-record/page'),
+          method: 'get',
+          params: this.$http.adornParams({
+            'page':this.page,
+            'limit':this.limit,
+            // 'orderId':this.orderId,
+            'activityType':this.huoType,
+            'userPhone':this.phone,
+			      'orderPayStatus':this.state,
+            'activityTitle':this.activyName,
+            'shopName':this.shopName
+          })
+        }).then(({
+          data
+        }) => {
+          if(data.msg=='success'){
+						this.tableDataLoading = false
+						let returnData = data.data
+						this.tableData = returnData
+					}else{
+						this.$message({
+							message: data.msg,
+							type: 'warning',
+							duration: 1500,
+							onClose: () => {}
+						})
+          }
+        })
+      },
+      animeDat(){
+        this.page = 1
+        this.dataSelect()
+      },
+      cleans(){
+        this.page = 1
+        this.phone = ''
+        this.state = ''
+        this.orderId=''
+		    this.shopName = ''
+        this.activyName=''
+        this.huoType=''
+        this.dataSelect()
+      }
+    },
+    mounted() {
+      this.dataSelect()
+    }
+  };
+</script>
+
+<style>
+
+</style>

Разница между файлами не показана из-за своего большого размера
+ 1398 - 720
src/views/integral/integral.vue


Разница между файлами не показана из-за своего большого размера
+ 1315 - 1314
src/views/mission/mission.vue


+ 251 - 0
src/views/shopManagement/duanxinlist.vue

@@ -0,0 +1,251 @@
+<template>
+	<div>
+		<div style="display: inline-block;">
+			<span>状态:</span>
+			<el-select v-model="successFlag" style="width:150px;margin-left: 10px;" @change="select()">
+				<el-option v-for="item in statesnum2" :key="item.value" :label="item.label" :value="item.value">
+				</el-option>
+			</el-select>&nbsp;&nbsp;
+			<div style="position: relative;display: inline-block;">
+				<span>订单id:</span>
+				<el-input style="width: 200px;" @keydown.enter.native="select" placeholder="请输入订单编号" v-model="orderId">
+				</el-input>&nbsp;&nbsp;
+			</div>
+			<div style="position: relative;display: inline-block;">
+				<span>发送商户:</span>
+				<el-input style="width: 200px;" @keydown.enter.native="select" placeholder="请输入发送商户手机号" v-model="fromTo">
+				</el-input>&nbsp;&nbsp;
+			</div>
+			<div style="position: relative;display: inline-block;">
+				<span>接收人:</span>
+				<el-input style="width: 200px;" @keydown.enter.native="select" placeholder="请输入接收人手机号" v-model="sendTo">
+				</el-input>&nbsp;&nbsp;
+			</div>
+			<div style="margin:5px;display: inline-block;">
+					<span>开始时间:</span>
+					<el-date-picker style="width: 160px;margin-left: 10px;" v-model="startTime" align="right"
+						type="datetime" format="yyyy-MM-dd" value-format="yyyy-MM-dd" placeholder="选择开始时间">
+					</el-date-picker>&nbsp;&nbsp;&nbsp;
+				</div>
+				<div style="margin:5px;display: inline-block;">
+					<span>截止时间:</span>
+					<el-date-picker style="width: 160px;margin-left: 10px;" v-model="endTime" align="right"
+						type="datetime" format="yyyy-MM-dd" value-format="yyyy-MM-dd" placeholder="选择截止时间">
+					</el-date-picker>
+				</div>
+			<el-button style='margin-left:15px;' size="mini" type="primary" icon="document" @click="select">查询
+			</el-button>
+			<el-button style='margin-left:15px;' size="mini" type="primary" icon="document" @click="cleans">重置
+			</el-button>
+			<!-- <el-button style='margin:0 0 20px 20px;' v-if="isAuth('autonym:tongguo')" size="mini" type="primary"
+				icon="document" @click="passClick()" :disabled="checkBoxData.length <= 0">通过</el-button> -->
+		</div>
+		<el-table v-loading="tableDataLoading" :data="duanxinData.list">
+		  <el-table-column fixed prop="complaintId" label="编号" width="80">
+			 <template slot-scope="scope">
+					  <span>{{scope.$index+1}}</span>
+				  </template>
+		  </el-table-column>
+		  <el-table-column prop="orderId" label="订单id" width="200" align="center">
+		  </el-table-column>
+		  <el-table-column prop="goodsCover" label="图片" width="150">
+            <template slot-scope="scope">
+              <div v-for="(item,index) in scope.row.imgs" :key="index"
+                style="display: inline-block; margin: 3px;">
+                <el-popover placement="top-start" title="" trigger="hover">
+                  <img style="width: 50px; height: 50px" :src="item" alt="" slot="reference">
+                  <img style="width: 300px; height: auto" :src="item" alt="">
+                </el-popover>
+              </div>
+            </template>
+          </el-table-column>
+		  <el-table-column prop="successFlag" label="发送状态" width="150">
+			<template slot-scope="scope">
+					  <div v-if="scope.row.successFlag==0">发送失败</div>
+					  <div v-if="scope.row.successFlag==1">发送成功</div>
+				  </template>
+		  </el-table-column>
+		  <el-table-column prop="sendContent" label="短信内容" width="180"></el-table-column>
+		  <el-table-column prop="sendResult" label="发送结果" width="120" align="center">
+		  </el-table-column>
+		  <el-table-column prop="sendTo" label="接受人" width="180"></el-table-column>
+		  <el-table-column prop="sendFromShopName" label="发送商户" width="180"></el-table-column>
+		  <el-table-column prop="sendTime" label="发送时间" width="100"></el-table-column>
+		</el-table>
+		<div style="text-align: center;margin-top: 10px;">
+			<el-pagination @size-change="handleSizeChange" @current-change="handleCurrentChange"
+				:page-sizes="[10, 20, 30, 40]" :page-size="limit" :current-page="page"
+				layout="total,sizes, prev, pager, next,jumper" :total="duanxinData.totalCount">
+			</el-pagination>
+		</div>
+	</div>
+</template>
+
+<script>
+	export default {
+		data() {
+			return {
+				limit: 10,
+				page: 1,
+				activeName: 'first',
+				tableDataLoading: false,
+				dialogFormVisible: false,
+				tableData: [],
+				checkBoxData: [], //多选框选择的值
+				helpTakeId:'',
+				info: {
+					stockDate: this.getNowTime(), //日期
+				},
+				info1: {
+					stockDate1: this.getNowTime1(), //日期
+				},
+				info2: {
+					stockDate2: this.getNowTime2(), //日期
+				},
+				startTime: '',
+				endTime: '',
+				orderId:'',
+				sendTo:'',
+				fromTo:'',
+				statesnum2: [{
+					label: '全部',
+					value: ''
+					},
+					{
+					label: '发送成功',
+					value: 1
+					},
+					{
+					label: '发送失败',
+					value: 0
+					},
+				],
+				successFlag:'',
+				duanxinData:[],
+				// info: {
+				// 	stockDate: this.getNowTime(), //日期
+				// },
+				// info1: {
+				// 	stockDate1: this.getNowTime1(), //日期
+				// },
+				// info2: {
+				// 	stockDate2: this.getNowTime2(), //日期
+				// },
+			}
+		},
+		methods: {
+			handleSizeChange(val) {
+				this.limit = val;
+				this.dataSelect()
+			},
+			handleCurrentChange(val) {
+				this.page = val;
+				this.dataSelect()
+			},
+			//处理默认选中当前日期
+			getNowTime1() {
+				var now = new Date();
+				var year = now.getFullYear(); //得到年份
+				var month = now.getMonth(); //得到月份
+				var date = now.getDate(); //得到日期
+				var hh = now.getHours() < 10 ? "0" + now.getHours() : now.getHours();
+				var mm = now.getMinutes() < 10 ? "0" + now.getMinutes() : now.getMinutes();
+				var ss = now.getSeconds() < 10 ? "0" + now.getSeconds() : now.getSeconds();
+				month = month + 1;
+				month = month.toString().padStart(2, "0");
+				date = date.toString().padStart(2, "0");
+				var defaultDate = `${year}-${month}-${date} ${hh}:${mm}:${ss}`;
+				return defaultDate;
+				this.$set(this.info, "stockDate", defaultDate);
+			},
+			getNowTime2() {
+				var now = new Date();
+				var year = now.getFullYear(); //得到年份
+				var month = now.getMonth(); //得到月份
+				var date = now.getDate(); //得到日期
+				month = month + 1;
+				month = month.toString().padStart(2, "0");
+				date = date.toString().padStart(2, "0");
+				var defaultDate = `${year}-${month}-${date}`;
+				return defaultDate;
+				this.$set(this.info, "stockDate", defaultDate);
+			},
+			//处理默认选中当前日期
+			getNowTime() {
+				var now = new Date()
+				var year = now.getFullYear() //得到年份
+				var month = now.getMonth() - now.getMonth() //得到月份
+				var date = now.getDate() - now.getDate() + 1 //得到日期
+				month = month + 1
+				month = month.toString().padStart(2, '0')
+				date = date.toString().padStart(2, '0')
+				var defaultDate = `${year}-${month}-${date}`
+				return defaultDate
+				this.$set(this.info, 'stockDate', defaultDate)
+			},
+			// 查询
+			select() {
+				this.page = 1
+				this.limit = 10
+				this.dataSelect()
+			},
+			// 重置
+			cleans() {
+				this.orderId = ''
+				this.successFlag = ''
+				this.sendTo = ''
+				this.fromTo= ''
+				this.startTime = ''
+				this.endTime = ''
+				this.page = 1
+				this.dataSelect()
+			},
+			// 获取派单数据列表
+			dataSelect() {
+				// if (this.endTime == '') {
+				// 	  this.endTime = this.info2.stockDate2
+				//   }
+				//   if (this.startTime == '') {
+				// 	  this.startTime = this.info.stockDate
+				//   }
+				this.tableDataLoading = true
+				this.$http({
+					url: this.$http.adornUrl('admin/tb-indent-sms/log'),
+					method: 'get',
+					params: this.$http.adornParams({
+					'page': this.page,
+					'limit': this.limit,
+					'orderId': this.orderId,//订单id
+					'successFlag': this.successFlag,//是否发送成功
+					'sendTo': this.sendTo,//接受人
+					'fromTo': this.fromTo,//发送骑手
+					'startTime': this.startTime,//开始时间
+					'endTime': this.endTime,//结束时间
+          'sourceType':2//1骑手、2商家,默认为1
+					})
+				}).then(({
+					data
+				}) => {
+					if (data && data.code === 0) {
+					this.tableDataLoading = false
+					for (var i in data.data.list) {
+						if (data.data.list[i].imgs) {
+						data.data.list[i].imgs = data.data.list[i].imgs.split(',')
+						}
+
+					}
+					let returnData = data.data
+					this.duanxinData = returnData
+					}
+				})
+			}
+		},
+		mounted() {
+			this.dataSelect()
+		}
+	};
+</script>
+
+<style>
+
+</style>

+ 607 - 41
src/views/shopsList/shopsList.vue

@@ -191,9 +191,9 @@
 					<template slot-scope="scope">
 						<div v-if="scope.row.activityId">是</div>
 						<div v-else>否</div>
-						<el-button size="mini" style="color: #4f9dec;background: #fff;border: none;margin: 3px;"
+						<!-- <el-button size="mini" style="color: #4f9dec;background: #fff;border: none;margin: 3px;"
 							type="primary" v-if="scope.row.activityId" @click="looksHd(scope.row)">活动详情
-						</el-button>
+						</el-button> -->
 						<el-button size="mini" style="margin: 3px;" type="warning" @click="canjiaHd(scope.row)">活动列表
 						</el-button>
 					</template>
@@ -616,15 +616,15 @@
 				<el-button style='margin-left:15px;' size="mini" type="primary" icon="document" @click="cleansHs">重置
 				</el-button>
 			</div>
-			<el-table v-loading="tableDataLoadingHd" :data="huodongData.records">
-				<el-table-column prop="activityId" label="编号" width="80">
+			<el-table v-loading="tableDataLoadingHd" :data="huodongData">
+				<el-table-column prop="id" label="编号" width="80">
 				</el-table-column>
-				<el-table-column prop="activityTitle" label="活动名称" width="150">
+				<el-table-column prop="title" label="活动名称" width="150">
 				</el-table-column>
-				<el-table-column prop="activityImage" label="活动图片" width="200">
+				<el-table-column prop="image" label="活动图片" width="200">
 					<template slot-scope="scope">
-						<div v-if="scope.row.activityImage">
-							<div v-for="(item,index) in scope.row.activityImage.split(',')" :key="index"
+						<div v-if="scope.row.image">
+							<div v-for="(item,index) in scope.row.image.split(',')" :key="index"
 								style="display: inline-block; margin: 3px;">
 								<el-popover placement="top-start" title="" trigger="hover">
 									<img style="width: 50px; height: 50px" :src="item" alt="" slot="reference">
@@ -634,12 +634,20 @@
 						</div>
 					</template>
 				</el-table-column>
-				<el-table-column prop="activityContent" label="活动内容">
+        <el-table-column prop="type" label="活动类型">
+          <template slot-scope="scope">
+            <span v-if="scope.row.type==1">普通活动</span>
+            <span v-else-if="scope.row.type==2">时段优惠</span>
+            <span v-else-if="scope.row.type==3">满额优惠</span>
+            <span v-else-if="scope.row.type==4">全场优惠</span>
+          </template>
+        </el-table-column>
+				<el-table-column prop="content" label="活动内容">
 					<template slot-scope="scope">
 						<el-popover placement="top-start" title="" trigger="hover">
 							<div style="display: -webkit-box;-webkit-box-orient: vertical;-webkit-line-clamp: 3;overflow: hidden;max-height:80px;"
-								slot="reference">{{scope.row.activityContent}}</div>
-							<div style="width: 300px; height: auto;word-break: break-all;">{{scope.row.activityContent}}
+								slot="reference">{{scope.row.content}}</div>
+							<div style="width: 300px; height: auto;word-break: break-all;">{{scope.row.content}}
 							</div>
 						</el-popover>
 
@@ -649,21 +657,26 @@
 				</el-table-column>
 				<el-table-column fixed="right" label="操作" width="100">
 					<template slot-scope="scope">
-						<el-button size="mini" v-if="activityId!=scope.row.activityId" type="primary" @click="querenBtnHd(scope.row)" style="margin: 3px;">参加活动
-						</el-button>
-
-						<el-button v-else size="mini" type="primary" disabled style="margin: 3px;">已参加
+						<el-button size="mini" v-if="scope.row.quantity==0" type="primary" @click="querenBtnHd(scope.row)" style="margin: 3px;">参加活动
 						</el-button>
+            <template v-else>
+              <el-button size="mini" type="warn" disabled style="margin: 3px;">已参加
+              </el-button>
+              <el-button size="mini" type="primary" style="margin: 3px;" v-if="scope.row.type==3" @click="selectshangpin(scope.row)">选择商品
+              </el-button>
+              <el-button size="mini" type="primary" style="margin: 3px;" @click="quitHuo(scope.row)">退出活动
+              </el-button>
+            </template>
 
 					</template>
 				</el-table-column>
 			</el-table>
-			<div style="text-align: center;margin-top: 10px;">
-				<el-pagination @size-change="handleSizeChange" @current-change="handleCurrentChange"
+			<!-- <div style="text-align: center;margin-top: 10px;">
+				<el-pagination @size-change="handleSizeChangeH" @current-change="handleCurrentChangeH"
 					:page-sizes="[10, 15, 20, 25]" :page-size="limitH" :current-page="pageH"
-					layout="total,sizes, prev, pager, next" :total="huodongData.total">
+					layout="total,sizes, prev, pager, next" :total="huodongData.length">
 				</el-pagination>
-			</div>
+			</div> -->
 		</el-dialog>
 
 		<!-- 活动详情 -->
@@ -686,6 +699,147 @@
 				</div>
 			</div>
 		</el-dialog>
+    <!-- 参与活动弹框 -->
+		<el-dialog title="参与活动" :visible.sync="dialogFormcanyuhuo" center>
+			<div>
+				<div style="margin-bottom: 10px;">
+					<span style="width: 200px;display: inline-block;text-align: right;">活动名称:</span>
+					<span>{{huoList.title}}</span>
+				</div>
+				<div style="margin-bottom: 10px;" v-if="huoList.image">
+					<div style="width: 200px;display: inline-block;text-align: right;">活动图片:</div>
+					<div class="imgs" v-for="(item,index) in huoList.image.split(',')" :key="index">
+						<img width="100%" class="images" height="100%" :src="item" alt="">
+					</div>
+				</div>
+				<div style="margin-bottom: 10px;">
+					<span style="width: 200px;display: inline-block;text-align: right;">活动详情:</span>
+					<div class="divs" v-html="huoList.content" style="margin-left: 200px;width: 50%;">
+					</div>
+				</div>
+        <!-- <div style="margin-bottom: 10px;">
+					<span style="width: 200px;display: inline-block;text-align: right;">参与活动的商品:</span>
+					<span class="divs" style="width: 50%;color: rgba(62, 142, 247, 1);" @click="selectshangpin">请选择/修改</span>
+				</div> -->
+        <div style="margin-bottom: 10px;">
+					<span style="width: 200px;display: inline-block;text-align: right;">活动类型:</span>
+					<span v-if="huoList.type=='1'">普通活动</span>
+					<span v-if="huoList.type=='2'">时段优惠</span>
+					<span v-if="huoList.type=='3'">满额优惠</span>
+					<span v-if="huoList.type=='4'">全场优惠</span>
+				</div>
+        <div style="margin-bottom: 10px;" v-if="huoList.type=='2' || huoList.type=='3' || huoList.type=='4'">
+					<span style="width: 200px;display: inline-block;text-align: right;">适用情况:</span>
+					<el-radio v-model="suitType" :label="'1'">皆适用</el-radio><br>
+					<div style="margin-left: 205px;width: 200px;">
+						<el-radio v-model="suitType" :label="'2'">仅针对第一次下单</el-radio>
+					</div>
+				</div>
+        <div style="margin-bottom: 10px;">
+					<span style="width: 200px;display: inline-block;text-align: right;">活动时间:</span>
+					<span>{{huoList.startTime}}至{{huoList.endTime}}</span>
+				</div>
+        <div style="margin-bottom: 10px;" v-if="huoList.type=='2' || huoList.type=='3' || huoList.type=='4'">
+					<span style="width: 200px;display: inline-block;text-align: right;">使用限制:</span>
+					<el-radio v-model="limitType" :label="'1'">无限制</el-radio><br>
+					<div style="margin-left: 205px;">
+						<el-radio v-model="limitType" :label="'2'">每天使用</el-radio>
+						<el-input v-model="limitNum" type="number" style="width:13%;display: inline-table;"></el-input>
+						<span>次</span>
+					</div>
+				</div>
+				<div style="margin-bottom: 10px;">
+					<div class="canquxiao" @click="joinHuo">确定</div>
+					<div class="canqueding">取消</div>
+				</div>
+			</div>
+		</el-dialog>
+
+    <!-- 选择活动商品弹框 -->
+		<el-dialog title="优惠商品" :visible.sync="dialogFormVisibleshangp" center width="70%">
+      <div style="margin:2% 0;display: inline-block;">
+        <span>商品名称:</span>
+        <el-input style="width: 180px;" @keydown.enter.native="select" clearable placeholder="请输入商品名称"
+          v-model="integralName"></el-input>
+      </div>
+      <div style="display: inline-block;">
+        <el-button style='margin-left:15px;' size="mini" type="primary" icon="document" @click="select">查询
+        </el-button>
+      </div>
+      <div style="display: inline-block;">
+        <el-button style='margin-left:15px;' size="mini" type="primary" icon="document" @click="yiselect()">已选择商品
+        </el-button>
+      </div>
+			<el-table v-loading="tableDataLoadingShop":data="shopData.list" ref="dataTable"
+      :key="randomKey"
+              @select="selectdan"
+              @select-all="selectAll">
+        <el-table-column
+          type="selection"
+          width="55">
+        </el-table-column>
+				<el-table-column label="编号" prop="goodsId" width="80" fixed="left">
+				</el-table-column>
+				<el-table-column label="标题" prop="goodsName" fixed="left">
+				</el-table-column>
+				<el-table-column prop="goodsCover" label="商品图" width="150">
+				  <template slot-scope="scope">
+
+				    <div style="display: inline-block; margin: 3px;">
+				      <el-popover placement="top-start" title="" trigger="hover">
+				        <img style="width: 50px; height: 50px" :src="scope.row.goodsCover" alt="" slot="reference">
+				        <img style="width: 300px; height: auto" :src="scope.row.goodsCover" alt="">
+				      </el-popover>
+				    </div>
+				  </template>
+				</el-table-column>
+        <el-table-column label="商品描述" prop="goodsDescribe" width="120">
+				</el-table-column>
+				<el-table-column label="创建时间" prop="createTime">
+				</el-table-column>
+
+			</el-table>
+      <el-button style='margin-left:15px;margin-top: 10px;' size="mini" type="primary" icon="document" @click="tianjiahuo">确定
+      </el-button>
+			<div style="text-align: center;margin-top: 10px;">
+				<el-pagination @size-change="handleSizeChangeShop" @current-change="handleCurrentChangeShop"
+					:page-sizes="[10, 15, 20, 25]" :page-size="limit1" :current-page="page1"
+					layout="total,sizes, prev, pager, next" :total="shopData.totalCount">
+				</el-pagination>
+			</div>
+		</el-dialog>
+
+    <!-- 已选择商品 -->
+		<el-dialog title="已选择商品" :visible.sync="dialogFormVisibleshangpYi" center width="70%">
+			<el-table v-loading="tableDataLoadingShopYi":data="shopDataYi">
+				<el-table-column label="编号" prop="goodsId" width="80" fixed="left">
+				</el-table-column>
+				<el-table-column label="标题" prop="goodsName" fixed="left">
+				</el-table-column>
+				<el-table-column prop="goodsCover" label="商品图" width="150">
+				  <template slot-scope="scope">
+
+				    <div style="display: inline-block; margin: 3px;">
+				      <el-popover placement="top-start" title="" trigger="hover">
+				        <img style="width: 50px; height: 50px" :src="scope.row.goodsCover" alt="" slot="reference">
+				        <img style="width: 300px; height: auto" :src="scope.row.goodsCover" alt="">
+				      </el-popover>
+				    </div>
+				  </template>
+				</el-table-column>
+        <el-table-column label="商品描述" prop="goodsDescribe" width="120">
+				</el-table-column>
+				<el-table-column label="创建时间" prop="createTime">
+				</el-table-column>
+
+			</el-table>
+			<!-- <div style="text-align: center;margin-top: 10px;">
+				<el-pagination @size-change="handleSizeChangeShop2" @current-change="handleCurrentChangeShop2"
+					:page-sizes="[10, 15, 20, 25]" :page-size="limit2" :current-page="page2"
+					layout="total,sizes, prev, pager, next" :total="shopTotal">
+				</el-pagination>
+			</div> -->
+		</el-dialog>
 	</el-tabs>
 </template>
 
@@ -709,6 +863,10 @@
 				nickName: '',
 				limit: 10,
 				page: 1,
+        limit1: 10,
+				page1: 1,
+				limit2: 10,
+				page2: 1,
 				size11: 10,
 				page11: 1,
 				shopName1: '',
@@ -822,8 +980,18 @@
 
 				dialogFormVisibleHd: false,
 				dialogFormVisibleXq: false,
+        dialogFormcanyuhuo: false,
+        dialogFormVisibleshangp:false,//优惠商品选择弹框
+        dialogFormVisibleshangpYi:false,//已选择商品弹框
+        selectedItems: [],//存储选中的数组
+        randomKey: Math.random(),
+        suoshoplength:0,//所有商品数量
+        shopTotal:0,
+        shopDataYi:[],//已选择商品
+        shopData:{},
+        tableDataLoadingShop:false,
 				tableDataLoadingHd: false,
-				huodongData: {},
+				huodongData: [],
 				limitH: 10,
 				pageH: 1,
 				integralName: '',
@@ -844,6 +1012,12 @@
 				openValue:1,
 				closeValue:0,
 				activityId:'',
+        // 参与活动参数
+				huoList:{},
+				suitType:'1',//适用情况
+				limitType:'1',//使用限制
+				limitNum:'',
+				actShopid:[],//选择商品的id
 			}
 		},
 		methods: {
@@ -884,6 +1058,15 @@
 				this.page = val
 				this.dataSelect()
 			},
+      //活动列表
+      handleSizeChangeH(val) {
+				this.limitH = val
+				this.shopSelect2()
+			},
+			handleCurrentChangeH(val) {
+				this.pageH = val
+				this.shopSelect2()
+			},
 			handleSizeChange1(val) {
 				this.limit = val
 				this.dataSelect1()
@@ -1998,75 +2181,429 @@
 				this.shopId = row.shopId
 				this.activityId = row.activityId
 				this.dialogFormVisibleHd = true
-				this.huodongSelect()
+				this.shopSelect2()
+			},
+      // 活动列表中该商家已参与的活动
+      shopSelect2() {
+				this.$http({
+					url: this.$http.adornUrl(`admin/activity-shop/shop-activity-list/${this.shopId}`),
+					method: 'get',
+					params: this.$http.adornParams({
+						// 'shopId': this.shopId,
+					})
+				}).then(({
+					data
+				}) => {
+					let returnData = data.data
+					this.huodongSelect(returnData)
+				})
 			},
 			// 获取活动列表
-			huodongSelect() {
+			huodongSelect(returnData) {
 				this.tableDataLoadingHd = true
-				this.$http({
-					url: this.$http.adornUrl('admin/activityManage/getActivityList'),
+        this.$http({
+					url: this.$http.adornUrl('admin/activity/page'),
 					method: 'get',
 					params: this.$http.adornParams({
-						'page': this.pageH,
+            'page': this.pageH,
 						'limit': this.limitH,
-						'activityTitle': this.integralName,
+						'title': this.integralName,
 						'isEnable': ''
 					})
 				}).then(({
 					data
 				}) => {
-					this.tableDataLoadingHd = false
-					let returnData = data.data
-					this.huodongData = returnData
+					let length=data.data.totalCount
+					this.$http({
+					url: this.$http.adornUrl('admin/activity/page'),
+					method: 'get',
+					params: this.$http.adornParams({
+						'page': this.pageH,
+						'limit': length,
+						'title': this.integralName,
+						'isEnable': ''
+					})
+					}).then(({
+						data
+					}) => {
+						this.tableDataLoadingHd = false
+						let returnData2 = data.data
+						const newList =returnData2.list.map(item =>{
+						return{...item,quantity:0}
+            return{...item,activityShopId:0}
+						})
+						var arr = []
+						for(var j in returnData){
+						newList.forEach(item => {
+							if (item.id === returnData[j].activityId) {
+							// 'status'为属性名,'非活动'为修改后的内容
+							item.quantity = 1
+              item.activityShopId = returnData[j].activityShopId
+							}
+						})
+						}
+						arr=newList
+						this.huodongData = arr
+					})
 				})
 			},
 			selectHd() {
 				this.pageH = 1
-				this.huodongSelect()
+				this.shopSelect2()
 			},
 			cleansHs() {
 				this.pageH = 1
 				this.integralName = ''
-				this.huodongSelect()
+				this.shopSelect2()
+			},
+      // 已选择商品
+			yiselect(row){
+				this.dialogFormVisibleshangpYi=true
+				this.selectShang()
+			},
+      handleSizeChangeShop(val) {
+        this.limit1 = val
+        this.getGoods11()
+      },
+      handleCurrentChangeShop(val) {
+        this.page1 = val
+        this.getGoods11()
+      },
+      handleSizeChangeShop2(val) {
+        this.limit2 = val
+        this.selectShang()
+      },
+      handleCurrentChangeShop2(val) {
+        this.page2 = val
+        this.selectShang()
+      },
+      //添加商品
+      tianjiahuo(){
+        if (this.selectedItems.length <= 0) {
+          this.$message('请勾选需要添加的商品');
+          return;
+        }
+        var shangIds=[]
+        this.selectedItems.forEach(item => {
+          shangIds.push(item.goodsId)
+        })
+        this.$http({
+            url: this.$http.adornUrl(
+              "/admin/activity-goods"
+            ),
+            method: 'post',
+            data: this.$http.adornData({
+              "activityShopId": this.actShopid,
+					    "goodsIds": shangIds
+            })
+          }).then(({
+            data
+          }) => {
+            if(data.code==0){
+              this.$message({
+                message: '操作成功',
+                type: 'success',
+                duration: 1500,
+                onClose: () => {
+                  this.dialogFormVisibleshangp = false
+                  this.selectedItems=[]
+                  this.shopSelect()
+                }
+              })
+						}else{
+							this.$message({
+								message: data.msg,
+								type: 'warning',
+								duration: 1500,
+								onClose: () => {
+								}
+							})
+						}
+          })
+      },
+      //选中table已有数据
+      selectedPreExisting (rows) {
+        if (rows.length > 0) {
+          //这里使用this.$nextTick是防止表格未渲染完成就执行,导致无法添加选中效果
+          this.$nextTick(() => {
+          rows.forEach(row => {
+            //判断row是存在当前tableData
+            let selectedItem = this.shopData.list.find(item => item.goodsId == row.goodsId)
+            this.$refs.dataTable.toggleRowSelection(selectedItem);
+          });
+          })
+        } else {
+          this.$refs.dataTable.clearSelection();
+        }
+      },
+      //表格单选
+      selectdan (selection, row) {
+        //因为翻页之后,点选时selection会出现undefined,所以这里需要进行判断
+        //这里可以通过判断选择selection中有没有row,就可以判断出是增加还是删减
+        if (selection && selection.find(item => item && (item.goodsId == row.goodsId))) {
+          this.addRows([row])
+        } else {
+          this.deleteRows([row])
+        }
+      },
+      //表格全选
+      selectAll (selection) {
+        //判断是选中还是取消tableData
+        if (selection.length > 0) {
+          this.addRows(this.shopData.list)
+        } else {
+          this.deleteRows(this.shopData.list)
+        }
+      },
+      //添加选中
+      addRows (rows) {
+        rows.forEach(row => {
+          //过滤,当selectedItems有此条数据时,则直接返回,不执行添加
+          if (this.selectedItems.find(item => item.goodsId == row.goodsId)) { return }
+          this.selectedItems.push(row)
+        });
+      },
+      //取消选中
+      deleteRows (rows) {
+        //当selectedItems为空数组时,不执行删除
+        if (this.selectedItems.length == 0) { return }
+        rows.forEach(row => {
+          this.selectedItems = this.selectedItems.filter(item => item.goodsId !== row.goodsId)
+        })
+      },
+      //选择商品
+      selectshangpin(row){
+        console.log(row)
+        this.dialogFormVisibleshangp=true
+        this.actShopid=row.activityShopId
+				this.getGoods11()
+      },
+      // 店铺已选择商品
+			selectShang(){
+				this.$http({
+					url: this.$http.adornUrl(`admin/activity-goods/${this.actShopid}`),
+					method: 'get',
+					params: this.$http.adornParams({
+					})
+				}).then(({
+					data
+				}) => {
+					if(data.msg=='success'){
+						let returnData = data.data
+						//商品列表
+						this.getGoods(returnData)
+					}else{
+						this.$message({
+							message: data.msg,
+							type: 'warning',
+							duration: 1500,
+							onClose: () => {
+							}
+						})
+					}
+				})
 			},
+			//所有商品
+			getGoods(returnData){
+				this.$http({
+					url: this.$http.adornUrl('admin/goodsShop/selectGoodsByShopId'),
+					method: 'get',
+					params: this.$http.adornParams({
+						"page": this.page2,
+						"limit": this.suoshoplength,
+						"goodsName": this.integralName,
+						"shopId": this.shopId,
+					})
+				}).then(({
+					data
+				}) => {
+					if(data.msg=='success'){
+            let returnData2 = data.data
+            const newList =returnData2.list
+            var arr = []
+            for(var j in returnData){
+              newList.forEach(item => {
+                if (item.goodsId === returnData[j]) {
+                  arr.push(item)
+                }
+              })
+            }
+            this.shopDataYi = arr
+            this.shopTotal =this.shopDataYi.length
+					}else{
+						this.$message({
+							message: data.msg,
+							type: 'warning',
+							duration: 1500,
+							onClose: () => {
+							}
+						})
+					}
+				})
+			},
+      //所有商品11
+			getGoods11(){
+				this.$http({
+					url: this.$http.adornUrl('admin/goodsShop/selectGoodsByShopId'),
+					method: 'get',
+					params: this.$http.adornParams({
+						"page": this.page1,
+						"limit": this.limit1,
+						"goodsName": this.integralName,
+						"shopId": this.shopId,
+					})
+				}).then(({
+					data
+				}) => {
+					if(data.msg=='success'){
+            this.suoshoplength=data.data.totalCount
+						this.shopData=data.data
+            //randomKey是table数据改动时,刷新table的
+            this.randomKey = Math.random()
+					  this.selectedPreExisting(this.selectedItems)
+					}else{
+						this.$message({
+							message: data.msg,
+							type: 'warning',
+							duration: 1500,
+							onClose: () => {
+							}
+						})
+					}
+				})
+			},
+      //选中table已有数据
+      selectedPreExisting (rows) {
+        if (rows.length > 0) {
+          //这里使用this.$nextTick是防止表格未渲染完成就执行,导致无法添加选中效果
+          this.$nextTick(() => {
+          rows.forEach(row => {
+            //判断row是存在当前tableData
+            let selectedItem = this.shopData.list.find(item => item.goodsId == row.goodsId)
+            this.$refs.dataTable.toggleRowSelection(selectedItem);
+          });
+          })
+        } else {
+          this.$refs.dataTable.clearSelection();
+        }
+      },
 			// 确认参加活动
 			querenBtnHd(row) {
-				this.$confirm(`确定要参加这个活动吗`, '提示', {
+        this.activityId=row.id
+				this.getActivity(row.id)
+			},
+      //退出活动
+			quitHuo(row){
+				this.$confirm(`确定退出该活动?`, '提示', {
 					confirmButtonText: '确定',
 					cancelButtonText: '取消',
 					type: 'warning'
 				}).then(() => {
 					this.$http({
-						url: this.$http.adornUrl('admin/activityManage/shopJoinActivity'),
-						method: 'get',
+						url: this.$http.adornUrl('admin/activity-shop/quit'),
+						method: 'put',
 						params: this.$http.adornParams({
-							'shopId': this.shopId,
-							'activityId': row.activityId
+							"shopId":this.shopId,
+							"activityId": row.id
 						})
 					}).then(({
 						data
 					}) => {
-						if (data.code == 0) {
+						if(data.code==0){
 							this.$message({
 								message: '操作成功',
 								type: 'success',
 								duration: 1500,
 								onClose: () => {
-									this.dialogFormVisibleHd = false
-									this.dataSelect()
+									this.shopSelect2()
 								}
 							})
-						} else {
+						}else{
 							this.$message({
 								message: data.msg,
 								type: 'warning',
 								duration: 1500,
-								onClose: () => {}
+								onClose: () => {
+								}
 							})
 						}
+
 					})
 				}).catch(() => {})
 			},
+      //参与活动
+			joinHuo(){
+				var shopid=[this.shopId]
+				if (this.limitType == '') {
+					this.$notify({
+						title: '提示',
+						duration: 1800,
+						message: '有限制时不能为空',
+						type: 'warning'
+					});
+					return
+				}
+				this.$http({
+					url: this.$http.adornUrl('admin/activity-shop/join'),
+					method: 'post',
+					data: this.$http.adornData({
+						"activityId": this.activityId,
+						"limitType": this.limitType,
+						"limitValue": this.limitNum,
+						"shopIds": shopid,
+						"suitType": this.suitType
+					})
+				}).then(({
+					data
+				}) => {
+					if(data.code==0){
+						this.dialogFormcanyuhuo = false
+						this.$message({
+							message: '操作成功',
+							type: 'success',
+							duration: 1500,
+							onClose: () => {
+								this.dataSelect()
+							}
+						})
+					}else{
+						this.$message({
+							message: data.msg,
+							type: 'warning',
+							duration: 1500,
+							onClose: () => {
+							}
+						})
+					}
+
+				})
+			},
+      //获取活动信息
+			getActivity(id){
+				this.$http({
+					url: this.$http.adornUrl(`admin/activity/${id}`),
+					method: 'get',
+					params: this.$http.adornParams({
+						// 'shopId': this.shopId,
+					})
+				}).then(({
+					data
+				}) => {
+					if(data.msg=='success'){
+						let returnData = data.data
+						this.huoList=returnData
+						this.dialogFormcanyuhuo=true
+					}else{
+						this.$message({
+							message: data.msg,
+							type: 'warning',
+							duration: 1500,
+							onClose: () => {
+							}
+						})
+					}
+				})
+			},
 			// 查看活动
 			looksHd(row) {
 				this.$http({
@@ -2238,4 +2775,33 @@
 	.divs img {
 		width: 100%;
 	}
+	/* //参与活动 */
+	.canquxiao{
+		margin-top: 20px;
+		margin-left: 287px;
+		width: 76px;
+		height: 35px;
+		opacity: 1;
+		border-radius: 5px;
+		border: 1px solid rgba(0, 0, 0, 1);
+		font-size: 16px;
+		font-weight: 400;
+		line-height: 35px;
+		color: rgba(0, 0, 0, 1);
+		text-align: center;
+	}
+	.canqueding{
+		margin-top: -35px;
+		margin-left: 407px;
+		width: 76px;
+		height: 35px;
+		opacity: 1;
+		border-radius: 5px;
+		background: rgba(62, 142, 247, 1);
+		font-size: 16px;
+		font-weight: 400;
+		line-height: 35px;
+		color: rgba(255, 255, 255, 1);
+		text-align: center;
+	}
 </style>