Forráskód Böngészése

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

嘀嘀嘀 1 éve
szülő
commit
798e045a3c

BIN
dist.zip


A különbségek nem kerülnek megjelenítésre, a fájl túl nagy
+ 783 - 781
src/router/index.js


+ 98 - 98
src/utils/httpRequest.js

@@ -1,98 +1,98 @@
-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://chtech.ncjti.edu.cn/testingServer/waiMaiAdmin/' + actionName}
-	return 'https://mxys.chuanghai-tech.com/sqx_fast/' + actionName
-  // return 'https://www.daweilinli.com/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.adornUrlMsg = (actionName) => {
-  // 非生产环境 && 开启代理, 接口前缀统一使用[/proxyApi/]前缀做代理拦截!
-  // return (process.env.NODE_ENV !== 'production' && process.env.OPEN_PROXY ? '/proxyApi/' : window.SITE_CONFIG.baseUrl) + actionName
-// return 'https://chtech.ncjti.edu.cn/testingServer/waiMaiAdmin/' + actionName}
-	return 'https://mxys.chuanghai-tech.com/sqx_fast/' + actionName
-  // return 'https://www.daweilinli.com/sqx_fast/' + 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://chtech.ncjti.edu.cn/testingServer/waiMaiAdmin/' + actionName}
+	// return 'https://mxys.chuanghai-tech.com/sqx_fast/' + actionName
+  return 'https://www.daweilinli.com/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.adornUrlMsg = (actionName) => {
+  // 非生产环境 && 开启代理, 接口前缀统一使用[/proxyApi/]前缀做代理拦截!
+  // return (process.env.NODE_ENV !== 'production' && process.env.OPEN_PROXY ? '/proxyApi/' : window.SITE_CONFIG.baseUrl) + actionName
+// return 'https://chtech.ncjti.edu.cn/testingServer/waiMaiAdmin/' + actionName}
+	// return 'https://mxys.chuanghai-tech.com/sqx_fast/' + actionName
+  return 'https://www.daweilinli.com/sqx_fast/' + 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

A különbségek nem kerülnek megjelenítésre, a fájl túl nagy
+ 794 - 433
src/views/coupon/activity.vue


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

@@ -0,0 +1,228 @@
+<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="请输入订单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.$cookie.get('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.activyName=''
+        this.huoType=''
+        this.dataSelect()
+      }
+    },
+    mounted() {
+      this.dataSelect()
+    }
+  };
+</script>
+
+<style>
+
+</style>

+ 490 - 489
src/views/main-navbar.vue

