Pārlūkot izejas kodu

修改首页与登录方式

dylan 2 gadi atpakaļ
vecāks
revīzija
1f49f95f79
8 mainītis faili ar 616 papildinājumiem un 621 dzēšanām
  1. 46 43
      App.vue
  2. 7 7
      common/setting.js
  3. 24 2
      pages.json
  4. 190 562
      pages/home/home.vue
  5. 5 3
      pages/login/login-account.vue
  6. 8 0
      pages/manage/manage.vue
  7. 329 0
      pages/user/center-simple.vue
  8. 7 4
      utils/func.js

+ 46 - 43
App.vue

@@ -1,49 +1,52 @@
 <script>
 	export default {
 		onLaunch: function() {
-			// #ifdef APP-PLUS
-			try {
-				let loginTime = uni.getStorageSync("loginTime");
-				if (loginTime) {
-					let dt = new Date();
-					let time = dt.getTime();
-					let expires = this.userInfo.expires_in;
-					if (expires) {
-						if ((time - loginTime) / 1000 > (expires - 60)) {
-							uni.reLaunch({
-								url: "pages/login/login-account",
-								success: () => {
-									plus.navigator.closeSplashscreen();
-								}
-							})
-						} else {
-							plus.navigator.closeSplashscreen();
-						}
-					} else {
-						uni.reLaunch({
-							url: "pages/login/login-account",
-							success: () => {
-								plus.navigator.closeSplashscreen();
-							}
-						})
-					}
-				} else {
-					uni.reLaunch({
-						url: "pages/login/login-account",
-						success: () => {
-							plus.navigator.closeSplashscreen();
-						}
-					})
-				}
-			} catch (e) {
-				uni.reLaunch({
-					url: "pages/login/login-account",
-					success: () => {
-						plus.navigator.closeSplashscreen();
-					}
-				})
-			}
-			// #endif
+	// 		// #ifdef APP-PLUS
+	// 		try {
+	// 			let loginTime = uni.getStorageSync("loginTime");
+	// 			if (loginTime) {
+	// 				let dt = new Date();
+	// 				let time = dt.getTime();
+	// 				let expires = this.userInfo.expires_in;
+	// 				if (expires) {
+	// 					if ((time - loginTime) / 1000 > (expires - 60)) {
+							
+	// 						uni.reLaunch({
+	// 							url: "pages/login/login-account",
+	// 							success: () => {
+	// 								plus.navigator.closeSplashscreen();
+	// 							}
+	// 						})
+	// 					} else {
+	// 						plus.navigator.closeSplashscreen();
+	// 					}
+	// 				} else {
+	// 					uni.reLaunch({
+	// 						url: "pages/login/login-account",
+	// 						success: () => {
+	// 							plus.navigator.closeSplashscreen();
+	// 						}
+	// 					})
+	// 				}
+	// 			} else {
+	
+					
+	// 				uni.reLaunch({
+	// 					url: "pages/login/login-account",
+	// 					success: () => {
+	// 						plus.navigator.closeSplashscreen();
+	// 					}
+	// 				})
+	// 			}
+	// 		} catch (e) {
+	// 			uni.reLaunch({
+	// 				url: "pages/login/login-account",
+	// 				success: () => {
+	// 					plus.navigator.closeSplashscreen();
+	// 				}
+	// 			})
+	// 		}
+	// 		// #endif
 		},
 		onShow: function() {
 			console.log('App Show')

+ 7 - 7
common/setting.js

@@ -3,7 +3,7 @@
  */
 module.exports = {
 	// 应用名
-	name: 'tscloudywxt',
+	name: 'tscloudywxtxjgd',
 	// 应用logo,支持本地路径和网络路径
 	logo: '/static/images/logo.png',
 	// 版本号
@@ -12,14 +12,14 @@ module.exports = {
 	userType: 'app',
 	// 开发环境接口Url
 	devUrl: 'http://127.0.0.1:50004',
-	// 测试环境
-	// oss: 'https://wx.dahengsi.com:44301/oss/galaxy/',
-	// imgPath: 'https://wx.dahengsi.com:44301/img/',
-	// prodUrl: 'https://wx.dahengsi.com:44301/api',
 	// 生产环境
 	oss: 'https://wx.dahengsi.com:30001/oss/galaxy/',
 	imgPath: 'https://wx.dahengsi.com:30001/img/',
 	prodUrl: 'https://wx.dahengsi.com:30001/api',
+	// 测试环境
+	// oss: 'https://wx.dahengsi.com:44301/oss/galaxy/',
+	// imgPath: 'https://wx.dahengsi.com:44301/img/',
+	// prodUrl: 'https://wx.dahengsi.com:44301/api',
 	// 后端数据的接收方式application/json;charset=UTF-8或者application/x-www-form-urlencoded;charset=UTF-8
 	contentType: 'application/json;charset=UTF-8',
 	// 后端返回状态码
@@ -29,7 +29,7 @@ module.exports = {
 	// 登录失效code
 	invalidCode: 401,
 	// 客户端ID
-	clientId: 'tscloudywxt_app',
+	clientId: 'tscloudywxt_app_xjgd',
 	// 客户端密钥
-	clientSecret: 'tscloudywxt_app_secret_82828800',
+	clientSecret: 'tscloudywxt_app_xjgd_secret_82828800',
 }

+ 24 - 2
pages.json

@@ -12,6 +12,14 @@
 				"navigationStyle": "custom"
 			}
 		},
+		{
+				"path": "pages/manage/manage",
+				"style": {
+					"navigationBarTitleText": "服务",
+					"enablePullDownRefresh": false,
+					"navigationStyle": "custom"
+				}
+			},
 		{
 			"path": "pages/serviceperson/servicepersonmanage",
 			"style": {
@@ -528,6 +536,15 @@
 				"navigationStyle": "custom"
 			}
 		},
+		{
+			"path": "pages/user/center-simple",
+			"style": {
+				"navigationBarTitleText": "帐号管理",
+				"enablePullDownRefresh": false,
+				"navigationStyle": "custom"
+			}
+		},
+		
 		{
 			"path": "pages/system/setting",
 			"style": {
@@ -672,9 +689,14 @@
 				"pagePath": "pages/home/home",
 				"iconPath": "static/images/tabbar/home.png",
 				"selectedIconPath": "static/images/tabbar/home_selected.png",
-				"text": "运维"
+				"text": "首页"
+			},
+{
+				"pagePath": "pages/manage/manage",
+				"iconPath": "static/images/tabbar/home.png",
+				"selectedIconPath": "static/images/tabbar/home_selected.png",
+				"text": "服务"
 			},
-
 			{
 				"pagePath": "pages/user/center",
 				"iconPath": "static/images/tabbar/user.png",

+ 190 - 562
pages/home/home.vue

@@ -9,533 +9,79 @@
 <template>
 	<view class="container">
 		<!-- 导航栏  #3F9EFF-->
-		<uni-nav-bar :fixed="true" backgroundColor="#3F9EFF" statusBar="false" height="75px">
+		<uni-nav-bar :fixed="true" backgroundColor="#f7f7f7" statusBar="false" height="75px">
 			<block slot="left">
 				<view class="view-flex-block-center">
-					<image src="/static/images/logo_start.png" class="logo" mode="widthFix"></image>
+					<image src="/static/images/logo_start.png"
+						style="width: 100rpx;height: 100rpx;background: lightgray;border-radius: 50%;" mode="widthFix">
+					</image>
 				</view>
 			</block>
-			<view class="view-flex-block-center" style="width: 100%;">
-				<view class="view-flex-inline-center">
-					<text style="color: #ffffff; font-size: 1.2rem;font-family: Microsoft YaHei;">{{title}}</text>
-				</view>
+			<view class="view-flex-inline">
+				<uni-list style="background-color: #f7f7f7;" :border="false">
+
+					<uni-list-item v-if="isLogin" :border="false" style="background-color: #f7f7f7;" showArrow
+						:title="userName" :note="userNote" :clickable="true" @click="onUserInfoClick()" />
+
+					<uni-list-item v-else :border="false" style="background-color: #f7f7f7;" showArrow title="登录/注册"
+						note="快速登录 注册体验更多功能" :clickable="true" @click="onLoginClick()" />
+				</uni-list>
 			</view>
 			<block slot="right">
-				<view style="margin-right:20rpx" @click="onNoticeMoreClick">
+				<view style="margin-right:0rpx" @click="onNoticeMoreClick">
 					<uni-badge class="uni-badge-left-margin" absolute="rightTop" :is-dot="noticeDot" :text="noticeValue"
 						size="small">
-						<uni-icons class="input-uni-icon" type="notification" size="24" color="#FFFFFF" />
+						<uni-icons class="input-uni-icon" type="email" size="24" color="#000000" />
+					</uni-badge>
+				</view>
+				<view style="margin-right:10rpx;margin-left: 10px;" @click="onNoticeMoreClick">
+					<uni-badge class="uni-badge-left-margin" absolute="rightTop" size="small">
+						<uni-icons class="input-uni-icon" type="scan" size="24" color="#000000" />
 					</uni-badge>
 				</view>
 			</block>
 		</uni-nav-bar>
-		<!-- 头部按钮 -->
-		<view class="nav">
-			<u-grid :col="4" :border="false">
-				<u-grid-item v-if="navButtonIndex[index]" bg-color="transparent" v-for="(item, index) in navButton"
-					:key="index">
-					<navigator v-if="item.badge" :url="item.url" hover-class="none" class="nav-item"
-						open-type="navigate">
-						<uni-badge class="uni-badge-left-margin" absolute="rightTop" :text="item.value" size="small">
-							<image :src="item.img" mode="widthFix" class="nav-item-img"></image>
-						</uni-badge>
-						<view style="font-size: 0.9rem;font-weight: bold;">{{ item.name }}</view>
-					</navigator>
-					<navigator v-else :url="item.url" hover-class="none" class="nav-item" open-type="navigate">
-						<image :src="item.img" mode="widthFix" class="nav-item-img"></image>
-						<view style="font-size: 0.9rem;font-weight: bold;">{{ item.name }}</view>
-					</navigator>
-				</u-grid-item>
-			</u-grid>
-		</view>
-		<uni-card v-if="permission.orgAdmin || (permission.companyServciePerson && postName=='servicePerson')"
-			title="快捷操作">
-			<view class="view-flex-inline">
-				<uni-icons class="input-uni-icon" type="phone" size="18" color="coral" />
-				<text class="text-under-line" style="color: coral;font-size: 1rem;"
-					@click="toShortcutCreateOrder">发起工单</text>
-			</view>
-		</uni-card>
-		<!-- 		<uni-card v-if="permission.companyServciePerson && postName=='engineer'" title="新的工单">
-			<view v-if="todoOrderCount>0">
-				<uni-list>
-					<uni-list-item v-for="item in todoOrderList" :key="item.id">
-						<template v-slot:body>
-							<view class="list-item-block">
-								<view class="line">
-									<uni-icons type="gear" size="18" color="lightblue" />
-									<view v-if="item.orderType==1" class="text" style="width: 90%;color: gray;">
-										工单类型: <span style="margin-left: 5px;color: cornflowerblue;">维修工单</span>
-									</view>
-									<view v-else class="text" style="width: 90%;color: gray;">
-										工单类型: <span style="margin-left: 5px;color: cornflowerblue;">服务工单</span>
-									</view>
-								</view>
-								<view class="line">
-									<uni-icons type="personadd" size="18" color="lightblue" />
-									<view class="text" style="width: 90%;color: gray;">
-										工单发起人: <span
-											style="margin-left: 5px;color: cornflowerblue;">{{item.createOrderPersonName}}</span>
-									</view>
-								</view>
-								<view class="line">
-									<uni-icons type="calendar" size="18" color="lightblue" />
-									<view class="text" style="width: 90%;color: gray;">
-										发起时间: <span
-											style="margin-left: 5px;color: cornflowerblue;">{{item.createTime}}</span>
-									</view>
-								</view>
-								<view class="line">
-									<uni-icons type="help" size="18" color="lightblue" />
-									<view class="text text-ellipsis" style="width: 90%;color: gray;">
-										问题描述: <span
-											style="margin-left: 5px;color: cornflowerblue;">{{item.orderDesc}}</span>
-									</view>
-								</view>
-								<view class="line">
-									<view class="block">
-										<uni-icons type="arrow-right" size="20" color="coral" />
-									</view>
-									<view class="text text-underline"
-										style="color: coral;margin-left: 2px;font-size: 1rem;" @click="toDo(item)">
-										去处理
-									</view>
-								</view>
-							</view>
-						</template>
-					</uni-list-item>
-				</uni-list>
-			</view>
-			<view v-else class="view-flex-inline">
-				<image src="/static/images/todo/todo.png" style="width: 40px;margin-left: 10px;" mode="widthFix">
-				</image>
-				<view class="view-flex-block-center" style="margin-left: 10px;align-items: flex-start;">
-					<text>暂无待处理工单</text>
-				</view>
-			</view>
-		</uni-card>
-		<uni-card v-if="permission.orgAdmin" title="待审批费用申请" >
-			<view v-if="costsApproveOrderCount>0">
-				<uni-list>
-					<uni-list-item v-for="item in costsApproveOrderList" :key="item.id">
-						<template v-slot:body>
-							<view class="list-item-block">
-								<view class="line">
-									<uni-icons type="auth" size="18" color="lightblue" />
-									<view class="text" style="width: 90%;color: gray;">
-										费用审批申请人:<span
-											style="margin-left: 5px;color: cornflowerblue;">{{item.processorName}}</span>
-									</view>
-								</view>
-								<view class="line">
-									<uni-icons type="calendar" size="18" color="lightblue" />
-									<view class="text" style="width: 90%;color: gray;">
-										申请时间:<span
-											style="margin-left: 5px;color: cornflowerblue;">{{item.orderProcessTime}}</span>
-									</view>
-								</view>
-								<view class="line">
-									<uni-icons type="info" size="18" color="lightblue" />
-									<view class="text text-ellipsis" style="width: 90%;color: gray;">
-										费用说明:<span
-											style="margin-left: 5px;color: cornflowerblue;">{{item.costsReportDesc}}</span>
-									</view>
-								</view>
-								<view class="line">
-									<view class="block">
-										<uni-icons type="arrow-right" size="20" color="coral" />
-									</view>
-									<view class="text  text-ellipsis text-underline"
-										style="width: 90%;color: coral;font-size: 1rem;"
-										@click="toOrderCostsApprove(item)">
-										去审批
-									</view>
-								</view>
-							</view>
-						</template>
-					</uni-list-item>
-				</uni-list>
-			</view>
-			<view v-else class="view-flex-inline">
-				<image src="/static/images/todo/todo.png" style="width: 40px;margin-left: 10px;" mode="widthFix">
-				</image>
-				<view class="view-flex-block-center" style="margin-left: 10px;align-items: flex-start;">
-					<text>暂无待费用审批工单</text>
+
+		<uni-card title="待办工单" :thumbnail="orderLogo">
+			<uni-list v-if="permission.admin || permission.orgAdmin">
+				<uni-list-item showArrow title="会议室音响没有声音" note="2024年3月1日 12时10分" rightText="去处理" />
+			</uni-list>
+			<uni-card v-else title="快捷操作">
+				<view class="view-flex-inline">
+					<uni-icons class="input-uni-icon" type="phone" size="18" color="coral" />
+					<text class="text-under-line" style="color: coral;font-size: 1rem;"
+						@click="toShortcutCreateOrder">发起工单</text>
 				</view>
-			</view>
+			</uni-card>
 		</uni-card>
-		<uni-card v-if="permission.companyServciePerson && postName=='engineer'" title="费用已审批工单">
-			<view v-if="costsApproveOrderCount>0">
-				<uni-list>
-					<uni-list-item v-for="item in costsApproveOrderList" :key="item.id">
-						<template v-slot:body>
-							<view class="list-item-block">
-								<view class="line">
-									<uni-icons type="auth" size="18" color="lightblue" />
-									<view class="text" style="width: 90%;color: gray;">
-										费用审批人:<span
-											style="margin-left: 5px;color: cornflowerblue;">{{item.processorName}}</span>
-									</view>
-								</view>
-								<view class="line">
-									<uni-icons type="calendar" size="18" color="lightblue" />
-									<view class="text" style="width: 90%;color: gray;">
-										审批时间:<span
-											style="margin-left: 5px;color: cornflowerblue;">{{item.orderProcessTime}}</span>
-									</view>
-								</view>
-								<view class="line">
-									<uni-icons type="info" size="18" color="lightblue" />
-									<view class="text text-ellipsis" style="width: 90%;color: gray;">
-										审批意见:<span
-											style="margin-left: 5px;color: cornflowerblue;">{{item.processDesc}}</span>
-									</view>
-								</view>
-								<view class="line">
-									<view class="block">
-										<uni-icons type="arrow-right" size="20" color="coral" />
-									</view>
-									<view class="text  text-ellipsis text-underline"
-										style="width: 90%;color: coral;font-size: 1rem;"
-										@click="toOrderProcess(item)">
-										去处理
-									</view>
-								</view>
-							</view>
-						</template>
-					</uni-list-item>
-				</uni-list>
-			</view>
-			<view v-else class="view-flex-inline">
-				<image src="/static/images/todo/todo.png" style="width: 40px;margin-left: 10px;" mode="widthFix">
-				</image>
-				<view class="view-flex-block-center" style="margin-left: 10px;align-items: flex-start;">
-					<text>暂无费用已审批工单</text>
-				</view>
-			</view>
+
+
+
+		<uni-card title="巡检保养任务" :thumbnail="checkLogo">
+			<uni-list>
+				<uni-list-item showArrow title="1-10号门禁查看" note="2024年3月1日 12时10分" :clickable="true" rightText="去处理" />
+			</uni-list>
 		</uni-card>
-		<uni-card v-if="permission.orgAdmin" title="待完结审批工单">
-			<view v-if="closeApproveOrderCount>0">
-				<uni-list>
-					<uni-list-item v-for="item in closeApproveOrderList" :key="item.id">
-						<template v-slot:body>
-							<view class="list-item-block">
-								<view class="line">
-									<uni-icons type="auth" size="18" color="lightblue" />
-									<view class="text" style="width: 90%;color: gray;">
-										工单处理人:<span
-											style="margin-left: 5px;color: cornflowerblue;">{{item.processorName}}</span>
-									</view>
-								</view>
-								<view class="line">
-									<uni-icons type="calendar" size="18" color="lightblue" />
-									<view class="text" style="width: 90%;color: gray;">
-										处理时间:<span
-											style="margin-left: 5px;color: cornflowerblue;">{{item.orderProcessTime}}</span>
-									</view>
-								</view>
-								<view class="line">
-									<uni-icons type="info" size="18" color="lightblue" />
-									<view class="text text-ellipsis" style="width: 90%;color: gray;">
-										解决措施说明:<span
-											style="margin-left: 5px;color: cornflowerblue;">{{item.processDesc}}</span>
-									</view>
-								</view>
-								<view class="line">
-									<view class="block">
-										<uni-icons type="arrow-right" size="20" color="coral" />
-									</view>
-									<view class="text text-ellipsis text-underline"
-										style="width: 90%;color: coral;font-size: 1rem;"
-										@click="toOrderCloseApprove(item)">
-										去审批
-									</view>
-								</view>
-							</view>
-						</template>
-					</uni-list-item>
-				</uni-list>
-			</view>
-			<view v-else class="view-flex-inline">
-				<image src="/static/images/todo/todo.png" style="width: 40px;margin-left: 10px;" mode="widthFix">
-				</image>
-				<view class="view-flex-block-center" style="margin-left: 10px;align-items: flex-start;">
-					<text>暂无待完结审批工单</text>
-				</view>
-			</view>
-		</uni-card> -->
-		<uni-card title="待处理事件">
-			<uni-section v-if="permission.companyServciePerson && postName=='engineer'" title="新的工单"
-				ftitleFontSize="0.8rem" type="circle">
-<!-- 				<template v-slot:decoration>
-					<view class="decoration"></view>
-				</template> -->
-				<view v-if="todoOrderCount>0">
-					<uni-list>
-						<uni-list-item v-for="item in todoOrderList" :key="item.id">
-							<template v-slot:body>
-								<view class="list-item-block">
-									<view class="line">
-										<uni-icons type="gear" size="18" color="lightblue" />
-										<view v-if="item.orderType==1" class="text" style="width: 90%;color: gray;">
-											工单类型: <span style="margin-left: 5px;color: cornflowerblue;">维修工单</span>
-										</view>
-										<view v-else class="text" style="width: 90%;color: gray;">
-											工单类型: <span style="margin-left: 5px;color: cornflowerblue;">服务工单</span>
-										</view>
-									</view>
-									<view class="line">
-										<uni-icons type="personadd" size="18" color="lightblue" />
-										<view class="text" style="width: 90%;color: gray;">
-											工单发起人: <span
-												style="margin-left: 5px;color: cornflowerblue;">{{item.createOrderPersonName}}</span>
-										</view>
-									</view>
-									<view class="line">
-										<uni-icons type="calendar" size="18" color="lightblue" />
-										<view class="text" style="width: 90%;color: gray;">
-											发起时间: <span
-												style="margin-left: 5px;color: cornflowerblue;">{{item.createTime}}</span>
-										</view>
-									</view>
-									<view class="line">
-										<uni-icons type="help" size="18" color="lightblue" />
-										<view class="text text-ellipsis" style="width: 90%;color: gray;">
-											问题描述: <span
-												style="margin-left: 5px;color: cornflowerblue;">{{item.orderDesc}}</span>
-										</view>
-									</view>
-									<view class="line">
-										<view class="block">
-											<uni-icons type="arrow-right" size="20" color="coral" />
-										</view>
-										<view class="text text-underline"
-											style="color: coral;margin-left: 2px;font-size: 1rem;" @click="toDo(item)">
-											去处理
-										</view>
-									</view>
-								</view>
-							</template>
-						</uni-list-item>
-					</uni-list>
-				</view>
-				<view v-else class="view-flex-inline">
-					<image src="/static/images/todo/todo.png" style="width: 40px;margin-left: 10px;" mode="widthFix">
-					</image>
-					<view class="view-flex-block-center" style="margin-left: 10px;align-items: flex-start;">
-						<text>暂无待处理工单</text>
-					</view>
-				</view>
-			</uni-section>
-			<uni-section v-if="permission.orgAdmin" title="待审批费用申请" ftitleFontSize="0.8rem" type="circle">
-<!-- 				<template v-slot:decoration>
-					<view class="decoration"></view>
-				</template> -->
-				<view v-if="costsApproveOrderCount>0">
-					<uni-list>
-						<uni-list-item v-for="item in costsApproveOrderList" :key="item.id">
-							<template v-slot:body>
-								<view class="list-item-block">
-									<view class="line">
-										<uni-icons type="auth" size="18" color="lightblue" />
-										<view class="text" style="width: 90%;color: gray;">
-											费用申请人:<span
-												style="margin-left: 5px;color: cornflowerblue;">{{item.processorName}}</span>
-										</view>
-									</view>
-									<view class="line">
-										<uni-icons type="calendar" size="18" color="lightblue" />
-										<view class="text" style="width: 90%;color: gray;">
-											申请时间:<span
-												style="margin-left: 5px;color: cornflowerblue;">{{item.orderProcessTime}}</span>
-										</view>
-									</view>
-									<view class="line">
-										<uni-icons type="info" size="18" color="lightblue" />
-										<view class="text text-ellipsis" style="width: 90%;color: gray;">
-											费用说明:<span
-												style="margin-left: 5px;color: cornflowerblue;">{{item.costsReportDesc}}</span>
-										</view>
-									</view>
-									<view class="line">
-										<view class="block">
-											<uni-icons type="arrow-right" size="20" color="coral" />
-										</view>
-										<view class="text  text-ellipsis text-underline"
-											style="width: 90%;color: coral;font-size: 1rem;"
-											@click="toOrderCostsApprove(item)">
-											去审批
-										</view>
-									</view>
-								</view>
-							</template>
-						</uni-list-item>
-					</uni-list>
-				</view>
-				<view v-else class="view-flex-inline">
-					<image src="/static/images/todo/todo.png" style="width: 40px;margin-left: 10px;" mode="widthFix">
-					</image>
-					<view class="view-flex-block-center" style="margin-left: 10px;align-items: flex-start;">
-						<text>暂无待审批费用申请工单</text>
-					</view>
-				</view>
-			</uni-section>
-			<uni-section v-if="permission.companyServciePerson && postName=='engineer'" title="费用已审批工单"
-				ftitleFontSize="0.8rem" type="circle">
-<!-- 				<template v-slot:decoration>
-					<view class="decoration"></view>
-				</template> -->
-				<view v-if="costsApproveOrderCount>0">
-					<uni-list>
-						<uni-list-item v-for="item in costsApproveOrderList" :key="item.id">
-							<template v-slot:body>
-								<view class="list-item-block">
-									<view class="line">
-										<uni-icons type="auth" size="18" color="lightblue" />
-										<view class="text" style="width: 90%;color: gray;">
-											费用审批人:<span
-												style="margin-left: 5px;color: cornflowerblue;">{{item.processorName}}</span>
-										</view>
-									</view>
-									<view class="line">
-										<uni-icons type="calendar" size="18" color="lightblue" />
-										<view class="text" style="width: 90%;color: gray;">
-											审批时间:<span
-												style="margin-left: 5px;color: cornflowerblue;">{{item.orderProcessTime}}</span>
-										</view>
-									</view>
-									<view class="line">
-										<uni-icons type="info" size="18" color="lightblue" />
-										<view class="text text-ellipsis" style="width: 90%;color: gray;">
-											审批意见:<span
-												style="margin-left: 5px;color: cornflowerblue;">{{item.processDesc}}</span>
-										</view>
-									</view>
-									<view class="line">
-										<view class="block">
-											<uni-icons type="arrow-right" size="20" color="coral" />
-										</view>
-										<view class="text  text-ellipsis text-underline"
-											style="width: 90%;color: coral;font-size: 1rem;"
-											@click="toOrderProcess(item)">
-											去处理
-										</view>
-									</view>
-								</view>
-							</template>
-						</uni-list-item>
-					</uni-list>
-				</view>
-				<view v-else class="view-flex-inline">
-					<image src="/static/images/todo/todo.png" style="width: 40px;margin-left: 10px;" mode="widthFix">
-					</image>
-					<view class="view-flex-block-center" style="margin-left: 10px;align-items: flex-start;">
-						<text>暂无费用已审批工单</text>
-					</view>
-				</view>
-			</uni-section>
-			<uni-section v-if="permission.orgAdmin" title="待完结审批工单" ftitleFontSize="0.8rem" type="circle">
-				<view v-if="closeApproveOrderCount>0">
-					<uni-list>
-						<uni-list-item v-for="item in closeApproveOrderList" :key="item.id">
-							<template v-slot:body>
-								<view class="list-item-block">
-									<view class="line">
-										<uni-icons type="auth" size="18" color="lightblue" />
-										<view class="text" style="width: 90%;color: gray;">
-											工单处理人:<span
-												style="margin-left: 5px;color: cornflowerblue;">{{item.processorName}}</span>
-										</view>
-									</view>
-									<view class="line">
-										<uni-icons type="calendar" size="18" color="lightblue" />
-										<view class="text" style="width: 90%;color: gray;">
-											处理时间:<span
-												style="margin-left: 5px;color: cornflowerblue;">{{item.orderProcessTime}}</span>
-										</view>
-									</view>
-									<view class="line">
-										<uni-icons type="info" size="18" color="lightblue" />
-										<view class="text text-ellipsis" style="width: 90%;color: gray;">
-											解决措施说明:<span
-												style="margin-left: 5px;color: cornflowerblue;">{{item.processDesc}}</span>
-										</view>
-									</view>
-									<view class="line">
-										<view class="block">
-											<uni-icons type="arrow-right" size="20" color="coral" />
-										</view>
-										<view class="text text-ellipsis text-underline"
-											style="width: 90%;color: coral;font-size: 1rem;"
-											@click="toOrderCloseApprove(item)">
-											去审批
-										</view>
-									</view>
-								</view>
-							</template>
-						</uni-list-item>
-					</uni-list>
-				</view>
-				<view v-else class="view-flex-inline">
-					<image src="/static/images/todo/todo.png" style="width: 40px;margin-left: 10px;" mode="widthFix">
-					</image>
-					<view class="view-flex-block-center" style="margin-left: 10px;align-items: flex-start;">
-						<text>暂无待完结审批工单</text>
-					</view>
-				</view>
-			</uni-section>
+
+
+
+
+
+
+		<uni-card :isFull="true">
+			<swiper style="height: 200px;" circular :indicator-dots="false" :autoplay="true" :interval="2000"
+				:duration="500">
+				<swiper-item style="height: 200px;line-height: 300rpx;">
+					<view style="background-color: lavenderblush;">A</view>
+				</swiper-item>
+				<swiper-item style="height: 200px;line-height: 300rpx;">
+					<view style="background-color: darkcyan;">B</view>
+				</swiper-item>
+				<swiper-item style="height: 200px;line-height: 300rpx;">
+					<view style="background-color: darkgoldenrod;">C</view>
+				</swiper-item>
+			</swiper>
 		</uni-card>
-		<!-- 		<uni-card title="云监控">
-			<uni-row>
-				<uni-col :span="12">
-					<view class="view-flex-inline">
-						<uni-icons class="input-uni-icon" type="calendar" size="18" color="orangered" />
-						<text>未关闭工单 {{realData.orderCount}}</text>
-					</view>
-					<view class="view-flex-inline">
-						<uni-icons class="input-uni-icon" type="calendar" size="18" color="orangered" />
-						<text>工单处理超时 {{realData.delayComfireOrders}}</text>
-					</view>
-				</uni-col>
-				<uni-col :span="12">
-					<view class="view-flex-inline">
-						<uni-icons class="input-uni-icon" type="notification" size="18" color="orangered" />
-						<text>设备异常 {{realData.warningRtus}}</text>
-					</view>
-				</uni-col>
-			</uni-row>
-		</uni-card> -->
-		<!-- 
-		<uni-card title="我的资源">
-			<uni-row>
-				<uni-col :span="12">
-					<view class="view-flex-inline">
-						<uni-icons class="input-uni-icon" type="home" size="18" color="orangered" />
-						<text>运维机构数量</text>
-					</view>
-				</uni-col>
-				<uni-col :span="12">
-					<view class="view-flex-inline">
-						<uni-icons class="input-uni-icon" type="folder-add" size="18" color="orangered" />
-						<text>项目数量</text>
-					</view>
-				</uni-col>
-			</uni-row>
-			<uni-row>
-				<uni-col :span="12">
-					<view class="view-flex-inline">
-						<uni-icons class="input-uni-icon" type="staff" size="18" color="orangered" />
-						<text>运维人员数量</text>
-					</view>
-				</uni-col>
-				<uni-col :span="12">
-					<view class="view-flex-inline">
-						<uni-icons class="input-uni-icon" type="videocam" size="18" color="orangered" />
-						<text>设备数量 {{realData.rtus}}</text>
-					</view>
-				</uni-col>
-			</uni-row>
-		</uni-card> -->
 	</view>
 </template>
 
@@ -562,6 +108,9 @@
 					'companyServciePerson': false,
 					'yjServicePerson': false,
 				},
+				userLoginStatus: 0,
+				userName: 'guest',
+				userNote: '泰山云服务已服务您180天',
 				postName: '',
 				currentRole: '',
 				current: 0,
@@ -581,6 +130,8 @@
 				costsApproveOrderList: [],
 				closeApproveOrderCount: 0,
 				closeApproveOrderList: [],
+				orderLogo: "/static/images/logo_pc.png",
+				checkLogo: "/static/images/home/inspection.png",
 			};
 		},
 		computed: {},
@@ -614,67 +165,81 @@
 					this.postName = "servicePerson";
 				}
 			}
