From 4810290202891c5b50c0088be325cf76c60bb4f8 Mon Sep 17 00:00:00 2001
From: shuishen <1109946754@qq.com>
Date: Thu, 02 Dec 2021 20:56:55 +0800
Subject: [PATCH] 部分修改

---
 pages/home/home.vue      |   16 ++------
 pages/dispatch/index.vue |   45 +++++++++++++++++++++-
 2 files changed, 46 insertions(+), 15 deletions(-)

diff --git a/pages/dispatch/index.vue b/pages/dispatch/index.vue
index 2e793af..cd3cd20 100644
--- a/pages/dispatch/index.vue
+++ b/pages/dispatch/index.vue
@@ -35,10 +35,49 @@
 		mounted() {},
 		methods: {
 			onLoad() {
+				if (this.$store.state.UserData.rname[0] == '保安') {
+
+					this.serviceButton = [{
+						name: '接收指令查询',
+						img: '/static/images/dispatch/look.png',
+						url: '../dispatch/receive'
+					}]
+
+				} else if (this.$store.state.UserData.rname[0] == '保安公司管理员') {
+
+					this.serviceButton = [{
+						name: '接收指令查询',
+						img: '/static/images/dispatch/look.png',
+						url: '../dispatch/receive'
+					}]
+
+				} else {
+					this.serviceButton = [{
+							name: '下发指令查询',
+							img: '/static/images/dispatch/up-down.png',
+							url: '../dispatch/send'
+						},
+						{
+							name: '接收指令查询',
+							img: '/static/images/dispatch/look.png',
+							url: '../dispatch/receive'
+						},
+						{
+							name: '文字指令下发',
+							img: '/static/images/dispatch/issue.png',
+							url: '../dispatch/text'
+						},
+						{
+							name: '图片指令下发',
+							img: '/static/images/dispatch/imgissue.png',
+							url: '../dispatch/imgissue'
+						}
+					]
+				}
 				// 加载服务按钮数据
-				fakeServiceButton().then(data => {
-					this.serviceButton = data;
-				});
+				// fakeServiceButton().then(data => {
+				// 	this.serviceButton = data;
+				// });
 			},
 			//页面跳转
 			goBusinessPage(url, index) {
diff --git a/pages/home/home.vue b/pages/home/home.vue
index 71d27ef..8d08522 100644
--- a/pages/home/home.vue
+++ b/pages/home/home.vue
@@ -77,12 +77,6 @@
 						<view class="name">{{ item.name }}</view>
 					</view>
 				</u-grid-item>
-				<u-grid-item bg-color="transparent" key="8">
-					<navigator url="/pages/service/service" hover-class="none" class="service-item">
-						<image src="/static/images/home/s8.png" mode="widthFix" class="img"></image>
-						<view class="name">更多</view>
-					</navigator>
-				</u-grid-item>
 			</u-grid>
 		</view>
 		<!-- 服务按钮 end -->
@@ -105,9 +99,9 @@
 						<view class="info">
 							{{item.title}}
 						</view>
-						
+
 						<view class="new-content u-line-1" v-html="item.content">
-							
+
 						</view>
 						<view class="date">
 							<!-- <image src="/static/images/home/date.png" class="icon" mode=""></image> -->
@@ -282,8 +276,6 @@
 			//去跳转详情页面
 			goArticleDetail(item) {
 
-				console.log(item)
-
 				if (item.content != undefined && item.content.indexOf('<p>') != -1) {
 
 					var reg1 = /<\/?p[^>]*>/g;
@@ -352,7 +344,7 @@
 			getArtcilePageList() {
 				var that = this;
 				uni.request({
-					url: this.$store.state.piAPI + "/blade-desk/notice/page?category=2&deptId=" + this.$store.state
+					url: this.$store.state.piAPI + "/blade-desk/notice/page?category=1&deptId=" + this.$store.state
 						.UserData
 						.dept_id,
 					method: 'GET',
@@ -656,7 +648,7 @@
 						line-height: 36rpx;
 						letter-spacing: 1px;
 					}
-					
+
 					.new-content {
 						margin: 12rpx 0;
 						font-size: 0.46rem;

--
Gitblit v1.9.3