@@ -1,489 +1,490 @@
-<template>
-	<nav class="site-navbar" :class="'site-navbar--' + navbarLayoutType">
-		<div class="site-navbar__header">
-			<h1 class="site-navbar__brand" @click="$router.push({ name: 'home' })">
-				<a class="site-navbar__brand-lg" href="javascript:;">墨轩云商商户管理平台</a>
-				<a class="site-navbar__brand-mini" href="javascript:;">
-					<img src="~@/assets/img/avatar.png" style="width: 25px;border-radius: 50%;">
-				</a>
-			</h1>
-		</div>
-		<div class="site-navbar__body clearfix">
-			<el-menu class="site-navbar__menu" mode="horizontal">
-				<el-menu-item class="site-navbar__switch" index="0" @click="sidebarFold = !sidebarFold">
-					<icon-svg name="zhedie"></icon-svg>
-				</el-menu-item>
-			</el-menu>
-			<el-menu class="site-navbar__menu site-navbar__menu--right" mode="horizontal">
-				<!-- <el-menu-item index="1" style="position: relative;" @click="$router.push({ name: 'missionSm' })" v-if="show">
-          <template slot="title">
-            <span class="left-number" v-if="chatNum">{{chatNum}}</span>
-            <icon-svg name="xiaoxi" class="el-icon-setting" style="font-size: 28px;"></icon-svg>
-            <audio id="audio1" autoplay="autoplay" v-if="chatNum>0"
-              src="https://pw.xianmxkj.com/file/uploadPath/2022/01/12/01beb0bc15549b9aa4d18027a7751bae.mp3" ref='audio'
-              controls hidden></audio>
-          </template>
-        </el-menu-item> -->
-				<el-menu-item index="1" style="position: relative;" @click="$router.push({ name: 'vueMchat' })">
-					<template slot="title">
-						<span class="left-number" v-if="chatNum2">{{chatNum2}}</span>
-						<icon-svg name="xiaoxi" class="el-icon-setting" style="font-size: 28px;"></icon-svg>
-						<!-- 消息提示  -->
-						<audio id="audio"  preload="auto">
-							<!-- 消息 -->
-							<source src="https://pw.xianmxkj.com/file/uploadPath/2022/01/19/0753211f78d718d44ee6372e33eae9ee.mp3"
-								type="audio/mpeg">
-						</audio>
-						<!-- 订单提示 -->
-						<audio id="audios" preload="auto" >
-							<source
-								src="https://pw.xianmxkj.com/file/uploadPath/2022/01/12/01beb0bc15549b9aa4d18027a7751bae.mp3"
-								type="audio/mpeg">
-						</audio>
-					</template>
-				</el-menu-item>
-				<!-- <el-menu-item index="1" @click="$router.push({ name: 'theme' })">
-          <template slot="title">
-            <el-badge value="new">
-              <icon-svg name="shezhi" class="el-icon-setting"></icon-svg>
-            </el-badge>
-          </template>
-        </el-menu-item> -->
-				<el-menu-item class="site-navbar__avatar" index="3">
-					<el-dropdown :show-timeout="0" placement="bottom">
-						<span class="el-dropdown-link">
-							<img :src="shopDetails.shopCover" :alt="shopDetails.shopName">
-							<!-- <img src="~@/assets/img/avatar.png" :alt="shopDetails.shopName">-->{{ shopDetails.shopName }} 
-						</span>
-						<el-dropdown-menu slot="dropdown">
-							<el-dropdown-item @click.native="updatePasswordHandle()">修改密码</el-dropdown-item>
-							<el-dropdown-item @click.native="logoutHandle()">退出</el-dropdown-item>
-						</el-dropdown-menu>
-					</el-dropdown>
-				</el-menu-item>
-			</el-menu>
-		</div>
-		<!-- 弹窗, 修改密码 -->
-		<update-password v-if="updatePassowrdVisible" ref="updatePassowrd"></update-password>
-	</nav>
-</template>
-
-<script>
-	import UpdatePassword from './main-navbar-update-password'
-	import {
-		clearLoginInfo
-	} from '@/utils'
-	export default {
-		data() {
-			return {
-				updatePassowrdVisible: false,
-				chatNum: 0,
-				chatNum2: 0,
-				intervalId: 0,
-				errCount: 0,
-				errCount2:0,
-				shopIds: [],
-				show: false,
-				storeId: 0,
-				shopDetails: {},
-				lodNum:0,
-				lodNums:0,
-				ordersOkMessage:0,
-				ordersClaneMessage:0,
-
-			}
-		},
-		components: {
-			UpdatePassword
-		},
-		computed: {
-			navbarLayoutType: {
-				get() {
-					return this.$store.state.common.navbarLayoutType
-				}
-			},
-			sidebarFold: {
-				get() {
-					return this.$store.state.common.sidebarFold
-				},
-				set(val) {
-					this.$store.commit('common/updateSidebarFold', val)
-				}
-			},
-			mainTabs: {
-				get() {
-					return this.$store.state.common.mainTabs
-				},
-				set(val) {
-					this.$store.commit('common/updateMainTabs', val)
-				}
-			},
-			userName: {
-				get() {
-					return this.$store.state.user.name
-				}
-			}
-		},
-		mounted() {
-			// this.chatSelect()
-			var userId = this.$cookie.get('userId')
-			var shopDel = this.$cookie.get('shopDel')
-			this.shopDetails = JSON.parse(shopDel)
-			console.log('shopDel', JSON.parse(shopDel))
-			this.$http({
-				url: this.$http.adornUrl(`/sys/user/info`),
-				method: 'get',
-				params: this.$http.adornParams()
-			}).then(({
-				data
-			}) => {
-				if (data && data.code === 0) {
-					var shows = 1
-					for (var i in data.user.roleIdList) {
-						if (data.user.roleIdList[i] == 12) {
-							shows = 2
-						} else {
-							shows = 1
-						}
-					}
-					console.log('shows', shows)
-					if (shows == 2) {
-						this.show = true
-					}
-					if (shows == 1) {
-						this.show = false
-					}
-
-					if (this.show == true) {
-						this.dataSelect()
-					}
-				}
-			})
-
-
-		},
-		methods: {
-			// 修改密码
-			updatePasswordHandle() {
-				this.updatePassowrdVisible = true
-				this.$nextTick(() => {
-					this.$refs.updatePassowrd.init()
-				})
-			},
-			// 退出
-			logoutHandle() {
-				this.$confirm(`确定进行[退出]操作?`, '提示', {
-					confirmButtonText: '确定',
-					cancelButtonText: '取消',
-					type: 'warning'
-				}).then(() => {
-					this.$http({
-						url: this.$http.adornUrl('/sys/logout'),
-						method: 'post',
-						data: this.$http.adornData()
-					}).then(({
-						data
-					}) => {
-						if (data && data.code === 0) {
-							clearLoginInfo()
-							this.$cookie.set('token', '')
-							sessionStorage.clear()
-							clearInterval(this.chatNum)
-							clearInterval(this.chatNum2)
-							this.$router.push({
-								name: 'login'
-							})
-						}
-					})
-				}).catch(() => {})
-			},
-			// 订单消息提醒
-			newsSelect() {
-				if(this.ordersOkMessage==0){
-					this.ordersOkMessage=1
-				}else{
-					return 
-				}
-				var _this = this
-				var shopId = this.$cookie.get('shopId')
-				this.$http({
-					url: this.$http.adornUrl('admin/ordermessage/selectReadFlagCount'),
-					method: 'post',
-					params: this.$http.adornParams({
-						'shopIds': shopId
-					})
-				}).then(({
-					data
-				}) => {
-					if (data.code == 0) {
-						if (data.data > 0) {
-							/* if (this.errCount != data.data) {
-								
-							}
-							this.ordersOkMessage=0	 */
-							this.lodNums = 1
-							this.lodNum = 0
-							this.$notify.info({
-								title: '消息',
-								dangerouslyUseHTMLString: true,
-								message: '有' + data.data + '条订单,请前往订单中心处理。',
-								offset: 80,
-								duration: 0,
-								type: "warning",
-								onClose() {
-									_this.defineCallBack();
-								}
-							});
-							this.errCount = data.data
-							this.chatNum = data.data
-							
-							this.aplayAudio()
-							this.quxiaoSocket(2)
-						} else {
-							this.ordersOkMessage=0
-							this.lodNums = 0
-							this.errCount = 0
-							this.chatNum = 0
-						}
-					}
-
-				})
-			},
-			// 取消订单消息提醒
-			newsSelectQx() {
-				if(this.ordersClaneMessage==0){
-					this.ordersClaneMessage=1
-				}else{
-					return 
-				}
-				var _this = this
-				var shopId = this.$cookie.get('shopId')
-				this.$http({
-					url: this.$http.adornUrl('admin/ordermessage/selectReadFlagCount'),
-					method: 'post',
-					params: this.$http.adornParams({
-						'shopIds': shopId,
-						'orderType':1
-					})
-				}).then(({
-					data
-				}) => {
-					if (data.code == 0) {
-						if (data.data > 0) {
-							/* if (this.errCount != data.data) {
-								
-							} */
-							this.lodNums = 1
-							this.lodNum = 0
-							this.$notify.info({
-								title: '消息',
-								dangerouslyUseHTMLString: true,
-								message: '有' + data.data + '条订单已取消,请前往订单中心查看。',
-								offset: 80,
-								duration: 0,
-								type: "warning",
-								onClose() {
-									_this.defineCallBack();
-								}
-							});
-							
-							this.errCount = data.data
-							this.chatNum = data.data
-							this.aplayAudio()
-							this.quxiaoSocket(1)
-						} else {
-							this.ordersClaneMessage=0
-							this.lodNums = 0
-							this.errCount = 0
-							this.chatNum = 0
-						}
-					}
-				
-				})
-			},
-			quxiaoSocket(orderType){
-					  var shopId = this.$cookie.get('shopId')
-					  this.$http({
-					  	url: this.$http.adornUrl('admin/ordermessage/allcheckOrderMessage'),
-					  	method: 'post',
-					  	params: this.$http.adornParams({
-					  		'shopIds': shopId,
-							'orderType':orderType
-					  	})
-					  }).then(({
-					  	data
-					  }) => {
-						  if(orderType==1){
-							  this.ordersClaneMessage=0
-						  }else{
-							   this.ordersOkMessage=0
-						  }
-						  console.log('清空消息',data)
-					  })
-			},
-			defineCallBack() {
-				// this.$http({
-				// 	url: this.$http.adornUrl('admin/ordermessage/allcheckOrderMessage'),
-				// 	method: 'post',
-				// 	params: this.$http.adornParams({
-				// 		'shopIds': this.shopIds.toString()
-				// 	})
-				// }).then(({
-				// 	data
-				// }) => {
-				// 	if (data.code === 0) {
-				// 		this.errCount = 0
-				// 		this.chatNum = 0
-				// 		this.$router.replace({
-				// 			name: 'missionSm'
-				// 		})
-				// 	}
-				// 	console.log('清空请求', data.data)
-				// })
-				this.$router.replace({
-					name: 'missionSm'
-				})
-				// this.quxiaoSocket()
-
-			},
-			aplayAudio() {
-				if(this.lodNum > 0){
-					document.getElementById('audio').play()
-				}
-				if(this.lodNums > 0){
-					document.getElementById('audios').play()
-				}
-				console.log('语音提示');
-				console.log('语音提示')
-			},
-			// 获取店铺数据
-			dataSelect() {
-				this.tableDataLoading = true
-				this.$http({
-					url: this.$http.adornUrl('admin/goods/selectAllShop'),
-					method: 'get',
-					params: this.$http.adornParams({
-						'page': 1,
-						'limit': 10,
-						'shopName': ''
-					})
-				}).then(({
-					data
-				}) => {
-					this.tableDataLoading = false
-					var arr = []
-					for (var i in data.data.list) {
-						if (data.data.list[i].shopId) {
-							arr.push(data.data.list[i].shopId)
-						}
-					}
-					let returnData = data.data
-					this.shopIds = arr
-					/* this.newsSelect()
-					this.newsSelectQx() */
-				})
-			},
-			// 获取聊天消息
-			chatSelect() {
-				var shopId = this.$cookie.get('shopId')
-				console.log('shopId--------------',shopId)
-				this.$http({
-					url: this.$http.adornUrl('shop/ordersChat/selectShopAllUnreadCount'),
-					method: 'get',
-					params: this.$http.adornParams({
-						'shopId': shopId
-					})
-				}).then(({
-					data
-				}) => {
-					this.code = data.code
-
-					if (data.data > 0) {
-						if (this.errCount2 != data.data) {
-							this.$notify.info({
-								title: '消息',
-								dangerouslyUseHTMLString: true,
-								message: '您有' + data.data + '条未读消息。',
-								offset: 80,
-								duration: 2500,
-								type: "warning"
-							});
-							this.chatNum2 = data.data
-							this.errCount2 = data.data
-							this.lodNum = 1
-							this.lodNums = 0
-							this.aplayAudio()
-						}
-					} else {
-						console.log('this.chatNum2', this.chatNum2)
-						this.chatNum2 = 0
-						this.errCount2 = 0
-						this.lodNum = 0
-						this.lodNums = 0
-					}
-					if (this.chatNum == 0) {
-						this.isshow = false
-					} else {
-						this.isshow = true
-					}
-					
-				})
-			},
-		},
-		created() {
-			console.log('this.show', this.show)
-			this.chatNum = setInterval(() => {
-				var token = this.$cookie.get('token')
-				if (token !== '') {
-					this.newsSelect()
-					this.newsSelectQx() 
-				} else {
-					clearInterval(this.chatNum2)
-				}
-			}, 5000)
-			this.chatNum2 = setInterval(() => {
-				var token = this.$cookie.get('token')
-				if (token !== '') {
-					this.chatSelect()
-				} else {
-					clearInterval(this.chatNum2)
-				}
-			}, 6000)
-
-		},
-		beforeDestroy() {
-			clearInterval(this.chatNum)
-		},
-		watch: {
-			// 'chatNum': function() {
-			// 	this.newsSelect()
-			// 	this.newsSelectQx()
-			// },
-			// 'chatNum2': function() {
-			// 	this.chatSelect()
-			// }
-		}
-	}
-</script>
-<style scoped="scoped">
-	.site-navbar__avatar .el-dropdown-link>img {
-		height: 36px;
-	}
-
-	.left-number {
-		position: absolute;
-		top: 0;
-		right: 20px;
-		width: 18px;
-		height: 18px;
-		line-height: 18px;
-		border-radius: 50%;
-		background: #ff4949;
-		color: #ffffff;
-		text-align: center;
-		font-size: 10px;
-		font-family: PingFang SC, PingFang SC-Regular;
-		font-weight: 400;
-		margin-top: 5px;
-	}
-</style>
+<template>
+	<nav class="site-navbar" :class="'site-navbar--' + navbarLayoutType">
+		<div class="site-navbar__header">
+			<h1 class="site-navbar__brand" @click="$router.push({ name: 'home' })">
+				<a class="site-navbar__brand-lg" href="javascript:;">墨轩云商商户管理平台</a>
+				<a class="site-navbar__brand-mini" href="javascript:;">
+					<img src="~@/assets/img/avatar.png" style="width: 25px;border-radius: 50%;">
+				</a>
+			</h1>
+		</div>
+		<div class="site-navbar__body clearfix">
+			<el-menu class="site-navbar__menu" mode="horizontal">
+				<el-menu-item class="site-navbar__switch" index="0" @click="sidebarFold = !sidebarFold">
+					<icon-svg name="zhedie"></icon-svg>
+				</el-menu-item>
+			</el-menu>
+			<el-menu class="site-navbar__menu site-navbar__menu--right" mode="horizontal">
+				<!-- <el-menu-item index="1" style="position: relative;" @click="$router.push({ name: 'missionSm' })" v-if="show">
+          <template slot="title">
+            <span class="left-number" v-if="chatNum">{{chatNum}}</span>
+            <icon-svg name="xiaoxi" class="el-icon-setting" style="font-size: 28px;"></icon-svg>
+            <audio id="audio1" autoplay="autoplay" v-if="chatNum>0"
+              src="https://pw.xianmxkj.com/file/uploadPath/2022/01/12/01beb0bc15549b9aa4d18027a7751bae.mp3" ref='audio'
+              controls hidden></audio>
+          </template>
+        </el-menu-item> -->
+				<el-menu-item index="1" style="position: relative;" @click="$router.push({ name: 'vueMchat' })">
+					<template slot="title">
+						<span class="left-number" v-if="chatNum2">{{chatNum2}}</span>
+						<icon-svg name="xiaoxi" class="el-icon-setting" style="font-size: 28px;"></icon-svg>
+						<!-- 消息提示  -->
+						<audio id="audio"  preload="auto">
+							<!-- 消息 -->
+							<source src="https://pw.xianmxkj.com/file/uploadPath/2022/01/19/0753211f78d718d44ee6372e33eae9ee.mp3"
+								type="audio/mpeg">
+						</audio>
+						<!-- 订单提示 -->
+						<audio id="audios" preload="auto" >
+							<source
+								src="https://pw.xianmxkj.com/file/uploadPath/2022/01/12/01beb0bc15549b9aa4d18027a7751bae.mp3"
+								type="audio/mpeg">
+						</audio>
+					</template>
+				</el-menu-item>
+				<!-- <el-menu-item index="1" @click="$router.push({ name: 'theme' })">
+          <template slot="title">
+            <el-badge value="new">
+              <icon-svg name="shezhi" class="el-icon-setting"></icon-svg>
+            </el-badge>
+          </template>
+        </el-menu-item> -->
+				<el-menu-item class="site-navbar__avatar" index="3">
+					<el-dropdown :show-timeout="0" placement="bottom">
+						<span class="el-dropdown-link">
+							<img :src="shopDetails.shopCover" :alt="shopDetails.shopName">
+							<!-- <img src="~@/assets/img/avatar.png" :alt="shopDetails.shopName">-->{{ shopDetails.shopName }}
+						</span>
+						<el-dropdown-menu slot="dropdown">
+							<el-dropdown-item @click.native="updatePasswordHandle()">修改密码</el-dropdown-item>
+							<el-dropdown-item @click.native="logoutHandle()">退出</el-dropdown-item>
+						</el-dropdown-menu>
+					</el-dropdown>
+				</el-menu-item>
+			</el-menu>
+		</div>
+		<!-- 弹窗, 修改密码 -->
+		<update-password v-if="updatePassowrdVisible" ref="updatePassowrd"></update-password>
+	</nav>
+</template>
+
+<script>
+	import UpdatePassword from './main-navbar-update-password'
+	import {
+		clearLoginInfo
+	} from '@/utils'
+	export default {
+		data() {
+			return {
+				updatePassowrdVisible: false,
+				chatNum: 0,
+				chatNum2: 0,
+				intervalId: 0,
+				errCount: 0,
+				errCount2:0,
+				shopIds: [],
+				show: false,
+				storeId: 0,
+				shopDetails: {},
+				lodNum:0,
+				lodNums:0,
+				ordersOkMessage:0,
+				ordersClaneMessage:0,
+
+			}
+		},
+		components: {
+			UpdatePassword
+		},
+		computed: {
+			navbarLayoutType: {
+				get() {
+					return this.$store.state.common.navbarLayoutType
+				}
+			},
+			sidebarFold: {
+				get() {
+					return this.$store.state.common.sidebarFold
+				},
+				set(val) {
+					this.$store.commit('common/updateSidebarFold', val)
+				}
+			},
+			mainTabs: {
+				get() {
+					return this.$store.state.common.mainTabs
+				},
+				set(val) {
+					this.$store.commit('common/updateMainTabs', val)
+				}
+			},
+			userName: {
+				get() {
+					return this.$store.state.user.name
+				}
+			}
+		},
+		mounted() {
+			// this.chatSelect()
+			var userId = this.$cookie.get('userId')
+			var shopDel = this.$cookie.get('shopDel')
+			this.shopDetails = JSON.parse(shopDel)
+			console.log('shopDel', JSON.parse(shopDel))
+			this.$http({
+				url: this.$http.adornUrl(`/sys/user/info`),
+				method: 'get',
+				params: this.$http.adornParams()
+			}).then(({
+				data
+			}) => {
+				if (data && data.code === 0) {
+          this.$cookie.set('shopName', data.user.shopList[0].shopName)
+					var shows = 1
+					for (var i in data.user.roleIdList) {
+						if (data.user.roleIdList[i] == 12) {
+							shows = 2
+						} else {
+							shows = 1
+						}
+					}
+					console.log('shows', shows)
+					if (shows == 2) {
+						this.show = true
+					}
+					if (shows == 1) {
+						this.show = false
+					}
+
+					if (this.show == true) {
+						this.dataSelect()
+					}
+				}
+			})
+
+
+		},
+		methods: {
+			// 修改密码
+			updatePasswordHandle() {
+				this.updatePassowrdVisible = true
+				this.$nextTick(() => {
+					this.$refs.updatePassowrd.init()
+				})
+			},
+			// 退出
+			logoutHandle() {
+				this.$confirm(`确定进行[退出]操作?`, '提示', {
+					confirmButtonText: '确定',
+					cancelButtonText: '取消',
+					type: 'warning'
+				}).then(() => {
+					this.$http({
+						url: this.$http.adornUrl('/sys/logout'),
+						method: 'post',
+						data: this.$http.adornData()
+					}).then(({
+						data
+					}) => {
+						if (data && data.code === 0) {
+							clearLoginInfo()
+							this.$cookie.set('token', '')
+							sessionStorage.clear()
+							clearInterval(this.chatNum)
+							clearInterval(this.chatNum2)
+							this.$router.push({
+								name: 'login'
+							})
+						}
+					})
+				}).catch(() => {})
+			},
+			// 订单消息提醒
+			newsSelect() {
+				if(this.ordersOkMessage==0){
+					this.ordersOkMessage=1
+				}else{
+					return
+				}
+				var _this = this
+				var shopId = this.$cookie.get('shopId')
+				this.$http({
+					url: this.$http.adornUrl('admin/ordermessage/selectReadFlagCount'),
+					method: 'post',
+					params: this.$http.adornParams({
+						'shopIds': shopId
+					})
+				}).then(({
+					data
+				}) => {
+					if (data.code == 0) {
+						if (data.data > 0) {
+							/* if (this.errCount != data.data) {
+
+							}
+							this.ordersOkMessage=0	 */
+							this.lodNums = 1
+							this.lodNum = 0
+							this.$notify.info({
+								title: '消息',
+								dangerouslyUseHTMLString: true,
+								message: '有' + data.data + '条订单,请前往订单中心处理。',
+								offset: 80,
+								duration: 0,
+								type: "warning",
+								onClose() {
+									_this.defineCallBack();
+								}
+							});
+							this.errCount = data.data
+							this.chatNum = data.data
+
+							this.aplayAudio()
+							this.quxiaoSocket(2)
+						} else {
+							this.ordersOkMessage=0
+							this.lodNums = 0
+							this.errCount = 0
+							this.chatNum = 0
+						}
+					}
+
+				})
+			},
+			// 取消订单消息提醒
+			newsSelectQx() {
+				if(this.ordersClaneMessage==0){
+					this.ordersClaneMessage=1
+				}else{
+					return
+				}
+				var _this = this
+				var shopId = this.$cookie.get('shopId')
+				this.$http({
+					url: this.$http.adornUrl('admin/ordermessage/selectReadFlagCount'),
+					method: 'post',
+					params: this.$http.adornParams({
+						'shopIds': shopId,
+						'orderType':1
+					})
+				}).then(({
+					data
+				}) => {
+					if (data.code == 0) {
+						if (data.data > 0) {
+							/* if (this.errCount != data.data) {
+
+							} */
+							this.lodNums = 1
+							this.lodNum = 0
+							this.$notify.info({
+								title: '消息',
+								dangerouslyUseHTMLString: true,
+								message: '有' + data.data + '条订单已取消,请前往订单中心查看。',
+								offset: 80,
+								duration: 0,
+								type: "warning",
+								onClose() {
+									_this.defineCallBack();
+								}
+							});
+
+							this.errCount = data.data
+							this.chatNum = data.data
+							this.aplayAudio()
+							this.quxiaoSocket(1)
+						} else {
+							this.ordersClaneMessage=0
+							this.lodNums = 0
+							this.errCount = 0
+							this.chatNum = 0
+						}
+					}
+
+				})
+			},
+			quxiaoSocket(orderType){
+					  var shopId = this.$cookie.get('shopId')
+					  this.$http({
+					  	url: this.$http.adornUrl('admin/ordermessage/allcheckOrderMessage'),
+					  	method: 'post',
+					  	params: this.$http.adornParams({
+					  		'shopIds': shopId,
+							'orderType':orderType
+					  	})
+					  }).then(({
+					  	data
+					  }) => {
+						  if(orderType==1){
+							  this.ordersClaneMessage=0
+						  }else{
+							   this.ordersOkMessage=0
+						  }
+						  console.log('清空消息',data)
+					  })
+			},
+			defineCallBack() {
+				// this.$http({
+				// 	url: this.$http.adornUrl('admin/ordermessage/allcheckOrderMessage'),
+				// 	method: 'post',
+				// 	params: this.$http.adornParams({
+				// 		'shopIds': this.shopIds.toString()
+				// 	})
+				// }).then(({
+				// 	data
+				// }) => {
+				// 	if (data.code === 0) {
+				// 		this.errCount = 0
+				// 		this.chatNum = 0
+				// 		this.$router.replace({
+				// 			name: 'missionSm'
+				// 		})
+				// 	}
+				// 	console.log('清空请求', data.data)
+				// })
+				this.$router.replace({
+					name: 'missionSm'
+				})
+				// this.quxiaoSocket()
+
+			},
+			aplayAudio() {
+				if(this.lodNum > 0){
+					document.getElementById('audio').play()
+				}
+				if(this.lodNums > 0){
+					document.getElementById('audios').play()
+				}
+				console.log('语音提示');
+				console.log('语音提示')
+			},
+			// 获取店铺数据
+			dataSelect() {
+				this.tableDataLoading = true
+				this.$http({
+					url: this.$http.adornUrl('admin/goods/selectAllShop'),
+					method: 'get',
+					params: this.$http.adornParams({
+						'page': 1,
+						'limit': 10,
+						'shopName': ''
+					})
+				}).then(({
+					data
+				}) => {
+					this.tableDataLoading = false
+					var arr = []
+					for (var i in data.data.list) {
+						if (data.data.list[i].shopId) {
+							arr.push(data.data.list[i].shopId)
+						}
+					}
+					let returnData = data.data
+					this.shopIds = arr
+					/* this.newsSelect()
+					this.newsSelectQx() */
+				})
+			},
+			// 获取聊天消息
+			chatSelect() {
+				var shopId = this.$cookie.get('shopId')
+				console.log('shopId--------------',shopId)
+				this.$http({
+					url: this.$http.adornUrl('shop/ordersChat/selectShopAllUnreadCount'),
+					method: 'get',
+					params: this.$http.adornParams({
+						'shopId': shopId
+					})
+				}).then(({
+					data
+				}) => {
+					this.code = data.code
+
+					if (data.data > 0) {
+						if (this.errCount2 != data.data) {
+							this.$notify.info({
+								title: '消息',
+								dangerouslyUseHTMLString: true,
+								message: '您有' + data.data + '条未读消息。',
+								offset: 80,
+								duration: 2500,
+								type: "warning"
+							});
+							this.chatNum2 = data.data
+							this.errCount2 = data.data
+							this.lodNum = 1
+							this.lodNums = 0
+							this.aplayAudio()
+						}
+					} else {
+						console.log('this.chatNum2', this.chatNum2)
+						this.chatNum2 = 0
+						this.errCount2 = 0
+						this.lodNum = 0
+						this.lodNums = 0
+					}
+					if (this.chatNum == 0) {
+						this.isshow = false
+					} else {
+						this.isshow = true
+					}
+
+				})
+			},
+		},
+		created() {
+			console.log('this.show', this.show)
+			this.chatNum = setInterval(() => {
+				var token = this.$cookie.get('token')
+				if (token !== '') {
+					this.newsSelect()
+					this.newsSelectQx()
+				} else {
+					clearInterval(this.chatNum2)
+				}
+			}, 5000)
+			this.chatNum2 = setInterval(() => {
+				var token = this.$cookie.get('token')
+				if (token !== '') {
+					this.chatSelect()
+				} else {
+					clearInterval(this.chatNum2)
+				}
+			}, 6000)
+
+		},
+		beforeDestroy() {
+			clearInterval(this.chatNum)
+		},
+		watch: {
+			// 'chatNum': function() {
+			// 	this.newsSelect()
+			// 	this.newsSelectQx()
+			// },
+			// 'chatNum2': function() {
+			// 	this.chatSelect()
+			// }
+		}
+	}
+</script>
+<style scoped="scoped">
+	.site-navbar__avatar .el-dropdown-link>img {
+		height: 36px;
+	}
+
+	.left-number {
+		position: absolute;
+		top: 0;
+		right: 20px;
+		width: 18px;
+		height: 18px;
+		line-height: 18px;
+		border-radius: 50%;
+		background: #ff4949;
+		color: #ffffff;
+		text-align: center;
+		font-size: 10px;
+		font-family: PingFang SC, PingFang SC-Regular;
+		font-weight: 400;
+		margin-top: 5px;
+	}
+</style>