-			if (this.$u.func.checkLogin()) {
-				console.log("timer start  +++++++ ")
-				this.timer = true;
-				setTimeout(this.timeCall, 10);
-			}
+			// if (this.$u.func.checkLogin()) {
+			// 	console.log("timer start  +++++++ ")
+			// 	this.timer = true;
+			// 	setTimeout(this.timeCall, 10);
+			// }
 		},
 		onUnload() {
-			this.timer = false;
+			//this.timer = false;
 		},
 		onReady() {
-			if (this.$u.func.checkLogin()) {} else {
-				this.$u.func.logout();
-			}
+			// if (this.$u.func.checkLogin()) {} else {
+			// 	this.$u.func.logout();
+			// }
 		},
 		onShow() {
-			if (this.$u.func.checkLogin()) {
-				if (this.userInfo.role_name !== this.currentRole) {
-					this.permission.admin = false;
-					this.permission.orgAdmin = false;
-					this.permission.companyAdmin = false;
-					this.permission.companyServciePerson = false;
-					this.permission.yjServicePerson = false;
-					this.navButton = navBtns.navButtons;
-					if (this.userInfo.role_name === role.admin) {
-						this.permission.admin = true;
-						this.navButtonIndex = navBtns.sysAdminNavButton;
-						this.currentRole = role.admin;
-					} else if (this.userInfo.role_name === role.orgAdmin) {
-						this.permission.orgAdmin = true;
-						this.currentRole = role.orgAdmin;
-						this.navButtonIndex = navBtns.orgAdminNavButton;
-					} else if (this.userInfo.role_name === role.companyAdmin) {
-						this.permission.companyAdmin = true;
-						this.currentRole = role.companyAdmin;
-						this.navButtonIndex = navBtns.companyAdminNavButton;
-					} else if (this.userInfo.role_name === role.companyServciePerson) {
-						this.permission.companyServciePerson = true;
-						this.currentRole = role.companyServciePerson;
-						this.navButtonIndex = navBtns.companyServicePersonNavButton;
-						if (this.userInfo.post_id == '1706859505948098562') {
-							this.postName = "engineer";
-						} else if (this.userInfo.post_id == '1730535542909140993') {
-							this.postName = "servicePerson";
-						}
-					}
-				}
-				if (this.timer == false) {
-					this.timer = true;
-					setTimeout(this.timeCall, 10);
-				}
-			} else {
-				this.$u.func.logout();
-			}
+			// if (this.$u.func.checkLogin()) {
+			// 	if (this.userInfo.role_name !== this.currentRole) {
+			// 		this.permission.admin = false;
+			// 		this.permission.orgAdmin = false;
+			// 		this.permission.companyAdmin = false;
+			// 		this.permission.companyServciePerson = false;
+			// 		this.permission.yjServicePerson = false;
+			// 		this.navButton = navBtns.navButtons;
+			// 		if (this.userInfo.role_name === role.admin) {
+			// 			this.permission.admin = true;
+			// 			this.navButtonIndex = navBtns.sysAdminNavButton;
+			// 			this.currentRole = role.admin;
+			// 		} else if (this.userInfo.role_name === role.orgAdmin) {
+			// 			this.permission.orgAdmin = true;
+			// 			this.currentRole = role.orgAdmin;
+			// 			this.navButtonIndex = navBtns.orgAdminNavButton;
+			// 		} else if (this.userInfo.role_name === role.companyAdmin) {
+			// 			this.permission.companyAdmin = true;
+			// 			this.currentRole = role.companyAdmin;
+			// 			this.navButtonIndex = navBtns.companyAdminNavButton;
+			// 		} else if (this.userInfo.role_name === role.companyServciePerson) {
+			// 			this.permission.companyServciePerson = true;
+			// 			this.currentRole = role.companyServciePerson;
+			// 			this.navButtonIndex = navBtns.companyServicePersonNavButton;
+			// 			if (this.userInfo.post_id == '1706859505948098562') {
+			// 				this.postName = "engineer";
+			// 			} else if (this.userInfo.post_id == '1730535542909140993') {
+			// 				this.postName = "servicePerson";
+			// 			}
+			// 		}
+			// 	}
+			// 	if (this.timer == false) {
+			// 		this.timer = true;
+			// 		setTimeout(this.timeCall, 10);
+			// 	}
+			// } else {
+			// 	this.$u.func.logout();
+			// }
 		},
 		onHide() {
-			this.timer = false;
+			//this.timer = false;
 		},
 		methods: {
 			toOss(path) {
 				return oss + path;
 			},
+			onLoginClick() {
+				console.log("onLoginClick")
+				var url = '/pages/login/login-account';
+				uni.navigateTo({
+					url: url
+				})
+			},
+			onUserInfoClick() {
+				console.log("onUserInfoClick")
+				var url = '/pages/user/center-simple';
+				uni.navigateTo({
+					url: url
+				})
+			},
 			timeCall() {
 				if (this.timer == true) {
 					this.getHomeInfo();
@@ -782,6 +347,69 @@
 <style lang="scss" scoped>
 	$nav-height: 75px;
 
+
+	.user-box {
+		display: flex;
+		justify-content: space-between;
+		padding: 0 20rpx 0 64rpx;
+		margin-top: 36rpx;
+
+		.left {
+			display: flex;
+			flex-direction: column;
+			align-items: center;
+
+			.avatar {
+				width: 128rpx;
+				height: 128rpx;
+				background: #ffffff;
+				border-radius: 50%;
+			}
+
+			.user-name {
+				margin-top: 20rpx;
+				font-size: 36rpx;
+				font-family: Source Han Sans CN;
+				font-weight: 500;
+				color: #ffffff;
+			}
+
+			.tag {
+				margin-top: 20rpx;
+				display: flex;
+				justify-content: center;
+				align-items: center;
+				padding: 5rpx 16rpx;
+				border: 1px solid #f5f5f5;
+				border-radius: 7rpx;
+
+				font-size: 19rpx;
+				font-family: Source Han Sans CN;
+				font-weight: 300;
+				color: #ffffff;
+			}
+		}
+
+		.edit-btn {
+			margin-top: 20rpx;
+			margin-bottom: 10px;
+			flex-shrink: 0;
+			display: flex;
+			justify-content: center;
+			align-items: center;
+
+			width: 165rpx;
+			height: 54rpx;
+			border: 2rpx solid #f5f5f5;
+			border-radius: 11rpx;
+
+			font-size: 27rpx;
+			font-family: Source Han Sans CN;
+			font-weight: 400;
+			color: #ffffff;
+		}
+	}
+
 	.decoration {
 		width: 6px;
 		height: 6px;
@@ -917,10 +545,10 @@
 	}
 
 	.container {
-		background-color: #f7f7f7;
-		min-height: 100vh;
+		// background-color: #f7f7f7;
+		// min-height: 100vh;
 		overflow: hidden;
-
+		padding: 0 0 75rpx;
 	}
 
 	.nav {

+ 5 - 3
pages/login/login-account.vue

@@ -7,7 +7,7 @@
 					style="width: 100%;margin-bottom: 80rpx;display: flex;flex-direction: column;align-items: center;">
 					<!-- 	<text style="font-size: 32rpx;">泰山云平台</text> -->
 					<text style="font-size: 1.5rem;margin-top: 5rpx;">
-						泰山电教维护服务系统
+						大恒巡检保养工单系统
 					</text>
 				</view>
 				<view class="cell">
@@ -24,7 +24,7 @@
 							placeholder-class="hold" @blur="handleInputCheck" />
 					</view>
 				</view>
-				<!-- <view class="agree">
+<!-- 				<view class="agree">
 					登录即代表同意
 					<text class="a">《用户协议》</text>
@@ -79,11 +79,13 @@
 				username: '',
 				password: '',
 				disabled: true,
-				rememberPw: false
+				rememberPw: false,
+			
 			};
 		},
 		onLoad() {
 			console.log("login+++")
+		
 			// uni.getPushClientId({
 			// 		success: (res) => {
 			// 			console.log("id11111111111 "+res.cid);

+ 8 - 0
pages/manage/manage.vue

@@ -0,0 +1,8 @@
+<template>
+</template>
+
+<script>
+</script>
+
+<style>
+</style>

+ 329 - 0
pages/user/center-simple.vue

@@ -0,0 +1,329 @@
+<template>
+	<view class="container">
+		<uni-nav-bar dark :fixed="true" backgroundColor="black" statusBar="false" left-icon="left" left-text="返回"
+			@clickLeft="toBack">
+			<view class="nav-title">
+				<text>{{title}}</text>
+			</view>
+		</uni-nav-bar>
+
+		<view class="cell-box">
+			<u-cell-group :border="false">
+				<u-cell-item title="修改密码" :border-bottom="false" @click="$u.func.route('/pages/user/modify-password')">
+					<image slot="icon" src="/static/images/user/c8.png" class="icon" mode=""></image>
+				</u-cell-item>
+			</u-cell-group>
+		</view>
+		<u-gap height="100"></u-gap>
+		<view class="cell-box">
+			<u-cell-group :border="false">
+				<button type="primary" plain="true" @click="logout()">退出登录</button>
+			</u-cell-group>
+		</view>
+	</view>
+</template>
+
+<script>
+	import http from '@/http/api.js'
+	export default {
+		onLoad() {
+			console.log(this.userInfo.nick_name)
+			const that = this;
+
+			http.request({
+				url: '/galaxy-system/dept/detail?id=' + this.userInfo.dept_id,
+				method: 'GET'
+			}).then(res => {
+				console.log(JSON.stringify(res.data))
+				that.deptName = res.data.deptName;
+			}).catch(err => {
+				console.log(err)
+			})
+
+			http.request({
+				url: '/galaxy-system/role/select?roleId=' + this.userInfo.role_id,
+				method: 'GET'
+			}).then(res => {
+				console.log(JSON.stringify(res.data))
+				var name = "";
+				res.data.forEach(info => {
+					name += name.length > 0 ? ":" : "";
+					name += info.roleName;
+				})
+				that.roleName = name;
+			}).catch(err => {
+				console.log(err)
+			})
+		},
+		data() {
+			return {
+				roleName: '',
+				deptName: '',
+				downloadurl: '',
+			};
+		},
+		methods: {
+			logout() {
+				this.$u.func.logout();
+			},
+			checkVersion() {
+				// #ifdef APP-PLUS  
+				let that = this;
+				let postData = {};
+				postData['appId'] = plus.runtime.appid;
+				postData['version'] = plus.runtime.version;
+				http.request({
+					url: '/galaxy-business/version/check',
+					method: 'GET',
+					data: postData,
+				}).then(res => {
+					console.log(JSON.stringify(res))
+					if (res.data != null) {
+						if (res.data.updateStatus == 1) {
+							that.downloadurl = res.data.apkUrl;
+							uni.showModal({
+								title: "版本检查",
+								content: "有新的APP版本需要更新",
+								success: (res) => {
+									if (res.confirm) {
+										that.updateApp();
+									}
+								},
+							})
+						} else {
+							uni.showModal({
+								title: "提示",
+								content: "当前已是最新版本!",
+								showCancel: false,
+								success: (res) => {
+
+								}
+							})
+						}
+					}
+				}).catch(err => {
+					console.log(err)
+				})
+				// #endif  
+			},
+			updateApp() {
+				// #ifdef APP-PLUS  
+				let task = plus.downloader.createDownload(this.downloadurl, {},
+					function(d, status) {
+						//下载完成
+						if (status == 200) {
+							var path = plus.io.convertLocalFileSystemURL(d
+								.filename);
+							plus.runtime.install(path, {}, function() {
+								plus.nativeUI.closeWaiting();
+								uni.showModal({
+									title: "更新提示",
+									content: "安装已完成,APP需重新启动!",
+									showCancel: false,
+									success: (res) => {
+										plus.runtime.restart();
+									}
+								})
+							}, function(e) {
+								uni.showModal({
+									title: "更新提示",
+									content: "版本更新失败[" + e.code + "]:" + e.message,
+									mask: false,
+									duration: 1500,
+								})
+							})
+						} else {
+							uni.showModal({
+								title: "更新提示",
+								content: "下载安装包文件失败!",
+								mask: false,
+								duration: 1500,
+							})
+						}
+					}
+				)
+				task.addEventListener("statechanged", function(download, status) {
+					switch (download.state) {
+						case 1:
+							loadingDig.setTitle("开始下载");
+							break;
+						case 2:
+							loadingDig.setTitle("已连接");
+							break;
+						case 3:
+							//if (undefined != task.downloadedSize && null != task.downloadedSize && parseFloat(task
+							//	.downloadedSize) > 0.0) {
+							// let prg = parseInt((parseFloat(task
+							// 			.downloadedSize) /
+							// 		parseFloat(task.totalSize)
+							// 	) *
+							// 	100.0);
+							// if (undefined != prg && null != prg && (prg >= 0.0 && prg <= 100.0)) {
+							// 	loadingDig.setTitle("安装包下载 " + prg + "%");
+							// }
+							loadingDig.setTitle("安装包下载中...");
+							break;
+						case 4:
+							plus.nativeUI.closeWaiting();
+							break;
+					}
+				})
+				task.start();
+				var loadingDig = plus.nativeUI.showWaiting("开始下载安装包");
+				// #endif  
+			}
+		}
+
+	};
+</script>
+
+<style lang="scss">
+	.container {
+		background-color: #f7f7f7;
+		min-height: 100vh;
+		overflow: hidden;
+	}
+
+	.head {
+		position: relative;
+		top: 0;
+		left: 0;
+		z-index: 1;
+		// min-height: 582rpx;
+		min-height: 400rpx;
+		overflow: hidden;
+		background: #3F9EFF;
+
+		.set-icon {
+			vertical-align: middle;
+			width: 41rpx;
+			height: auto;
+			margin-right: 35rpx;
+		}
+
+		.head-bg {
+			position: absolute;
+			left: 0px;
+			top: 0px;
+			z-index: -1;
+			width: 750rpx;
+			height: 582rpx;
+			background: #0bb9c8;
+		}
+	}
+
+	.user-box {
+		display: flex;
+		justify-content: space-between;
+		padding: 0 20rpx 0 64rpx;
+		margin-top: 36rpx;
+
+		.left {
+			display: flex;
+			flex-direction: column;
+			align-items: center;
+
+			.avatar {
+				width: 128rpx;
+				height: 128rpx;
+				background: #ffffff;
+				border-radius: 50%;
+			}
+
+			.user-name {
+				margin-top: 20rpx;
+				font-size: 36rpx;
+				font-family: Source Han Sans CN;
+				font-weight: 500;
+				color: #ffffff;
+			}
+
+			.tag {
+				margin-top: 20rpx;
+				display: flex;
+				justify-content: center;
+				align-items: center;
+				padding: 5rpx 16rpx;
+				border: 1px solid #f5f5f5;
+				border-radius: 7rpx;
+
+				font-size: 19rpx;
+				font-family: Source Han Sans CN;
+				font-weight: 300;
+				color: #ffffff;
+			}
+		}
+
+		.edit-btn {
+			margin-top: 20rpx;
+			margin-bottom: 10px;
+			flex-shrink: 0;
+			display: flex;
+			justify-content: center;
+			align-items: center;
+
+			width: 165rpx;
+			height: 54rpx;
+			border: 2rpx solid #f5f5f5;
+			border-radius: 11rpx;
+
+			font-size: 27rpx;
+			font-family: Source Han Sans CN;
+			font-weight: 400;
+			color: #ffffff;
+		}
+	}
+
+	.nav {
+		display: flex;
+		//border-top: 2rpx solid #7dcdd6;
+		margin: 36rpx 38rpx 0;
+		padding: 36rpx 0 42rpx;
+
+		.nav-item {
+			width: calc(100% / 4);
+			display: flex;
+			flex-direction: column;
+			align-items: center;
+			justify-content: space-between;
+
+			font-size: 25rpx;
+			font-family: Source Han Sans CN;
+			font-weight: 400;
+			color: #ffffff;
+
+			&:not(:last-of-type) {
+				position: relative;
+
+				&::after {
+					position: absolute;
+					right: 0;
+					top: 50%;
+					transform: translateY(-50%);
+					content: '';
+					display: block;
+					width: 2rpx;
+					background-color: #3ac4d1;
+					height: 30rpx;
+				}
+			}
+
+			.icon {
+				width: 48rpx;
+				height: 48rpx;
+				margin-bottom: 6rpx;
+			}
+		}
+	}
+
+	.cell-box {
+		background: #ffffff;
+		margin: 18rpx;
+
+		.icon {
+			width: 32rpx;
+			height: 32rpx;
+			margin-right: 22rpx;
+		}
+	}
+</style>

+ 7 - 4
utils/func.js

@@ -9,8 +9,8 @@ const install = (Vue, vm) => {
 		uni.setStorageSync("SubSystemSelectInfo", {
 			subSystem: 1,
 		});
-		uni.switchTab({
-			url: '/pages/home/home'
+		uni.navigateBack({
+			delta: 1
 		})
 	}
 
@@ -23,8 +23,11 @@ const install = (Vue, vm) => {
 		})
 		vm.$u.vuex('accessToken', '')
 		vm.$u.vuex('isLogin', false)
-		uni.redirectTo({
-			url: '/pages/login/login-account'
+		// uni.redirectTo({
+		// 	url: '/pages/login/login-account'
+		// })
+		uni.navigateBack({
+			delta: 1
 		})
 	}