+ 205 - 197
src/views/main-sidebar.vue

@@ -1,197 +1,205 @@
-<template>
-  <aside class="site-sidebar" :class="'site-sidebar--' + sidebarLayoutSkin">
-    <div class="site-sidebar__inner">
-      <el-menu
-        :default-active="menuActiveName || 'home'"
-        :collapse="sidebarFold"
-        :collapseTransition="false"
-        class="site-sidebar__menu">
-      <el-menu-item index="home" @click="$router.push({ name: 'home' })">
-          <icon-svg name="shuju" class="site-sidebar__menu-icon"></icon-svg>
-          <span slot="title">数据中心</span>
-        </el-menu-item>
-		<!-- <el-menu-item index="userList" @click="$router.push({ name: 'userList' })">
-			<icon-svg name="yonghu" class="site-sidebar__menu-icon"></icon-svg>
-			<span slot="title">用户中心</span>
-		</el-menu-item> -->
-		<!-- <el-menu-item index="financeList" @click="$router.push({ name: 'financeList' })">
-			<icon-svg name="caiwu" class="site-sidebar__menu-icon"></icon-svg>
-			<span slot="title">财务中心</span>
-		</el-menu-item> -->
-		<el-menu-item index="merchIncome" @click="$router.push({ name: 'merchIncome' })">
-			<icon-svg name="tubiao" class="site-sidebar__menu-icon"></icon-svg>
-			<span slot="title">店铺管理</span>
-		</el-menu-item>
-		<el-menu-item index="missionSm" @click="$router.push({ name: 'missionSm' })">
-			<icon-svg name="xiaoxi" class="site-sidebar__menu-icon"></icon-svg>
-			<span slot="title">订单中心</span>
-		</el-menu-item>
-		<!-- <el-menu-item index="shopsListAdminSm" @click="$router.push({ name: 'shopsListAdminSm' })">
-			<icon-svg name="shangpin" class="site-sidebar__menu-icon"></icon-svg>
-			<span slot="title">商品管理</span>
-		</el-menu-item> -->
-		<el-menu-item index="message" @click="$router.push({ name: 'message' })">
-			<icon-svg name="pinglun" class="site-sidebar__menu-icon"></icon-svg>
-			<span slot="title">消息中心</span>
-		</el-menu-item>
-		<el-menu-item index="vueMchat" @click="$router.push({ name: 'vueMchat' })">
-			<icon-svg name="yonghul" class="site-sidebar__menu-icon"></icon-svg>
-			<span slot="title">群聊天</span>
-		</el-menu-item>
-		<el-menu-item index="vueMchatKf" @click="$router.push({ name: 'vueMchatKf' })">
-			<icon-svg name="yonghul" class="site-sidebar__menu-icon"></icon-svg>
-			<span slot="title">客服聊天</span>
-		</el-menu-item>
-		<el-menu-item index="specification" @click="$router.push({ name: 'specification' })">
-			<icon-svg name="fenleilist" class="site-sidebar__menu-icon"></icon-svg>
-			<span slot="title">商品规格</span>
-		</el-menu-item>
-		<el-menu-item index="classifyAdmin" @click="$router.push({ name: 'classifyAdmin' })">
-			<icon-svg name="peizhilb" class="site-sidebar__menu-icon"></icon-svg>
-			<span slot="title">商品分类</span>
-		</el-menu-item>
-		<el-menu-item index="shopsListAdmin" @click="$router.push({ name: 'shopsListAdmin' })">
-			<icon-svg name="renwu" class="site-sidebar__menu-icon"></icon-svg>
-			<span slot="title">商品管理</span>
-		</el-menu-item>
-		
-		<el-menu-item index="pingjiaList" @click="$router.push({ name: 'pingjiaList' })">
-			<icon-svg name="order" class="site-sidebar__menu-icon"></icon-svg>
-			<span slot="title">店铺评价</span>
-		</el-menu-item>
-		<el-menu-item index="coupon" @click="$router.push({ name: 'coupon' })">
-			<icon-svg name="leibie" class="site-sidebar__menu-icon"></icon-svg>
-			<span slot="title">店铺优惠券</span>
-		</el-menu-item>
-		<el-menu-item index="couponList" @click="$router.push({ name: 'couponList' })">
-			<icon-svg name="order" class="site-sidebar__menu-icon"></icon-svg>
-			<span slot="title">优惠券领取列表</span>
-		</el-menu-item>
-		
-		<el-menu-item index="activity" @click="$router.push({ name: 'activity' })">
-			<icon-svg name="shangpin" class="site-sidebar__menu-icon"></icon-svg>
-			<span slot="title">店铺活动</span>
-		</el-menu-item>
-		 <!-- <el-menu-item index="userList" @click="$router.push({ name: 'userList' })">
-			<icon-svg name="yonghul" class="site-sidebar__menu-icon"></icon-svg>
-			<span slot="title">用户中心</span>
-		</el-menu-item>
-		<el-menu-item index="financeList" @click="$router.push({ name: 'financeList' })">
-			<icon-svg name="caiwu" class="site-sidebar__menu-icon"></icon-svg>
-			<span slot="title">财务中心</span>
-		</el-menu-item>
-		<el-menu-item index="message" @click="$router.push({ name: 'message' })">
-			<icon-svg name="xiaoxi" class="site-sidebar__menu-icon"></icon-svg>
-			<span slot="title">消息中心</span>
-		</el-menu-item>
-		<el-menu-item index="mission" @click="$router.push({ name: 'mission' })">
-			<icon-svg name="renwu" class="site-sidebar__menu-icon"></icon-svg>
-			<span slot="title">任务中心</span>
-		</el-menu-item>
-		<el-menu-item index="taskConfig" @click="$router.push({ name: 'taskConfig' })">
-			<icon-svg name="renwu" class="site-sidebar__menu-icon"></icon-svg>
-			<span slot="title">任务配置</span>
-		</el-menu-item> -->
-		<!-- <el-menu-item index="missionsye" @click="$router.push({ name: 'missionsye' })">
-			<icon-svg name="pingtai" class="site-sidebar__menu-icon"></icon-svg>
-			<span slot="title">系统任务</span>
-		</el-menu-item> -->
-		<!-- <el-menu-item index="materialsList" @click="$router.push({ name: 'materialsList' })">
-			<icon-svg name="xinxi" class="site-sidebar__menu-icon"></icon-svg>
-			<span slot="title">好物圈</span>
-		</el-menu-item> -->
-		<!-- <el-menu-item index="bannerList" @click="$router.push({ name: 'bannerList' })">
-			<icon-svg name="shangpin" class="site-sidebar__menu-icon"></icon-svg>
-			<span slot="title">商城配置</span>
-		</el-menu-item>
-		<el-menu-item index="allocationList" @click="$router.push({ name: 'allocationList' })">
-			<icon-svg name="system" class="site-sidebar__menu-icon"></icon-svg>
-			<span slot="title">系统配置</span>
-		</el-menu-item> -->
-        <!-- <sub-menu
-          v-for="menu in menuList"
-          :key="menu.menuId"
-          :menu="menu"
-          :dynamicMenuRoutes="dynamicMenuRoutes">
-        </sub-menu> -->
-      </el-menu>
-    </div>
-  </aside>
-</template>
-
-<script>
-  import SubMenu from './main-sidebar-sub-menu'
-  import { isURL } from '@/utils/validate'
-  export default {
-    data () {
-      return {
-        dynamicMenuRoutes: []
-      }
-    },
-    components: {
-      SubMenu
-    },
-    computed: {
-      sidebarLayoutSkin: {
-        get () { return this.$store.state.common.sidebarLayoutSkin }
-      },
-      sidebarFold: {
-        get () { return this.$store.state.common.sidebarFold }
-      },
-      menuList: {
-        get () { return this.$store.state.common.menuList },
-        set (val) { this.$store.commit('common/updateMenuList', val) }
-      },
-      menuActiveName: {
-        get () { return this.$store.state.common.menuActiveName },
-        set (val) { this.$store.commit('common/updateMenuActiveName', val) }
-      },
-      mainTabs: {
-        get () { return this.$store.state.common.mainTabs },
-        set (val) { this.$store.commit('common/updateMainTabs', val) }
-      },
-      mainTabsActiveName: {
-        get () { return this.$store.state.common.mainTabsActiveName },
-        set (val) { this.$store.commit('common/updateMainTabsActiveName', val) }
-      }
-    },
-    watch: {
-      $route: 'routeHandle'
-    },
-    created () {
-      this.menuList = JSON.parse(sessionStorage.getItem('menuList') || '[]')
-      this.dynamicMenuRoutes = JSON.parse(sessionStorage.getItem('dynamicMenuRoutes') || '[]')
-      this.routeHandle(this.$route)
-    },
-    methods: {
-      // 路由操作
-      routeHandle (route) {
-        if (route.meta.isTab) {
-          // tab选中, 不存在先添加
-          var tab = this.mainTabs.filter(item => item.name === route.name)[0]
-          if (!tab) {
-            if (route.meta.isDynamic) {
-              route = this.dynamicMenuRoutes.filter(item => item.name === route.name)[0]
-              if (!route) {
-                return console.error('未能找到可用标签页!')
-              }
-            }
-            tab = {
-              menuId: route.meta.menuId || route.name,
-              name: route.name,
-              title: route.meta.title,
-              type: isURL(route.meta.iframeUrl) ? 'iframe' : 'module',
-              iframeUrl: route.meta.iframeUrl || '',
-              params: route.params,
-              query: route.query
-            }
-            this.mainTabs = this.mainTabs.concat(tab)
-          }
-          this.menuActiveName = tab.menuId + ''
-          this.mainTabsActiveName = tab.name
-        }
-		
-      }
-    }
-  }
-</script>
+<template>
+  <aside class="site-sidebar" :class="'site-sidebar--' + sidebarLayoutSkin">
+    <div class="site-sidebar__inner">
+      <el-menu
+        :default-active="menuActiveName || 'home'"
+        :collapse="sidebarFold"
+        :collapseTransition="false"
+        class="site-sidebar__menu">
+      <el-menu-item index="home" @click="$router.push({ name: 'home' })">
+          <icon-svg name="shuju" class="site-sidebar__menu-icon"></icon-svg>
+          <span slot="title">数据中心</span>
+        </el-menu-item>
+		<!-- <el-menu-item index="userList" @click="$router.push({ name: 'userList' })">
+			<icon-svg name="yonghu" class="site-sidebar__menu-icon"></icon-svg>
+			<span slot="title">用户中心</span>
+		</el-menu-item> -->
+		<!-- <el-menu-item index="financeList" @click="$router.push({ name: 'financeList' })">
+			<icon-svg name="caiwu" class="site-sidebar__menu-icon"></icon-svg>
+			<span slot="title">财务中心</span>
+		</el-menu-item> -->
+		<el-menu-item index="merchIncome" @click="$router.push({ name: 'merchIncome' })">
+			<icon-svg name="tubiao" class="site-sidebar__menu-icon"></icon-svg>
+			<span slot="title">店铺管理</span>
+		</el-menu-item>
+		<el-menu-item index="missionSm" @click="$router.push({ name: 'missionSm' })">
+			<icon-svg name="xiaoxi" class="site-sidebar__menu-icon"></icon-svg>
+			<span slot="title">订单中心</span>
+		</el-menu-item>
+		<!-- <el-menu-item index="shopsListAdminSm" @click="$router.push({ name: 'shopsListAdminSm' })">
+			<icon-svg name="shangpin" class="site-sidebar__menu-icon"></icon-svg>
+			<span slot="title">商品管理</span>
+		</el-menu-item> -->
+		<el-menu-item index="message" @click="$router.push({ name: 'message' })">
+			<icon-svg name="pinglun" class="site-sidebar__menu-icon"></icon-svg>
+			<span slot="title">消息中心</span>
+		</el-menu-item>
+		<el-menu-item index="vueMchat" @click="$router.push({ name: 'vueMchat' })">
+			<icon-svg name="yonghul" class="site-sidebar__menu-icon"></icon-svg>
+			<span slot="title">群聊天</span>
+		</el-menu-item>
+		<el-menu-item index="vueMchatKf" @click="$router.push({ name: 'vueMchatKf' })">
+			<icon-svg name="yonghul" class="site-sidebar__menu-icon"></icon-svg>
+			<span slot="title">客服聊天</span>
+		</el-menu-item>
+		<el-menu-item index="specification" @click="$router.push({ name: 'specification' })">
+			<icon-svg name="fenleilist" class="site-sidebar__menu-icon"></icon-svg>
+			<span slot="title">商品规格</span>
+		</el-menu-item>
+		<el-menu-item index="classifyAdmin" @click="$router.push({ name: 'classifyAdmin' })">
+			<icon-svg name="peizhilb" class="site-sidebar__menu-icon"></icon-svg>
+			<span slot="title">商品分类</span>
+		</el-menu-item>
+		<el-menu-item index="shopsListAdmin" @click="$router.push({ name: 'shopsListAdmin' })">
+			<icon-svg name="renwu" class="site-sidebar__menu-icon"></icon-svg>
+			<span slot="title">商品管理</span>
+		</el-menu-item>
+
+		<el-menu-item index="pingjiaList" @click="$router.push({ name: 'pingjiaList' })">
+			<icon-svg name="order" class="site-sidebar__menu-icon"></icon-svg>
+			<span slot="title">店铺评价</span>
+		</el-menu-item>
+		<el-menu-item index="coupon" @click="$router.push({ name: 'coupon' })">
+			<icon-svg name="leibie" class="site-sidebar__menu-icon"></icon-svg>
+			<span slot="title">店铺优惠券</span>
+		</el-menu-item>
+		<el-menu-item index="couponList" @click="$router.push({ name: 'couponList' })">
+			<icon-svg name="order" class="site-sidebar__menu-icon"></icon-svg>
+			<span slot="title">优惠券领取列表</span>
+		</el-menu-item>
+
+		<el-menu-item index="activity" @click="$router.push({ name: 'activity' })">
+			<icon-svg name="shangpin" class="site-sidebar__menu-icon"></icon-svg>
+			<span slot="title">店铺活动</span>
+		</el-menu-item>
+    <el-menu-item index="huodongList" @click="$router.push({ name: 'huodongList' })">
+			<icon-svg name="order" class="site-sidebar__menu-icon"></icon-svg>
+			<span slot="title">活动参与记录</span>
+		</el-menu-item>
+    <el-menu-item index="duanxinlist" @click="$router.push({ name: 'duanxinlist' })">
+			<icon-svg name="order" class="site-sidebar__menu-icon"></icon-svg>
+			<span slot="title">短信记录</span>
+		</el-menu-item>
+		 <!-- <el-menu-item index="userList" @click="$router.push({ name: 'userList' })">
+			<icon-svg name="yonghul" class="site-sidebar__menu-icon"></icon-svg>
+			<span slot="title">用户中心</span>
+		</el-menu-item>
+		<el-menu-item index="financeList" @click="$router.push({ name: 'financeList' })">
+			<icon-svg name="caiwu" class="site-sidebar__menu-icon"></icon-svg>
+			<span slot="title">财务中心</span>
+		</el-menu-item>
+		<el-menu-item index="message" @click="$router.push({ name: 'message' })">
+			<icon-svg name="xiaoxi" class="site-sidebar__menu-icon"></icon-svg>
+			<span slot="title">消息中心</span>
+		</el-menu-item>
+		<el-menu-item index="mission" @click="$router.push({ name: 'mission' })">
+			<icon-svg name="renwu" class="site-sidebar__menu-icon"></icon-svg>
+			<span slot="title">任务中心</span>
+		</el-menu-item>
+		<el-menu-item index="taskConfig" @click="$router.push({ name: 'taskConfig' })">
+			<icon-svg name="renwu" class="site-sidebar__menu-icon"></icon-svg>
+			<span slot="title">任务配置</span>
+		</el-menu-item> -->
+		<!-- <el-menu-item index="missionsye" @click="$router.push({ name: 'missionsye' })">
+			<icon-svg name="pingtai" class="site-sidebar__menu-icon"></icon-svg>
+			<span slot="title">系统任务</span>
+		</el-menu-item> -->
+		<!-- <el-menu-item index="materialsList" @click="$router.push({ name: 'materialsList' })">
+			<icon-svg name="xinxi" class="site-sidebar__menu-icon"></icon-svg>
+			<span slot="title">好物圈</span>
+		</el-menu-item> -->
+		<!-- <el-menu-item index="bannerList" @click="$router.push({ name: 'bannerList' })">
+			<icon-svg name="shangpin" class="site-sidebar__menu-icon"></icon-svg>
+			<span slot="title">商城配置</span>
+		</el-menu-item>
+		<el-menu-item index="allocationList" @click="$router.push({ name: 'allocationList' })">
+			<icon-svg name="system" class="site-sidebar__menu-icon"></icon-svg>
+			<span slot="title">系统配置</span>
+		</el-menu-item> -->
+        <!-- <sub-menu
+          v-for="menu in menuList"
+          :key="menu.menuId"
+          :menu="menu"
+          :dynamicMenuRoutes="dynamicMenuRoutes">
+        </sub-menu> -->
+      </el-menu>
+    </div>
+  </aside>
+</template>
+
+<script>
+  import SubMenu from './main-sidebar-sub-menu'
+  import { isURL } from '@/utils/validate'
+  export default {
+    data () {
+      return {
+        dynamicMenuRoutes: []
+      }
+    },
+    components: {
+      SubMenu
+    },
+    computed: {
+      sidebarLayoutSkin: {
+        get () { return this.$store.state.common.sidebarLayoutSkin }
+      },
+      sidebarFold: {
+        get () { return this.$store.state.common.sidebarFold }
+      },
+      menuList: {
+        get () { return this.$store.state.common.menuList },
+        set (val) { this.$store.commit('common/updateMenuList', val) }
+      },
+      menuActiveName: {
+        get () { return this.$store.state.common.menuActiveName },
+        set (val) { this.$store.commit('common/updateMenuActiveName', val) }
+      },
+      mainTabs: {
+        get () { return this.$store.state.common.mainTabs },
+        set (val) { this.$store.commit('common/updateMainTabs', val) }
+      },
+      mainTabsActiveName: {
+        get () { return this.$store.state.common.mainTabsActiveName },
+        set (val) { this.$store.commit('common/updateMainTabsActiveName', val) }
+      }
+    },
+    watch: {
+      $route: 'routeHandle'
+    },
+    created () {
+      this.menuList = JSON.parse(sessionStorage.getItem('menuList') || '[]')
+      this.dynamicMenuRoutes = JSON.parse(sessionStorage.getItem('dynamicMenuRoutes') || '[]')
+      this.routeHandle(this.$route)
+    },
+    methods: {
+      // 路由操作
+      routeHandle (route) {
+        if (route.meta.isTab) {
+          // tab选中, 不存在先添加
+          var tab = this.mainTabs.filter(item => item.name === route.name)[0]
+          if (!tab) {
+            if (route.meta.isDynamic) {
+              route = this.dynamicMenuRoutes.filter(item => item.name === route.name)[0]
+              if (!route) {
+                return console.error('未能找到可用标签页!')
+              }
+            }
+            tab = {
+              menuId: route.meta.menuId || route.name,
+              name: route.name,
+              title: route.meta.title,
+              type: isURL(route.meta.iframeUrl) ? 'iframe' : 'module',
+              iframeUrl: route.meta.iframeUrl || '',
+              params: route.params,
+              query: route.query
+            }
+            this.mainTabs = this.mainTabs.concat(tab)
+          }
+          this.menuActiveName = tab.menuId + ''
+          this.mainTabsActiveName = tab.name
+        }
+
+      }
+    }
+  }
+</script>

+ 244 - 0
src/views/shopsList/duanxinlist.vue

@@ -0,0 +1,244 @@
+<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="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:'',
+				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.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,//接受人
+					'shopId':this.$cookie.get('shopId'),
+					'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>