hmp 5 anni fa
parent
commit
a5ad4a9009
100 ha cambiato i file con 2921 aggiunte e 2595 eliminazioni
  1. 28 30
      App.vue
  2. 29 1
      assets/colorui/app.css
  3. 98 124
      assets/http/api.js
  4. 39 14
      assets/http/service.js
  5. 1 1
      assets/js/tabbar.js
  6. 10 2
      components/hot-consult/hot-consult.vue
  7. 5 5
      components/infomation/infomation.vue
  8. 2 2
      components/keyboard-package/keyboard-package.vue
  9. 4 1
      components/mescroll-body/mescroll-mixins.js
  10. 2 2
      components/mescroll-body/mescroll-uni-option.js
  11. 63 12
      main.js
  12. 292 299
      package-lock.json
  13. 80 19
      pages.json
  14. 92 68
      pages/auth/auth.vue
  15. 15 10
      pages/company/company.vue
  16. 2 2
      pages/device/device.vue
  17. 1 1
      pages/index/access-record/comps/card.vue
  18. 15 12
      pages/index/agency/agency.vue
  19. 0 204
      pages/index/car/car.vue
  20. 5 5
      pages/index/car/comps/card.vue
  21. 3 1
      pages/index/car/comps/item.vue
  22. 1 1
      pages/index/car/detail.vue
  23. 11 4
      pages/index/car/list.vue
  24. 11 7
      pages/index/fire/alarm-record.vue
  25. 22 12
      pages/index/fire/detail.vue
  26. 15 6
      pages/index/fire/list/comps/card.vue
  27. 1 1
      pages/index/fire/list/list.vue
  28. 228 90
      pages/index/index.vue
  29. 14 8
      pages/index/myinfo/myinfo.vue
  30. 1 1
      pages/index/notice/add.vue
  31. 15 5
      pages/index/notice/list.vue
  32. 1 1
      pages/index/staff-temperature/comps/item.vue
  33. 3 3
      pages/index/staff-temperature/detail.vue
  34. 3 3
      pages/index/staff-temperature/list.vue
  35. 5 5
      pages/index/staffAudit/comps/card.vue
  36. 13 19
      pages/index/staffAudit/comps/item.vue
  37. 41 26
      pages/index/staffAudit/detail.vue
  38. 20 26
      pages/index/staffAudit/list.vue
  39. 545 445
      pages/login/login.vue
  40. 657 30
      pages/login/login1.vue
  41. 73 52
      pages/mine/changePass/changePass.vue
  42. 11 5
      pages/mine/editPhone/editPhone.vue
  43. 21 8
      pages/mine/feedback/feedback.vue
  44. 3 1
      pages/mine/mine-info/mine-info.vue
  45. 291 340
      pages/mine/mine.vue
  46. 2 4
      pages/mine/protocol/protocol.vue
  47. 26 147
      pages/test/test.vue
  48. 99 147
      pages/test/test1.vue
  49. 1 1
      router.js
  50. BIN
      static/empty.png
  51. BIN
      static/index/blue/avatar1.png
  52. BIN
      static/index/blue/change-phone.png
  53. BIN
      static/index/blue/changePsw.png
  54. BIN
      static/index/blue/contact.png
  55. BIN
      static/index/blue/dingyue.png
  56. BIN
      static/index/blue/face.png
  57. BIN
      static/index/blue/fankui.png
  58. BIN
      static/index/blue/healthcode.png
  59. BIN
      static/index/blue/msg.png
  60. BIN
      static/index/blue/setting.png
  61. BIN
      static/index/blue/shenfen.png
  62. BIN
      static/index/blue/shuoming.png
  63. BIN
      static/index/blue/touxiang.png
  64. BIN
      static/index/blue/wuye.png
  65. BIN
      static/index/blue/xieyi1.png
  66. BIN
      static/index/fire/dianbiao.png
  67. BIN
      static/index/fire/dianchi.png
  68. BIN
      static/index/fire/more.png
  69. BIN
      static/index/fire/ranqi.png
  70. BIN
      static/index/fire/ranqi2.png
  71. BIN
      static/index/fire/xiaofang.png
  72. BIN
      static/index/fire/yangan.png
  73. BIN
      static/index/fire/yanwu.png
  74. BIN
      static/index/fire/yanwu1.png
  75. BIN
      static/index/gander/car.png
  76. BIN
      static/index/gander/cewen.png
  77. BIN
      static/index/gander/cewen1.png
  78. BIN
      static/index/gander/notice.png
  79. BIN
      static/index/gander/qiye.png
  80. BIN
      static/index/gander/renzheng.png
  81. BIN
      static/index/gander/renzheng1.png
  82. BIN
      static/index/gander/tongxing.png
  83. BIN
      static/index/top.jpg
  84. BIN
      static/login/2.png
  85. BIN
      static/login/3.png
  86. BIN
      static/login/qiye1.png
  87. BIN
      static/login/sj.png
  88. BIN
      static/login/xinyong1.png
  89. BIN
      static/login/yuanqu.png
  90. BIN
      static/login/yz.png
  91. BIN
      static/tarbar/index.png
  92. BIN
      static/tarbar/index0.png
  93. BIN
      static/tarbar/menjin.png
  94. BIN
      static/tarbar/menjin0.png
  95. BIN
      static/tarbar/my.png
  96. BIN
      static/tarbar/my0.png
  97. 1 0
      uni.scss
  98. 0 243
      utils/md5.js
  99. 0 88
      utils/my-request/adapters/index.js
  100. 0 51
      utils/my-request/core/InterceptorManager.js

+ 28 - 30
App.vue

@@ -1,37 +1,35 @@
 <script>
 	export default {
 		onLaunch: function() {
-			//更新版本
-			const updateManager = uni.getUpdateManager();
-			
-			updateManager.onCheckForUpdate(function (res) {
-			  // 请求完新版本信息的回调
-			  console.log("是否有新版本:",res.hasUpdate);
-			});
-			updateManager.onUpdateReady(function (res) {
-			  uni.showModal({
-			    title: '更新提示',
-			    content: '新版本已经准备好,是否重启应用?',
-			    success(res) {
-			      if (res.confirm) {
-			        // 新的版本已经下载好,调用 applyUpdate 应用新版本并重启
-			        updateManager.applyUpdate();
-			      }
-			    }
-			  });
-			
-			});
-			
-			updateManager.onUpdateFailed(function (res) {
-			  // 新的版本下载失败
-			});
-		},
-		onShow: function() {
-			console.log('App Show')
-		},
-		onHide: function() {
-			console.log('App Hide')
+			this.updateApp()
 		},
+		methods:{
+			//更新版本
+			updateApp(){
+				const updateManager = uni.getUpdateManager();
+				updateManager.onCheckForUpdate(function (res) {
+				  // 请求完新版本信息的回调
+				  console.log("是否有新版本:",res.hasUpdate);
+				});
+				updateManager.onUpdateReady(function (res) {
+				  uni.showModal({
+				    title: '更新提示',
+				    content: '新版本已经准备好,是否重启应用?',
+				    success(res) {
+				      if (res.confirm) {
+				        // 新的版本已经下载好,调用 applyUpdate 应用新版本并重启
+						uni.clearStorageSync()
+				        updateManager.applyUpdate();
+				      }
+				    }
+				  });
+				
+				});
+				updateManager.onUpdateFailed(function (res) {
+				  // 新的版本下载失败
+				});
+			},
+		}
 	}
 </script>
 

+ 29 - 1
assets/colorui/app.css

@@ -1,9 +1,37 @@
 /* 新邻园区 */
 .base-bg-color{
-	background-color: #59a5f0;
+	background-color: #5064eb;
 	color: #FFFFFF;
 }
 
+.base-color{
+	color:#5064eb
+}
+
+.base-line{
+	font-weight: 800;
+	color: #5064eb;
+	border: 1rpx solid #5064eb;
+}
+
+.red-line{
+	font-weight: 800;
+	color: #da0000;
+	border: 1rpx solid #da0000;
+}
+
+.text-wait{
+	color: #ea7500;
+}
+
+.text-pass{
+	color: #12914f;
+}
+
+.text-fail{
+	color: #da0000;
+}
+
 /* ===========padding=========== */
 .padding-10,.padding-sm{
 	padding: 10rpx;

+ 98 - 124
assets/http/api.js

@@ -1,22 +1,19 @@
 import {http} from './service.js'
 
 //文件上传
-let uploadFileUrl='/upload/putfile'
 const uploadFile={
-	submit:p => http.upload(uploadFileUrl, {name:'file',filePath:p}),
+	submit:p => http.upload('/upload/putfile', {name:'file',filePath:p}),
 }
 
-//短信Url
-let SMSUrl={
-	sendSms:'huawei/sms/sendSms',
-	validCode:'huawei/sms/validCode'
-}
 //短信api
 const SMSApi = {
-	sendSms:p => http.post(SMSUrl.sendSms+p),
-	validCode:p => http.post(SMSUrl.validCode+p),
+	sendSms:p => http.post('huawei/sms/sendSms'+p),
+	validCode:p => http.post('huawei/sms/validCode'+p),
 }
 
+//字典
+const dict=p => http.get('/blade-system/dict-biz/dictionary',{params:p})
+
 
 //微信基本参数
 let wxData={
@@ -28,198 +25,173 @@ let wxData={
 	secret:'30f9cf566aa57892e55aee0406356b9e',
 	subscribe_grant_type:'client_credential', //订阅消息的grant_type
 }
-//微信url
-let wxUrl={
-	subscribe:'/wx/msgSend',
-	getAccessToken:'/wx/getAccessToken',
-	getOpenId:'/wx/getOpenId',
-	
-	getAppletStatus:'appconf/appconf/getById',
-}
+
 //微信api
 const wxApi = {
-	subscribe:p => http.post(wxUrl.subscribe, p),
-	getAccessToken:p => http.get(wxUrl.getAccessToken, {params:p}),
-	getOpenId:p => http.get(wxUrl.getOpenId, {params:p}),
-	
+	subscribe:p => http.post('/wx/msgSend', p),
+	getAccessToken:p => http.get('/wx/getAccessToken', {params:p}),
+	getOpenId:p => http.get('/wx/getOpenId', {params:p}),
 	//获取小程序的audit状态
-	getAppletStatus:p => http.get(wxUrl.getAppletStatus, {params:p}),
+	getAppletStatus:p => http.get('appconf/appconf/getById', {params:p}),
 }
 
+//登录
+const login=p => http.post('community/enterprisestaff/app/login', p)
+
+//修改密码
+const updatePassword=p => http.post('community/enterprisestaff/app/updatePassword'+p)
+
+//获取管理员的openid集合
+const getManagerOpenList=p => http.get('/community/enterprisestaff/app/getManagerList',{params:p})
+
+
+//获取token
+const getToken=p => http.post('blade-auth/oauth/token'+p,{},{header: {"Authorization": "Basic c2FiZXI6c2FiZXJfc2VjcmV0"}})
 
 //园区api
-let agencyUrl={
-	page:'/agency/agency/getAgencyList',
-	submit:'/agency/agency/submit'
-}
 const agency = {
-	page:p => http.get(agencyUrl.page, {params:p}),
-	submit:p => http.post(agencyUrl.submit, p),
+	getAgencyTenantList:p => http.get('agency/agency/getAgencyTenantList', {params:p}),
+	page:p => http.get('/agency/agency/getAgencyList', {params:p}),
+	submit:p => http.post('/agency/agency/submit', p),
 }
 //区域api
-let residentialUrl={
-	page:'/community/residential/listByAgencyId'
-}
 const residential = {
-	page:p => http.get(residentialUrl.page, {params:p}),
+	page:p => http.get('/community/residential/listByAgencyId', {params:p}),
 }
 
 //企业api
-let enterpriseUrl={
-	page:'/enterprise/enterprise/list',
-	detail:'/enterprise/enterprise/detail',
-	submit:'/enterprise/enterprise/submit'
-}
 const enterprise = {
-	page:p => http.get(enterpriseUrl.page, {params:p}),
-	detail:p => http.get(enterpriseUrl.detail, {params:p}),
-	submit:p => http.post(enterpriseUrl.submit, p),
+	page:p => http.get('/enterprise/enterprise/list', {params:p}),
+	detail:p => http.get('/enterprise/enterprise/detail', {params:p}),
+	submit:p => http.post('/enterprise/enterprise/submit', p),
 }
 
 //企业员工
-let enterprisestaffUrl={
-	page:'/community/enterprisestaff/getEnterpriseList',
-	submit:'/community/enterprisestaff/submit',
-	detail:'/community/enterprisestaff/detail'
-}
 const enterprisestaff = {
-	page:p => http.get(enterprisestaffUrl.page, {params:p}),
-	detail:p => http.get(enterprisestaffUrl.detail, {params:p}),
-	submit:p => http.post(enterprisestaffUrl.submit, p),
+	page:p => http.get('/community/enterprisestaff/getEnterpriseList', {params:p}),
+	detail:p => http.get('/community/enterprisestaff/detail', {params:p}),
+	submit:p => http.post('/community/enterprisestaff/submit', p),
 }
 
 //CMS
-let CMSUrl={
-	page:'/estate/article/list',
-	detail:'/estate/article/detail',
-	addReaderCount:'/estate/article/addReaderCount'
-}
 const CMS={
-	page:p => http.get(CMSUrl.page, {params:p}),
-	detail:p => http.get(CMSUrl.detail, {params:p}),
-	addReaderCount:p => http.post(CMSUrl.addReaderCount, p),
+	page:p => http.get('/estate/article/list', {params:p}),
+	detail:p => http.get('/estate/article/detail', {params:p}),
+	addReaderCount:p => http.post('/estate/article/addReaderCount', p),
 }
 
 //banner 轮播图
-let bannerUrl={
-	page:'/estate/banners/list'
-}
 const banner={
-	page:p => http.get(bannerUrl.page, {params:p}),
+	page:p => http.get('/estate/banners/list', {params:p}),
 }
 
-
-
 //消防设备
-let fireDeviceUrl={
-	page:'/smartapplication/smartdevice/list',
-	agencyPage:'/smartapplication/smartdevice/getDeviceList',
-	alarmRecord:'/smartapplication/smartdevice/getAlarmRecord',
-	//电表抄表记录
-	electricmeterrecord:'/electricmeterrecord/electricmeterrecord/list'
-}
 const fireDevice={
 	//企业角色的设备列表接口
-	page:p => http.get(fireDeviceUrl.page, {params:p}),
+	page:p => http.get('/smartapplication/smartdevice/list', {params:p}),
 	//园区角色的设备列表接口
-	agencyPage:p => http.get(fireDeviceUrl.agencyPage, {params:p}),
+	agencyPage:p => http.get('/smartapplication/smartdevice/getDeviceList', {params:p}),
 	//报警记录接口
-	alarmRecord:p => http.get(fireDeviceUrl.alarmRecord, {params:p}),
+	alarmRecord:p => http.get('/smartapplication/smartdevice/getAlarmRecord', {params:p}),
 	//电表抄表记录
-	electricmeterrecord:p => http.get(fireDeviceUrl.electricmeterrecord, {params:p}),
+	electricmeterrecord:p => http.get('/electricmeterrecord/electricmeterrecord/list', {params:p}),
 }
 //用户反馈
-let feedbackUrl={
-	submit:'/estate/feedback/submit'
-}
 const feedback = {
-	submit:p => http.post(feedbackUrl.submit, p),
+	submit:p => http.post('/estate/feedback/submit', p),
 }
 //园区公告
-let noticeUrl={
-	page:'/estate/parknotice/list',
-	remove:'/estate/parknotice/remove',
-	submit:'/estate/parknotice/save'
-}
 const notice = {
-	page:p => http.get(noticeUrl.page, {params:p}),
-	remove:p => http.post(noticeUrl.remove+p),
-	submit:p => http.post(noticeUrl.submit, p),
+	page:p => http.get('/estate/parknotice/list', {params:p}),
+	remove:p => http.post('/estate/parknotice/remove?ids='+p),
+	submit:p => http.post('/estate/parknotice/save', p),
 }
 
 //测温记录
-let temperatureRecordUrl={
-	page:'/smartapplication/temperaturerecord/getTemperatureRecord'
-}
 const temperatureRecord = {
-	page:p => http.get(temperatureRecordUrl.page, {params:p}),
+	page:p => http.get('/smartapplication/temperaturerecord/getTemperatureRecord', {params:p}),
 }
 
-
 //健康码
-let healthCodeUrl={
-	getCode:'/health/getCode'
-}
 const healthCode = {
-	getCode:p => http.post(healthCodeUrl.getCode, p)
+	getCode:p => http.post('/health/getCode', p)
 }
 
- //车辆出入
- let carUrl={
+ const car = {
 	 //出入记录
-	 condition:'carenterrecord/carenterrecord/queryRecord',
+	 condition:p => http.get('carenterrecord/carenterrecord/queryRecord', {params:p}),
 	 //入场记录
-	 enterPage:'/carenterrecord/carenterrecord/list',
+	 enterPage:p => http.get('/carenterrecord/carenterrecord/list', {params:p}),
 	 //出场记录
-	 outPage:'/caroutrecord/caroutrecord/list'
- }
- const car = {
-	 page:p => http.get(carUrl.page, {params:p}),
-	 condition:p => http.get(carUrl.condition, {params:p}),
-	 enterPage:p => http.get(carUrl.enterPage, {params:p}),
-	 outPage:p => http.get(carUrl.outPage, {params:p}),
+	 outPage:p => http.get('/caroutrecord/caroutrecord/list', {params:p}),
+	 
+	 //车辆列表
+	 carList:p => http.get('/community/car/app/list', {params:p}),
+	 //添加车辆
+	 carAdd:p => http.post('/community/car/submit', p),
+	 //删除车辆
+	 carRemove:p => http.post('/community/car/remove?ids='+p),
+	 //车辆审核
+	 carAudit:p => http.post('/community/car/audit', p),
  }
- 
+
  //开门设备
- let deviceUrl={
-	 page:'facedevice/facedevice/list',
-	 open:'facedevice/facedevice/remoteOpenDoor'
- }
- 
  const device={
-	 page:p => http.get(deviceUrl.page, {params:p}),
-	 open:p => http.post(deviceUrl.open, p)
+	 page:p => http.get('facedevice/facedevice/list', {params:p}),
+	 open:p => http.post('facedevice/facedevice/remoteOpenDoor', p)
  }
  
  //园区统计
- let statisticalUrl={
-	 //当日动态数据
-	 todayData:'/statistics/screen/park/todayData'
- }
  const statistical={
- 	 todayData:p => http.get(statisticalUrl.todayData, {params:p}),
+	 //园区信息统计
+	 agencyStatistical:p => http.get('/statistics/agency', {params:p}),
+	 //当日动态数据
+ 	 todayData:p => http.get('/statistics/screen/park/todayData', {params:p}),
+	 //人员进出记录
+	 carTendency:p => http.get('statistics/screen/park/carTendency', {params:p}),
+	 //三十天内用电量
+	 electricMeterStatic:p => http.get('statistics/electricMeterStatic', {params:p}),
+	 //消防设备数据统计
+	 getGateStatic:p => http.get('smartapplication/smartdevice/getFireStatic', {params:p}),
+	 //消防场景告警事件统计
+	 getDeviceJobStaticByApp:p => http.get('jobs/devicejob/getDeviceJobStaticByApp', {params:p}),
+	  
  }
  
  //出入记录
- let accessrecordUrl={
- 	 page:'/community/accessrecord/list'
- }
  const accessrecord={
- 	 page:p => http.get(accessrecordUrl.page, {params:p}),
+ 	 page:p => http.get('/community/accessrecord/list', {params:p}),
+ }
+ 
+ //访客授权
+ const guest={
+	 submit:p => http.post('estate/guest/application', p),
+	 page:p => http.get('estate/guest/list', {params:p}),
+	 getByGuestOpenId:p => http.get('/estate/guest/getByGuestOpenId', {params:p}),
+	 check:p => http.post('estate/guest/check', p),
  }
  
  
  
-
 export const api={
 	//上传文件
 	uploadFile,
 	//短信
 	SMSApi,
+	//字典
+	dict,
 	//微信基本参数
 	wxData,
 	//微信api
 	wxApi,
+	//登录
+	login,
+	//修改密码
+	updatePassword,
+	//获取管理员的openid集合
+	getManagerOpenList,
+	//获取token
+	getToken,
 	//园区
 	agency,
 	//区域
@@ -249,6 +221,8 @@ export const api={
 	//统计
 	statistical,
 	//出入记录
-	accessrecord
+	accessrecord,
+	//访客授权
+	guest
 	
 }

+ 39 - 14
assets/http/service.js

@@ -1,12 +1,14 @@
-import Request from '../../utils/my-request/index.js'
+import Request from 'luch-request'
+import util from '../../utils/util.js'
 
-
-// let	baseURL = 'http://192.168.1.117:9527/'
+// let	baseURL = 'http://192.168.1.244:9527/'
 
 let	baseURL = 'https://park.58fo.com/api/'
 
-let tokenUrl=baseURL+"blade-auth/oauth/token?tenantId=804981&password=ea3c40c0df5477c525543b0e85548004&username=wpadmin"
-
+const getTokenUrl=()=>{
+	let tokenObj=uni.getStorageSync("tokenObj")
+	return baseURL+`blade-auth/oauth/token?tenantId=${tokenObj.tenantId}&password=${tokenObj.password}&username=${tokenObj.username}`
+}
 //获取token
 const getTokenStorage = () => {
   let token = ''
@@ -16,6 +18,10 @@ const getTokenStorage = () => {
   }
   return token
 }
+
+//不需要加上Blade-Auth的url
+const WHiTE_LIST=['agency/agency/getAgencyTenantList'] 
+
 const http = new Request()
 http.setConfig((config) => { /* 设置全局配置 */
   config.baseURL = baseURL  /* 根域名不同 */
@@ -24,10 +30,13 @@ http.setConfig((config) => { /* 设置全局配置 */
   }
   return config
 })
+
 http.interceptors.request.use((config) => { /* 请求之前拦截器。可以使用async await 做异步操作 */
-  config.header = {
-    ...config.header,
-    "Blade-Auth": getTokenStorage()
+  if (!WHiTE_LIST.includes(config.url)) {
+  	config.header = {
+  	  ...config.header,
+  	  "Blade-Auth": getTokenStorage()
+  	}
   }
   return config
 }, (config) => {
@@ -44,8 +53,23 @@ http.interceptors.response.use(async (response) => { /* 请求之后拦截器。
           if (!isRefreshing) {
               isRefreshing = true
               let token = uni.getStorageSync('token')
+			  let url=getTokenUrl()
+			  if (url.indexOf('tenantId=undefined')>0) {
+					uni.showModal({
+						content:"会话过期,请重新登录",
+							title:"提示",
+							showCancel:false,
+							success(resp) {
+								uni.clearStorageSync()
+								uni.reLaunch({
+									url:"/pages/login/login"
+								})
+							}
+					})
+					return
+			  }
               let [,res] = await uni.request({
-                  url: tokenUrl,
+                  url,
                   method: 'POST',
                   header:{
                   	Authorization:"Basic c2FiZXI6c2FiZXJfc2VjcmV0"
@@ -68,11 +92,12 @@ http.interceptors.response.use(async (response) => { /* 请求之后拦截器。
               })
           }
       }
-	  //200 返回数据成功 0 上传文件成功 400 没有相关数据
-      if (response.data.code != 200 && response.data.code !=400 && response.data.code !=0) {
-        return Promise.reject(response)
-      }
-      return response.data
+	  //200 返回数据成功 0 上传文件成功 400 没有相关数据 || response.data.buildingCount 数据统计的~晕~~~~
+      if (response.data.code == 200 || response.data.buildingCount!=undefined || response.data.code ==400 || response.data.code ==0 || response.data.access_token!=undefined) {
+		  return response.data
+      }else{
+		  return Promise.reject(response)
+	  }
   }, (err) => { // 请求错误做点什么
       uni.showToast({
           icon: 'none',

+ 1 - 1
assets/js/tabbar.js

@@ -1,6 +1,6 @@
 export  const tabbar = {
 		inactiveColor:"#8a8a8a",
-		activeColor:"#59a5f0",
+		activeColor:"#5064eb",
 		bgColor:"#ffffff",
 		midButton:true,
 		iconSize:44,

+ 10 - 2
components/hot-consult/hot-consult.vue

@@ -3,12 +3,20 @@
 		<view class="container">
 			<view class="flex justify-between" >
 				<block>
-					<view class="cu-avatar text-font"  style="background-image:url(http://139.9.103.171:1888/miniofile/app/notice.png);"></view>
+					<view class="flex flex-direction justify-center align-center" style="width: 120rpx;padding-left: 20rpx;">
+						<view class="base-color text-bold" style="font-family:Arial, Helvetica, sans-serif;font-size: 32rpx;">
+							园区
+						</view>
+						<view class="text-bold" style="font-family:Arial, Helvetica, sans-serif;font-size: 32rpx;">
+							公告
+						</view>
+					</view>
+					<!-- <view class="cu-avatar text-font"  style="background-image:url(http://139.9.103.171:1888/miniofile/app/notice.png);"></view> -->
 					<view class="margin-top-xs" style="width: 680rpx">
 						<swiper :circular="true" class="swiper" autoplay="true" vertical="true" interval="5000" next-margin="46rpx">
 							<swiper-item v-for="(item, index) in swiperTexts" :key="index" @click="detailTap(item)">
 								<view class="swiper-item" > 
-									<text class="text-orange cuIcon-title padding-right-sm"></text>
+									<text class="base-color text-bold cuIcon-title padding-right-sm"></text>
 									<text>{{item.title}} : {{item.notice | formatHtml}}</text>
 								</view>
 							</swiper-item>

+ 5 - 5
components/infomation/infomation.vue

@@ -6,7 +6,7 @@
 				<image   mode="aspectFill" class="uni-media-list-logo-left" :src="item.image"></image>
 	            <view class="uni-media-list-body" style="height: 180rpx;">
 	                <view class="uni-media-list-text-top text-cut-2">{{item.title}}</view>
-					<view class="text-sm text-cut-2" style="color: #464646;">
+					<view class=" text-cut-2" style="color: #757575;font-size: 24rpx;">
 						<text>{{item.article | formatHtml}}</text>
 						<!-- <rich-text :nodes="item.article"></rich-text> -->
 					</view>
@@ -131,7 +131,7 @@
 	.uni-media-list-text-bottom {
 	    line-height: 30upx;
 	    font-size: 26upx;
-	    color: #8f8f94;
+	    color: #999;
 	}
 	
 	.uni-media-list-logo-left {
@@ -159,11 +159,11 @@
 	
 	.uni-media-list-text-top {
 	    width: 100%;
-	    line-height: 36upx;
+	    line-height: 50upx;
 	    height: 50upx;
-	    font-size: 26upx;
-		font-weight: 800;
+	    font-size: 32upx;
 	    overflow: hidden;
+		color: #000000;
 	}
 	
 	.uni-media-list-text-bottom {

+ 2 - 2
components/keyboard-package/keyboard-package.vue

@@ -175,7 +175,7 @@
 				}
 
 				.confirem {
-					background-color: #1989fa;
+					background-color: $base-color;
 					color: #FFFFFF;
 
 					&.active {
@@ -245,7 +245,7 @@
 
 			&>view {
 				padding: 0 45rpx;
-				color: #00a7ea;
+				color: $base-color;
 				height: 100%;
 				display: flex;
 				align-items: center;

+ 4 - 1
components/mescroll-body/mescroll-mixins.js

@@ -10,7 +10,10 @@ const MescrollMixin = {
 	// },
 	data() {
 		return {
-			mescroll: null //mescroll实例对象
+			mescroll: null, //mescroll实例对象
+			downOption:{
+				auto:false
+			}
 		}
 	},
 	// 注册系统自带的下拉刷新 (配置down.native为true时生效, 还需在pages配置enablePullDownRefresh:true;详请参考mescroll-native的案例)

+ 2 - 2
components/mescroll-body/mescroll-uni-option.js

@@ -27,8 +27,8 @@ const GlobalOption = {
 		},
 		empty: {
 			use: true, // 是否显示空布局
-			icon: "http://139.9.103.171:1888/miniofile/xlyq/empty/empty.png", // 图标路径 (建议放入static目录, 如 /static/img/mescroll-empty.png )
-			tip: '数据为空' // 提示
+			icon: "/static/empty.png", // 图标路径 (建议放入static目录, 如 /static/img/mescroll-empty.png )
+			tip: '暂无数据' // 提示
 		}
 	}
 }

+ 63 - 12
main.js

@@ -1,28 +1,59 @@
 import Vue from 'vue'
 import App from './App'
+import store from '@/store';
 
 //引入uview组件库
 import uView from 'uview-ui';
 Vue.use(uView);
 
+//mescroll刷新组件
 import MescrollBody from "@/components/mescroll-body/mescroll-body.vue"
 Vue.component('mescroll-body', MescrollBody)
 
+//vuex
+let vuexStore = require("@/store/$u.mixin.js");
+Vue.mixin(vuexStore);
+
 //引入路由拦截
-import {router,RouterMount} from './router.js'  //路径换成自己的
-Vue.use(router)
+// import {router,RouterMount} from './router.js'  
+// Vue.use(router)
 
 //封装api
 import { api } from 'assets/http/api.js' 
 Vue.prototype.$api = api
-//引入util.js
-import Util from 'utils/util.js'
-Vue.prototype.$util = Util
 
 //封装缓存
 import simpleCache from "@/utils/cache.js"
 Vue.prototype.$cache = simpleCache
 
+//封装日期时间工具类
+import dateTime from 'utils/dateTime.js'
+Vue.prototype.$dateTime = dateTime
+
+//封装提示工具
+import dialog from 'utils/dialog.js'
+Vue.prototype.$dialog = dialog
+
+//全局变量
+import Global from './utils/global'
+Vue.prototype.$global = Global
+
+// 全局注入
+import Mixin from './utils/mixin'
+Vue.mixin(Mixin)
+
+// 微信函数封装
+import Mpi from './utils/mpi'
+Vue.prototype.$mpi = Mpi
+
+//引入工具类
+import util from 'utils/util.js'
+Vue.prototype.$util = util
+
+//校验文件
+import verify from 'utils/verify.js'
+Vue.prototype.$verify = verify
+
 //登陆类型
 Vue.prototype.$loginType={
 	STAFF:'staff',
@@ -40,14 +71,27 @@ Vue.prototype.$device_type={
 	ELECTRIC_METER:'100030'//电表
 }
 
-//订阅消息模板
-Vue.prototype.$tmplIds=['QeE-CxbJGd05fo0lGkVa39wj3L5rKeXZclFsyC4am00']
+//员工消息模板
+Vue.prototype.$staffTmplIds=[
+	//审核结果通知。可用于员工认证审核和访客申请审核
+	'QeE-CxbJGd05fo0lGkVa33OLqYulzy0WLnUZg3DeRM8'
+]
+
+//管理员消息模板
+Vue.prototype.$adminTmplIds=[
+	//设备告警通知
+	'xfsqjKLVz_P8dBIpdP91uGx709hE7b3k99gqm3wUwMU',
+	//访客申请开门通知
+	'3nd5TxKeVg9iZ5uQRi0R16D8RhCPQifUcfVUOo1ER1Y',
+	//员工认证通知
+	'enS3r9XGVNq0go-7l3dU17MONZwEVISqMvDLPmKcxFc'
+]
+
+
+
 //小程序版本
-Vue.prototype.$miniprogramState={
-	DEVELOPER:'developer', //开发版
-	TRIAL:'trial', //体验版
-	FORMAL:'formal',//正式版
-}
+Vue.prototype.$miniprogramState='formal'
+// Vue.prototype.$miniprogramState='trial'
 
 //封装提示框
 Vue.prototype.$showModel = (content,isShowCancel=true,title='提示',)=>{
@@ -73,6 +117,12 @@ Vue.prototype.$showToast=function(title,type,position){
 	})
 }
 
+Vue.prototype.$navigateBack=(delta=1)=>{
+	uni.navigateBack({
+		delta
+	})
+}
+
 //是否认证登陆
 Vue.prototype.$isAuth=()=>{
 	return simpleCache.get('loginType')
@@ -142,6 +192,7 @@ Vue.config.productionTip = false
 App.mpType = 'app'
 
 const app = new Vue({
+	store,
     ...App
 })
 //v1.3.5起 H5端 你应该去除原有的app.$mount();使用路由自带的渲染方式

File diff suppressed because it is too large
+ 292 - 299
package-lock.json


+ 80 - 19
pages.json

@@ -3,13 +3,13 @@
 		"^u-(.*)": "@/uview-ui/components/u-$1/u-$1.vue"
 	},
 	"pages": [ 
-		
-		
 		{
 		    "path" : "pages/login/login",
 			"name":"login",
 		    "style" :                                                                                    
-		    {
+		    {
+				"navigationBarTextStyle":"white",
+				"navigationBarBackgroundColor":"#5064eb",
 		        "navigationBarTitleText": "登陆",
 		        "enablePullDownRefresh": false
 		    }
@@ -37,8 +37,10 @@
             "path" : "pages/mine/mine",
 			"name":"mine",
             "style" :                                                                                    
-            {
-				"navigationBarTitleText":"个人中心",
+            {
+				"navigationBarTextStyle":"white",
+				"navigationBarBackgroundColor":"#5064eb",
+				"navigationBarTitleText": "我的",
                 "enablePullDownRefresh": false
             }
             
@@ -65,10 +67,13 @@
             
         }
         ,{
-            "path" : "pages/test/test",
+            "path" : "pages/test/test",
+			"name" : "test",
             "style" :                                                                                    
-            {
-                "navigationBarTitleText": "",
+            {
+				"navigationBarTextStyle":"white",
+				"navigationBarBackgroundColor":"#5064eb",
+				"navigationBarTitleText": "我的",
                 "enablePullDownRefresh": false
             }
             
@@ -148,7 +153,7 @@
             "style" :                                                                                    
             {
 				"navigationBarTextStyle":"white",
-				"navigationBarBackgroundColor":"#59a5f0",
+				"navigationBarBackgroundColor":"#5064eb",
 				"navigationBarTitleText": "通行记录",
 				"enablePullDownRefresh": false
             }
@@ -180,7 +185,7 @@
             "style" :                                                                                    
             {
 				"navigationBarTextStyle":"white",
-				"navigationBarBackgroundColor":"#59a5f0",
+				"navigationBarBackgroundColor":"#5064eb",
                 "navigationBarTitleText": "门禁",
                 "enablePullDownRefresh": false
             }
@@ -212,7 +217,7 @@
             "style" :                                                                                    
             {
 				"navigationBarTextStyle":"white",
-				"navigationBarBackgroundColor":"#59a5f0",
+				"navigationBarBackgroundColor":"#5064eb",
 				"navigationBarTitleText": "员工审核",
 				"enablePullDownRefresh": false
             }
@@ -225,7 +230,7 @@
             "style" :                                                                                    
             {
                 "navigationBarTextStyle":"white",
-                "navigationBarBackgroundColor":"#59a5f0",
+                "navigationBarBackgroundColor":"#5064eb",
                 "navigationBarTitleText": "审核详情",
                 "enablePullDownRefresh": false
             }
@@ -313,7 +318,8 @@
         ,{
             "path" : "pages/index/agency/agency",
             "style" :                                                                                    
-            {
+            {
+				
                 "navigationBarTitleText": "园区信息",
                 "enablePullDownRefresh": false
             }
@@ -342,7 +348,7 @@
             "style" :                                                                                    
             {
                "navigationBarTextStyle":"white",
-               "navigationBarBackgroundColor":"#59a5f0",
+               "navigationBarBackgroundColor":"#5064eb",
                "navigationBarTitleText": "测温记录",
                "enablePullDownRefresh": false
             }
@@ -358,7 +364,16 @@
             
         }
         ,{
-            "path" : "pages/index/car/car",
+            "path" : "pages/index/car/detail",
+            "style" :                                                                                    
+            {
+                "navigationBarTitleText": "记录详情",
+                "enablePullDownRefresh": false
+            }
+            
+        }
+        ,{
+            "path" : "pages/index/car/list",
             "style" :                                                                                    
             {
                 "navigationBarTitleText": "车辆记录",
@@ -367,23 +382,69 @@
             
         }
         ,{
-            "path" : "pages/index/car/detail",
+            "path" : "pages/guest/guest",
             "style" :                                                                                    
             {
-                "navigationBarTitleText": "记录详情",
                 "enablePullDownRefresh": false
             }
             
         }
         ,{
-            "path" : "pages/index/car/list",
+            "path" : "pages/guest/records/records",
             "style" :                                                                                    
             {
-                "navigationBarTitleText": "车辆记录",
+                "navigationBarTitleText": "申请记录",
+                "enablePullDownRefresh": false
+            }
+            
+        }
+        ,{
+            "path" : "pages/guest/open-door/open-door",
+            "style" :                                                                                    
+            {
+                "navigationBarTitleText": "门禁",
                 "enablePullDownRefresh": false
             }
             
         }
+        ,{
+            "path" : "pages/index/car/my-car/my-car",
+            "style" :                                                                                    
+            {
+                "navigationBarTitleText": "我的车辆",
+                "enablePullDownRefresh": false
+            }
+            
+        }
+        ,{
+            "path" : "pages/index/car/my-car/add",
+            "style" :                                                                                    
+            {
+                "navigationBarTitleText": "添加车辆",
+                "enablePullDownRefresh": false
+            }
+            
+        }
+        ,{
+            "path" : "pages/index/car/car-manager/car-manager",
+            "style" :                                                                                    
+            {
+                "navigationBarTitleText": "车辆管理",
+                "enablePullDownRefresh": false
+            }
+            
+        }
+        ,{
+            "path" : "pages/agency/agency",
+            "style" :                                                                                    
+            {
+				"navigationBarTextStyle":"white",
+				"navigationBarBackgroundColor":"#5064eb",
+				"navigationBarTitleText": "园区信息",
+				"enablePullDownRefresh": false
+            }
+            
+        }
     ],
 	"tabBar": {
 		  "list": [

+ 92 - 68
pages/auth/auth.vue

@@ -4,8 +4,10 @@
 			<u-top-tips type="info" ref="uTips"></u-top-tips>
 			<u-alert-tips :show="show" type="warning" title="审核意见" :close-able="true"  :description="opinion"></u-alert-tips>
 			<view class="auth">
-				<text class="cuIcon-titles text-blue padding-right-10"></text>
-				<text>个人信息认证</text>
+				<view class="flex" >
+					<image style="width: 35rpx;height: 35rpx;display: block;padding-top: 6rpx;padding-right: 10rpx;" src="../../static/icon/tag1.png" mode=""></image>
+					<text class="text-lg">个人信息认证</text>
+				</view>
 				<view class="card">
 					<u-form :model="model"  ref="uForm" >
 						<u-form-item  :label-width="labelWidth"  label="姓名" >
@@ -32,7 +34,7 @@
 							  bgsrc="http://139.9.103.171:1888/miniofile/xlyq/face1.png"
 							  >
 							</upload-img>
-							<view class="text-center padding-top-20" style="color: #59a5f0;">
+							<view class="text-center  padding-top-20 base-color" >
 							 <text class="cuIcon-camera padding-right-sm" style="font-size: 30rpx;"></text>
 							 <text v-if="$isEmpty(model.face)">点击上传人脸</text>
 							 <text style="margin-top: 40rpx;display: inline-block;" v-else>点击重新上传</text>
@@ -42,8 +44,10 @@
 				</view>
 			</view>
 			<view class="auth">
-				<text class="cuIcon-titles text-blue padding-right-10"></text>
-				<text>企业信息认证</text>
+				<view class="flex" >
+					<image style="width: 35rpx;height: 35rpx;display: block;padding-top: 6rpx;padding-right: 10rpx;" src="../../static/icon/tag1.png" mode=""></image>
+					<text class="text-lg">企业信息认证</text>
+				</view>
 				<view class="card">
 					<u-form  :model="model"  ref="uForm" >
 						<u-form-item  :label-width="labelWidth"   label="公司园区" >
@@ -59,8 +63,10 @@
 				</view>
 			</view>
 			<view class="auth">
-				<text class="cuIcon-titles text-blue padding-right-10"></text>
-				<text>其他信息</text>
+				<view class="flex" >
+					<image style="width: 35rpx;height: 35rpx;display: block;padding-top: 6rpx;padding-right: 10rpx;" src="../../static/icon/tag1.png" mode=""></image>
+					<text class="text-lg">其他信息</text>
+				</view>
 				<view class="card">
 					<u-form :model="model"  ref="uForm" >
 						<u-form-item label-position="top" :border-bottom="false" :label-width="labelWidth"   label="备注(可选)" >
@@ -71,24 +77,24 @@
 				</view>
 			</view>
 			
-			<view class="auth flex justify-between">
+			<!-- <view class="auth flex justify-between">
 				<view class="flex flex-direction">
 					<view class="">
-						<text class="cuIcon-noticefill text-blue padding-right-10"></text>
-						<text>消息通知提醒</text>
+						<text style="font-size: 34rpx;" class="cuIcon-noticefill  base-color padding-right-10"></text>
+						<text class="text-lg">消息通知提醒</text>
 					</view>
 					<view class="padding-top-10 text-sm text-gray">
 						<text>开启订阅后,认证审核通知将推送到您的微信上</text>
 					</view>
 				</view>
-				<button v-if="subscribeShow" @click="subscribe" class="cu-btn sm round bg-blue">
+				<button v-if="subscribeShow" @click="subscribe" class="cu-btn sm round base-bg-color">
 					订阅
 				</button>
-				<button v-else @opensetting="opensetting" open-type="openSetting"class="cu-btn sm round bg-blue">
+				<button v-else @opensetting="opensetting" open-type="openSetting"class="cu-btn sm round base-bg-color">
 					订阅
 				</button>
-			</view>
-			<button  open-type="getUserInfo" @getuserinfo="submit"  class="cu-btn bg-blue round flex" style="padding: 40rpx 0;margin-top: 40rpx;">
+			</view> -->
+			<button :style="{marginBottom:safeAreaBottom}" open-type="getUserInfo" @getuserinfo="submit"  class="cu-btn base-bg-color round flex" style="padding: 40rpx 0;margin-top: 40rpx;">
 				<text v-text="operationType==0?'提交':'重新审核'"></text>
 			</button>
 			<!-- 性别 -->
@@ -209,6 +215,21 @@
 				}, 500)
 			},
 		},
+		computed: {
+		  //ios底部安全区域
+		  safeAreaBottom() {
+		    let info = uni.getSystemInfoSync()
+		    let safe = 20
+		    if (
+		      info &&
+		      ['devtools', 'ios'].includes(info.platform) &&
+		      info.statusBarHeight > safe
+		    ) {
+		      return info.statusBarHeight - safe+'px'
+		    }
+		    return 0
+		  }
+		},
 		onShow() {
 			this.handelAppletAudit()
 			
@@ -219,19 +240,9 @@
 		},
 		
 		onLoad(options) {
+			
 			that=this
 			
-			let tempId=this.$tmplIds[0]
-			wx.getSetting({
-			 	withSubscriptions: true,
-			   success(res){
-				   if (res.subscriptionsSetting.itemSettings[tempId]=='accept') {
-						that.subscribeShow=false
-				   }else{
-					   that.subscribeShow=true
-				   }
-			   }
-			})
 			if (!this.$isEmpty(options.operationType)) {
 				this.operationType=options.operationType
 			}
@@ -239,8 +250,8 @@
 			if (this.operationType==0) {
 				//用户认证
 				this.getOpenid()
-				if (!this.$isEmpty(this.$Route.query.phone)) {
-					this.model.phone=this.$Route.query.phone
+				if (!this.$isEmpty(options.phone)) {
+					this.model.phone=options.phone
 				}
 			}else{
 				//用户重新审核
@@ -303,31 +314,10 @@
 					}
 				})
 			},
-			/**
-			 * 订阅认证信息
-			 */
-			subscribe(e){
-				uni.requestSubscribeMessage({
-				   tmplIds: that.$tmplIds,
-				   success (res) {
-					   if (res.errMsg=='requestSubscribeMessage:ok') {
-							//已授权
-							that.subscribeShow=false
-					   }else{
-						   //未授权
-						   that.subscribeShow=true
-					   }
-				   },
-				   fail(err){
-					   that.subscribeShow=true
-					   console.error(err);
-				   }
-				 })
-			},
 			/**
 			 * 提交审核
 			 */
-			submit(e){
+			async submit(e){
 				let userInfo=e.detail.userInfo
 				if (this.$isEmpty(userInfo)&&this.operationType==0) {
 					//认证操作才需要获取微信头像和昵称信息,修改操作不需要
@@ -374,21 +364,61 @@
 					this.model.examine=0
 				}
 				this.model.createType=1 //1小程序认证方式 0:后台数据导入
-				this.$api.enterprisestaff.submit(this.model).then(res=>{
-					if (res.code==200) {
-						if (this.operationType==0) {
-							that.$showModel('提交成功,请耐心等待企业管理者审核',false).then(res=>{
-								this.$Router.replaceAll({name:'login'})
+				let res=await this.$api.enterprisestaff.submit(this.model)
+				if (res.code==200) {
+					if (this.operationType==0) {
+						that.$showModel('提交成功,请耐心等待企业管理者审核',false).then(res=>{
+							uni.reLaunch({
+								url:"/pages/login/login"
 							})
-						}else{
-							that.$showModel('操作成功',false).then(res=>{
-								this.$Router.back()
-							})
-						}
-						
+						})
 					}else{
-						this.$u.toast(res.msg)
+						that.$showModel('操作成功',false).then(res=>{
+							this.$navigateBack()
+						})
 					}
+					await this.$mpi.subscribe(that.$staffTmplIds)
+					this.getOpenListAndSendMsg()
+				}else{
+					this.$u.toast(res.msg)
+				}
+			},
+			async send(openId){
+				let tokenData={
+					grantType:this.$api.wxData.subscribe_grant_type,
+					appId:this.$api.wxData.appId,
+					secret:this.$api.wxData.secret
+				}
+				let res=await this.$api.wxApi.getAccessToken(tokenData)
+				let token=JSON.parse(res.data).access_token
+				let subscribeData={
+					accessToken:token,
+					touser:openId,
+					lang:"zh_CN",
+					page:'/pages/index/staffAudit/list',
+					miniprogramState:this.$miniprogramState,
+				    templateId: this.$adminTmplIds[2],
+					  "data": {
+						  "thing5": {
+							  "value": this.model.realName
+						  },
+						  "phone_number6":{
+							  "value": this.model.phone
+						  },
+						  "time3": {
+							  "value": this.$dateTime.format(new Date())
+						  }
+						}
+				}
+				let resp=await this.$api.wxApi.subscribe(subscribeData)
+				console.log(resp);
+			},
+			async getOpenListAndSendMsg(){
+				let agencyRes=await this.$api.getManagerOpenList({agencyId:this.model.agencyId})
+				let enterpriseRes=await this.$api.getManagerOpenList({enterpriseId:this.model.enterpriseId})
+				let openIds=[...agencyRes.data,...enterpriseRes.data]
+				openIds.forEach(item=>{
+					this.send(item)
 				})
 			},
 		//园区 begin
@@ -564,7 +594,7 @@
 			  uni.chooseImage({
 			    count: 1,
 			    //最多可以选择的图片张数,默认9
-			    sourceType: ['album', 'camera'],
+			    sourceType: ['album'],
 			    sizeType: ['compressed'],
 			    //可选择原图或压缩后的图片
 			    success: res => {
@@ -579,12 +609,6 @@
 				})
 			},
 		},
-		/**打开设置页
-		 * 方法可以不实现,但是不可以不写
-		 */
-		opensetting(){
-			
-		}
 	}
 </script>
 

+ 15 - 10
pages/company/company.vue

@@ -8,14 +8,16 @@
 		</swiper>
 		
 		<view class="card">
-			<!-- <image src="http://139.9.103.171:1888/miniofile/xlyq/del/logo1.jpg"></image> -->
 			<view class="flex flex-direction justify-center padding-left-20">
 				<text class="text-bold  text-lg" style="padding-bottom: 12rpx;">{{detail.enterpriseName}}</text>
 				<text class="text-sm">{{detail.enterpriseType}}</text>
 			</view>
 		</view>
 		<view class="desc">
-			<text class="text-lg text-bold">公司简介</text>
+			<view class="flex">
+				<image style="width: 35rpx;height: 35rpx;display: block;padding-top: 6rpx;padding-right: 10rpx;" src="../../static/icon/tag1.png" mode=""></image>
+				<text class="text-lg text-bold">公司简介</text>
+			</view>
 			<view class="sub-title">
 				<text style="padding-left: 60rpx;">
 					{{detail.enterpriseIntroduce}}
@@ -23,11 +25,14 @@
 			</view>
 		</view>
 		<view class="bg-white text-black">
-			<text class="text-lg text-bold " style="padding:0 30rpx;">其他信息</text>
+			<view class="flex padding-left-30">
+				<image style="width: 35rpx;height: 35rpx;display: block;padding-top: 6rpx;padding-right: 10rpx;" src="../../static/icon/tag1.png" mode=""></image>
+				<text class="text-lg text-bold">其他信息</text>
+			</view>
 			<view class="cu-list menu text-df padding-top-20">
 				<view class="cu-item">
 					<view class="content">
-						<text class="cuIcon-profile" style="font-size: 32rpx;"></text>
+						<text class="cuIcon-profile base-color" style="font-size: 32rpx;"></text>
 						<text class="">法定代表人</text>
 					</view>
 					<view class="action">
@@ -37,7 +42,7 @@
 				
 				<view class="cu-item">
 					<view class="content">
-						<text class="cuIcon-news" style="font-size: 32rpx;"></text>
+						<text class="cuIcon-news  base-color" style="font-size: 32rpx;"></text>
 						<text class="">统一社会信用代码</text>
 					</view>
 					<view class="action">
@@ -47,7 +52,7 @@
 				
 				<view class="cu-item">
 					<view class="content">
-						<text class="cuIcon-recharge" style="font-size: 32rpx;"></text>
+						<text class="cuIcon-recharge base-color" style="font-size: 32rpx;"></text>
 						<text class="">注册金额</text>
 					</view>
 					<view class="action">
@@ -57,7 +62,7 @@
 				
 				<view class="cu-item flex">
 					<view class="content" style="flex-basis: 45%;">
-						<text class="cuIcon-location" style="font-size: 32rpx;"></text>
+						<text class="cuIcon-location base-color" style="font-size: 32rpx;"></text>
 						<text class="">公司地址</text>
 					</view>
 					<view class="action">
@@ -67,7 +72,7 @@
 				
 				<view class="cu-item">
 					<view class="content" style="flex-basis: 45%;">
-						<text class="cuIcon-focus" style="font-size: 32rpx;"></text>
+						<text class="cuIcon-focus  base-color" style="font-size: 32rpx;"></text>
 						<text class="">注册地址</text>
 					</view>
 					<view class="action">
@@ -128,7 +133,7 @@
 				detail:{},
 				bannerList: [
 					{
-					  'banners': "http://139.9.103.171:1888/miniofile/xlyq/banner01.jpg"
+					  'banners': "http://139.9.103.171:1888/miniofile/xlyq/banner.jpg"
 					},
 				],
 				historyList:[],
@@ -136,7 +141,7 @@
 		},
 		onLoad() {
 			this.fetchDeatil()
-			this.fetchBanner()
+			// this.fetchBanner()
 		},
 		methods: {
 			fetchDeatil(){

+ 2 - 2
pages/device/device.vue

@@ -1,7 +1,7 @@
 <template>
 	<view class="page" style="position: relative;">
 		<view class="content">
-			<loading  isFullScreen color="#59a5f0" :active="isloading" text="开门中..."></loading>
+			<loading  isFullScreen color="#5064eb" :active="isloading" text="开门中..."></loading>
 			<view @click="openDoor(item.macAddress)" class="device u-border-bottom" v-for="(item,index) in device_list" :key="index">
 				<text>{{item.cameraName}}</text>
 				<view class="cu-btn bg-blue round sm">
@@ -116,7 +116,7 @@ export default {
 		padding: 30rpx;
 		
 		.bg-blue{
-			background-color: #59a5f0;
+			background-color: $base-color;
 			color: #FFFFFF;
			
 		}
 	}

+ 1 - 1
pages/index/access-record/comps/card.vue

@@ -4,7 +4,7 @@
 			<u-time-line-item nodeTop="2" v-for="(item,index) in list" :key="index">
 				<template v-slot:node>
 					<view class="u-node bg-white" >
-						<u-icon name="clock-fill" color="#59a5f0" :size="28"></u-icon>
+						<u-icon name="clock-fill" color="#5064eb" :size="28"></u-icon>
 					</view>
 				</template>
 				<template v-slot:content>

+ 15 - 12
pages/index/agency/agency.vue

@@ -13,11 +13,14 @@
 			</view>
 		</view>
 		<view class="bg-white text-black">
-			<text class="text-lg text-bold " style="padding:0 30rpx;">其他信息</text>
+			<view class="flex" style="padding:20rpx 30rpx 0;">
+				<image style="width: 35rpx;height: 35rpx;display: block;padding-top: 6rpx;padding-right: 10rpx;" src="../../../static/icon/tag1.png" mode=""></image>
+				<text class="text-lg  padding-left-10" >其他信息</text>
+			</view>
 			<view class="cu-list menu text-df padding-top-20">
 				<view class="cu-item">
 					<view class="content">
-						<text class="cuIcon-profile" style="font-size: 32rpx;"></text>
+						<text class="cuIcon-profilefill base-color" style="font-size: 32rpx;"></text>
 						<text class="">法定代表人</text>
 					</view>
 					<view class="action">
@@ -27,21 +30,21 @@
 				
 				<view class="cu-item">
 					<view class="content">
-						<text class="cuIcon-mobile" style="font-size: 32rpx;"></text>
+						<text class="cuIcon-mobilefill text-bold base-color" style="font-size: 32rpx;"></text>
 						<text class="">联系方式</text>
 					</view>
 					<view class="action">
 						<text>{{detail.personPhone}}</text>
 					</view>
 				</view>
-				<view class="cu-item flex">
-					<view class="content" style="flex-basis: 45%;">
-						<text class="cuIcon-location" style="font-size: 32rpx;"></text>
-						<text class="">公司地址</text>
-					</view>
-					<view class="action">
-						<text>{{detail.address}}</text>
-					</view>
+			</view>
+			<view class="" style="padding: 20rpx 40rpx;">
+				<view class="">
+					<text class="cuIcon-locationfill base-color " style="margin-right: 20rpx;"></text>
+					公司地址:
+				</view>
+				<view class="text-cut-2 " style="padding: 20rpx 10rpx">
+					<text>{{detail.address}}</text>
 				</view>
 			</view>
 		</view>
@@ -56,7 +59,7 @@
 				detail:{},
 				bannerList: [
 					{
-					  'banners': "http://139.9.103.171:1888/miniofile/xlyq/banner01.jpg"
+					  'banners': "http://139.9.103.171:1888/miniofile/xlyq/banner.jpg"
 					},
 				],
 			}

+ 0 - 204
pages/index/car/car.vue

@@ -1,204 +0,0 @@
-<template>
-	<view>
-		 <mescroll-body ref="mescrollRef" @init="mescrollInit" @down="downCallback" @up="upCallback" :down="downOption" :up="upOption">
-			<view class="margin-top-20">
-				<car-card  :list="dataList"></car-card>
-			</view>
-		 </mescroll-body>
-		 <view @click="filterShow=true" class="cuIcon cu-btn round  bg-blue" style="position: fixed;bottom: 20%;right: 20rpx;width: 80rpx;height: 80rpx;">
-		 	<text class="cuIcon-filter" style="font-size: 45rpx;"></text>
-			<u-badge size="mini" type="error" :is-center="true" :count="filterCount"></u-badge>
-		 </view>
-		 <u-toast ref="uToast"/>
-		 <u-modal negative-top="300" z-index="88" cancel-text="重置" cancel-color="#000000" @cancel="filterReset" :show-cancel-button="true"  @confirm="filterConfirm" title="筛选" :mask-close-able="true" v-model="filterShow" >
-		 	<view class="slot-content" style="margin: 20rpx;">
-		 		<u-form label-width="150"  ref="uForm">
-		 			<u-form-item label="车牌号"><u-input placeholder="请输入车牌号" disabled @click="openKeyBoard" v-model="plateNumberStr" /></u-form-item>
-		 			<!-- <u-form-item label="入场时间">
-		 				<u-input placeholder="请选择入场时间" type="select" @click="enterTimeShow=true" :selectOpen="enterTimeShow" v-model="params.enterTime" />
-		 			</u-form-item>
-		 			<u-form-item :border-bottom="false" label="出场时间">
-		 				<u-input placeholder="请选择出场时间" @click="outTimeShow=true" :selectOpen="outTimeShow" type="select"  v-model="params.outTime"   />
-		 			</u-form-item> -->
-		 		</u-form>
-		 	</view>
-		 </u-modal>
-		 <keyboard-package z-index="999" ref="plateNumber" type="plateNumber"  @onInput="onInput" @onDelete="onDelete" @onConfirm="onConfirm"/>
-		 <u-picker @confirm="enterTimeConfirm" v-model="enterTimeShow" mode="time"></u-picker>
-		 <u-picker @confirm="outTimeConfirm" v-model="outTimeShow" mode="time"></u-picker>
-	</view>
-</template>
-
-<script>
-	import carCard from "@/components/car-card/car-card.vue"
-	import keyboardPackage from "@/components/keyboard-package/keyboard-package.vue"
-	import MescrollMixin from "@/components/mescroll-body/mescroll-mixins.js";
-	export default {
-		mixins: [MescrollMixin], 
-		components:{
-			keyboardPackage,carCard
-		},
-		data() {
-			return {
-				iconStyle:{
-					color:"#59a5f0"
-				},
-				
-				filterShow:false,
-				filterCount:0,
-				params:{
-					carNo:'',
-					enterTime:'',
-					outTime:''
-				},
-				enterTimeShow:false,
-				outTimeShow:false,
-				carNoInputList:[],
-				
-				//园区tenantId
-				tenantId:'',
-				dataList: [],
-				
-				upOption: {
-					noMoreSize: 4, 
-					auto: true,
-					page: {
-						page: 0,
-						size: 10
-					}
-				},
-				// 下拉配置参数
-				downOption: {
-					use: true, 
-					auto: false
-				}
-			}
-		},
-		computed:{
-			plateNumberStr(){
-				let str='';
-				this.carNoInputList.forEach(item=>{
-					str+=item.toString();
-				})
-				this.params.carNo=str
-				return str;
-			}
-		},
-		onLoad() {
-			this.tenantId=this.$cache.get('agencyTenantId')
-		},
-		methods: {			
-			enterTimeConfirm(e){
-				this.params.enterTime=e.year+"-"+e.month+"-"+e.day
-			},
-			outTimeConfirm(e){
-				this.params.outTime=e.year+"-"+e.month+"-"+e.day
-			},
-			filterConfirm(){
-				let n=0
-				if (this.$isEmpty()) {
-					
-				}
-				if (!this.$isEmpty(this.params.carNo)) {
-					n++
-				}
-				if (!this.$isEmpty(this.params.enterTime)) {
-					n++
-				}
-				if (!this.$isEmpty(this.params.outTime)) {
-					n++
-				}
-				this.filterCount=n
-				this.dataList=[]
-				this.mescroll.resetUpScroll();
-			},
-			filterReset(){
-				this.filterCount=0
-				this.carNoInputList=[]
-				this.params.carNo=''
-				this.params.enterTime=''
-				this.params.outTime=''
-				this.dataList=[]
-				this.mescroll.resetUpScroll();
-			},
-			/**
-			 * 下拉刷新回调
-			 */
-			downCallback(){
-				setTimeout(()=>{
-					this.$showToast('刷新成功')
-					this.mescroll.resetUpScroll();
-				},1500)
-			},
-			/**
-			 * 上拉加载回调
-			 */
-			upCallback(page){
-				let params={
-					current:page.num,
-					size:page.size,
-					tenantId:this.tenantId,
-				}
-				if (!this.$isEmpty(this.params.carNo)) {
-					params.carNo=this.params.carNo
-				}
-				// if (!this.$isEmpty(this.params.enterTime)) {
-				// 	params.enterTime=this.params.enterTime
-				// }
-				// if (!this.$isEmpty(this.params.outTime)) {
-				// 	params.outTime=this.params.outTime
-				// }
-				try{
-					this.$api.car.page(params).then(res=>{
-						let data=res.data.records
-						this.mescroll.endBySize(data.length, res.total)
-						if (page.num==1) this.dataList=[]
-						this.dataList=this.dataList.concat(data)
-						console.log(this);
-					})
-				}catch(e){
-					this.mescroll.endErr();
-				}
-			},
-			
-			//车牌号键盘
-			onInput(val){
-				console.log(val);
-				this.carNoInputList.push(val)
-			},
-			onDelete(){
-				this.carNoInputList.pop();
-			},
-			onConfirm(){
-				this.params.carNo=this.plateNumberStr
-				console.log(this.params.carNo);
-			},
-			openKeyBoard() {
-				this.$refs.plateNumber.open();
-			},
-			
-		}
-	}
-</script>
-
-<style lang="scss">
-	.demo-warter {
-		height: 530rpx;
-		margin: 20rpx 8rpx;
-		background-color: #ffffff;
-		position: relative;
-		border-top-right-radius: 12rpx;
-		border-top-left-radius: 12rpx;
-		.time{
-			font-size: 26rpx;
-			padding: 20rpx 0 10rpx 20rpx;
-		}
-	}
-	
-	.demo-image {
-		border-top-right-radius: 12rpx;
-		border-top-left-radius: 12rpx;
-		height: 360rpx;
-		width: 100%;
-	}
-</style>

+ 5 - 5
pages/index/car/comps/card.vue

@@ -13,21 +13,21 @@
 		      </view>
 			  <view class="content">
 				  <view>
-						<text class="cuIcon-time  margin-right-10"></text>
+						<u-icon style="margin-right: 15rpx;" name="clock-fill" color="#5064eb" size="34"></u-icon>
 						<text>进:{{formatDate(item.enterTime)}}</text>
 				  </view>
 				  <!-- 出场时间 -->
 				  <view v-if="current==1" style="padding-top: 8rpx;">
-						<text class="cuIcon-time  margin-right-10"></text>
+						<text class="cuIcon-timefill base-color  margin-right-10"></text>
 						<text>出:{{formatDate(item.outTime)}}</text>
 				  </view>
 				  <!-- 入场车道 -->
 				  <view v-if="current==0" style="padding-top: 8rpx;">
-					    <u-icon style="margin-right: 10rpx;" name="map"></u-icon>
+					    <u-icon style="margin-right: 10rpx;" name="map-fill" color="#5064eb" size="36"></u-icon>
 						<text>{{item.enterGateName}}</text>
 				  </view>
-				  <view class="flex justify-center" style="margin: 20rpx 0;">
-				  	<view  class="cu-btn line-blue round df" style="width: 70%;">
+				  <view class="flex justify-center" style="margin: 20rpx 0 0;">
+				  	<view  class="cu-btn base-line round df" style="width: 70%;">
 				  		查看详情
 				  	</view>
 				  </view>

+ 3 - 1
pages/index/car/comps/item.vue

@@ -14,7 +14,8 @@
 		props: {
 			type: Number,
 			i: Number,
-			item:Object
+			item:Object,
+			params:Object
 		},
 		data() {
 			return {
@@ -70,6 +71,7 @@
 					current:mescroll.num,
 					size:mescroll.size,
 					tenantId:this.tenantId,
+					carNo:this.params.carNo
 				}
 				let res=null
 				try{

+ 1 - 1
pages/index/car/detail.vue

@@ -27,7 +27,7 @@ export default {
 			current:0,
 			detailData:{},
 			iconStyle:{
-				color:"#59a5f0"
+				color:"#5064eb"
 			},
 		};
 	},

+ 11 - 4
pages/index/car/list.vue

@@ -3,7 +3,7 @@
 		<view class="tabs" style="width: 420rpx;margin: 0rpx  auto;padding-top: 20rpx;">
 			<scroll-view scroll-x class="nav" >
 				<view class="flex text-center">
-					<view  style="border: 1rpx solid #59a5f0;padding:15rpx 20rpx;" class="flex-sub" 
+					<view  style="border: 1rpx solid #5064eb;padding:15rpx 20rpx;" class="flex-sub" 
 					:class="index==current?'nav-checked':'nav-unchecked'" 
 					v-for="(item,index) in tabs" :key="index" @tap="tabChange(index)" >
 						{{item.name}}
@@ -16,7 +16,7 @@
 				@animationfinish="animationfinish">
 				<swiper-item v-for="(item,index) in tabs" :key="index">
 					<scroll-view scroll-y style="height: 100%;">
-						<item  :i="index" :item="item" :type="current"></item>
+						<item :params="params" :i="index" :item="item" :type="current"></item>
 					</scroll-view>
 				</swiper-item>
 			</swiper>
@@ -31,6 +31,10 @@
 		},
 		data() {
 			return {
+				params:{
+					carNo:''
+				},
+				
 				scrollLeft:0,
 				current: 0,
 				swiperCurrent:0,
@@ -46,6 +50,9 @@
 				],
 			}
 		},
+		onLoad(options) {
+			this.params.carNo=options.carNo || ''
+		},
 		methods:{
 			tabChange(index) {
 				this.current = index
@@ -82,13 +89,13 @@
 	}
 	
 	.nav-checked{
-		background-color: #59a5f0;
+		background-color: $base-color;
 		color: #FFFFFF;
 		font-weight: 800;
 	}
 	
 	.nav-unchecked{
 		background-color: #FFFFFF;
-		color: #59a5f0;
+		color: $base-color;
 	}
 </style>

+ 11 - 7
pages/index/fire/alarm-record.vue

@@ -5,10 +5,10 @@
 			<view class="flex justify-between">
 				<view class="flex">
 					<view class="flex justify-center align-center">
-						<image v-if="fireType==0" style="width: 80rpx;height: 80rpx;" src="/static/index/fire/yanwu1.png"></image>
-						<image v-if="fireType==1" style="width: 80rpx;height: 80rpx;" src="/static/index/fire/ranqi2.png"></image>
-						<image v-if="fireType==2" style="width: 80rpx;height: 80rpx;" src="/static/index/fire/xiaofang.png"></image>
-						<image v-if="fireType==3" style="width: 80rpx;height: 80rpx;" src="/static/index/fire/dianbiao.png"></image>
+						<image v-if="fireType==0" style="width: 80rpx;height: 80rpx;" src="../../../static/icon/yangan.png"></image>
+						<image v-if="fireType==1" style="width: 80rpx;height: 80rpx;" src="../../../static/icon/ranqi.png"></image>
+						<image v-if="fireType==2" style="width: 80rpx;height: 80rpx;" src="../../../static/icon/xiaofang.png"></image>
+						<image v-if="fireType==3" style="width: 80rpx;height: 80rpx;" src="../../../static/icon/dianbiao.png"></image>
 					</view>
 					<view class="padding-left-40">
 						<view >
@@ -24,8 +24,8 @@
 						</view>
 					</view>
 				</view>
-				<view @click="dateShow=true" class="flex text-blue flex-direction justify-center align-center">
-					<view class="padding-bottom-20">
+				<view @click="dateShow=true" class="flex base-color flex-direction justify-center align-center">
+					<view class="padding-bottom-20 text-bold">
 						<text class="cuIcon-filter padding-right-20"></text>
 						<text class="">筛选</text>
 					</view>
@@ -39,7 +39,7 @@
 					<u-time-line-item nodeTop="2" v-for="(item,index) in list" :key="index">
 						<template v-slot:node>
 							<view class="u-node bg-white" >
-								<u-icon name="clock-fill" color="#59a5f0" :size="28"></u-icon>
+								<u-icon name="clock-fill" color="#5064eb" :size="28"></u-icon>
 							</view>
 						</template>
 						<template v-slot:content>
@@ -227,6 +227,10 @@
   }
 }
 
+.text-red{
+	color: #ca0000;
+}
+
 .nav-title {
 	font-size: 28upx;
 	font-weight: 300;

+ 22 - 12
pages/index/fire/detail.vue

@@ -5,16 +5,16 @@
 				<view class="left">
 					
 					<view class="title flex " style="padding:0  24rpx;">
-						<u-icon  size="36" name="http://139.9.103.171:1888/miniofile/xlyq/sn.png"></u-icon>
+						<u-icon color="#3895e1" size="36" name="http://139.9.103.171:1888/miniofile/xlyq/sn.png"></u-icon>
 						<text class="padding-left-10 text-lg text-bold">IEMI:{{dataDetail.imei}}</text>
-						<text @click.stop="copy(dataDetail.imei)" style="text-decoration: underline;" class="text-blue padding-left-20">复制</text>
+						<text @click.stop="copy(dataDetail.imei)" style="text-decoration: underline;" class="base-color padding-left-20">复制</text>
 					</view>
 				</view>
 				<view class="right">
-					<view v-if="dataDetail.defenseStatus==1" class="radius sm cu-btn line-green">
+					<view v-if="dataDetail.defenseStatus==1" style="font-size: 22rpx;" class="radius sm cu-btn line-green">
 						已上线
 					</view>
-					<view v-if="dataDetail.defenseStatus==2" class="radius sm cu-btn line-red">
+					<view v-if="dataDetail.defenseStatus==2" style="font-size: 22rpx;" class="radius sm cu-btn line-red">
 						已下线
 					</view>
 				</view>
@@ -61,8 +61,8 @@
 						</view> -->
 						
 						<view class="content flex align-center justify-start">
-							<u-icon  size="36" name="map" color="#72a6f9"></u-icon>
-							<text class="text-bold padding-left-10">安装位置:</text>
+							<u-icon  size="36" name="map" color="#5064eb"></u-icon>
+							<text class="text-bold padding-left-10" >安装位置:</text>
 							<text  v-text="dataDetail.deviceInstallAddress?dataDetail.deviceInstallAddress:'未知'"  style="padding-top: 8rpx;" ></text>
 						</view>
 						
@@ -84,7 +84,7 @@
 							<text :class="dataDetail.manufacturers?'':'text-unknow'"  v-text="dataDetail.manufacturers?dataDetail.manufacturers:'未知'"></text>
 						</view>
 						<view  class="content flex">
-							<u-icon name="ICCID" custom-prefix="custom-icon" size="32" color="#55aaff"></u-icon>
+							<u-icon name="ICCID" custom-prefix="custom-icon" size="32" color="#5064eb"></u-icon>
 							<text class="text-bold padding-left-10">ICCID:</text>
 							<text :class="dataDetail.iccid?'':'text-unknow'"  v-text="dataDetail.iccid?dataDetail.iccid:'未知'"></text>
 						</view>
@@ -101,12 +101,12 @@
 							<text :class="dataDetail.nbModuleModel?'':'text-unknow'"  v-text="dataDetail.nbModuleModel?dataDetail.nbModuleModel:'未知'"></text>
 						</view>
 						<view  class="content flex">
-							<u-icon name="banbenhao" custom-prefix="custom-icon" size="32" color="#71a4f9"></u-icon>
+							<u-icon name="banbenhao" custom-prefix="custom-icon" size="32" color="#5064eb"></u-icon>
 							<text class="text-bold padding-left-10">NB模组版本信息:</text>
 							<text :class="dataDetail.nbModuleEdition?'':'text-unknow'"  v-text="dataDetail.nbModuleEdition?dataDetail.nbModuleEdition:'未知'"></text>
 						</view>
 						<view  class="content flex">
-							<u-icon name="cichang" custom-prefix="custom-icon" size="32" color="#5bccc9"></u-icon>
+							<u-icon name="cichang" custom-prefix="custom-icon" size="32" color="#53b9b6"></u-icon>
 							<text class="text-bold padding-left-10">当场磁场值:</text>
 							<text :class="dataDetail.magneticField?'':'text-unknow'"  v-text="dataDetail.magneticField?dataDetail.magneticField:'未知'"></text>
 						</view>
@@ -116,12 +116,12 @@
 							<text :class="dataDetail.heartbeatTime?'':'text-unknow'"  v-text="dataDetail.heartbeatTime?dataDetail.heartbeatTime:'未知'"></text>
 						</view>
 						<view  class="content flex">
-							<u-icon name="wuxian" custom-prefix="custom-icon" size="32" color="#6fa03c"></u-icon>
+							<u-icon name="wuxian" custom-prefix="custom-icon" size="32" color="#6c9a3a"></u-icon>
 							<text class="text-bold padding-left-10">无线信号覆盖等级:</text>
 							<text :class="dataDetail.wirelessLevel?'':'text-unknow'"  v-text="dataDetail.wirelessLevel?dataDetail.wirelessLevel:'未知'"></text>
 						</view>
 						<view  class="content flex">
-							<u-icon name="fashegongshuai" custom-prefix="custom-icon" size="32" color="#bcd62d"></u-icon>
+							<u-icon name="fashegongshuai" custom-prefix="custom-icon" size="32" color="#afc629"></u-icon>
 							<text class="text-bold padding-left-10">终端发射功率:</text>
 							<text :class="dataDetail.transmittingPower?'':'text-unknow'"  v-text="dataDetail.transmittingPower?dataDetail.transmittingPower:'未知'"></text>
 						</view>
@@ -165,8 +165,18 @@ page{
 	background-color: #FFFFFF;
 }
 
+.line-green{
+	border-color: #16aa5d;
+	color: #16aa5d;
+}
+
+.line-red{
+	border-color: #cf0000;
+	color: #cf0000;
+}
+
 .text-unknow{
-	color: #1296db;
+	color: $base-color;
 }
 	
 .data {

+ 15 - 6
pages/index/fire/list/comps/card.vue

@@ -5,11 +5,11 @@
 				<view class="left">
 					<view class="title">
 						<text>IMEI:{{item.imei}}</text>
-						<text @click.stop="copy(item.imei)" style="text-decoration: underline;" class="text-blue padding-left-20">复制</text>
+						<text @click.stop="copy(item.imei)" style="text-decoration: underline;" class="base-color padding-left-20">复制</text>
 					</view>
 				</view>
 				<view class="right">
-					<view v-if="item.defenseStatus==1" class="radius sm cu-btn line-green">
+					<view v-if="item.defenseStatus==1" style="font-size: 24rpx;" class="radius sm cu-btn line-green">
 						已上线
 					</view>
 					<view v-if="item.defenseStatus==2" class="radius sm cu-btn line-red">
@@ -62,13 +62,12 @@
 				</view>
 			</view>
 			<view class="bottom flex" >
-				<view @click.stop="goDetail(item)" class="cu-btn  sm round line-blue" >
+				<view @click.stop="goDetail(item)" style="font-size: 22rpx;font-weight: 800;" class="cu-btn  sm round  base-line" >
 					查看详情
 				</view>
-				<view @click.stop="goAlarm(item)" class="cu-btn  sm round line-blue" style="margin: 0 20rpx;">
+				<view @click.stop="goAlarm(item)"  class="cu-btn  sm round base-line" style="margin: 0 20rpx;font-size: 22rpx;font-weight: 800;">
 					<text v-if="item.deviceType==100030">抄表记录</text>
 					<text v-else>告警记录</text>
-					
 				</view>
 			</view>
 		</view>
@@ -119,6 +118,16 @@ export default {
 </script>
 
 <style lang="scss">
+.line-green{
+	border-color: #16aa5d;
+	color: #16aa5d;
+}
+
+.line-red{
+	border-color: #cf0000;
+	color: #cf0000;
+}
+
 .data {
 	width: 710rpx;
 	background-color: #ffffff;
@@ -141,7 +150,7 @@ export default {
 			}
 		}
 		.right{
-			margin-right: 10rpx;
+			margin-right: 20rpx;
 		}
 	}
 	.item {

+ 1 - 1
pages/index/fire/list/list.vue

@@ -3,7 +3,7 @@
 		<view class="tabs">
 			<scroll-view scroll-x class="bg-white nav">
 				<view class="flex text-center">
-					<view class="cu-item flex-sub" :class="index==current?'text-blue text-xl text-bold ':'text-lg'" v-for="(item,index) in tabs" :key="index" @tap="tabChange(index)" >
+					<view class="cu-item flex-sub" :class="index==current?'base-color text-xl text-bold ':'text-lg'" v-for="(item,index) in tabs" :key="index" @tap="tabChange(index)" >
 						{{item.name}}
 					</view>
 				</view>

+ 228 - 90
pages/index/index.vue

@@ -2,16 +2,12 @@
 	<view class="content">
 		<view class="">
 			<!-- 头部 -->
-			<u-navbar :border-bottom="false" :is-back="false" title=" ">
+			<u-navbar :border-bottom="false" :background="background" :is-back="false" title=" ">
 				<view class="slot-wrap">
-					<view class="padding-left-40 flex" >
-						<u-icon size="34" name="map"></u-icon>
-						<text class="text-cut-1" style="font-size: 34rpx;padding: 0 10rpx;">{{gander?gander:'暂无园区信息'}}</text>
+					<view class="padding-left-20 flex" >
+						<u-icon size="34" name="map-fill" color="#FFFFFF"></u-icon>
+						<text class="text-cut-1 text-white"  style="font-size: 32rpx;padding: 0 10rpx;">{{gander?gander:'暂无园区信息'}}</text>
 					</view>
-				  <!-- <view class="padding-left-40 " @click="ganderShow=true">
-					<text class="padding-right-10" style="font-size: 34rpx;">{{gander?gander:'暂无园区信息'}}</text>
-					<u-icon  :name="ganderShow?'arrow-up-fill':'arrow-down-fill'" top="-5" size="20" color="#7f7f7f"></u-icon>
-				  </view> -->
 				</view>
 			</u-navbar>
 			<!-- banner -->
@@ -27,13 +23,45 @@
 				<view class="bg-white" style="height: 10rpx;"></view>
 				<hotConsult  @onTap="jump('/pages/index/notice/notice')" @detailTap="goNoticeDetail" :swiperTexts="noticeList"></hotConsult>
 			</view>
+			
+			<!-- 园区信息 -->
+			<view class="bg-white" v-if="loginType=='agency'">
+				<view class="flex"  style="padding: 30rpx; ">
+					<image style="width: 35rpx;height: 35rpx;display: block;padding-top: 6rpx;padding-right: 10rpx;" src="../../static/icon/tag1.png" mode=""></image>
+					<text class="text-lg text-black">园区信息</text>
+				</view>
+				
+				<view class="cu-list grid col-4 no-border" :key="index">
+					<view class="cu-item" @click="jump(item.url)"  v-for="(item,index) in statistical" :key="index">
+						<view class="grid-icon" >
+							<image  style="width: 70rpx;height: 70rpx;" :src="item.icon"/>
+						</view>
+						<text  style="color: #333333;font-size: 26rpx;" >{{item.title}}</text>
+						<view class="cu-tag bg-red badge" v-if="item.count>0">{{item.count}}</view>
+					</view>
+				</view>
+			</view>
+			
+			
 			<!-- 园区服务 -->
 			<view class="bg-white">
-				<view  style="padding: 30rpx 30rpx 0 30rpx; ">
-					<text class="cuIcon-titles text-blue"></text>
-					<text class="text-bold text-lg">园区服务</text>
+				<view class="flex"  style="padding: 30rpx; ">
+					<image style="width: 35rpx;height: 35rpx;display: block;padding-top: 6rpx;padding-right: 10rpx;" src="../../static/icon/tag1.png" mode=""></image>
+					<text class="text-lg text-black">园区服务</text>
+				</view>
+				
+				<view class="cu-list grid col-4 no-border">
+					<view class="cu-item" v-if="item.show" @click="jump(item.url)"  v-for="(item,index) in elements" :key="index">
+						<view class="grid-icon" >
+							<image  style="width: 70rpx;height: 70rpx;" :src="item.icon"/>
+						</view>
+						<text  style="color: #333333;font-size: 26rpx;" >{{item.title}}</text>
+						<view class="cu-tag bg-red badge" v-if="item.count>0">{{item.count}}</view>
+					</view>
 				</view>
-				<view class="nav-list  padding-top-30" >
+				
+				
+				<!-- <view class="nav-list  padding-top-30" >
 					<view
 						v-if="item.show"
 						hover-class="none"
@@ -45,14 +73,24 @@
 						<image :src="item.icon" mode=""></image>
 						<u-badge  :is-center="true" type="error" :count="item.count"></u-badge>
 					</view>
-				</view>
+				</view> -->
 			</view>
 			<view class="bg-white" v-if="loginType!='staff'">
-				<view  style="padding: 30rpx 30rpx 0 30rpx; ">
-					<text class="cuIcon-titles text-blue"></text>
-					<text class="text-bold text-lg">消防服务</text>
+				<view class="flex"  style="padding: 30rpx; ">
+					<image style="width: 35rpx;height: 35rpx;display: block;padding-top: 6rpx;padding-right: 10rpx;" src="../../static/icon/tag1.png" mode=""></image>
+					<text class="text-lg">消防服务</text>
+				</view>
+				<view class="cu-list grid col-4 no-border">
+					<view class="cu-item" @click="jump(item.url)"  v-for="(item,index) in fireList" :key="index">
+						<view class="grid-icon" >
+							<image  style="width: 70rpx;height: 70rpx;" :src="item.icon"/>
+						</view>
+						<text  style="color: #333333;font-size: 26rpx;" >{{item.title}}</text>
+						<view class="cu-tag bg-red badge" v-if="item.count>0">{{item.count}}</view>
+					</view>
 				</view>
-				<view class="nav-list  padding-top-30" >
+				
+				<!-- <view class="nav-list  padding-top-30" >
 					<view hover-class="none"
 						@click="jump(item.url)"
 						class="nav-li light"  :style="{backgroundColor:item.color}" 
@@ -61,16 +99,16 @@
 						<view class="" style="padding-top: 10rpx;font-size: 24rpx;color: #acacac;">{{item.name}}</view>
 						<image :src="item.icon" mode=""></image>
 					</view>
-				</view>
+				</view> -->
 			</view>
-			<view class="bg-white padding-bottom-20">
-				<view class="flex justify-between" style="padding: 26rpx;">
-					<view class="">
-						<text class="cuIcon-titles text-blue"></text>
-						<text class="text-bold text-lg">园区动态</text>
+			<view class="bg-white padding-bottom-20" v-if="newsList.length>0">
+				<view class="flex justify-between" style="padding: 30rpx;">
+					<view class="flex">
+						<image style="width: 35rpx;height: 35rpx;display: block;padding-top: 6rpx;padding-right: 10rpx;" src="../../static/icon/tag1.png" mode=""></image>
+						<text class="text-lg text-black">园区动态</text>
 					</view>
 					<view @click="jump('/pages/news/list')" style="padding-top: 6rpx;font-size: 26rpx;color: #676767;">
-						<text>查看更多</text>
+						<text style="font-size: 24rpx;color: #676767;margin-top: 5rpx;">查看更多</text>
 						<text class="cuIcon-right "></text>
 					</view>
 				</view>
@@ -78,11 +116,12 @@
 			</view>
 			<u-action-sheet @click="ganderChange" :list="ganderArray" v-model="ganderShow"></u-action-sheet>
 		</view>
-		<u-tabbar v-model="tabbarCurr"
-		 :icon-size="tabbar.iconSize" 
-		 :active-color="tabbar.activeColor" 
-		 :list="tabbar.list" >
-		 </u-tabbar>
+		 <u-tabbar v-model="tabbarCurr"
+		  :icon-size="tabbar.iconSize" 
+		  :active-color="tabbar.activeColor" 
+		  :mid-button-size="tabbar.MinButtonSize" 
+		  :list="tabbar.list" :mid-button="true">
+		  </u-tabbar>
 	</view>
 </template>
 
@@ -96,11 +135,15 @@ export default {
 	},
 	data() {
 		return {
+			background:{
+				backgroundColor:'#5064eb'
+			},
+			
 			//登陆类型
 			loginType:this.$cache.get('loginType') || '',
 			//tabbar
 			tabbarCurr:0,
-			tabbar:{},
+			tabbar:tabbar,
 			//园区 label
 			
 			ganderShow:false,
@@ -111,7 +154,7 @@ export default {
 			//banner
 			bannerList: [
 				{
-				  'banners': "http://139.9.103.171:1888/miniofile/xlyq/banner01.jpg"
+				  'banners': "http://139.9.103.171:1888/miniofile/xlyq/banner.jpg"
 				},
 			],
 			// 公告
@@ -120,7 +163,8 @@ export default {
 			fireList:[],
 			//园区服务
 		    elements: [],
-			
+			//园区统计
+			statistical:[],
 			//园区动态
 			newsList:[]
 			
@@ -130,21 +174,24 @@ export default {
 		this.fetchNoticeList()
 		if (this.loginType!=this.$loginType.STAFF) {
 			this.fetchWaitAuditNum()
+			this.fetchWaitAuditGuestNum()
 		}
 	},
-	onReady() {
-		if (this.$cache.get('loginType')!=this.$loginType.STAFF) {
-			let tmp=this.$u.deepClone(tabbar)
-			tmp.list.splice(1,1)
-			this.tabbar=tmp
-		}else{
-			this.tabbar=tabbar
-		}
-	},
+	// onReady() {
+	// 	if (this.$cache.get('loginType')!=this.$loginType.STAFF) {
+	// 		let tmp=this.$u.deepClone(tabbar)
+	// 		tmp.list.splice(1,1)
+	// 		this.tabbar=tmp
+	// 	}else{
+	// 		this.tabbar=tabbar
+	// 	}
+	// },
 	onLoad() {
 		this.fetchStaticData()
 		this.fetchUserInfo()
 		this.fetchNewsList()
+		//缓存字段值
+		this.cacheDict()
 	},
 	methods:{
 		fetchBanner(){
@@ -183,10 +230,11 @@ export default {
 					this.gander=userInfo.enterpriseName
 				})
 		   }else if (this.loginType==this.$loginType.ENTERPRISE) {
-			   this.gander=this.$cache.get('enterpriseName')
 				let creditCode=this.$cache.get('creditCode')
 				this.$api.enterprise.detail({creditCode:creditCode}).then(res=>{
+					this.gander=res.data.enterpriseName
 					getApp().globalData.userInfo=res.data
+					this.$cache.put('enterpriseName',res.data.enterpriseName)
 					this.$cache.put("residentialId",res.data.residentialId)
 				})
 		   }else if (this.loginType==this.$loginType.AGENCY) {
@@ -205,21 +253,36 @@ export default {
 			if (this.loginType==this.$loginType.ENTERPRISE) {
 				params.enterpriseId=this.$cache.get('enterpriseId')
 			}
+			if (this.loginType==this.$loginType.AGENCY) {
+				params.agencyId=this.$cache.get('agencyId')
+			}
+			
 			this.$api.enterprisestaff.page(params).then(res=>{
-				if (!that.$isEmpty(res.data.records)) {
-					that.elements.forEach(item=>{
-						if (item.url=='/pages/index/staffAudit/list') {
-							item.count=res.data.total
-						}
-					})				
-				}else{
-					that.elements.forEach(item=>{
-						if (item.url=='/pages/index/staffAudit/list') {
-							item.count=0
-						}
-					})	
-				}
-				console.log(that.elements);
+				this.elements.forEach(item=>{
+					if (item.url=='/pages/index/staffAudit/list') {
+						item.count=res.data.total
+					}
+				})
+			})
+		},
+		fetchWaitAuditGuestNum(){
+			let params={
+				checkState:0
+			}
+			//企业
+			if (this.loginType==this.$loginType.ENTERPRISE) {
+				params.enterpriseId=this.$cache.get('enterpriseId')
+			}
+			//园区
+			if (this.loginType==this.$loginType.AGENCY) {
+				params.agencyId=this.$cache.get('agencyId')
+			}
+			this.$api.guest.page(params).then(res=>{
+				this.elements.forEach(item=>{
+					if (item.url=='/pages/guest/records/records') {
+						item.count=res.data.total
+					}
+				})
 			})
 		},
 		/**
@@ -269,34 +332,100 @@ export default {
 				url:"/pages/index/notice/detail",
 			})
 		},
+		//缓存字典的值
+		async cacheDict(){
+			let dictCacheData=this.$cache.get('dict')
+			if (!this.$isEmpty(dictCacheData)) {
+				return
+			}
+			//有效时间
+			let validTime=1*24*60*60*3
+			
+			//车辆类型
+			let carTypeList=[]
+			//车辆性质
+			let carPropertiesList=[]
+			//燃油类别
+			let fuelCategoryList=[]
+			
+			// 请求字典begin
+			let res1=await this.$api.dict({code:'car_type'})
+			res1.data.forEach((item)=>{
+				let tmp={
+					value:item.dictKey,
+					label:item.dictValue
+				}
+				carTypeList.push(tmp)
+			})
+			
+			let res2=await this.$api.dict({code:'car_properties'})
+			res2.data.forEach((item)=>{
+				let tmp={
+					value:item.dictKey,
+					label:item.dictValue
+				}
+				carPropertiesList.push(tmp)
+			})
+		
+			let res3=await this.$api.dict({code:'fuel_category'})
+			res3.data.forEach((item)=>{
+				let tmp={
+					value:item.dictKey,
+					label:item.dictValue
+				}
+				fuelCategoryList.push(tmp)
+			})
+			// 请求字典end
+			
+			//缓存字典的值begin
+			let dict={
+				carTypeList,
+				carPropertiesList,
+				fuelCategoryList
+			}
+			this.$cache.put('dict',dict,validTime)
+			//缓存字典的值end
+		},
 		/**
 		 * 加载静态数据
 		 */
 		fetchStaticData(){
+			this.statistical=[
+				{
+					title: '园区信息',
+					name: 'Campus information',
+					color: '#e3f5ff',
+					icon:'../../static/icon/yuanqu.png',
+					url:'/pages/agency/agency',
+					count:0,
+				},
+				{
+					title: '数据统计',
+					icon:'../../static/icon/data-service.png',
+					url:'/pages/agency/agency?current=1',
+				},
+				{
+					title: '消防统计',
+					icon:'../../static/icon/fire-service.png',
+					url:'/pages/agency/agency?current=2',
+				},
+			]
+			
 			this.elements=[
 				{
 					title: '我的企业',
 					name: 'My business',
 					color: '#e3f5ff',
-					icon: '../../static/index/gander/qiye.png',
+					icon:'../../static/icon/yuanqu.png',
 					url:'/pages/company/company',
 					count:0,
 					show:this.loginType!=this.$loginType.AGENCY
 				},
-				{
-					title: '园区信息',
-					name: 'Campus information',
-					color: '#e3f5ff',
-					icon: '../../static/index/gander/qiye.png',
-					url:'/pages/index/agency/agency',
-					count:0,
-					show:this.loginType==this.$loginType.AGENCY
-				},
 				{
 					title: '我的资料',
 					name: 'My profile',
 					color: '#ecf3f9',
-					icon: '../../static/index/gander/renzheng.png',
+					icon:'../../static/icon/info.png',
 					url:'/pages/index/myinfo/myinfo',
 					count:0,
 					show:this.loginType==this.$loginType.STAFF
@@ -305,16 +434,23 @@ export default {
 					title: '员工审核',
 					name: 'Staff certification',
 					color: '#eaebf9',
-					icon: '../../static/index/gander/renzheng.png',
+					icon:'../../static/icon/info.png',
 					url:'/pages/index/staffAudit/list',
 					count:0,
 					show:this.loginType!=this.$loginType.STAFF
 				},
+				{
+					title: '访客审核',
+					icon:'../../static/icon/guest-gl.png',
+					url:'/pages/guest/records/records',
+					count:0,
+					show:this.loginType!=this.$loginType.STAFF
+				},
 				{
 					title: '我的测温',
 					name: 'My temperature',
 					color: '#e5eef9',
-					icon: '../../static/index/gander/cewen1.png',
+					icon:'../../static/icon/cewen.png',
 					url:'/pages/index/staff-temperature/list',
 					count:0,
 					show:this.loginType==this.$loginType.STAFF
@@ -323,7 +459,7 @@ export default {
 					title: '测温记录',
 					name: 'Staff temperature',
 					color: '#e5eef9',
-					icon: '../../static/index/gander/cewen1.png',
+					icon:'../../static/icon/cewen.png',
 					url:'/pages/index/staff-temperature/list',
 					count:0,
 					show:this.loginType!=this.$loginType.STAFF
@@ -332,7 +468,7 @@ export default {
 					title: '通行记录',
 					name: 'Access records',
 					color: '#e9f9f3',
-					icon: '../../static/index/gander/tongxing.png',
+					icon:'../../static/icon/jilu.png',
 					url:'/pages/index/access-record/access-record',
 					count:0,
 					show:true
@@ -341,25 +477,25 @@ export default {
 					title: '公告管理',
 					name: 'Notice managerment',
 					color: '#eaebf9',
-					icon: '../../static/index/gander/notice.png',
+					icon:'../../static/icon/tongzhi.png',
 					url:'/pages/index/notice/list',
 					count:0,
 					show:this.loginType==this.$loginType.AGENCY
 				},
 				{
-					title: '健康码',
-					name: 'Staff temperature',
-					color: '#f4f0ff',
-					icon: '../../static/index/gander/health.png',
-					url:'/pages/mine/healthcode/healthcode',
+					title: this.loginType==this.$loginType.STAFF?'我的车辆':'车辆管理',
+					name: 'Notice managerment',
+					color: '#eaebf9',
+					icon:'../../static/icon/car.png',
+					url:this.loginType==this.$loginType.STAFF?'/pages/index/car/my-car/my-car':'/pages/index/car/car-manager/car-manager',
 					count:0,
-					show:this.loginType==this.$loginType.STAFF
-				}, 
+					show:true
+				},
 				{
 					title: '车辆记录',
 					name: 'The vehicle record',
 					color: '#fcf5f3',
-					icon: '../../static/index/gander/car.png',
+					icon:'../../static/icon/car-records.png',
 					url:'/pages/index/car/list',
 					count:0,
 					show:this.loginType==this.$loginType.AGENCY
@@ -370,28 +506,30 @@ export default {
 					title: '烟感报警',
 					name: 'Smoke alarm',
 					color: '#e5eef9',
-					icon: '../../static/index/fire/yangan.png',
+					icon:'../../static/icon/yangan.png',
 					url:"/pages/index/fire/list/list?fireType=0"
 				},
-				{
-					title: '燃气告警',
-					name: 'Gas alarm',
-					color: '#ffefef',
-					icon: '../../static/index/fire/ranqi.png',
-					url:"/pages/index/fire/list/list?fireType=1"
-				}, 
 				{
 					title: '消防水压',
 					name: 'Fire water pressure',
 					color: '#e9f9f3',
-					icon: '../../static/index/fire/xiaofang.png',
+					icon: '../../static/icon/xiaofang.png',
 					url:"/pages/index/fire/list/list?fireType=2"
 				}, 
+				{
+					title: '燃气告警',
+					name: 'Gas alarm',
+					color: '#ffefef',
+					icon: '../../static/icon/ranqi.png',
+					url:"/pages/index/fire/list/list?fireType=1"
+				}, 
+				
 				{
 					title: '电表设备',
 					name: 'Metering equipment',
 					color: '#e3f5ff',
-					icon: '../../static/index/fire/dianbiao.png',
+					icon:'../../static/icon/dianbiao.png',
+					// icon: '../../static/index/fire/dianbiao.png',
 					url:"/pages/index/fire/list/list?fireType=3"
 				}, 
 				

+ 14 - 8
pages/index/myinfo/myinfo.vue

@@ -4,8 +4,10 @@
 			<u-top-tips type="info" ref="uTips"></u-top-tips>
 			
 			<view class="auth">
-				<text class="cuIcon-titles text-blue padding-right-10"></text>
-				<text>个人信息</text>
+				<view class="flex">
+					<image style="width: 35rpx;height: 35rpx;display: block;padding-top: 6rpx;padding-right: 10rpx;" src="../../../static/icon/tag1.png" mode=""></image>
+					<text>个人信息</text>
+				</view>
 				<view class="card">
 					<u-form :model="model"  ref="uForm" >
 						<u-form-item  :label-width="labelWidth"  label="姓名" >
@@ -19,8 +21,8 @@
 						</u-form-item>
 						<u-form-item   label="手机号码"  :label-width="labelWidth">
 							<u-input disabled maxlength="11"  :value="model.phone" type="number"></u-input>
-							<view class="text-blue"   @click="changePhone" slot="right" >
-								<text style="text-decoration: underline;" class="textblue">换绑</text>
+							<view class="base-color"   @click="changePhone" slot="right" >
+								<text style="text-decoration: underline;" >换绑</text>
 							</view>
 						</u-form-item>
 						<u-form-item :border-bottom="false"  label="脸部信息"  :label-width="labelWidth"></u-form-item>
@@ -34,7 +36,7 @@
 							  bgsrc="http://139.9.103.171:1888/miniofile/xlyq/face1.png"
 							  >
 							</upload-img>
-							<view class="text-center padding-top-20" style="color: #0081ff;">
+							<view class="text-center base-color padding-top-20" >
 								 <text class="cuIcon-camera padding-right-sm" style="font-size: 30rpx;"></text>
 								 <text v-if="$isEmpty(model.face)">点击上传人脸</text>
 								 <text style="margin-top: 40rpx;display: inline-block;" v-else>重新上传人脸</text>
@@ -44,8 +46,10 @@
 				</view>
 			</view>
 			<view class="auth">
-				<text class="cuIcon-titles text-blue padding-right-10"></text>
-				<text>企业信息</text>
+				<view class="flex">
+					<image style="width: 35rpx;height: 35rpx;display: block;padding-top: 6rpx;padding-right: 10rpx;" src="../../../static/icon/tag1.png" mode=""></image>
+					<text>企业信息</text>
+				</view>
 				<view class="card">
 					<u-form :model="model"  ref="uForm" >
 						<u-form-item  :label-width="labelWidth"   label="公司园区" >
@@ -128,7 +132,9 @@
 			 * 换绑手机号
 			 */
 			changePhone(){
-				this.$Router.push({name:'editPhone'})
+				uni.navigateTo({
+					url:"/pages/mine/editPhone/editPhone"
+				})
 			},
 			/**
 			 * 编辑操作时,加载用户的认证信息

+ 1 - 1
pages/index/notice/add.vue

@@ -12,7 +12,7 @@
 			</u-form>
 		</view>
 		<view @click="confirm" class="bottom-bar" style="position: fixed;bottom:40rpx;">
-			<view class="cu-btn bg-blue radius" style="width: 80%;height: 84rpx;">
+			<view class="cu-btn base-bg-color radius" style="width: 80%;height: 84rpx;">
 				提交
 			</view>
 		</view>

+ 15 - 5
pages/index/notice/list.vue

@@ -24,17 +24,22 @@
 				</view>
 			</view>
 		</mescroll-body>
-		<view @click="add" style="position: fixed;bottom: 25%;right: 20rpx;">
-			<view class="cuIcon cu-btn bg-blue" style="width: 80rpx;height: 80rpx;">
+		<!-- <view @click="add" style="position: fixed;bottom: 25%;right: 20rpx;">
+			<view class="cuIcon cu-btn base-bg-color" style="width: 80rpx;height: 80rpx;">
 				<text class="cuIcon-add" style="font-size: 60rpx;"></text>
 			</view>
-		</view>
+		</view> -->
+		<wm-list-add ref="add" @clickAdd="add"/>
 	</view>
 </template>
 <script>
+	import wmListAdd from '@/components/wm-list-add/wm-list-add';
 	import MescrollMixin from "@/components/mescroll-body/mescroll-mixins.js";
 	export default {
 		mixins:[MescrollMixin],
+		components:{
+			wmListAdd
+		},
 		data() {
 			return {
 				agencyId:'',
@@ -76,9 +81,8 @@
 				})
 			},
 			delItem(item){
-				let params="?ids="+item.id
 				this.$showModel('确定要删除该公告吗?').then(res=>{
-					this.$api.notice.remove(params).then(res=>{
+					this.$api.notice.remove(item.id).then(res=>{
 						if (res.success) {
 							this.$showToast('删除成功')
 							setTimeout(()=>{
@@ -129,6 +133,11 @@
 </script>
 
 <style lang="scss">
+	.line-red{
+		border: 1rpx solid #dc0000;
+		color: #dc0000;
+	}
+	
 	.card{
 		background-color: #FFFFFF;
 		border-radius: 20rpx;
@@ -147,6 +156,7 @@
 			}
 		}
 		.content{
+			color: #737373;
 			height: 150rpx;
 			padding:30rpx 20rpx;
 			border-bottom: 1rpx dashed  #e6e5e8;

+ 1 - 1
pages/index/staff-temperature/comps/item.vue

@@ -25,7 +25,7 @@
 				mescroll: null, // mescroll 对象
 				// 上拉配置参数
 				up: {
-					noMoreSize: 2, 
+					noMoreSize: 5, 
 					auto: false,
 					page: {
 						page: 0,

+ 3 - 3
pages/index/staff-temperature/detail.vue

@@ -28,13 +28,13 @@ export default {
 		return {
 			detailData:{},
 			iconStyle:{
-				color:"#59a5f0"
+				color:"#5064eb"
 			},
 			titleStyle0:{
-				color:"#19be6b"
+				color:"#005500"
 			},
 			titleStyle1:{
-				color:"#fa3534"
+				color:"#aa0000"
 			},
 		};
 	},

+ 3 - 3
pages/index/staff-temperature/list.vue

@@ -3,7 +3,7 @@
 		<view class="tabs" style="width: 420rpx;margin: 0rpx  auto;padding-top: 20rpx;">
 			<scroll-view scroll-x class="nav" >
 				<view class="flex text-center">
-					<view  style="border: 1rpx solid #59a5f0;padding:15rpx 20rpx;" class="flex-sub" 
+					<view  style="border: 1rpx solid #5064eb;padding:15rpx 20rpx;" class="flex-sub" 
 					:class="index==current?'nav-checked':'nav-unchecked'" 
 					v-for="(item,index) in tabs" :key="index" @tap="tabChange(index)" >
 						{{item.name}}
@@ -82,13 +82,13 @@
 	}
 	
 	.nav-checked{
-		background-color: #59a5f0;
+		background-color: $base-color;
 		color: #FFFFFF;
 		font-weight: 800;
 	}
 	
 	.nav-unchecked{
 		background-color: #FFFFFF;
-		color: #59a5f0;
+		color: $base-color;
 	}
 </style>

+ 5 - 5
pages/index/staffAudit/comps/card.vue

@@ -10,14 +10,14 @@
 				</view>
 				<view class="right">
 					<text class="" v-if="item.examine==1">已通过</text>
-					<text class="text-orange" v-if="item.examine==0">待审核</text>
-					<text class="text-red" v-if="item.examine==2">未通过</text>
+					<text style="color: #ea7500;" v-if="item.examine==0">待审核</text>
+					<text style="color: #da0000;" v-if="item.examine==2">未通过</text>
 				</view>
 			</view>
 			<view class="item">
 				<view class="left">
 					<view style="padding: 20rpx 30rpx 0;">
-						<view v-if="!$isEmpty(item.face)" class="">
+						<view @click.stop="$util.preview(item.face)" v-if="item.face" class="">
 							<image style="width: 140rpx;height: 140rpx;" :src="item.face" mode=""></image>
 						</view>
 						<view class="content">
@@ -38,10 +38,10 @@
 			</view>
 			<view class="bottom" >
 				<!-- 待审核,显示取消工单 -->
-				<view @click.stop="pass(item)" v-if="item.examine==0" class="cu-btn  sm round bg-blue light margin-right-20" >
+				<view @click.stop="pass(item)" v-if="item.examine==0" style="font-size: 22rpx;" class="cu-btn  sm round base-bg-color  margin-right-20" >
 					审核通过
 				</view>
-				<view @click.stop="fail(item)" v-if="item.examine==0" class="cu-btn  sm round bg-red light" >
+				<view @click.stop="fail(item)" v-if="item.examine==0" style="font-size: 22rpx;" class="cu-btn  sm round bg-red " >
 					审核不通过
 				</view>
 			</view>

+ 13 - 19
pages/index/staffAudit/comps/item.vue

@@ -89,13 +89,7 @@
 					this.$api.enterprisestaff.submit(item).then(res=>{
 						if (res.success==true) {
 							this.$showToast(res.msg)
-							let msgData={
-								openId:item.openId,
-								content:"审核已通过",
-								remarks:"已审核",
-								enterpriseName:item.enterpriseName
-							}
-							that.send(msgData)
+							that.send(item)
 							that.mescroll.resetUpScroll()
 						}
 					})
@@ -108,7 +102,7 @@
 			fail(item){
 				this.$emit('showOpinion',item)
 			},
-			async send(msgData){
+			async send(item){
 				let tokenData={
 					grantType:this.$api.wxData.subscribe_grant_type,
 					appId:this.$api.wxData.appId,
@@ -118,23 +112,23 @@
 				let token=JSON.parse(res.data).access_token
 				let subscribeData={
 					accessToken:token,
-					touser:msgData.openId,
+					touser:item.openId,
 					lang:"zh_CN",
-					page:'/pages/index/index',
-					miniprogramState:this.$miniprogramState.FORMAL,
-				    templateId: this.$tmplIds[0],
-					  "data": {
-						  "thing13": {
-							  "value": msgData.enterpriseName
+					page:'/pages/login/login',
+					miniprogramState:this.$miniprogramState,
+				    templateId: this.$staffTmplIds[0],
+						"data": {
+						  "name1": {
+							  "value": this.$cache.get('loginAccount')
 						  },
-						  "thing9":{
-							  "value": "员工认证信息审核"
+						  "phrase5":{
+							  "value": "员工认证"
 						  },
 						  "phrase2": {
-							  "value": msgData.content
+							  "value": "审核已通过"
 						  },
 						  "thing3": {
-							  "value": msgData.remarks
+							  "value": '已审核'
 						  },
 						}
 				}

+ 41 - 26
pages/index/staffAudit/detail.vue

@@ -19,8 +19,8 @@
 				</view>
 				<view class="right">
 					<text class="" v-if="dataDetail.examine==1">已通过</text>
-					<text class="text-orange" v-if="dataDetail.examine==0">待审核</text>
-					<text class="text-red" v-if="dataDetail.examine==2">未通过</text>
+					<text style="color: #ea7500;" v-if="dataDetail.examine==0">待审核</text>
+					<text style="color: #da0000;" v-if="dataDetail.examine==2">未通过</text>
 				</view>
 			</view>
 			<view class="item">
@@ -42,7 +42,7 @@
 							</view>
 							<view class="" v-if="!this.$isEmpty(dataDetail.face)">
 								<image @click="previewImg(dataDetail.face)" style="width: 200rpx;height: 200rpx;" :src="dataDetail.face" ></image>
-								<view class="text-center text-blue padding-top-10">
+								<view class="text-center base-color padding-top-10">
 									(人脸信息)
 								</view>
 							</view>
@@ -89,11 +89,11 @@
 				</view>
 			</view>
 		</view>
-		<view v-if="dataDetail.examine==0" class="footer-fixed    bg-white flex justify-end margin-right-30" style="padding: 25rpx 20rpx;box-sizing: border-box;z-index: 999;border-top: 1rpx solid #DEDEDE;">
-			<view @click="pass" class="cu-btn df bg-blue light round margin-right-20" >
+		<view v-if="dataDetail.examine==0" :style="{marginBottom:safeAreaBottom}" class="footer-fixed padding-20  bg-white flex justify-end margin-right-30" style="box-sizing: border-box;z-index: 999;border-top: 1rpx solid #f1f1f1;">
+			<view @click="pass" class="cu-btn df base-bg-color  round margin-right-20" >
 				审核通过
 			</view>
-			<view @click="fail" class="cu-btn df bg-red light round " >
+			<view @click="fail" class="cu-btn df bg-red  round " >
 				审核不通过
 			</view>
 		</view>
@@ -118,6 +118,21 @@ export default {
 	onShow() {
 		this.setPreData(false)
 	},
+	computed: {
+	  //ios底部安全区域
+	  safeAreaBottom() {
+	    let info = uni.getSystemInfoSync()
+	    let safe = 20
+	    if (
+	      info &&
+	      ['devtools', 'ios'].includes(info.platform) &&
+	      info.statusBarHeight > safe
+	    ) {
+	      return info.statusBarHeight - safe+'px'
+	    }
+	    return 0
+	  }
+	},
 	methods:{
 		call(phone){
 			uni.makePhoneCall({
@@ -136,23 +151,23 @@ export default {
 				accessToken:token,
 				touser:msgData.openId,
 				lang:"zh_CN",
-				page:'/pages/index/index',
-				miniprogramState:this.$miniprogramState.FORMAL,
-			    templateId: this.$tmplIds[0],
+				page:'/pages/login/login',
+				miniprogramState:this.$miniprogramState,
+			    templateId: this.$staffTmplIds[0],
 				  "data": {
-					  "thing13": {
-						  "value": msgData.enterpriseName
-					  },
-					  "thing9":{
-						  "value": "员工认证信息审核"
-					  },
-					  "phrase2": {
-						  "value": msgData.content
-					  },
-					  "thing3": {
-						  "value": msgData.remarks
-					  },
-					}
+				    "name1": {
+				  	  "value": this.$cache.get('loginAccount')
+				    },
+				    "phrase5":{
+				  	  "value": "员工认证"
+				    },
+				    "phrase2": {
+				  	  "value": msgData.content
+				    },
+				    "thing3": {
+				  	  "value": msgData.remarks || '已阅'
+				    },
+				  }
 			}
 			this.$api.wxApi.subscribe(subscribeData).then(res=>{
 				console.log(res);
@@ -188,8 +203,7 @@ export default {
 						let msgData={
 							openId:item.openId,
 							content:"审核已通过",
-							remarks:'已审核',
-							enterpriseName:item.enterpriseName
+							remarks:'已审核'
 						}
 						this.send(msgData)
 					}
@@ -215,13 +229,14 @@ export default {
 						openId: item.openId,
 						content:"审核不通过",
 						remarks:item.opinion || '审核不通过',
-						enterpriseName:item.enterpriseName
 					}
 					this.send(msgData)
 				}
 				this.$showModel(res.msg,false).then(res=>{
 					this.setPreData(true)
-					this.$Router.back()
+					uni.navigateBack({
+						delta:1
+					})
 				})
 			})
 		},

+ 20 - 26
pages/index/staffAudit/list.vue

@@ -124,13 +124,7 @@
 				that.$api.enterprisestaff.submit(item).then(res=>{
 					if (res.success==true) {
 						this.$showToast(res.msg)
-						let msgData={
-							openId:item.openId,
-							content:"审核不通过",
-							remarks:that.opinion || '审核不通过',
-							enterpriseName:item.enterpriseName
-						}
-						that.send(msgData)
+						that.send(item)
 						that.$nextTick(() => {
 							that.refreshMescroll()
 						})
@@ -140,7 +134,7 @@
 			/**
 			 * 发送信息
 			 */
-			async send(msgData){
+			async send(item){
 				let tokenData={
 					grantType:this.$api.wxData.subscribe_grant_type,
 					appId:this.$api.wxData.appId,
@@ -150,25 +144,25 @@
 				let token=JSON.parse(res.data).access_token
 				let subscribeData={
 					accessToken:token,
-					touser:msgData.openId,
+					touser:item.openId,
 					lang:"zh_CN",
-					page:'/pages/index/index',
-					miniprogramState:this.$miniprogramState.FORMAL,
-				    templateId: this.$tmplIds[0],
+					page:'/pages/login/login',
+					miniprogramState:this.$miniprogramState,
+				    templateId: this.$staffTmplIds[0],
 					  "data": {
-						  "thing13": {
-							  "value": msgData.enterpriseName
-						  },
-						  "thing9":{
-							  "value": "员工认证信息审核"
-						  },
-						  "phrase2": {
-							  "value": msgData.content
-						  },
-						  "thing3": {
-							  "value": msgData.remarks
-						  },
-						}
+					    "name1": {
+					  	  "value": this.$cache.get('loginAccount')
+					    },
+					    "phrase5":{
+					  	  "value": "员工认证"
+					    },
+					    "phrase2": {
+					  	  "value": "审核不通过"
+					    },
+					    "thing3": {
+					  	  "value": this.opinion || '审核不通过'
+					    },
+					  }
 				}
 				this.$api.wxApi.subscribe(subscribeData).then(res=>{
 					console.log(res);
@@ -248,7 +242,7 @@
 
 <style lang="scss" scoped>
 	.text-blue{
-		color: #59a5f0;
+		color: $base-color;
 	}
 	.text-xl{
 		font-size: 34rpx;

+ 545 - 445
pages/login/login.vue

@@ -1,191 +1,281 @@
-<!-- 蓝色简洁登录页面 -->
 <template>
 	<view class="">
-		<view class="t-login">
-			<u-top-tips ref="uTips"></u-top-tips>
-			<u-toast ref="uToast"></u-toast>
-			<!-- 页面装饰图片 -->
-			<!-- <image class="img-a" src="@/static/login/2.png"></image> -->
-			<!-- <image class="img-b" src="@/static/login/3.png"></image> -->
-			<!-- 标题 -->
-			<view class="t-b">欢迎回来!</view>
-			<form class="cl">
-				<!-- 员工登陆 -->
-				<block v-if="typeIndex==0">
-					<view class="t-a" >
-						<image   src="@/static/login/sj.png"></image>
-						<input class="input"  type="number"  placeholder="请输入手机号" maxlength="11" v-model="phone" />
-					</view>
-					<view class="t-a" >
-						<image  src="@/static/login/yz.png"></image>
-						<input class="input" type="number"  maxlength="6" placeholder="请输入验证码" v-model="yzm" />
-						<view :style="showText?'':'background-color: #A7A7A7;'"  class="t-c" @click="getCode()">{{tips}}</view>
-					</view>
-				</block>
-				<!-- 企业登陆 -->
-				<block v-if="typeIndex==1">
-					<view class="t-a">
-						<image  style="width: 50rpx;height: 58rpx;padding-bottom: 10rpx;top: 20rpx;" src="@/static/login/qiye1.png"></image>
-						<input class="input" disabled  type="text" @click="enterpriseShow = true"  placeholder="请选择企业" v-model="enterpriseName" />
-					</view>
-					<view class="t-a" >
-						<image  src="@/static/login/yz.png"></image>
-						<input class="input" type="password"  maxlength="6" placeholder="请输入登录密码" v-model="password" />
-					</view>
-				</block>
-				<!-- 管理员登录 -->
-				<view class="t-a" v-if="typeIndex==2">
-					<image  style="width: 50rpx;height: 58rpx;padding-bottom: 10rpx;top: 20rpx;" src="@/static/login/yuanqu.png"></image>
-					<input class="input" disabled  type="text" @click="ganderSelectShow = true"  placeholder="请选择园区" v-model="ganderInfo.agencyName" />
-				</view>
-				<view class="t-a" v-if="typeIndex==2">
-					<image  src="@/static/login/yz.png"></image>
-					<input class="input" type="password"  maxlength="8" placeholder="请输入登录密码" v-model="inputGanderPsw" />
-				</view>
-				
-				<!-- 登录类型 -->
-				<view  class="flex padding-bottom-50" style="text-align: left">
-					<view @click="typeShow=true" style="border: 1px solid #e9e9e9;background-color: #f8f7fc;" class="cu-btn   df  round">
-						<text class="text-black">{{typeList[typeIndex].text}}</text>
-						<text class="text-black cuIcon-triangledownfill " style="font-size: 40rpx;padding-left: 4rpx;"></text>
-					</view>
+		<view class="top">
+			
+		</view>
+		<view class="content" style="height: 85vh;">
+			<scroll-view style="border-radius: 20rpx;padding-left: 20rpx;" scroll-x class="bg-white nav" scroll-with-animation :scroll-left="scrollLeft">
+				<view class="cu-item text-lg" :class="index==current?'text-checked text-bold cur':''" v-for="(item,index) in list" :key="index" @tap="tabSelect(index)" >
+					{{item.name}}
 				</view>
-				<!-- 七天免登录 -->
-				<view class="checkbox">
-					<u-checkbox 
-					@change="checkboxChange" 
-					v-model="checked" 
-					>七天内免登录</u-checkbox>
+			</scroll-view>
+			<view class="item">
+				<swiper :circular="true" style="height: 100%;" :current="current"  @change="swiperChange"
+					@animationfinish="animationfinish">
+					<swiper-item style="height: 100%;">
+						<view class="flex justify-center flex-direction align-center">
+							<image style="width: 120rpx;height: 120rpx;" src="../../static/login/yuangong.png" ></image>
+						</view>
+						<view class="input">
+							<image src="../../static/login/yuanqu.png" mode=""></image>
+							<input disabled v-model="agencyName"  @click="agencyShow = true" placeholder="请选择您所在的园区"  type="text" value="" />
+						</view>
+						<view class="input">
+							<image class="phone" src="../../static/login/phone.png" mode=""></image>
+							<input v-model="phone" placeholder="请输入您的手机号码"  type="text" value="" />
+						</view>
+						<view class="input" style="position: relative;">
+							<image src="../../static/login/code.png" mode=""></image>
+							<input v-model="yzm" style="width: 60%;" placeholder="请输入验证码"  type="text" value="" />
+							<view :style="showText?'':'background-color: #A7A7A7;'"  class="code" @click="getCode()">{{tips}}</view>
+						</view>
+					</swiper-item>
+					<swiper-item >
+						<view class="flex justify-center flex-direction align-center">
+							<image style="width: 90rpx;height: 90rpx;" src="../../static/login/qiye.png" ></image>
+						</view>
+						<view class="input">
+							<image src="../../static/login/yuanqu.png" mode=""></image>
+							<input disabled v-model="agencyName"  @click="agencyShow = true" placeholder="请选择您所在的园区" type="text" value="" />
+						</view>
+						<view class="input">
+							<image class="qiye" src="../../static/login/qiye.png" mode=""></image>
+							<input disabled v-model="enterpriseName" @click="enterpriseShow = true" placeholder="请选择您所在的企业"  type="text" value="" />
+						</view>
+						<view class="input" >
+							<image src="../../static/login/account.png" mode=""></image>
+							<input v-model="enterpriseAccount" style="width: 60%;" placeholder="请输入您的登录账号"  type="text" value="" />
+						</view>
+						<view class="input" >
+							<image src="../../static/login/password.png" mode=""></image>
+							<input v-model="enterprisePassword" style="width: 60%;" placeholder="请输入您的登录密码"  type="password" value="" />
+						</view>
+					</swiper-item>
+					<swiper-item >
+						<view class="flex justify-center  " >
+							<image style="width: 120rpx;height: 120rpx;" src="../../static/login/guanliyuan.png" ></image>
+						</view>
+						<view class="input">
+							<image src="../../static/login/yuanqu.png" mode=""></image>
+							<input disabled v-model="agencyName"  @click="agencyShow = true" placeholder="请选择您所在的园区" type="text" value="" />
+						</view>
+						<view class="input" >
+							<image src="../../static/login/account.png" mode=""></image>
+							<input v-model="agencyAccount" style="width: 60%;" placeholder="请输入您的登录账号"  type="text" value="" />
+						</view>
+						<view class="input" >
+							<image src="../../static/login/password.png" mode=""></image>
+							<input type="password" v-model="agencyPassword" style="width: 60%;" placeholder="请输入您的登录密码"   value="" />
+						</view>
+					</swiper-item>
+					<swiper-item >
+						<view class="flex justify-center flex-direction align-center">
+							<image style="width: 100rpx;height: 100rpx;" src="../../static/login/fangke.png"></image>
+						</view>
+						<view class="input">
+							<image class="qiye" src="../../static/login/time.png" mode=""></image>
+							<input disabled v-model="interviewTime"  @click="interviewTimeShow = true" placeholder="请选择访问时间"  type="text" value="" />
+						</view>
+						<view class="input">
+							<image src="../../static/login/yuanqu.png" mode=""></image>
+							<input disabled v-model="agencyName"  @click="agencyShow = true" placeholder="请选择您要访问的园区" type="text" value="" />
+						</view>
+						<view class="input">
+							<image class="qiye" src="../../static/login/qiye.png" mode=""></image>
+							<input disabled v-model="enterpriseName" @click="enterpriseShow = true" placeholder="请选择您要访问的企业 (选填)"  type="text" value="" />
+						</view>
+						<view @click="jump('/pages/guest/records/records')" class="text-center base-color padding-top-50 text-lg">
+							<text style="text-decoration: underline;">申请记录</text>
+						</view>
+					</swiper-item>
+				</swiper>
+			</view>
+			<button v-if="current!=3" class="button" @click="login()">登 录</button>
+			<button v-else class="button" @click="applyOpenDoor">申请开门</button>
+		</view>
+		<!-- 园区 -->
+		<u-popup  border-radius="60" height="60%"  mode="bottom" v-model="agencyShow">
+			<view class="fixed cu-bar search bg-white">
+				<view class="search-form round">
+					<text class="cuIcon-search"></text>
+					<u-input style="width: 90%;" v-model="agencyKeyWord" type="text" :adjust-position="false" placeholder="请输入关键字搜索" confirm-type="search"/>
 				</view>
-				<button class="button" @click="login()">登 录</button>
-			</form>
-			<view v-if="typeIndex==0">
-				<view class="t-f">
-					<u-divider color="#aaa" border-color="#aaa">微信快速登陆</u-divider>
+			</view>
+			<scroll-view v-if="!$isEmpty(agencyList)"  style="padding-top: 110rpx;height: 100%;" :scroll-y="true" >
+				<view @click="selectAgency(item)" hover-class="hoverClass" class="text-center padding-30 solid-bottom"  v-for="(item,index) in agencyList" :key="index">
+					<text>{{item.agencyName}}</text>
 				</view>
-				<!-- <view class="t-f"><text>————— 微信快速登录 —————</text></view> -->
-				<view style="display: flex;justify-content: center;padding-top: 50rpx;">
-					<view  @click="wxLogin()"><image style="width: 88rpx;height: 88rpx;" src="@/static/login/wx.png"></image></view>
+				<u-divider v-if="agencyList.length>=20" height="80">只显示20条数据</u-divider>
+			</scroll-view>
+			<u-empty v-else name="search"></u-empty>
+		</u-popup>
+		<!-- 企业列表 -->
+		<u-popup  border-radius="60" height="60%"  mode="bottom" v-model="enterpriseShow">
+			<view class="fixed cu-bar search bg-white">
+				<view class="search-form round">
+					<text class="cuIcon-search"></text>
+					<u-input style="width: 90%;" v-model="enterpriseKeyword" type="text" :adjust-position="false" placeholder="请输入关键字搜索" confirm-type="search"/>
 				</view>
 			</view>
-			<u-popup  border-radius="60" height="60%"  mode="bottom" v-model="enterpriseShow">
-				<view class="fixed cu-bar search bg-white">
-					<view class="search-form round">
-						<text class="cuIcon-search"></text>
-						<u-input style="width: 90%;" v-model="keyword" type="text" :adjust-position="false" placeholder="请输入关键字搜索" confirm-type="search"/>
-					</view>
-					<!-- <view @click="fetchEnterpriseList" class="action">
-						<button class="cu-btn bg-blue shadow-blur round">搜索</button>
-					</view> -->
+			<scroll-view v-if="!$isEmpty(enterpriseList)" style="padding-top: 110rpx;height: 100%;" :scroll-y="true" >
+				<view @click="selectEnterprise(item)" hover-class="hoverClass" class="text-center padding-30 solid-bottom"  v-for="(item,index) in enterpriseList" :key="index">
+					<text>{{item.enterpriseName}}</text>
 				</view>
-				<scroll-view v-if="!$isEmpty(enterpriseList)" @scrolltolower="scrolltolower" style="padding-top: 110rpx;height: 100%;" :scroll-y="true" >
-					<view @click="selectEnterprise(item)" hover-class="hoverClass" class="text-center padding-30 solid-bottom"  v-for="(item,index) in enterpriseList" :key="index">
-						<text>{{item.enterpriseName}}</text>
-					</view>
-					<u-divider v-if="flag" height="80">没有更多了</u-divider>
-				</scroll-view>
-				<u-empty v-else name="search"></u-empty>
-			</u-popup>
-			
-			<!-- 园区列表 -->
-			<u-picker v-model="ganderSelectShow" @confirm="ganderSelectCallback" :range="ganderSelectList" range-key="agencyName" mode="selector"></u-picker>
-			
-			<u-action-sheet @click="typeClick" :list="typeList" v-model="typeShow"></u-action-sheet>
-			<u-verification-code seconds="60" @end="end" @start="start" ref="uCode" @change="codeChange"></u-verification-code>
-		</view>
+				<u-divider v-if="enterpriseList.length>=20" height="80">只显示20条数据</u-divider>
+			</scroll-view>
+			<u-empty v-else name="search"></u-empty>
+		</u-popup>
+		<!-- 访问时间 -->
+		<u-picker @confirm="interviewTimeConfirm" :params="params" v-model="interviewTimeShow" mode="time"></u-picker>
+		<!-- 验证码 -->
+		<u-verification-code seconds="60" @end="end" @start="start" ref="uCode" @change="codeChange"></u-verification-code>
+		
 	</view>
 </template>
 <script>
-let that;
+var that;
 export default {
+	name: 'card',
 	data() {
 		return {
-			keyword:'',
-			enterpriseShow:false,
-			enterpriseList:[],
-			
-			checked:false,//七天免登录
-			
-			//登录类型
-			typeList:[{text:'员工登录',value:'0'},{text:'企业登录',value:'1'},{text:'管理员登录',value:'2'}],
-			typeShow:false,
-			typeIndex:0,
-			
-			//员工登录:手机号码+验证码登录
-			phone: '',
-			yzm: '' ,
+			contentHeight:'',
 			
+			list: [{
+				name: '员工'
+			}, {
+				name: '企业'
+			}, {
+				name: '管理员',
+			}, {
+				name: '访客',
+			}],
+			current: 0,
 			//发送验证码
 			tips: '',
 			showText:true,
 			
-			//企业登录:统一信用代码+密码登录
-			enterpriseName:'',
-			creditCode:'',
-			password:'',
+			//园区下拉框
+			agencyName:'',
+			agencyList:[],
+			agencyKeyWord:'',
+			agencyShow:false,
+			
+			//园区登录
+			agencyId:'',
+			agencyAccount:'',
+			agencyPassword:'',
+			
+			//企业下拉框
+			enterpriseName:'',//回显
+			enterpriseShow:false,
+			enterpriseList:[],
+			enterpriseKeyword:'',
 			
-			//园区管理员登陆
-			ganderInfo:'',//选择的园区对象信息
-			inputGanderPsw:'',//输入的密码
-			ganderSelectList: [],//园区列表
-			ganderSelectShow: false,
+			//企业登录
+			creditCode:'',
+			enterpriseId:'',
+			enterpriseAccount:'',
+			enterprisePassword:'',
 			
-			//微信快速登陆
 			openId:'',
+			//员工登录
+			phone:'',
+			yzm:'',
 			
-			//分页
-			current:1,
-			flag:false,
+			//访客
+			interviewTimeShow:false,
+			interviewTime:'',
+			params: {
+				year: true,
+				month: true,
+				day: true,
+				hour: false,
+				minute: false,
+				second: false
+			},
 		};
 	},
-	watch:{
-		keyword(){
-			let that=this
-			//节流函数
-			if (this.timer){
-				clearTimeout(this.timer)//阻止setTimeout函数的执行
-			}
-			this.timer = setTimeout(() => {
-				that.enterpriseList=[]
-				that.current=1
-				that.fetchEnterpriseList()
-			}, 500)
-		},
-	},
 	onLoad() {
+		this.contentHeight=this.$u.sys().windowHeight+'px'
 		that=this
-		this.getOpenid()
 		if (this.$isAuth()) {
-			//免登录
-			uni.switchTab({
-				url:"/pages/index/index"
+			uni.reLaunch({
+				url:'/pages/index/index'
 			})
+			//免登录
+			return
+		}
+		if(this.$isEmpty(this.$cache.get('openId'))){
+			this.getOpenId()
+		}else{
+			this.openId=this.$cache.get('openId')
 		}
+		this.getAgencyList()
 	},
 	onShow() {
+		this.handelNoToken()
 		this.getAppletStatus()
 	},
-	methods: {
-		getAppletStatus(){
-			this.$api.wxApi.getAppletStatus({id:1}).then(res=>{
-				uni.setStorageSync("appletStatus",res.data.isOnline)
-			})
+	watch:{
+		agencyKeyWord(){
+			let that=this
+			//节流函数
+			if (this.timer){
+				clearTimeout(this.timer)
+			}
+			this.timer = setTimeout(() => {
+				that.agencyList=[]
+				that.getAgencyList()
+			}, 500)
 		},
-		scrolltolower(e){
-			 if(this.enterpriseList.length<this.current*10){
-				 this.flag=true
-			   return
-			}else{
-				this.current++
-				this.fetchEnterpriseList()
+		enterpriseKeyword(){
+			let that=this
+			//节流函数
+			if (this.timer){
+				clearTimeout(this.timer)
 			}
-			
+			this.timer = setTimeout(() => {
+				that.enterpriseList=[]
+				that.getEnterpriseList()
+			}, 500)
+		},
+	},
+	methods:{
+		//处理没token但是却选择了园区的情况
+		//访客从申请列表返回登录页时,是没有token的,这样导致其他接口报错
+		async handelNoToken(){
+			let that=this
+		 	if(!this.$cache.get('tokenObj')&&!this.$isEmpty(this.agencyId)){
+				//如果没有token,且园区id不为空
+				this.agencyList.forEach(item=>{
+					if(item.id==that.agencyId){
+						let params={
+							tenantId:item.tenantId,
+							username:item.account,
+							password:item.password
+						}
+						//放进缓存中,并获取token
+						that.$cache.put('tokenObj',params)
+						//获取token
+						that.$api.getToken(that.$u.queryParams(params)).then(res=>{
+							let token=res.token_type+" "+res.access_token
+							uni.setStorageSync('token', token)
+							//获取企业列表
+							that.getEnterpriseList()
+						})
+					}
+				})
+				
+			}
+		},
+		//访问时间
+		interviewTimeConfirm(e){
+			this.interviewTime=e.year+'-'+e.month+'-'+e.day
 		},
 		/**
 		 * 获取openid
 		 */
-		getOpenid(){
-			let that=this
+		getOpenId(){
 			uni.login({
 				success: (res) => {
 					let data={
@@ -196,60 +286,41 @@ export default {
 					this.$api.wxApi.getOpenId(data).then(res=>{
 						let resData= JSON.parse(res.data)
 						this.openId=resData.openid
+						this.$cache.put('openId',this.openId)
 					})
 				}
 			})
 		},
-		/**
-		 * 加载企业列表
-		 */
-		fetchEnterpriseList(){
+		//获取园区列表
+		getAgencyList(){
 			let params={
-				current:this.current,
-				enterpriseName:this.keyword
+				size:20,
+				agencyName:this.agencyKeyWord
 			}
-			this.$api.enterprise.page(params).then(res=>{
-				this.enterpriseList = [...this.enterpriseList,...res.data.records]
+			this.$api.agency.getAgencyTenantList(params).then(res=>{
+				this.agencyList = res.data
 			})
 		},
-		/**
-		 * 选择公司的回调
-		 */
-		selectEnterprise(item){
-			this.$cache.put('enterpriseName',item.enterpriseName)
-			this.enterpriseShow=false
-			this.creditCode=item.creditCode
-			this.enterpriseName=item.enterpriseName
-		},
-		/**
-		 * 登陆类型
-		 * @param {Object} index
-		 */
-		typeClick(index){
-			this.typeIndex=index
-			if (this.typeIndex==1) {
-				//企业登录,加载企业数据
-				this.fetchEnterpriseList()
-			}else if (this.typeIndex==2) {
-				//园区管理员登陆
-				this.fetchAgencyList()
+		//选择园区
+		selectAgency(item){
+			console.log(item);
+			let params={
+				tenantId:item.tenantId,
+				username:item.account,
+				password:item.password
 			}
-		},
-		/**
-		 * 获取园区列表
-		 */
-		fetchAgencyList(){
-			this.$api.agency.page({size:200}).then(res=>{
-				this.ganderSelectList=res.data
+			this.agencyId=item.id
+			this.agencyName=item.agencyName
+			this.agencyShow=false
+			this.$cache.put('tokenObj',params)
+			//获取token
+			this.$api.getToken(this.$u.queryParams(params)).then(res=>{
+				let token=res.token_type+" "+res.access_token
+				uni.setStorageSync('token', token)
+				//获取企业列表
+				this.getEnterpriseList()
 			})
 		},
-		/**
-		 * 选择园区后的回调
-		 */
-		ganderSelectCallback(e) {
-			let index=e[0]
-			this.ganderInfo=this.ganderSelectList[index]
-		},
 		/**
 		 * 获取验证码
 		 */
@@ -294,9 +365,6 @@ export default {
 				this.$u.toast('倒计时结束后再发送');
 			}
 		},
-		checkboxChange(e){
-			this.checked=e.value
-		},
 		codeChange(text) {
 			this.tips = text;
 		},
@@ -308,62 +376,28 @@ export default {
 		},
 		//当前登录按钮操作
 		async login() {
-			if (this.typeIndex==0) {
+			if (this.current==0) {
 				//员工登录
 				this.staffLogin()
-			}else if (this.typeIndex==1) {
+			}else if (this.current==1) {
 				//企业登录
 				this.enterpriseLogin()
-			}else if (this.typeIndex==2) {
+			}else if (this.current==2) {
 				//管理员登陆
 				this.ganderLogin()
 			}
 		},
-		/**
-		 * 登录成功的处理方式
-		 * 如果是从其他地方跳转回的登录页,则登录后跳转回原页面
-		 * 否则跳转到首页
-		 */
-		handelSuccessLogin(loginType){
-			//储存必要信息
-			if (that.checked) {
-				//七天内免登录
-				//存储登录类型,用于判断用户的登录类型和是否登录
-				that.$cache.put("loginType",loginType,1*24*60*60*7) 
-			}else{
-				//三十分内钟免登录
-				that.$cache.put("loginType",loginType,1*60*30)
-			}
-			//跳转
-			  uni.showLoading({
-				title: '登陆中...'
-			  })
-			  setTimeout(()=>{
-				uni.hideLoading()
-				if (that.$isEmpty(that.$Route.query.fullPath)) {
-					uni.switchTab({
-						url:"/pages/index/index"
-					})
-					return
-				}
-				if (that.$Route.query.fullPath.indexOf('login')) {
-					uni.switchTab({
-						url:"/pages/index/index"
-					})
-				}else{
-					uni.reLaunch({
-						url:that.$Route.query.fullPath
-					})
-				}
-				
-			  },1200)
-		},
 		//员工登录
 		async staffLogin(){
+			//15622205184
 			if (this.phone=='15622205184') {
 				this.userLogin()
 				return
 			}
+			if (this.$isEmpty(this.agencyId)) {
+				this.$u.toast('请选择您所在的园区')
+				return
+			}
 			if (!this.phone) {
 				uni.showToast({ title: '请输入手机号', icon: 'none' });
 				return;
@@ -394,14 +428,13 @@ export default {
 		//用户登陆
 		async userLogin(){
 			//通过手机号查找该员工信息
-			let staffRes=await this.$api.enterprisestaff.page({phone:this.phone})
-			let records=staffRes.data.records
+			let staffRes=await this.$api.login({loginType:0,phone:this.phone})
+			let records=staffRes.data
 			if (this.$isEmpty(records)) {
-				let data={
-					phone:this.phone
-				}
 				//如果没有员工信息。新用户。跳转到注册认证界面
-				this.$Router.push({name:'auth',params:data})
+				uni.navigateTo({
+					url:'/pages/auth/auth?phone='+this.phone
+				})
 			}else{
 				let userInfo=records[0]
 				if (userInfo.examine==0) {
@@ -431,62 +464,62 @@ export default {
 				}
 			}
 		},
-		/**
-		 * 微信快速登陆
-		 */
-		wxLogin(){
-			if (this.$isEmpty(this.openId)) {
-				this.$showModel('获取微信openId失败,请用手机号登录',false)
-				return
+		//获取企业列表
+		getEnterpriseList(){
+			let params={
+				size:20,
+				enterpriseName:this.enterpriseKeyword
 			}
-			this.$api.enterprisestaff.page({openId:this.openId,examine:1}).then(res=>{
-				if (this.$isEmpty(res.data.records)) {
-					this.$refs.uTips.show({
-						title: '请先用绑定的手机号登陆!',
-						type: 'primary',
-						duration: '2500'
-					})
-				}else{
-					let userInfo=res.data.records[0]
-					getApp().globalData.userInfo=userInfo
-					//存储手机号,便于拉取用户信息
-					this.$cache.put('agencyTenantId',userInfo.tenantId)
-					this.$cache.put('phone',userInfo.phone)
-					this.$cache.put('agencyId',userInfo.agencyId)
-					this.$cache.put('enterpriseId',userInfo.enterpriseId)
-					this.handelSuccessLogin('staff')
-				}
+			this.$api.enterprise.page(params).then(res=>{
+				this.enterpriseList =res.data.records
 			})
 		},
+		//选择企业
+		selectEnterprise(item){
+			this.creditCode=item.creditCode
+			this.enterpriseShow=false
+			this.enterpriseName=item.enterpriseName
+			this.enterpriseId=item.id
+		},
 		/**
 		 * 企业登录
 		 */
 		async enterpriseLogin(){
-			if (this.$isEmpty(this.creditCode)) {
+			if(this.$isEmpty(this.agencyId)){
+				this.$u.toast('请选择园区')
+				return
+			}
+			if (this.$isEmpty(this.enterpriseId)) {
 				this.$u.toast('请选择企业')
 				return
 			}
-			if (this.$isEmpty(this.password)) {
+			if (this.$isEmpty(this.enterpriseAccount)) {
+				this.$u.toast("请输入账号")
+				return
+			}
+			if (this.$isEmpty(this.enterprisePassword)) {
 				this.$u.toast("请输入密码")
 				return
 			}
-			this.$api.enterprise.page({creditCode:this.creditCode,password:this.password}).then(res=>{
-				if (this.$isEmpty(res.data.records)) {
-					if (this.$isEmpty(res.data.data)) {
-						this.$u.toast('登录失败,密码错误')
-						return
-					}
+			let params={
+				"loginType":1,  
+			    "enterpriseId": this.enterpriseId,
+			    "enterpriseAccount": this.enterpriseAccount,
+			    "enterprisePassword": this.enterprisePassword
+			}
+			this.$api.login(params).then(res=>{
+				if (this.$isEmpty(res.data)) {
+					this.$u.toast('账号或密码错误')
+					return
 				}else{
 					//公司信息
-					let userInfo=res.data.records[0]
-					this.$api.agency.page({residentialId:userInfo.residentialId}).then(agencyRes=>{
-						this.$cache.put('agencyId',agencyRes.data[0].id)
-					})
+					let userInfo=res.data[0]
+					this.$cache.put('agencyId',userInfo.agencyId)
 					getApp().globalData.userInfo=userInfo
-					//存储公司统一信用代码,便于拉取企业信息
+					this.$cache.put('loginAccount',this.enterpriseAccount)
 					this.$cache.put('agencyTenantId',userInfo.tenantId)
 					this.$cache.put('creditCode',this.creditCode)
-					this.$cache.put('enterpriseId',userInfo.id)
+					this.$cache.put('enterpriseId',userInfo.enterpriseId)
 					this.handelSuccessLogin('enterprise')
 				}
 			})
@@ -494,180 +527,247 @@ export default {
 		/**
 		 * 管理员登陆
 		 */
-		ganderLogin(){
-			if (this.$isEmpty(this.ganderInfo)) {
-				this.$u.toast('请选择园区')
+		async ganderLogin(){
+			if (this.$isEmpty(this.agencyId)) {
+				this.$u.toast('请选择您所在的园区')
+				return
+			}
+			if (this.$isEmpty(this.agencyAccount)) {
+				this.$u.toast('请输入账号')
 				return
 			}
-			if (this.$isEmpty(this.inputGanderPsw)) {
+			if (this.$isEmpty(this.agencyPassword)) {
 				this.$u.toast('请输入密码')
 				return
 			}
-			/**
-			 * 后台直接返回了明文的园区密码,也没写密码校验的接口
-			 * 就直接在前端校验好了
-			 * 安全性差!!!!
-			 */
-			if (this.inputGanderPsw==this.ganderInfo.password) {
-				//输入密码成功
-				//园区信息
-				this.$cache.put('agencyId',this.ganderInfo.id)
-				this.$cache.put('agency',this.ganderInfo.agencyName)
-				this.$cache.put('agencyTenantId',this.ganderInfo.tenantId)
-				getApp().globalData.userInfo=this.ganderInfo
-				this.handelSuccessLogin('agency')
-			}else{
-				this.$u.toast('登录失败,密码错误')
+			let params={
+			    "loginType":2,  
+			    "agencyId": this.agencyId,
+			    "agencyAccount": this.agencyAccount,
+			    "agencyPassword": this.agencyPassword
+			}
+			let res=await this.$api.login(params)
+			let ganderInfo=res.data[0]
+			if (this.$isEmpty(ganderInfo)) {
+				this.$u.toast('账号或密码错误')
 				return
 			}
-		}
-		
-		
+			//订阅消息通知
+			await this.$mpi.subscribe(this.$adminTmplIds)
+			//输入密码成功
+			//园区信息
+			this.$cache.put('loginAccount',this.agencyAccount)
+			this.$cache.put('agencyId',ganderInfo.agencyId)
+			this.$cache.put('agency',ganderInfo.agencyName)
+			this.$cache.put('agencyTenantId',ganderInfo.tenantId)
+			getApp().globalData.userInfo=ganderInfo
+			this.handelSuccessLogin('agency')
+		},
+		/**
+		 * 登录成功的处理方式
+		 * 如果是从其他地方跳转回的登录页,则登录后跳转回原页面
+		 * 否则跳转到首页
+		 */
+		handelSuccessLogin(loginType){
+			that.$cache.put("loginType",loginType)
+			//跳转
+			  uni.showLoading({
+				title: '登陆中...'
+			  })
+			  uni.switchTab({
+			  	url:"/pages/index/index"
+			  })
+			 //  setTimeout(()=>{
+				// uni.hideLoading()
+				// if (that.$isEmpty(that.$Route.query.fullPath)) {
+				// 	uni.switchTab({
+				// 		url:"/pages/index/index"
+				// 	})
+				// 	return
+				// }
+				// if (that.$Route.query.fullPath.indexOf('login')) {
+				// 	uni.switchTab({
+				// 		url:"/pages/index/index"
+				// 	})
+				// }else{
+				// 	uni.reLaunch({
+				// 		url:that.$Route.query.fullPath
+				// 	})
+				// }
+				
+			 //  },1200)
+		},
+		async applyOpenDoor(){
+			if (this.$isEmpty(this.interviewTime)) {
+				this.$u.toast('请选择访问时间')
+				return
+			}
+			if (this.$isEmpty(this.agencyId)) {
+				this.$u.toast('请选择要访问的园区')
+				return
+			}
+			let params={
+				interviewTime:this.interviewTime,
+				agencyId:this.agencyId,
+				openId:this.openId
+			}
+			let res=await this.$api.guest.page(params)
+			let data=res.data.records[0]
+			if (this.$isEmpty(data)) {
+				that.reApply(params)
+				return
+			}
+			uni.showModal({
+				content:"检测到您有该园区的申请记录,是否立即去开门?",
+				cancelText:"重新申请",
+				confirmText:'去开门',
+				success: (res) => {
+					if (res.confirm) {
+						console.log("去开门")
+					}else{
+						that.reApply(params)
+					}
+				}
+			})
+		},
+		reApply(params){
+			params.enterpriseId=this.enterpriseId,
+			params.agencyName=this.agencyName
+			params.enterpriseName=this.enterpriseName
+			uni.navigateTo({
+				url:"/pages/guest/guest"+this.$u.queryParams(params)
+			})
+		},
+		jump(url){
+			if (!this.$isEmpty(url)) {
+				uni.navigateTo({
+					url
+				})
+			}
+		},
+		isToday(str){
+		    var d = new Date(str.replace(/-/g,"/"));
+		    var todaysDate = new Date();
+		    if(d.setHours(0,0,0,0) == todaysDate.setHours(0,0,0,0)){
+		        return true;
+		    } else {
+		        return false;
+		    }
+		},
+		getAppletStatus(){
+			this.$api.wxApi.getAppletStatus({id:1}).then(res=>{
+				uni.setStorageSync("appletStatus",res.data.isOnline)
+			})
+		},
+		tabSelect(index){
+			this.current=index
+		},
+		swiperChange(e) {
+		  this.current = e.detail.current
+		},
+		animationfinish({detail: { current }}) {
+			this.current = current;
+		},
 	}
 };
 </script>
-<style lang="scss" >
-page{
-	background-color: #FFFFFF;
-}
-
-.hoverClass{
-	background-color: #eee;
-}
-.checkbox{
-	padding-bottom: 50rpx;
-	padding-left: 20rpx;
-	margin-top: -10rpx;
-}
-
-.cu-btn.lg {
-	padding: 0 50upx;
-	font-size: 30upx;
-	height: 70upx;
-}
-
-.img-a {
-	position: absolute;
-	width: 100%;
-	top: -300rpx;
-	right: -100rpx;
-}
-.img-b {
-	position: absolute;
-	width: 50%;
-	bottom: 0;
-	left: -50rpx;
-	margin-bottom: -200rpx;
-}
-.t-login {
-	width: 600rpx;
-	margin: -200rpx auto;
-	font-size: 28rpx;
-	color: #000;
-}
-
-.t-login .button {
-	font-size: 28rpx;
-	background: #5677fc;
-	color: #fff;
-	height: 90rpx;
-	line-height: 90rpx;
-	border-radius: 50rpx;
-	box-shadow: 0 5px 7px 0 rgba(86, 119, 252, 0.2);
-}
-
-.t-login .input {
-	padding: 0 20rpx 0 120rpx;
-	height: 90rpx;
-	line-height: 90rpx;
-	margin-bottom: 50rpx;
-	background: #f8f7fc;
-	border: 1px solid #e9e9e9;
-	font-size: 28rpx;
-	border-radius: 50rpx;
-}
 
-.t-login .t-a {
-	position: relative;
-}
-
-.t-login .t-a image {
-	width: 40rpx;
-	height: 42rpx;
-	position: absolute;
-	left: 30rpx;
-	top: 26rpx;
-	padding-right:4rpx;
-}
-
-.t-login .t-b {
-	text-align: left;
-	font-size: 46rpx;
-	color: #000;
-	padding: 300rpx 0 120rpx 0;
-	font-weight: bold;
-}
-.t-login .t-c {
-	position: absolute;
-	right: 22rpx;
-	top: 22rpx;
-	background: #5677fc;
-	color: #fff;
-	font-size: 24rpx;
-	border-radius: 50rpx;
-	height: 50rpx;
-	line-height: 50rpx;
-	padding: 0 25rpx;
-	z-index: 1000;
-}
-
-.t-login .t-d {
-	text-align: center;
-	color: #999;
-	margin: 80rpx 0;
-}
-
-.t-login .t-e {
-	text-align: center;
-	width: 250rpx;
-	margin: 80rpx auto;
-}
-
-.t-login .t-g {
-	float: left;
-	width: 50%;
-}
-
-.t-login .t-e image {
-	width: 50rpx;
-	height: 50rpx;
-}
-
-.t-login .t-f {
-	text-align: center;
-	margin: 100rpx 0 0 0;
-	color: #666;
-}
-
-.t-login .t-f text {
-	margin-left: 20rpx;
-	color: #aaaaaa;
-	font-size: 27rpx;
-}
-
-.t-login .uni-input-placeholder {
-	color: #000;
-}
-
-.cl {
-	zoom: 1;
-}
-
-.cl:after {
-	clear: both;
-	display: block;
-	visibility: hidden;
-	height: 0;
-	content: '\20';
-}
+<style lang="scss">
+	
+	page{
+		background-color: #FFFFFF;
+		height: 100%;
+	}
+	.text-checked{
+		font-size: 36rpx;
+		// color: #333;
+		color: $base-color;
+	}
+	
+	.button{
+		position: fixed;
+		bottom: 5%;
+		left: 0;
+		right: 0;
+		font-size: 28rpx;
+		background: $base-color;
+		color: #fff;
+		height: 90rpx;
+		margin:0rpx 30rpx;
+		line-height: 90rpx;
+		border-radius: 50rpx;
+		box-shadow: 0 5px 7px 0 rgba(86, 119, 252, 0.2);
+	}
+	
+	.guest{
+		font-size: 28rpx;
+		color: #fff;
+		background: $base-color;
+		height: 90rpx;
+		margin:120rpx 30rpx;
+		line-height: 90rpx;
+		border-radius: 50rpx;
+		box-shadow: 0 5px 7px 0 rgba(86, 119, 252, 0.2);
+	}
+	
+	.top{	
+		height: 220rpx;
+		background-color: #5064eb;
+	}
+	
+	.content{
+		border-radius: 20rpx;
+		background-color: #FFFFFF;
+		margin: -120rpx 20rpx 0;
+		.item{
+			height: 100%;
+			padding-top: 15%;
+			.input{
+				margin:40rpx 30rpx;
+				border-radius: 50rpx;
+				background-color: rgba(80, 100, 235,.1);
+				display: flex;
+				padding: 20rpx 30rpx;
+				
+				image{
+					width: 30rpx;
+					height: 36rpx;
+					margin-top: 4rpx;
+					margin-right: 20rpx;
+				}
+				
+				.phone{
+					width: 40rpx;
+					height: 40rpx;
+					margin-top: 4rpx;
+					margin-right: 22rpx;
+				}
+				.qiye{
+					width: 38rpx;
+					height: 38rpx;
+					margin-top: 4rpx;
+					margin-right: 22rpx;
+				}
+				
+				input{
+					width: 100%;
+					height: 100%;
+				}
+				
+				.code{
+					position: absolute;
+					right: 22rpx;
+					top: 18rpx;
+					background: $base-color;
+					color: #fff;
+					font-size: 24rpx;
+					border-radius: 50rpx;
+					height: 50rpx;
+					line-height: 50rpx;
+					padding: 0 25rpx;
+					z-index: 1000;
+				}
+			}
+		}
+	}
 </style>

+ 657 - 30
pages/login/login1.vue

@@ -1,49 +1,676 @@
+<!-- 蓝色简洁登录页面 -->
 <template>
-	<view class="flex bg-white flex-direction justify-center align-center " style="padding-top: 100rpx;">
-		<u-avatar  size="130" src="http://pic2.sc.chinaz.com/Files/pic/pic9/202002/hpic2119_s.jpg"></u-avatar>
-		<text  style="margin:30rpx 0 100rpx 0rpx;color: #333333;font-size: 26rpx;font-family: 'Franklin Gothic Medium', 'Arial Narrow', Arial, sans-serif;">Hi~登陆玩转新邻园区吧</text>
-		<view class="cu-btn round wx-btn ">
-			<view class="text-center"  style="position: relative;left: -100rpx;">
-				<text class="cuIcon-weixin icon"></text>
+	<view class="">
+		<view class="t-login">
+			<u-top-tips ref="uTips"></u-top-tips>
+			<u-toast ref="uToast"></u-toast>
+			<!-- 页面装饰图片 -->
+			<!-- <image class="img-a" src="@/static/login/2.png"></image> -->
+			<!-- <image class="img-b" src="@/static/login/3.png"></image> -->
+			<!-- 标题 -->
+			<view class="t-b">欢迎回来!</view>
+			<form class="cl">
+				<!-- 员工登陆 -->
+				<block v-if="typeIndex==0">
+					<view class="t-a" >
+						<image   src="@/static/login/sj.png"></image>
+						<input class="input"  type="number"  placeholder="请输入手机号" maxlength="11" v-model="phone" />
+					</view>
+					<view class="t-a" >
+						<image  src="@/static/login/yz.png"></image>
+						<input class="input" type="number"  maxlength="6" placeholder="请输入验证码" v-model="yzm" />
+						<view :style="showText?'':'background-color: #A7A7A7;'"  class="t-c" @click="getCode()">{{tips}}</view>
+					</view>
+				</block>
+				<!-- 企业登陆 -->
+				<block v-if="typeIndex==1">
+					<view class="t-a">
+						<image  style="width: 50rpx;height: 58rpx;padding-bottom: 10rpx;top: 20rpx;" src="@/static/login/qiye1.png"></image>
+						<input class="input" disabled  type="text" @click="enterpriseShow = true"  placeholder="请选择园区" v-model="enterpriseName" />
+					</view>
+					<view class="t-a">
+						<image  style="width: 50rpx;height: 58rpx;padding-bottom: 10rpx;top: 20rpx;" src="@/static/login/qiye1.png"></image>
+						<input class="input" disabled  type="text" @click="enterpriseShow = true"  placeholder="请选择企业" v-model="enterpriseName" />
+					</view>
+					<view class="t-a" >
+						<image  src="@/static/login/yz.png"></image>
+						<input class="input" type="password"  maxlength="6" placeholder="请输入登录密码" v-model="password" />
+					</view>
+				</block>
+				<!-- 管理员登录 -->
+				<view class="t-a" v-if="typeIndex==2">
+					<image  style="width: 50rpx;height: 58rpx;padding-bottom: 10rpx;top: 20rpx;" src="@/static/login/yuanqu.png"></image>
+					<input class="input" disabled  type="text" @click="ganderSelectShow = true"  placeholder="请选择园区" v-model="ganderInfo.agencyName" />
+				</view>
+				<view class="t-a" v-if="typeIndex==2">
+					<image  src="@/static/login/yz.png"></image>
+					<input class="input" type="password"  maxlength="8" placeholder="请输入登录密码" v-model="inputGanderPsw" />
+				</view>
+				
+				<!-- 登录类型 -->
+				<view  class="flex padding-bottom-50" style="text-align: left">
+					<view @click="typeShow=true" style="border: 1px solid #e9e9e9;background-color: #f8f7fc;" class="cu-btn   df  round">
+						<text class="text-black">{{typeList[typeIndex].text}}</text>
+						<text class="text-black cuIcon-triangledownfill " style="font-size: 40rpx;padding-left: 4rpx;"></text>
+					</view>
+				</view>
+				<!-- 七天免登录 -->
+				<view class="checkbox">
+					<u-checkbox 
+					@change="checkboxChange" 
+					v-model="checked" 
+					>七天内免登录</u-checkbox>
+				</view>
+				<button class="button" @click="login()">登 录</button>
+			</form>
+			<view v-if="typeIndex==0">
+				<view class="t-f">
+					<u-divider color="#aaa" border-color="#aaa">微信快速登陆</u-divider>
+				</view>
+				<view style="display: flex;justify-content: center;padding-top: 50rpx;">
+					<view  @click="wxLogin()"><image style="width: 88rpx;height: 88rpx;" src="@/static/login/wx.png"></image></view>
+				</view>
 			</view>
-			<view style="position: relative;left: -16rpx;">
-				<text class="text-center text-lg">微信快速登陆</text>
-			</view>
-		</view>
-		<view class="cu-btn round line-gray " style="width: 200rpx;margin-top: 80rpx;">
-			暂不登陆
+			<u-popup  border-radius="60" height="60%"  mode="bottom" v-model="enterpriseShow">
+				<view class="fixed cu-bar search bg-white">
+					<view class="search-form round">
+						<text class="cuIcon-search"></text>
+						<u-input style="width: 90%;" v-model="keyword" type="text" :adjust-position="false" placeholder="请输入关键字搜索" confirm-type="search"/>
+					</view>
+					<!-- <view @click="fetchEnterpriseList" class="action">
+						<button class="cu-btn bg-blue shadow-blur round">搜索</button>
+					</view> -->
+				</view>
+				<scroll-view v-if="!$isEmpty(enterpriseList)" @scrolltolower="scrolltolower" style="padding-top: 110rpx;height: 100%;" :scroll-y="true" >
+					<view @click="selectEnterprise(item)" hover-class="hoverClass" class="text-center padding-30 solid-bottom"  v-for="(item,index) in enterpriseList" :key="index">
+						<text>{{item.enterpriseName}}</text>
+					</view>
+					<u-divider v-if="flag" height="80">没有更多了</u-divider>
+				</scroll-view>
+				<u-empty v-else name="search"></u-empty>
+			</u-popup>
+			
+			<!-- 园区列表 -->
+			<u-picker v-model="ganderSelectShow" @confirm="ganderSelectCallback" :range="ganderSelectList" range-key="agencyName" mode="selector"></u-picker>
+			
+			<u-action-sheet @click="typeClick" :list="typeList" v-model="typeShow"></u-action-sheet>
+			<u-verification-code seconds="60" @end="end" @start="start" ref="uCode" @change="codeChange"></u-verification-code>
 		</view>
 	</view>
 </template>
 <script>
+let that;
 export default {
-	name: '',
 	data() {
 		return {
+			keyword:'',
+			enterpriseShow:false,
+			enterpriseList:[],
+			
+			checked:false,//七天免登录
+			
+			//登录类型
+			typeList:[{text:'员工登录',value:'0'},{text:'企业登录',value:'1'},{text:'管理员登录',value:'2'}],
+			typeShow:false,
+			typeIndex:0,
+			
+			//员工登录:手机号码+验证码登录
+			phone: '',
+			yzm: '' ,
+			
+			//发送验证码
+			tips: '',
+			showText:true,
+			
+			//企业登录:统一信用代码+密码登录
+			enterpriseName:'',
+			creditCode:'',
+			password:'',
+			
+			//园区管理员登陆
+			ganderInfo:'',//选择的园区对象信息
+			inputGanderPsw:'',//输入的密码
+			ganderSelectList: [],//园区列表
+			ganderSelectShow: false,
 			
+			//微信快速登陆
+			openId:'',
+			
+			//分页
+			current:1,
+			flag:false,
 		};
 	},
+	watch:{
+		keyword(){
+			let that=this
+			//节流函数
+			if (this.timer){
+				clearTimeout(this.timer)//阻止setTimeout函数的执行
+			}
+			this.timer = setTimeout(() => {
+				that.enterpriseList=[]
+				that.current=1
+				that.fetchEnterpriseList()
+			}, 500)
+		},
+	},
 	onLoad() {
-		
+		that=this
+		this.getOpenid()
+		if (this.$isAuth()) {
+			//免登录
+			uni.switchTab({
+				url:"/pages/index/index"
+			})
+		}
+	},
+	onShow() {
+		this.getAppletStatus()
 	},
-	methods:{
+	methods: {
+		getAppletStatus(){
+			this.$api.wxApi.getAppletStatus({id:1}).then(res=>{
+				uni.setStorageSync("appletStatus",res.data.isOnline)
+			})
+		},
+		scrolltolower(e){
+			 if(this.enterpriseList.length<this.current*10){
+				 this.flag=true
+			   return
+			}else{
+				this.current++
+				this.fetchEnterpriseList()
+			}
+			
+		},
+		/**
+		 * 获取openid
+		 */
+		getOpenid(){
+			let that=this
+			uni.login({
+				success: (res) => {
+					let data={
+						appId:this.$api.wxData.appId,
+						jsCode:res.code,
+						secret:this.$api.wxData.secret
+					}
+					this.$api.wxApi.getOpenId(data).then(res=>{
+						let resData= JSON.parse(res.data)
+						this.openId=resData.openid
+					})
+				}
+			})
+		},
+		/**
+		 * 加载企业列表
+		 */
+		fetchEnterpriseList(){
+			let params={
+				current:this.current,
+				enterpriseName:this.keyword
+			}
+			this.$api.enterprise.page(params).then(res=>{
+				this.enterpriseList = [...this.enterpriseList,...res.data.records]
+			})
+		},
+		/**
+		 * 选择公司的回调
+		 */
+		selectEnterprise(item){
+			this.$cache.put('enterpriseName',item.enterpriseName)
+			this.enterpriseShow=false
+			this.creditCode=item.creditCode
+			this.enterpriseName=item.enterpriseName
+		},
+		/**
+		 * 登陆类型
+		 * @param {Object} index
+		 */
+		typeClick(index){
+			this.typeIndex=index
+			if (this.typeIndex==1) {
+				//企业登录,加载企业数据
+				this.fetchEnterpriseList()
+			}else if (this.typeIndex==2) {
+				//园区管理员登陆
+				this.fetchAgencyList()
+			}
+		},
+		/**
+		 * 获取园区列表
+		 */
+		fetchAgencyList(){
+			this.$api.agency.page({size:200}).then(res=>{
+				this.ganderSelectList=res.data
+			})
+		},
+		/**
+		 * 选择园区后的回调
+		 */
+		ganderSelectCallback(e) {
+			let index=e[0]
+			this.ganderInfo=this.ganderSelectList[index]
+		},
+		/**
+		 * 获取验证码
+		 */
+		async getCode() {
+			let that=this
+			
+			if (this.$isEmpty(this.phone)) {
+				this.$u.toast("请输入手机号")
+				return
+			}
+			if (!this.$u.test.mobile(this.phone)) {
+				this.$u.toast("请输入正确的手机号")
+				return
+			}
+			if(this.$refs.uCode.canGetCode) {
+				// 模拟向后端请求验证码
+				uni.showLoading({
+					title: '正在获取验证码'
+				})
+				setTimeout(async () => {
+					uni.hideLoading();
+					let params=`?phone=${this.phone}`
+					this.$api.SMSApi.sendSms(params).then(res=>{
+						if (res.data=='获取验证码成功') {
+							that.$u.toast('验证码已发送');
+							// 通知验证码组件内部开始倒计时
+							that.$refs.uCode.start();
+						}else{
+							that.$refs.uTips.show({
+								title: res.data,
+								type: 'primary',
+								duration: '3000'
+							})
+						}
+						// 通知验证码组件内部开始倒计时
+						that.$refs.uCode.start();
+					}).catch(err=>{
+						that.$u.toast('获取验证码失败');
+					})
+				}, 2300);
+			} else {
+				this.$u.toast('倒计时结束后再发送');
+			}
+		},
+		checkboxChange(e){
+			this.checked=e.value
+		},
+		codeChange(text) {
+			this.tips = text;
+		},
+		end() {
+			this.showText=true
+		},
+		start() {
+			this.showText=false
+		},
+		//当前登录按钮操作
+		async login() {
+			if (this.typeIndex==0) {
+				//员工登录
+				this.staffLogin()
+			}else if (this.typeIndex==1) {
+				//企业登录
+				this.enterpriseLogin()
+			}else if (this.typeIndex==2) {
+				//管理员登陆
+				this.ganderLogin()
+			}
+		},
+		/**
+		 * 登录成功的处理方式
+		 * 如果是从其他地方跳转回的登录页,则登录后跳转回原页面
+		 * 否则跳转到首页
+		 */
+		handelSuccessLogin(loginType){
+			//储存必要信息
+			if (that.checked) {
+				//七天内免登录
+				//存储登录类型,用于判断用户的登录类型和是否登录
+				that.$cache.put("loginType",loginType,1*24*60*60*7) 
+			}else{
+				//三十分内钟免登录
+				that.$cache.put("loginType",loginType,1*60*30)
+			}
+			//跳转
+			  uni.showLoading({
+				title: '登陆中...'
+			  })
+			  setTimeout(()=>{
+				uni.hideLoading()
+				if (that.$isEmpty(that.$Route.query.fullPath)) {
+					uni.switchTab({
+						url:"/pages/index/index"
+					})
+					return
+				}
+				if (that.$Route.query.fullPath.indexOf('login')) {
+					uni.switchTab({
+						url:"/pages/index/index"
+					})
+				}else{
+					uni.reLaunch({
+						url:that.$Route.query.fullPath
+					})
+				}
+				
+			  },1200)
+		},
+		//员工登录
+		async staffLogin(){
+			if (this.phone=='15622205184') {
+				this.userLogin()
+				return
+			}
+			if (!this.phone) {
+				uni.showToast({ title: '请输入手机号', icon: 'none' });
+				return;
+			}
+			if (!/^[1][3,4,5,7,8,9][0-9]{9}$/.test(this.phone)) {
+				uni.showToast({ title: '请输入正确手机号', icon: 'none' });
+				return;
+			}
+			if (!this.yzm) {
+				uni.showToast({ title: '请输入验证码', icon: 'none' });
+				return;
+			}
+			if (this.yzm.length!=6) {
+				this.$u.toast('请输入6位数的验证码')
+				return
+			}
+			let params={
+				phone:this.phone,
+				code:this.yzm
+			}
+			let smsRes=await this.$api.SMSApi.validCode(this.$u.queryParams(params))
+			if (smsRes.data!='success') {
+				this.$u.toast(smsRes.data)
+				return
+			}
+			this.userLogin()
+		},
+		//用户登陆
+		async userLogin(){
+			//通过手机号查找该员工信息
+			let staffRes=await this.$api.enterprisestaff.page({phone:this.phone})
+			let records=staffRes.data.records
+			if (this.$isEmpty(records)) {
+				let data={
+					phone:this.phone
+				}
+				//如果没有员工信息。新用户。跳转到注册认证界面
+				this.$Router.push({name:'auth',params:data})
+			}else{
+				let userInfo=records[0]
+				if (userInfo.examine==0) {
+					//有员工信息,但审核未通过,提示等待审核
+					this.$showModel('您的认证信息尚未审核,请联系企业负责人审核',false)
+				}else if(userInfo.examine==1){
+					//后台导入的员工信息没有openid,需要在小程序重新插入
+					if (this.$isEmpty(userInfo.openId)&&!this.$isEmpty(this.openId)) {
+						userInfo.openId=this.openId
+						this.$api.enterprisestaff.submit(userInfo)
+					}
+					this.$cache.put('agencyId',userInfo.agencyId)
+					this.$cache.put('agencyTenantId',userInfo.tenantId)
+					getApp().globalData.userInfo=userInfo
+					//存储手机号,便于拉取用户信息
+					this.$cache.put('phone',userInfo.phone)
+					this.$cache.put('userId',userInfo.id)
+					this.$cache.put('enterpriseId',userInfo.enterpriseId)
+					this.handelSuccessLogin('staff')
+				}else if (userInfo.examine==2) {
+					//审核不通过
+					this.$showModel('您的认证信息审核不通过,是否重新认证!').then(res=>{
+						uni.navigateTo({
+							url:"/pages/auth/auth?operationType=1&phone="+that.phone
+						})
+					})
+				}
+			}
+		},
+		/**
+		 * 微信快速登陆
+		 */
+		wxLogin(){
+			if (this.$isEmpty(this.openId)) {
+				this.$showModel('获取微信openId失败,请用手机号登录',false)
+				return
+			}
+			this.$api.enterprisestaff.page({openId:this.openId,examine:1}).then(res=>{
+				if (this.$isEmpty(res.data.records)) {
+					this.$refs.uTips.show({
+						title: '请先用绑定的手机号登陆!',
+						type: 'primary',
+						duration: '2500'
+					})
+				}else{
+					let userInfo=res.data.records[0]
+					getApp().globalData.userInfo=userInfo
+					//存储手机号,便于拉取用户信息
+					this.$cache.put('agencyTenantId',userInfo.tenantId)
+					this.$cache.put('phone',userInfo.phone)
+					this.$cache.put('agencyId',userInfo.agencyId)
+					this.$cache.put('enterpriseId',userInfo.enterpriseId)
+					this.handelSuccessLogin('staff')
+				}
+			})
+		},
+		/**
+		 * 企业登录
+		 */
+		async enterpriseLogin(){
+			if (this.$isEmpty(this.creditCode)) {
+				this.$u.toast('请选择企业')
+				return
+			}
+			if (this.$isEmpty(this.password)) {
+				this.$u.toast("请输入密码")
+				return
+			}
+			this.$api.enterprise.page({creditCode:this.creditCode,password:this.password}).then(res=>{
+				if (this.$isEmpty(res.data.records)) {
+					if (this.$isEmpty(res.data.data)) {
+						this.$u.toast('登录失败,密码错误')
+						return
+					}
+				}else{
+					//公司信息
+					let userInfo=res.data.records[0]
+					this.$api.agency.page({residentialId:userInfo.residentialId}).then(agencyRes=>{
+						this.$cache.put('agencyId',agencyRes.data[0].id)
+					})
+					getApp().globalData.userInfo=userInfo
+					//存储公司统一信用代码,便于拉取企业信息
+					this.$cache.put('agencyTenantId',userInfo.tenantId)
+					this.$cache.put('creditCode',this.creditCode)
+					this.$cache.put('enterpriseId',userInfo.id)
+					this.handelSuccessLogin('enterprise')
+				}
+			})
+		},
+		/**
+		 * 管理员登陆
+		 */
+		ganderLogin(){
+			if (this.$isEmpty(this.ganderInfo)) {
+				this.$u.toast('请选择园区')
+				return
+			}
+			if (this.$isEmpty(this.inputGanderPsw)) {
+				this.$u.toast('请输入密码')
+				return
+			}
+			/**
+			 * 后台直接返回了明文的园区密码,也没写密码校验的接口
+			 * 就直接在前端校验好了
+			 * 安全性差!!!!
+			 */
+			if (this.inputGanderPsw==this.ganderInfo.password) {
+				//输入密码成功
+				//园区信息
+				this.$cache.put('agencyId',this.ganderInfo.id)
+				this.$cache.put('agency',this.ganderInfo.agencyName)
+				this.$cache.put('agencyTenantId',this.ganderInfo.tenantId)
+				getApp().globalData.userInfo=this.ganderInfo
+				this.handelSuccessLogin('agency')
+			}else{
+				this.$u.toast('登录失败,密码错误')
+				return
+			}
+		}
+		
 		
 	}
 };
 </script>
+<style lang="scss" >
+page{
+	background-color: #FFFFFF;
+}
 
-<style lang="scss" scoped>
-	page{
-		background-color: #FFFFFF;
-	}
-	
-	.wx-btn{
-		background-color: #2ba246;
-		color: #FFFFFF;
-		padding: 40rpx 180rpx;
-		.icon{
-			color: #216a21;
-			font-size: 42rpx;
-		}
-	}
-</style>
+.hoverClass{
+	background-color: #eee;
+}
+.checkbox{
+	padding-bottom: 50rpx;
+	padding-left: 20rpx;
+	margin-top: -10rpx;
+}
+
+.cu-btn.lg {
+	padding: 0 50upx;
+	font-size: 30upx;
+	height: 70upx;
+}
+
+.img-a {
+	position: absolute;
+	width: 100%;
+	top: -300rpx;
+	right: -100rpx;
+}
+.img-b {
+	position: absolute;
+	width: 50%;
+	bottom: 0;
+	left: -50rpx;
+	margin-bottom: -200rpx;
+}
+.t-login {
+	width: 600rpx;
+	margin: -200rpx auto;
+	font-size: 28rpx;
+	color: #000;
+}
+
+.t-login .button {
+	font-size: 28rpx;
+	background: #5677fc;
+	color: #fff;
+	height: 90rpx;
+	line-height: 90rpx;
+	border-radius: 50rpx;
+	box-shadow: 0 5px 7px 0 rgba(86, 119, 252, 0.2);
+}
+
+.t-login .input {
+	padding: 0 20rpx 0 120rpx;
+	height: 90rpx;
+	line-height: 90rpx;
+	margin-bottom: 50rpx;
+	background: #f8f7fc;
+	border: 1px solid #e9e9e9;
+	font-size: 28rpx;
+	border-radius: 50rpx;
+}
+
+.t-login .t-a {
+	position: relative;
+}
+
+.t-login .t-a image {
+	width: 40rpx;
+	height: 42rpx;
+	position: absolute;
+	left: 30rpx;
+	top: 26rpx;
+	padding-right:4rpx;
+}
+
+.t-login .t-b {
+	text-align: left;
+	font-size: 46rpx;
+	color: #000;
+	padding: 300rpx 0 120rpx 0;
+	font-weight: bold;
+}
+.t-login .t-c {
+	position: absolute;
+	right: 22rpx;
+	top: 22rpx;
+	background: #5677fc;
+	color: #fff;
+	font-size: 24rpx;
+	border-radius: 50rpx;
+	height: 50rpx;
+	line-height: 50rpx;
+	padding: 0 25rpx;
+	z-index: 1000;
+}
+
+.t-login .t-d {
+	text-align: center;
+	color: #999;
+	margin: 80rpx 0;
+}
+
+.t-login .t-e {
+	text-align: center;
+	width: 250rpx;
+	margin: 80rpx auto;
+}
+
+.t-login .t-g {
+	float: left;
+	width: 50%;
+}
+
+.t-login .t-e image {
+	width: 50rpx;
+	height: 50rpx;
+}
+
+.t-login .t-f {
+	text-align: center;
+	margin: 100rpx 0 0 0;
+	color: #666;
+}
+
+.t-login .t-f text {
+	margin-left: 20rpx;
+	color: #aaaaaa;
+	font-size: 27rpx;
+}
+
+.t-login .uni-input-placeholder {
+	color: #000;
+}
+
+.cl {
+	zoom: 1;
+}
+
+.cl:after {
+	clear: both;
+	display: block;
+	visibility: hidden;
+	height: 0;
+	content: '\20';
+}
+</style>

+ 73 - 52
pages/mine/changePass/changePass.vue

@@ -3,17 +3,17 @@
 		<view class="bg-white padding-left-40 padding-right-40">
 			<u-form   ref="uForm" >
 				<u-form-item   label="旧密码"  :label-width="labelWidth">
-					<u-input maxlength="8" placeholder="请输入旧密码"   v-model="password"  type="password"></u-input>
+					<u-input maxlength="8" placeholder="请输入旧密码"   v-model="oldPassword"  type="password"></u-input>
 				</u-form-item>
 				<u-form-item   label="新密码"  :label-width="labelWidth">
-					<u-input maxlength="8" placeholder="请输入新密码"   v-model="newPass"  type="password"></u-input>
+					<u-input maxlength="8" placeholder="请输入新密码"   v-model="newPassword"  type="password"></u-input>
 				</u-form-item>
 				<u-form-item   label="确认新密码"  :label-width="labelWidth">
-					<u-input maxlength="8" placeholder="再次输入新密码"   v-model="confirmPass"  type="password"></u-input>
+					<u-input maxlength="8" placeholder="再次输入新密码"   v-model="confirmPassword"  type="password"></u-input>
 				</u-form-item>
 			</u-form>
 		</view>
-		<view @click="submit"  class="footer-fixed cu-btn  bg-color-base flex" style="padding: 45rpx;">
+		<view @click="submit"  class=" footer-fixed cu-btn  base-bg-color flex " style="padding: 45rpx;" :style="{marginBottom:safeAreaBottom}">
 			确认修改
 		</view>
 	</view>
@@ -25,86 +25,105 @@
 			return {
 				loginType:'',
 				
+				account:'',
+				
 				dataDetail:{},
 				
 				labelWidth:180,
-				password:'',
-				newPass:'',
-				confirmPass:''
+				oldPassword:'',
+				newPassword:'',
+				confirmPassword:''
 			}
 		},
-		onShow() {
-			let dataDetail=getApp().globalData.userInfo
-			this.loginType=this.$cache.get('loginType')
-			if (this.$isEmpty(dataDetail)) {
-				if (this.$loginType.AGENCY==this.loginType) {
-					//加载园区信息
-					this.fetchAgencyInfo()
-				}else if(this.$loginType.ENTERPRISE==this.loginType){
-					//加载企业信息
-					this.fetchEnterpriseInfo()
-				}
+		onLoad() {
+			this.$loginType=this.$cache.get('loginType')
+			if (!this.$cache.get('loginAccount')) {
+				uni.showModal({
+					content:"系统异常",
+					showCancel:false,
+					success() {
+						uni.navigateBack({
+							delta:1
+						})
+					}
+				})
 			}else{
-				this.dataDetail=dataDetail
+				this.account=this.$cache.get('loginAccount')
 			}
 		},
+		computed: {
+		  //ios底部安全区域
+		  safeAreaBottom() {
+		    let info = uni.getSystemInfoSync()
+		    let safe = 20
+		    if (
+		      info &&
+		      ['devtools', 'ios'].includes(info.platform) &&
+		      info.statusBarHeight > safe
+		    ) {
+		      return info.statusBarHeight - safe+'px'
+		    }
+		    return 0
+		  }
+		},
 		methods: {
-			/**
-			 * 加载园区信息
-			 */
-			fetchAgencyInfo(){
-				let agencyId=this.$cache.get('agencyId')
-				this.$api.agency.page({id:agencyId}).then(res=>{
-					this.dataDetail=res.data[0]
-				})
-			},
-			/**
-			 * 加载企业信息
-			 */
-			fetchEnterpriseInfo(){
-				let creditCode=this.$cache.get('creditCode')
-				this.$api.enterprise.detail({creditCode:creditCode}).then(res=>{
-					this.dataDetail=res.data
-				})
-			},
 			/**
 			 * 修改密码
 			 */
 			submit(){
-				if (this.$isEmpty(this.password)) {
+				if (this.$isEmpty(this.oldPassword)) {
 					this.$u.toast("请输入旧密码")
 					return
 				}
-				if (this.password!=this.dataDetail.password) {
-					this.$u.toast("旧密码错误")
-					return
-				}
-				if (this.$isEmpty(this.newPass)) {
+				if (this.$isEmpty(this.newPassword)) {
 					this.$u.toast('请输入新密码')
 					return
 				}
-				if (this.newPass.length<6) {
+				if (this.newPassword.length<6) {
 					this.$u.toast('新密码不能少于6位')
 					return
 				}
-				if (this.$isEmpty(this.confirmPass)) {
+				if (this.$isEmpty(this.confirmPassword)) {
 					this.$u.toast('请再次输入新密码')
 					return
 				}
-				if (this.newPass!=this.confirmPass) {
+				if (this.newPassword!=this.confirmPassword) {
 					this.$u.toast('两次密码输入不一致')
 					return
 				}
-				this.dataDetail.password=this.newPass
+				let loginType=''
 				
+				if (this.loginType==this.$loginType.AGENCY) {
+					//园区
+					loginType=2
+				}else{
+					//企业
+					loginType=1
+				}
+				
+				let params={
+					loginType,
+					account:this.account,
+					oldPassword:this.oldPassword,
+					newPassword:this.newPassword
+				}
+				this.$api.updatePassword(this.$u.queryParams(params)).then(res=>{
+					if (res.data==true) {
+						this.$showModel('修改成功,请重新登陆!',false).then(res=>{
+							this.$cache.clear()
+							uni.reLaunch({
+								url:"/pages/login/login"
+							})
+						})
+					}else{
+						this.$u.toast(res.data)
+					}
+				})
 				if (this.loginType==this.$loginType.AGENCY) {
 					//修改园区密码
 					this.$api.agency.submit(this.dataDetail).then(res=>{
 						if (res.success) {
-							this.$showModel('修改成功,请重新登陆!',false).then(res=>{
-								this.$cache.clear()
-								this.$Router.push('login')
-							})
+							
 						}
 					})
 					
@@ -114,7 +133,9 @@
 						if (res.success) {
 							this.$showModel('修改成功,请重新登陆!',false).then(res=>{
 								this.$cache.clear()
-								this.$Router.push('login')
+								uni.navigateTo({
+									url:"/pages/login/login"
+								})
 							})
 						}
 					})

+ 11 - 5
pages/mine/editPhone/editPhone.vue

@@ -10,7 +10,7 @@
 				</u-form-item>
 				<u-form-item  label="验证码"  :label-width="labelWidth">
 					<u-input  placeholder="请输入验证码" v-model="code" type="text"></u-input>
-					<view  :style="showText?'':'background-color: #A7A7A7;'"  @click="getCode" slot="right" class="cu-btn round sm bg-blue">
+					<view  :style="showText?'':'background-color: #A7A7A7;'"  @click="getCode" slot="right" class="cu-btn round sm base-bg-color">
 						{{codeTips}}
 					</view>
 				</u-form-item>
@@ -20,7 +20,7 @@
 
 			</u-form>
 		</view>
-		<view @click="submit" class="cu-btn bg-blue round flex " style="padding: 40rpx;margin: 80rpx 20rpx;">
+		<view @click="submit" class="cu-btn base-bg-color round flex " style="padding: 40rpx;margin: 80rpx 20rpx;">
 			换绑手机号
 		</view>
 		<u-verification-code seconds="60" @end="end" @start="start" ref="uCode" @change="codeChange"></u-verification-code>
@@ -45,7 +45,9 @@ export default {
 		//从缓存中获取手机号
 		if (this.$isEmpty(this.$cache.get('phone'))) {
 			this.$showModel('系统错误',false).then(res=>{
-				this.$Router.back()
+				uni.navigateBack({
+					delta:1
+				})
 				return
 			})
 		}else{
@@ -118,7 +120,9 @@ export default {
 					getApp().globalData.userInfo=that.userInfo
 					that.$cache.put('phone',that.newPhone)
 					that.$showModel('修改成功',false).then(res=>{
-						that.$Router.back()
+						uni.navigateBack({
+							delta:1
+						})
 					})
 				}
 			})
@@ -130,7 +134,9 @@ export default {
 			let that=this
 			if (this.$isEmpty(this.phone)) {
 				this.$showModel('系统异常',false).then(res=>{
-					this.$Router.back()
+					uni.navigateBack({
+						delta:1
+					})
 				})
 				return
 			}

+ 21 - 8
pages/mine/feedback/feedback.vue

@@ -52,12 +52,9 @@
 				
 			</view>
 		</view>
-		<view class="bg-white margin-top-20 footer-fixed" @click="sumit">
-			<view class="flex flex-direction padding-sm">
-				<button class="radius cu-btn bg-blue" style="padding: 45rpx;">提交反馈</button>
-			</view>
+		<view @click="submit"  class=" footer-fixed cu-btn  base-bg-color flex " style="padding: 45rpx;" :style="{marginBottom:safeAreaBottom}">
+			提交反馈
 		</view>
-		
 	</view>
 </template>
 
@@ -96,6 +93,21 @@
 				],
 			}
 		},
+		computed: {
+		  //ios底部安全区域
+		  safeAreaBottom() {
+		    let info = uni.getSystemInfoSync()
+		    let safe = 20
+		    if (
+		      info &&
+		      ['devtools', 'ios'].includes(info.platform) &&
+		      info.statusBarHeight > safe
+		    ) {
+		      return info.statusBarHeight - safe+'px'
+		    }
+		    return 0
+		  }
+		},
 		methods: {
 			//选择反馈类型
 			RadioChange(e){
@@ -201,6 +213,7 @@
 	view{
 		box-sizing: border-box;
 	}
+	
 	.commit{
 		color: #fff;
 		font-size: 28upx;
@@ -209,7 +222,7 @@
 		margin: 0 20upx;
 		width: 690upx;
 		height:88upx;
-		background:#59a5f0;
+		background:$base-color;
 		border-radius:25px;
 		margin-bottom: 50upx;
 		position: absolute;
@@ -231,8 +244,8 @@
 				border: 1rpx solid #d1d1d1;
 			}
 			.checkBorder{
-				border: 1rpx solid #59a5f0;
-				color: #59a5f0;
+				border: 1rpx solid $base-color;
+				color: $base-color;
 			}
 			
 		}

+ 3 - 1
pages/mine/mine-info/mine-info.vue

@@ -81,7 +81,9 @@
 						confirmText:"确认",
 						content:"退出成功",
 						success() {
-							that.$Router.replaceAll({name:"login"})
+							uni.reLaunch({
+								url:"/pages/login/login"
+							})
 						}
 					 })
 				} catch (e) {

+ 291 - 340
pages/mine/mine.vue

@@ -1,372 +1,323 @@
 <template>
-<view >
-	<view >
-		<view v-if="loginType=='staff'" class="mine_order_statue">
-			<view   class="flex justify-between" style="padding:30rpx 20rpx;">
-				<view class="flex">
-					<image :src="staffInfo.avatar?staffInfo.avatar:'http://139.9.103.171:8888/group1/M00/00/01/iwlnq1_AYZqAb30pAAAQNvkj3Wk302.png'"  style="background-color: #FFFFFF;width: 106rpx;height: 106rpx;border-radius: 10rpx;" ></image>
-					<view  class="flex flex-direction padding-left-30">
-						<text class="text-lg text-bold" v-text="staffInfo.realName"></text>
-						<view  class="text-df"  style="padding: 20rpx 0;" >
-							<text  class="margin-top-40 text-df">手机号:{{staffInfo.phone}}</text>
-						</view>
+	<view>
+		<view class="">
+			<view class="header">
+				<view class="" style="height: 25rpx;"></view>
+			    <view class="flex justify-between">
+			    	<view class="flex">
+			    		<view class="avatar">
+			    		   <open-data  type="userAvatarUrl"></open-data>
+			    		</view>
+			    		<view style="padding: 10rpx 20rpx;" v-if="loginType=='staff'">
+			    			<open-data style="font-size: 32rpx;" type="userNickName"></open-data>
+			    			<view class="text-white text-df padding-top-20">
+			    				{{$cache.get('phone')}}
+			    			</view>
+			    		</view>
+			    		<view v-else class="nickname">
+			    			<open-data  type="userNickName"></open-data>
+			    		</view>
+			    	</view>
+					<view @click="loginOut" class="flex justify-center align-center" style="text-decoration: underline;color: #FFFFFF;padding-right: 80rpx;">
+						<image src="../../static/login/logout.png" style="width: 50rpx;" mode="widthFix"></image>
 					</view>
-				</view>
-			</view>
-		</view>
-		<view class="item_list" v-if="loginType=='staff'">
-			<view class=" flex justify-between" style="padding: 34rpx 24rpx 34rpx 40rpx;">
-				<view class="text-bold">所属公司</view>
-				<view class="" @click="goEnterpriseDetail">
-					<text class="text-black" style="font-size: 28rpx;" >{{staffInfo.enterpriseName}}</text>
-					<text class="cuIcon-right text-gray padding-left-20" style="font-size: 24rpx;"></text>
-				</view>
-			</view>
-		</view>
-		<view class="item_list" style="margin-top: 0;" v-if="loginType=='enterprise'">
-			<view class="flex justify-between" style="padding: 50rpx 25rpx 60rpx 40rpx;">
-				<view class="text-bold">我的公司</view>
-				<view class="" @click="goEnterpriseDetail">
-					<text class="text-black" v-if="loginType=='enterprise'">{{enterpriseInfo.enterpriseName}}</text>
-					<text class="cuIcon-right text-gray padding-left-20" style="font-size: 24rpx;"></text>
-				</view>
+			    </view>
 			</view>
-		</view>
-		<view class="item_list" style="margin-top: 0;" v-if="loginType=='agency'">
-			<view class="flex justify-between" style="padding: 50rpx 25rpx 60rpx 40rpx;">
-				<view class="text-bold">我的园区</view>
-				<view class="" @click="goAgencyDetail">
-					<text class="text-black">{{agencyInfo.agencyName}}</text>
-					<text class="cuIcon-right text-gray padding-left-20" style="font-size: 24rpx;"></text>
-				</view>
+			
+			<view class="info" @click="jump">
+				<text v-text="loginType=='agency'?'我的园区':'所属公司'"></text>
+				<text>{{title}}</text>
 			</view>
-		</view>
-		<view class="item_list" >
-			<view class="item" v-if="item.show"  v-for="(item, index) in systemItemList" :key="index" @tap="tapToMenu(item.name)">
-				<view class="item_content">
-					<image :src="item.itemIcon"></image>
-					<text>{{ item.itemName }}</text>
+			
+			<view class="item_list" >
+				<view class="item">
+					<text style="font-size: 32rpx;">系统功能</text>
 				</view>
-				<view class="">
-					<image src="http://139.9.103.171:1888/img/image/arrow.png"></image>
+				<view v-if="item.show" class="item" v-for="(item, index) in systemItemList" :key="index" @tap="tapToMenu(item.name)">
+					<view class="item_content">
+						<image :src="item.itemIcon"></image>
+						<text>{{ item.itemName }}</text>
+					</view>
+					<view class="">
+						<image src="http://139.9.103.171:1888/img/image/arrow.png"></image>
+					</view>
 				</view>
 			</view>
 		</view>
-		
-		<view @click="loginOut" class="cu-btn round flex bg-blue" style="padding: 40rpx;margin: 80rpx 15rpx 0;">
-			退出登陆
-		</view>
-		
+		 <u-tabbar v-model="tabbarCurr"
+		  :icon-size="tabbar.iconSize" 
+		  :active-color="tabbar.activeColor" 
+		  :mid-button-size="tabbar.MinButtonSize" 
+		  :list="tabbar.list" :mid-button="true">
+		  </u-tabbar>
 	</view>
-	<u-tabbar v-model="tabbarCurr"
-	 :icon-size="tabbar.iconSize" 
-	 :active-color="tabbar.activeColor" 
-	 :list="tabbar.list" :mid-button="false">
-	 </u-tabbar>
-</view>
 </template>
 
 <script>
-var app=getApp()
-import DtCustomBar from '@/components/dt_custom_bar.vue'
-import {tabbar} from "@/assets/js/tabbar.js"
-let that
-export default {
-	components: {
-		DtCustomBar
-	},
-	data() {
-		return {
-			background: {
-				backgroundColor: '#f5f6f8',
-			},
-			//tabbar
-			tabbarCurr:2,
-			tabbar:{},
-			
-			//登陆类型
-			loginType:'',
-			//员工信息
-			staffInfo:{},
-			//企业信息
-			enterpriseInfo:{},
-			//园区信息
-			agencyInfo:{},
-			
-			//功能列表
-			systemItemList:[],
-		};
-	},
-	onShow() {
-		this.apiGetUserInfo()
-	},
-	onReady() {
-		if (this.$cache.get('loginType')!=this.$loginType.STAFF) {
-			let tmp=this.$u.deepClone(tabbar)
-			tmp.list.splice(1,1)
-			this.tabbar=tmp
-		}else{
-			this.tabbar=tabbar
-		}
-	},
-	onLoad() {
-		that=this
-		
-		this.fetchStaticData()
-		if (this.loginType==this.$loginType.STAFF) {
-			this.fetchStaffInfo()
-		}else if (this.loginType==this.$loginType.ENTERPRISE) {
-			this.fetchEnterpriseInfo()
-		}else if (this.loginType==this.$loginType.AGENCY) {
-			this.fetchAgencyInfo()
-		}
-	},
-	methods: {
-		fetchStaticData(){
-			this.loginType=this.$cache.get('loginType') || ''
-			
-			this.systemItemList=[
-				// {
-				// 	itemName: '物业报修',
-				// 	itemIcon: '/static/index/blue/wuye.png',
-				// 	index:10
-				// },
-				// {
-				// 	itemName: '人员认证',
-				// 	itemIcon: '/static/index/blue/shenfen.png',
-				// 	index:10
-				// },
-				{
-					itemName: '换绑手机号',
-					itemIcon: '/static/index/blue/change-phone.png',
-					name:'changePhone',
-					show:this.loginType==this.$loginType.STAFF
-				},
-				{
-					itemName: '修改密码',
-					itemIcon: '/static/index/blue/changePsw.png',
-					name:'changePsw',
-					show:this.loginType!=this.$loginType.STAFF
-				},
-				{
-					itemName: '问题反馈',
-					itemIcon: '/static/index/blue/fankui.png',
-					name:'feedback',
-					show:true
-				},
-				{
-					itemName: '帮助中心',
-					itemIcon: '/static/index/blue/shuoming.png',
-					name:'help',
-					show:true
-				},
-				{
-					itemName: '用户协议',
-					itemIcon: '/static/index/blue/xieyi1.png',
-					name:'protocol',
-					show:true
-				}
-			]
-		},
-		
-		loginOut(){
-			let that=this
-			try {
-			     uni.clearStorageSync();
-				 uni.showModal({
-				 	showCancel:false,
-					confirmText:"确认",
-					content:"退出成功",
-					success() {
-						getApp().globalData.userInfo=''
-						that.$Router.replaceAll({name:"login"})
-					}
-				 })
-			} catch (e) {
-				uni.showToast({
-					title:"退出失败",
-					icon:"none"
-				})
+	var app=getApp()
+	import {tabbar} from "@/assets/js/tabbar.js"
+	let that
+	export default {
+		data() {
+			return {
+				//tabbar
+				tabbarCurr:2,
+				tabbar:tabbar,
+				
+				//登陆类型
+				loginType:'',
+				title:'',
+				//功能列表
+				systemItemList:[]
+				
 			}
 		},
-		/**
-		 * 订阅认证信息
-		 */
-		subscribe(){
-			// 获取用户的当前设置,判断是否点击了“总是保持以上,不在询问”
-			uni.getSetting({
-			 	withSubscriptions: true,//是否获取用户订阅消息的订阅状态,默认false不返回
-			   success(res){
-				   if(res.authSetting['scope.address']){
-						 uni.openSetting({ // 打开设置页
-						   success(res) {
-								console.log(res.authSetting)
-							},
-							fail: (err) => {
-								console.log(err);
-							}
-						 });
-				    }
-				   else{// 用户没有点击“总是保持以上,不再询问”则每次都会调起订阅消息
-						 uni.requestSubscribeMessage({
-							   tmplIds: that.$tmplIds,
-							   success (res) {
-								 console.log(res)
-							   },
-							   fail(err){
-								   console.error(err);
-							   }
-						  })
-					 }
-			   }
-			})
-		},
-		/**
-		 * 加载员工信息
-		 */
-		fetchStaffInfo(){
-			let phone= this.$cache.get('phone')
-			this.$api.enterprisestaff.page({phone:phone,examine:1}).then(res=>{
-				this.staffInfo=res.data.records[0]
-			})
-		},
-		/**
-		 * 加载企业信息
-		 */
-		fetchEnterpriseInfo(){
-			let creditCode=this.$cache.get('creditCode')
-			this.$api.enterprise.detail({creditCode:creditCode}).then(res=>{
-				this.enterpriseInfo=res.data
-			})
-		},
-		/**
-		 * 加载园区信息
-		 */
-		fetchAgencyInfo(){
-			console.log(getApp().globalData.userInfo);
-			
-			let agencyId=this.$cache.get('agencyId')
-			this.$api.agency.page({id:agencyId}).then(res=>{
-				this.agencyInfo=res.data[0]
-			})
-		},
-		/**
-		 * 企业详情
-		 */
-		goEnterpriseDetail(){
-			uni.navigateTo({
-				url:"/pages/company/company"
-			})
-		},
-		/**
-		 * 园区详情
-		 */
-		goAgencyDetail(){
-			uni.navigateTo({
-				url:"/pages/index/agency/agency"
-			})
-		},
-		//功能跳转
-		tapToMenu(name){
-			let url=''
-			switch (name){
-				case 'feedback':
-					url="/pages/mine/feedback/feedback"
-					break;
-				case 'changePhone':
-					url="/pages/mine/editPhone/editPhone"
-					break;
-				case 'changePsw':
-					url="/pages/mine/changePass/changePass"
-					break;
-				default:
-					break;
+		onLoad() {
+			that=this
+			this.fetchStaticData()
+			if (this.loginType==this.$loginType.STAFF) {
+				console.log("1");
+				this.fetchStaffInfo()
+			}else if (this.loginType==this.$loginType.ENTERPRISE) {
+				console.log("2");
+				this.fetchEnterpriseInfo()
+			}else if (this.loginType==this.$loginType.AGENCY) {
+				console.log("3");
+				this.fetchAgencyInfo()
 			}
-			if (!this.$isEmpty(url)) {
-				uni.navigateTo({
-					url:url
+		},
+		// onReady() {
+		// 	if (this.$cache.get('loginType')!=this.$loginType.STAFF) {
+		// 		let tmp=this.$u.deepClone(tabbar)
+		// 		tmp.list.splice(1,1)
+		// 		this.tabbar=tmp
+		// 	}else{
+		// 		this.tabbar=tabbar
+		// 	}
+		// },
+		methods: {
+			loginOut(){
+				let that=this
+				try {
+					 uni.clearStorageSync();
+					 uni.showModal({
+						showCancel:false,
+						confirmText:"确认",
+						content:"退出成功",
+						success() {
+							getApp().globalData.userInfo=''
+							uni.reLaunch({
+								url:"/pages/login/login"
+							})
+						}
+					 })
+				} catch (e) {
+					uni.showToast({
+						title:"退出失败",
+						icon:"none"
+					})
+				}
+			},
+			fetchStaticData(){
+				this.loginType=this.$cache.get('loginType') || ''
+				this.systemItemList=[
+					{
+						itemName: '换绑手机号',
+						itemIcon: '/static/icon/phone.png',
+						name:'changePhone',
+						show:this.loginType==this.$loginType.STAFF
+					},
+					{
+						itemName: '修改密码',
+						itemIcon: '/static/icon/mima.png',
+						name:'changePsw',
+						show:this.loginType!=this.$loginType.STAFF
+					},
+					{
+						itemName: '问题反馈',
+						itemIcon: '/static/icon/fankui.png',
+						name:'feedback',
+						show:true
+					},
+					{
+						itemName: '用户协议',
+						itemIcon: '/static/icon/xieyi.png',
+						name:'protocol',
+						show:true
+					}
+				]
+			},
+			/**
+			 * 加载员工信息
+			 */
+			fetchStaffInfo(){
+				let phone= this.$cache.get('phone')
+				this.$api.enterprisestaff.page({phone:phone,examine:1}).then(res=>{
+					this.title=res.data.records[0].enterpriseName
 				})
-			}else{
+			},
+			/**
+			 * 加载企业信息
+			 */
+			fetchEnterpriseInfo(){
+				let creditCode=this.$cache.get('creditCode')
+				this.$api.enterprise.detail({creditCode:creditCode}).then(res=>{
+					this.title=res.data.enterpriseName
+				})
+			},
+			/**
+			 * 加载园区信息
+			 */
+			fetchAgencyInfo(){
+				let agencyId=this.$cache.get('agencyId')
+				this.$api.agency.page({id:agencyId}).then(res=>{
+					this.title=res.data[0].agencyName
+				})
+			},
+			/**
+			 * 企业详情
+			 */
+			jump(){
+				let url=''
+				if (this.loginType==this.$loginType.AGENCY) {
+					url='/pages/agency/agency'
+				}else{
+					url='/pages/company/company'
+				}
 				uni.navigateTo({
-					url:"/pages/mine/protocol/protocol"
+					url
 				})
-			}
-		},
-		//获取微信昵称和头像
-		getUserInfo(e){
-			this.userInfo=e.detail.userInfo
-			console.log(this.userInfo.avatarUrl)
-			this.$cache.put('userInfo',this.userInfo)
-		},
-		//获取用户信息
-		apiGetUserInfo(){
-			this.phone=this.$cache.get('phone') || ''
-			this.userInfo= getApp().globalData.userInfo || {}
-		},
-	},
-
-};
-</script>
-<style lang="scss" scoped>
-.page{
-	min-height: 100vh;
-	background-color: #FFFFFF;
-	// background-color: #f5f6f8;
-}
-button::after {
-	  border: none;
+			},
+			//功能跳转
+			tapToMenu(name){
+				let url=''
+				switch (name){
+					case 'feedback':
+						url="/pages/mine/feedback/feedback"
+						break;
+					case 'changePhone':
+						url="/pages/mine/editPhone/editPhone"
+						break;
+					case 'changePsw':
+						url="/pages/mine/changePass/changePass"
+						break;
+					default:
+						break;
+				}
+				if (!this.$isEmpty(url)) {
+					uni.navigateTo({
+						url:url
+					})
+				}else{
+					uni.navigateTo({
+						url:"/pages/mine/protocol/protocol"
+					})
+				}
+			},
+		}
 	}
+</script>
 
+<style>
+	page{
+		background-color: #FFFFFF;
+	}
+</style>
 
-.mine_order_statue {
-	//todo
-	// box-shadow: 0 10rpx #e7f1fd ;
-	background: #fff;
-	padding: 10upx 20upx;
-	border-radius: 20rpx;
-}
-
-.item_list {
-	display: flex;
-	flex-direction: column;
-	background: #fff;
-	margin-top: 15upx;
-    // margin-left: 20rpx;
-	// margin-right: 20rpx;
-	border-radius: 10rpx;
-	.item {
+<style lang="scss" scoped>
+	
+	
+	.header{
+		background-color: $base-color;
+		height: 250rpx;
+		
+		.avatar{
+			display: block;
+			margin-left: 50rpx;
+		    overflow:hidden;  
+		    width: 120rpx;
+		    height: 120rpx; 
+		    left: 50%;  
+		    border-radius: 50%;  
+		}
+		.nickname{
+			display: flex;
+			justify-content: center;
+			align-items: center;
+			padding-left: 30rpx;
+			font-size: 34rpx;
+		}
+	}
+	
+	.info{
+		padding:30rpx 20rpx;
+		text-align: center;
+		margin: -60rpx 25rpx 20rpx;
+		background-color: #FFFFFF;
+		border-radius: 20rpx;
+		box-shadow: 0 10rpx #e7f1fd ;
 		display: flex;
-		flex-direction: row;
-		align-items: center;
 		justify-content: space-between;
-		padding: 0 30upx;
-		height: 90upx;
-		border-bottom: 1upx solid #f1f1f1;
-
-		.item_content {
+		
+		text:first-child{
+			font-size: 30rpx;
+			padding-left: 15rpx;
+			color: #000000;
+			font-weight: 800;
+		}
+		
+		text:last-child{
+			color: #333;
+			padding-right: 20rpx;
+			font-size: 28rpx;
+		}
+	}
+	
+	.item_list {
+		display: flex;
+		flex-direction: column;
+		background: #fff;
+		margin: 20rpx;
+		border-radius: 20rpx;
+		.item {
 			display: flex;
 			flex-direction: row;
 			align-items: center;
-
-			image {
-				width: 42upx;
-				height: 42upx;
+			justify-content: space-between;
+			padding: 0 30upx;
+			height: 90upx;
+			border-bottom: 1upx solid #f1f1f1;
+	
+			.item_content {
+				display: flex;
+				flex-direction: row;
+				align-items: center;
+	
+				image {
+					width: 42upx;
+					height: 42upx;
+				}
+	
+				text {
+					font-size: 28upx;
+					color: #333333;
+					margin-left: 20upx;
+				}
 			}
-
-			text {
-				font-size: 28upx;
-				color: #333333;
-				margin-left: 20upx;
+	
+			image {
+				width: 10upx;
+				height: 18upx;
 			}
 		}
-
-		image {
-			width: 10upx;
-			height: 18upx;
+		
+		.item:first-child{
+			border: none;
+		}
+	
+		.item:last-child {
+			border: none;
 		}
 	}
-	.item:last-child {
-		border: none;
-	}
-}
+
 </style>

+ 2 - 4
pages/mine/protocol/protocol.vue

@@ -1,6 +1,6 @@
 <template>
 	<view>
-		<u-empty  marginTop="300"   text="暂未开发" src="http://139.9.103.171:1888/miniofile/xlyq/empty/empty.png"></u-empty>
+		<u-empty  marginTop="300"    text="暂未开发" src="/static/empty.png"></u-empty>
 	</view>
 </template>
 
@@ -18,7 +18,5 @@
 </script>
 
 <style lang="scss">
-page{
-	background-color: #FFFFFF;
-}
+
 </style>

+ 26 - 147
pages/test/test.vue

@@ -1,164 +1,43 @@
 <template>
-	<view class="">
-		<view class="data" v-for="(item, index) in list" :key="index">
-			<view class="top">
-				<view class="left">
-					<view class="title ">
-						<text class="text-bold">IEMI:</text>
-						<text>{{item.imei}}</text>
-						<text @click="copy(item.imei)" style="text-decoration: underline;padding-left: 10rpx;color: #007AFF;">复制</text>
-					</view>
-				</view>
-				<view class="right">
-					<view v-if="item.defenseStatus==1" class="radius sm cu-btn line-green">
-						已上线
-					</view>
-					<view v-if="item.defenseStatus==2" class="radius sm cu-btn line-red">
-						已下线
-					</view>
-				</view>
-			</view>
-			<view class="item  padding-left-20">
-				<view class="content flex">
-					<u-icon  size="36" name="http://139.9.103.171:1888/miniofile/xlyq/xiaofangshuang.png"></u-icon>
-					<text class="text-bold padding-left-10">设备名称:</text>
-					<text>{{item.deviceName}}</text>
-				</view>
-				<view class="content flex">
-					<view class="flex">
-						<u-icon  size="36" name="http://139.9.103.171:1888/miniofile/xlyq/dianchi.png"></u-icon>
-						<text class="text-bold padding-left-10">电池电量:</text>
-					</view>
-					<view class="striped active cu-progress round margin-top-sm sm" style="width: 60%;">
-						<view style="width: 68%;background-color: #16c60c;color: #FFFFFF;">
-							{{item.battery?item.battery:0}}%
-						</view>
-					</view>
-				</view>
-				<view class="content flex">
-					<view class="flex">
-						<u-icon  size="36" name="http://139.9.103.171:1888/miniofile/xlyq/wifi.png"></u-icon>
-						<text class="text-bold padding-left-10">信号强弱:</text>
-					</view>
-					<view class="striped active cu-progress round margin-top-sm sm" style="width: 60%;">
-						<view style="width: 58%;background-color: #fc5f44;color: #FFFFFF;">
-							{{item.signalIntensity?item.signalIntensity:0}}%
-						</view>
-					</view>
-				</view>
-				<view class="content flex">
-					<u-icon  size="36" name="http://139.9.103.171:1888/miniofile/xlyq/jiance.png"></u-icon>
-					<text class="text-bold padding-left-10">监测值:</text>
-					<text class="text-bold" style="color: #1296db;padding-top: 6rpx;">{{item.monitorValue}}</text>
-				</view>
-				<view class="content flex">
-					<u-icon  size="36" name="http://139.9.103.171:1888/miniofile/xlyq/updateTime2.png"></u-icon>
-					<text class="text-bold padding-left-10">更新时间:</text>
-					<text style="padding-top: 6rpx;">{{item.lastUpdateTime}}</text>
-				</view>
-			</view>
-			<view class="bottom" >
-				<view class="cu-btn round sm line-blue" >
-					查看详情
-				</view>
-				<view class="cu-btn round sm line-blue" style="margin: 0 20rpx;">
-					告警记录
-				</view>
-			</view>
-		</view>
-		<u-divider height="100" bgColor="#f1f1f1">到底了</u-divider>
+	<view >
+		
 	</view>
 </template>
+
 <script>
 export default {
-	name: 'card',
-	props:{
-		list:{
-			type:Array,
-			default:()=>{
-				[
-					{
-						id:'1337708672083709954',
-						imei:'861878041367316',
-						defenseStatus:'1',
-						deviceName:'无线智能消防栓检测终端',
-						battery:'52',
-						signalIntensity:'90',
-						monitorValue:'0.0009Mpa',
-						lastUpdateTime:'2020-12-19 15:51:45'
-					}
-				]
-			}
-		}
-	},
 	data() {
 		return {
 			
-		};
+		}
 	},
 	onLoad() {
-		
+		uni.startWifi({ //初始化wifi
+			success: function(res) {
+				console.log(res.errMsg + "11654");
+				wx.getWifiList({ //成功后,就可以获取列表了
+					success: function(res) {
+						console.log(res);
+						//列表获取成功后,要到事件里提取
+						wx.onGetWifiList(function(res) {
+							console.log("获取wifi列表");
+							console.log(res.wifiList); //在这里提取列表数据
+							that.wifiList = res.wifiList
+						})
+					}
+				});
+			},
+			fail: function(err){
+				console.log(err);
+			}
+		});
 	},
-	methods:{
-		copy(data){
-			uni.setClipboardData({
-				data:data
-			})
-		},
-		goDetail(item){
-			uni.navigateTo({
-				
-			})
-		},
+	methods: {
+		
 	}
 };
 </script>
 
-<style lang="scss">
-.bg-blue{
-	background-color: #59a5f0;
-	color: #FFFFFF;
-}
-
+<style lang="scss" >
 	
-.data {
-	width: 720rpx;
-	background-color: #ffffff;
-	margin: 20rpx auto;
-	border-radius: 6rpx;
-	box-sizing: border-box;
-	padding: 20rpx;
-	font-size: 28rpx;
-	.top {
-		display: flex;
-		justify-content: space-between;
-		padding-bottom: 20rpx;
-		border-bottom: 1rpx dashed #DDDDDD;
-		.left {
-			display: flex;
-			align-items: center;
-			.title {
-				margin: 0 10rpx;
-				font-size: 30rpx;
-			}
-		}
-		.right{
-			margin-right: 10rpx;
-		}
-	}
-	.item {
-		margin: 5rpx 0 20rpx 0;
-		.content {
-			padding: 30rpx 0 ;
-			border-bottom: 1rpx dashed  #DDDDDD;
-		}
-	}
-	.bottom {
-		display: flex;
-		padding-top: 10rpx;
-		margin-top: 30rpx;
-		justify-content: flex-end;
-		align-items: center;
-	}
-}
 </style>

+ 99 - 147
pages/test/test1.vue

@@ -1,158 +1,110 @@
 <template>
-	<view class="">
-		<view class="data" v-for="(item, index) in list" :key="index">
-			<view class="top">
-				<view class="left">
-					<view class="title ">
-						<text class="text-bold">IEMI:</text>
-						<text>{{item.imei}}</text>
-						<text @click="copy(item.imei)" style="text-decoration: underline;padding-left: 10rpx;color: #007AFF;">复制</text>
-					</view>
-				</view>
-				<view class="right">
-					<view v-if="item.defenseStatus==1" class="radius sm cu-btn line-green">
-						已上线
-					</view>
-					<view v-if="item.defenseStatus==2" class="radius sm cu-btn line-red">
-						已下线
-					</view>
-				</view>
-			</view>
-			<view class="item  padding-left-20">
-				<view class="content flex">
-					<u-icon  size="36" name="http://139.9.103.171:1888/miniofile/xlyq/xiaofangshuang.png"></u-icon>
-					<text class="text-bold padding-left-10">设备名称:</text>
-					<text>{{item.deviceName}}</text>
-				</view>
-				<view class="content flex">
-					<view class="flex">
-						<u-icon  size="36" name="http://139.9.103.171:1888/miniofile/xlyq/dianchi.png"></u-icon>
-						<text class="text-bold padding-left-10">电池电量:</text>
-					</view>
-					<view class="striped active cu-progress round margin-top-sm sm" style="width: 60%;">
-						<view style="width: 68%;background-color: #16c60c;color: #FFFFFF;">
-							{{item.battery?item.battery:0}}%
-						</view>
-					</view>
-				</view>
-				<view class="content flex">
-					<view class="flex">
-						<u-icon  size="36" name="http://139.9.103.171:1888/miniofile/xlyq/wifi.png"></u-icon>
-						<text class="text-bold padding-left-10">信号强弱:</text>
-					</view>
-					<view class="striped active cu-progress round margin-top-sm sm" style="width: 60%;">
-						<view style="width: 58%;background-color: #fc5f44;color: #FFFFFF;">
-							{{item.signalIntensity?item.signalIntensity:0}}%
-						</view>
-					</view>
-				</view>
-				<view class="content flex">
-					<u-icon  size="36" name="http://139.9.103.171:1888/miniofile/xlyq/jiance.png"></u-icon>
-					<text class="text-bold padding-left-10">监测值:</text>
-					<text class="text-bold" style="color: #1296db;padding-top: 6rpx;">{{item.monitorValue}}</text>
-				</view>
-				<view class="content flex">
-					<u-icon  size="36" name="http://139.9.103.171:1888/miniofile/xlyq/updateTime2.png"></u-icon>
-					<text class="text-bold padding-left-10">更新时间:</text>
-					<text style="padding-top: 6rpx;">{{item.lastUpdateTime}}</text>
-				</view>
-			</view>
-			<view class="bottom" >
-				<view class="cu-btn round sm line-blue" >
-					查看详情
-				</view>
-				<view class="cu-btn round sm line-blue" style="margin: 0 20rpx;">
-					告警记录
-				</view>
-			</view>
+	<view class="qiun-columns">
+		<view class="qiun-bg-white qiun-title-bar qiun-common-mt" >
+			<view class="qiun-title-dot-light">基本柱状图</view>
+		</view>
+		<view class="qiun-charts" >
+			<canvas canvas-id="canvasColumn" id="canvasColumn" class="charts" @touchstart="touchColumn"></canvas>
 		</view>
-		<u-divider height="100" bgColor="#f1f1f1">到底了</u-divider>
 	</view>
 </template>
+
 <script>
-export default {
-	name: 'card',
-	props:{
-		list:{
-			type:Array,
-			default:()=>{
-				[
-					// {
-					// 	id:'1337708672083709954',
-					// 	imei:'861878041367316',
-					// 	defenseStatus:'1',
-					// 	deviceName:'无线智能消防栓检测终端',
-					// 	battery:'52',
-					// 	signalIntensity:'90',
-					// 	monitorValue:'0.0009Mpa',
-					// 	lastUpdateTime:'2020-12-19 15:51:45'
-					// }
-				]
+	import uCharts from '@/assets/js/u-charts/u-charts/u-charts.js';
+	var _self;
+	var canvaColumn=null;
+
+	export default {
+		data() {
+			return {
+				cWidth:'',
+				cHeight:'',
+				pixelRatio:1,
+				serverData:'',
 			}
-		}
-	},
-	data() {
-		return {
-		};
-	},
-	methods:{
-		copy(data){
-			uni.setClipboardData({
-				data:data
-			})
 		},
-		goDetail(item){
-			uni.navigateTo({
-				
-			})
+		created() {
+			_self = this;
+			this.cWidth=uni.upx2px(750);
+			this.cHeight=uni.upx2px(500);
+			this.getServerData();
 		},
+		methods: {
+			getServerData(){
+				uni.request({
+					url: 'https://www.ucharts.cn/data.json',
+					data:{
+					},
+					success: function(res) {
+						console.log(res.data.data)
+						//下面这个根据需要保存后台数据,我是为了模拟更新柱状图,所以存下来了
+						_self.serverData=res.data.data;
+						let Column={categories:[],series:[]};
+						//这里我后台返回的是数组,所以用等于,如果您后台返回的是单条数据,需要push进去
+						Column.categories=res.data.data.Column.categories;
+						Column.series=res.data.data.Column.series;
+						_self.showColumn("canvasColumn",Column);
+					},
+					fail: () => {
+						_self.tips="网络错误,小程序端请检查合法域名";
+					},
+				});
+			},
+			showColumn(canvasId,chartData){
+				canvaColumn=new uCharts({
+					$this:_self,
+					canvasId: canvasId,
+					type: 'column',
+					legend:{show:true},
+					fontSize:11,
+					background:'#FFFFFF',
+					pixelRatio:_self.pixelRatio,
+					animation: true,
+					categories: chartData.categories,
+					series: chartData.series,
+					xAxis: {
+						disableGrid:true,
+					},
+					yAxis: {
+						//disabled:true
+					},
+					dataLabel: true,
+					width: _self.cWidth*_self.pixelRatio,
+					height: _self.cHeight*_self.pixelRatio,
+					extra: {
+						column: {
+							type:'group',
+							width: _self.cWidth*_self.pixelRatio*0.45/chartData.categories.length
+						}
+					  }
+				});
+				
+			},
+			touchColumn(e){
+				canvaColumn.showToolTip(e, {
+					format: function (item, category) {
+						if(typeof item.data === 'object'){
+							return category + ' ' + item.name + ':' + item.data.value 
+						}else{
+							return category + ' ' + item.name + ':' + item.data 
+						}
+					}
+				});
+			},
+		}
 	}
-};
 </script>
 
-<style lang="scss">
-.bg-blue{
-	background-color: #59a5f0;
-	color: #FFFFFF;
-}
-.data {
-	width: 720rpx;
-	background-color: #ffffff;
-	margin: 20rpx auto;
-	border-radius: 6rpx;
-	box-sizing: border-box;
-	padding: 20rpx;
-	font-size: 28rpx;
-	.top {
-		display: flex;
-		justify-content: space-between;
-		padding-bottom: 20rpx;
-		border-bottom: 1rpx dashed #DDDDDD;
-		.left {
-			display: flex;
-			align-items: center;
-			.title {
-				margin: 0 10rpx;
-				font-size: 30rpx;
-			}
-		}
-		.right{
-			margin-right: 10rpx;
-		}
-	}
-	.item {
-		margin: 5rpx 0 20rpx 0;
-		.content {
-			padding: 30rpx 0 ;
-			border-bottom: 1rpx dashed  #DDDDDD;
-		}
-	}
-	.bottom {
-		display: flex;
-		padding-top: 10rpx;
-		margin-top: 30rpx;
-		justify-content: flex-end;
-		align-items: center;
-	}
-}
-</style>
+<style>
+page{background:#F2F2F2;width: 750upx;overflow-x: hidden;}
+.qiun-padding{padding:2%; width:96%;}
+.qiun-wrap{display:flex; flex-wrap:wrap;}
+.qiun-rows{display:flex; flex-direction:row !important;}
+.qiun-columns{display:flex; flex-direction:column !important;}
+.qiun-common-mt{margin-top:10upx;}
+.qiun-bg-white{background:#FFFFFF;}
+.qiun-title-bar{width:96%; padding:10upx 2%; flex-wrap:nowrap;}
+.qiun-title-dot-light{border-left: 10upx solid #0ea391; padding-left: 10upx; font-size: 32upx;color: #000000}
+.qiun-charts{width: 750upx; height:500upx;background-color: #FFFFFF;}
+.charts{width: 750upx; height:500upx;background-color: #FFFFFF;}
+</style>

+ 1 - 1
router.js

@@ -5,7 +5,7 @@ import {
 } from 'uni-simple-router';
 
 //配置白名单
-let WHiTE_LIST=['login','my-camera','auth']
+let WHiTE_LIST=['login','my-camera','auth','test']
 
 //员工页面,只可以员工权限的用户访问
 let STAFF=['auth','editPhone']

BIN
static/empty.png


BIN
static/index/blue/avatar1.png


BIN
static/index/blue/change-phone.png


BIN
static/index/blue/changePsw.png


BIN
static/index/blue/contact.png


BIN
static/index/blue/dingyue.png


BIN
static/index/blue/face.png


BIN
static/index/blue/fankui.png


BIN
static/index/blue/healthcode.png


BIN
static/index/blue/msg.png


BIN
static/index/blue/setting.png


BIN
static/index/blue/shenfen.png


BIN
static/index/blue/shuoming.png


BIN
static/index/blue/touxiang.png


BIN
static/index/blue/wuye.png


BIN
static/index/blue/xieyi1.png


BIN
static/index/fire/dianbiao.png


BIN
static/index/fire/dianchi.png


BIN
static/index/fire/more.png


BIN
static/index/fire/ranqi.png


BIN
static/index/fire/ranqi2.png


BIN
static/index/fire/xiaofang.png


BIN
static/index/fire/yangan.png


BIN
static/index/fire/yanwu.png


BIN
static/index/fire/yanwu1.png


BIN
static/index/gander/car.png


BIN
static/index/gander/cewen.png


BIN
static/index/gander/cewen1.png


BIN
static/index/gander/notice.png


BIN
static/index/gander/qiye.png


BIN
static/index/gander/renzheng.png


BIN
static/index/gander/renzheng1.png


BIN
static/index/gander/tongxing.png


BIN
static/index/top.jpg


BIN
static/login/2.png


BIN
static/login/3.png


BIN
static/login/qiye1.png


BIN
static/login/sj.png


BIN
static/login/xinyong1.png


BIN
static/login/yuanqu.png


BIN
static/login/yz.png


BIN
static/tarbar/index.png


BIN
static/tarbar/index0.png


BIN
static/tarbar/menjin.png


BIN
static/tarbar/menjin0.png


BIN
static/tarbar/my.png


BIN
static/tarbar/my0.png


+ 1 - 0
uni.scss

@@ -14,6 +14,7 @@
 
 /* 颜色变量 */
 @import "uview-ui/theme.scss";
+$base-color:#5064eb;
 /* 行为相关颜色 */
 $uni-color-primary: #007aff;
 $uni-color-success: #4cd964;

+ 0 - 243
utils/md5.js

@@ -1,243 +0,0 @@
-/*
- * A JavaScript implementation of the RSA Data Security, Inc. MD5 Message
- * Digest Algorithm, as defined in RFC 1321.
- * Version 2.2 Copyright (C) Paul Johnston 1999 - 2009
- * Other contributors: Greg Holt, Andrew Kepert, Ydnar, Lostinet
- * Distributed under the BSD License
- * See http://pajhome.org.uk/crypt/md5 for more info.
- */
-module.exports = {
-  hex_md5: hex_md5
-}; //上面三行是小程序引入时需要的
-
-var hexcase = 0;
-
-function hex_md5(a) {
-  return rstr2hex(rstr_md5(str2rstr_utf8(a)));
-}
-
-function hex_hmac_md5(a, b) {
-  return rstr2hex(rstr_hmac_md5(str2rstr_utf8(a), str2rstr_utf8(b)));
-}
-
-function md5_vm_test() {
-  return hex_md5("abc").toLowerCase() == "900150983cd24fb0d6963f7d28e17f72";
-}
-
-function rstr_md5(a) {
-  return binl2rstr(binl_md5(rstr2binl(a), a.length * 8));
-}
-
-function rstr_hmac_md5(c, f) {
-  var e = rstr2binl(c);
-
-  if (e.length > 16) {
-    e = binl_md5(e, c.length * 8);
-  }
-
-  var a = Array(16),
-      d = Array(16);
-
-  for (var b = 0; b < 16; b++) {
-    a[b] = e[b] ^ 909522486;
-    d[b] = e[b] ^ 1549556828;
-  }
-
-  var g = binl_md5(a.concat(rstr2binl(f)), 512 + f.length * 8);
-  return binl2rstr(binl_md5(d.concat(g), 512 + 128));
-}
-
-function rstr2hex(c) {
-  try {
-    hexcase;
-  } catch (g) {
-    hexcase = 0;
-  }
-
-  var f = hexcase ? "0123456789ABCDEF" : "0123456789abcdef";
-  var b = "";
-  var a;
-
-  for (var d = 0; d < c.length; d++) {
-    a = c.charCodeAt(d);
-    b += f.charAt(a >>> 4 & 15) + f.charAt(a & 15);
-  }
-
-  return b;
-}
-
-function str2rstr_utf8(c) {
-  var b = "";
-  var d = -1;
-  var a, e;
-
-  while (++d < c.length) {
-    a = c.charCodeAt(d);
-    e = d + 1 < c.length ? c.charCodeAt(d + 1) : 0;
-
-    if (55296 <= a && a <= 56319 && 56320 <= e && e <= 57343) {
-      a = 65536 + ((a & 1023) << 10) + (e & 1023);
-      d++;
-    }
-
-    if (a <= 127) {
-      b += String.fromCharCode(a);
-    } else {
-      if (a <= 2047) {
-        b += String.fromCharCode(192 | a >>> 6 & 31, 128 | a & 63);
-      } else {
-        if (a <= 65535) {
-          b += String.fromCharCode(224 | a >>> 12 & 15, 128 | a >>> 6 & 63, 128 | a & 63);
-        } else {
-          if (a <= 2097151) {
-            b += String.fromCharCode(240 | a >>> 18 & 7, 128 | a >>> 12 & 63, 128 | a >>> 6 & 63, 128 | a & 63);
-          }
-        }
-      }
-    }
-  }
-
-  return b;
-}
-
-function rstr2binl(b) {
-  var a = Array(b.length >> 2);
-
-  for (var c = 0; c < a.length; c++) {
-    a[c] = 0;
-  }
-
-  for (var c = 0; c < b.length * 8; c += 8) {
-    a[c >> 5] |= (b.charCodeAt(c / 8) & 255) << c % 32;
-  }
-
-  return a;
-}
-
-function binl2rstr(b) {
-  var a = "";
-
-  for (var c = 0; c < b.length * 32; c += 8) {
-    a += String.fromCharCode(b[c >> 5] >>> c % 32 & 255);
-  }
-
-  return a;
-}
-
-function binl_md5(p, k) {
-  p[k >> 5] |= 128 << k % 32;
-  p[(k + 64 >>> 9 << 4) + 14] = k;
-  var o = 1732584193;
-  var n = -271733879;
-  var m = -1732584194;
-  var l = 271733878;
-
-  for (var g = 0; g < p.length; g += 16) {
-    var j = o;
-    var h = n;
-    var f = m;
-    var e = l;
-    o = md5_ff(o, n, m, l, p[g + 0], 7, -680876936);
-    l = md5_ff(l, o, n, m, p[g + 1], 12, -389564586);
-    m = md5_ff(m, l, o, n, p[g + 2], 17, 606105819);
-    n = md5_ff(n, m, l, o, p[g + 3], 22, -1044525330);
-    o = md5_ff(o, n, m, l, p[g + 4], 7, -176418897);
-    l = md5_ff(l, o, n, m, p[g + 5], 12, 1200080426);
-    m = md5_ff(m, l, o, n, p[g + 6], 17, -1473231341);
-    n = md5_ff(n, m, l, o, p[g + 7], 22, -45705983);
-    o = md5_ff(o, n, m, l, p[g + 8], 7, 1770035416);
-    l = md5_ff(l, o, n, m, p[g + 9], 12, -1958414417);
-    m = md5_ff(m, l, o, n, p[g + 10], 17, -42063);
-    n = md5_ff(n, m, l, o, p[g + 11], 22, -1990404162);
-    o = md5_ff(o, n, m, l, p[g + 12], 7, 1804603682);
-    l = md5_ff(l, o, n, m, p[g + 13], 12, -40341101);
-    m = md5_ff(m, l, o, n, p[g + 14], 17, -1502002290);
-    n = md5_ff(n, m, l, o, p[g + 15], 22, 1236535329);
-    o = md5_gg(o, n, m, l, p[g + 1], 5, -165796510);
-    l = md5_gg(l, o, n, m, p[g + 6], 9, -1069501632);
-    m = md5_gg(m, l, o, n, p[g + 11], 14, 643717713);
-    n = md5_gg(n, m, l, o, p[g + 0], 20, -373897302);
-    o = md5_gg(o, n, m, l, p[g + 5], 5, -701558691);
-    l = md5_gg(l, o, n, m, p[g + 10], 9, 38016083);
-    m = md5_gg(m, l, o, n, p[g + 15], 14, -660478335);
-    n = md5_gg(n, m, l, o, p[g + 4], 20, -405537848);
-    o = md5_gg(o, n, m, l, p[g + 9], 5, 568446438);
-    l = md5_gg(l, o, n, m, p[g + 14], 9, -1019803690);
-    m = md5_gg(m, l, o, n, p[g + 3], 14, -187363961);
-    n = md5_gg(n, m, l, o, p[g + 8], 20, 1163531501);
-    o = md5_gg(o, n, m, l, p[g + 13], 5, -1444681467);
-    l = md5_gg(l, o, n, m, p[g + 2], 9, -51403784);
-    m = md5_gg(m, l, o, n, p[g + 7], 14, 1735328473);
-    n = md5_gg(n, m, l, o, p[g + 12], 20, -1926607734);
-    o = md5_hh(o, n, m, l, p[g + 5], 4, -378558);
-    l = md5_hh(l, o, n, m, p[g + 8], 11, -2022574463);
-    m = md5_hh(m, l, o, n, p[g + 11], 16, 1839030562);
-    n = md5_hh(n, m, l, o, p[g + 14], 23, -35309556);
-    o = md5_hh(o, n, m, l, p[g + 1], 4, -1530992060);
-    l = md5_hh(l, o, n, m, p[g + 4], 11, 1272893353);
-    m = md5_hh(m, l, o, n, p[g + 7], 16, -155497632);
-    n = md5_hh(n, m, l, o, p[g + 10], 23, -1094730640);
-    o = md5_hh(o, n, m, l, p[g + 13], 4, 681279174);
-    l = md5_hh(l, o, n, m, p[g + 0], 11, -358537222);
-    m = md5_hh(m, l, o, n, p[g + 3], 16, -722521979);
-    n = md5_hh(n, m, l, o, p[g + 6], 23, 76029189);
-    o = md5_hh(o, n, m, l, p[g + 9], 4, -640364487);
-    l = md5_hh(l, o, n, m, p[g + 12], 11, -421815835);
-    m = md5_hh(m, l, o, n, p[g + 15], 16, 530742520);
-    n = md5_hh(n, m, l, o, p[g + 2], 23, -995338651);
-    o = md5_ii(o, n, m, l, p[g + 0], 6, -198630844);
-    l = md5_ii(l, o, n, m, p[g + 7], 10, 1126891415);
-    m = md5_ii(m, l, o, n, p[g + 14], 15, -1416354905);
-    n = md5_ii(n, m, l, o, p[g + 5], 21, -57434055);
-    o = md5_ii(o, n, m, l, p[g + 12], 6, 1700485571);
-    l = md5_ii(l, o, n, m, p[g + 3], 10, -1894986606);
-    m = md5_ii(m, l, o, n, p[g + 10], 15, -1051523);
-    n = md5_ii(n, m, l, o, p[g + 1], 21, -2054922799);
-    o = md5_ii(o, n, m, l, p[g + 8], 6, 1873313359);
-    l = md5_ii(l, o, n, m, p[g + 15], 10, -30611744);
-    m = md5_ii(m, l, o, n, p[g + 6], 15, -1560198380);
-    n = md5_ii(n, m, l, o, p[g + 13], 21, 1309151649);
-    o = md5_ii(o, n, m, l, p[g + 4], 6, -145523070);
-    l = md5_ii(l, o, n, m, p[g + 11], 10, -1120210379);
-    m = md5_ii(m, l, o, n, p[g + 2], 15, 718787259);
-    n = md5_ii(n, m, l, o, p[g + 9], 21, -343485551);
-    o = safe_add(o, j);
-    n = safe_add(n, h);
-    m = safe_add(m, f);
-    l = safe_add(l, e);
-  }
-
-  return Array(o, n, m, l);
-}
-
-function md5_cmn(h, e, d, c, g, f) {
-  return safe_add(bit_rol(safe_add(safe_add(e, h), safe_add(c, f)), g), d);
-}
-
-function md5_ff(g, f, k, j, e, i, h) {
-  return md5_cmn(f & k | ~f & j, g, f, e, i, h);
-}
-
-function md5_gg(g, f, k, j, e, i, h) {
-  return md5_cmn(f & j | k & ~j, g, f, e, i, h);
-}
-
-function md5_hh(g, f, k, j, e, i, h) {
-  return md5_cmn(f ^ k ^ j, g, f, e, i, h);
-}
-
-function md5_ii(g, f, k, j, e, i, h) {
-  return md5_cmn(k ^ (f | ~j), g, f, e, i, h);
-}
-
-function safe_add(a, d) {
-  var c = (a & 65535) + (d & 65535);
-  var b = (a >> 16) + (d >> 16) + (c >> 16);
-  return b << 16 | c & 65535;
-}
-
-function bit_rol(a, b) {
-  return a << b | a >>> 32 - b;
-}
-
-;

+ 0 - 88
utils/my-request/adapters/index.js

@@ -1,88 +0,0 @@
-import buildURL from '../helpers/buildURL'
-import buildFullPath from '../core/buildFullPath'
-import settle from '../core/settle'
-
-/**
- * 返回可选值存在的配置
- * @param {Array} keys - 可选值数组
- * @param {Object} config2 - 配置
- * @return {{}} - 存在的配置项
- */
-const mergeKeys = (keys, config2) => {
-  let config = {}
-  keys.forEach(prop => {
-    if (typeof config2[prop] !== 'undefined') {
-      config[prop] = config2[prop]
-    }
-  })
-  return config
-}
-export default (config) => {
-  return new Promise((resolve, reject) => {
-    const _config = {
-      url: buildURL(buildFullPath(config.baseURL, config.url), config.params),
-      header: config.header,
-      complete: (response) => {
-        response.config = config
-        try {
-          // 对可能字符串不是json 的情况容错
-          if (typeof response.data === 'string') {
-            response.data = JSON.parse(response.data)
-          }
-          // eslint-disable-next-line no-empty
-        } catch (e) {
-        }
-        settle(resolve, reject, response)
-      }
-    }
-    let requestTask
-    if (config.method === 'UPLOAD') {
-      delete _config.header['content-type']
-      delete _config.header['Content-Type']
-      let otherConfig = {
-        // #ifdef MP-ALIPAY
-        fileType: config.fileType,
-        // #endif
-        filePath: config.filePath,
-        name: config.name
-      }
-      const optionalKeys = [
-        // #ifdef APP-PLUS || H5
-        'files',
-        // #endif
-        // #ifdef H5
-        'file',
-        // #endif
-        'formData'
-      ]
-      requestTask = uni.uploadFile({..._config, ...otherConfig, ...mergeKeys(optionalKeys, config)})
-    } else if (config.method === 'DOWNLOAD') {
-      requestTask = uni.downloadFile(_config)
-    } else {
-      const optionalKeys = [
-        'data',
-        'method',
-        // #ifdef MP-ALIPAY || MP-WEIXIN
-        'timeout',
-        // #endif
-        'dataType',
-        // #ifndef MP-ALIPAY || APP-PLUS
-        'responseType',
-        // #endif
-        // #ifdef APP-PLUS
-        'sslVerify',
-        // #endif
-        // #ifdef H5
-        'withCredentials',
-        // #endif
-        // #ifdef APP-PLUS
-        'firstIpv4',
-        // #endif
-      ]
-      requestTask = uni.request({..._config,...mergeKeys(optionalKeys, config)})
-    }
-    if (config.getTask) {
-      config.getTask(requestTask, config)
-    }
-  })
-}

+ 0 - 51
utils/my-request/core/InterceptorManager.js

@@ -1,51 +0,0 @@
-'use strict'
-
-
-function InterceptorManager() {
-  this.handlers = []
-}
-
-/**
- * Add a new interceptor to the stack
- *
- * @param {Function} fulfilled The function to handle `then` for a `Promise`
- * @param {Function} rejected The function to handle `reject` for a `Promise`
- *
- * @return {Number} An ID used to remove interceptor later
- */
-InterceptorManager.prototype.use = function use(fulfilled, rejected) {
-  this.handlers.push({
-    fulfilled: fulfilled,
-    rejected: rejected
-  })
-  return this.handlers.length - 1
-}
-
-/**
- * Remove an interceptor from the stack
- *
- * @param {Number} id The ID that was returned by `use`
- */
-InterceptorManager.prototype.eject = function eject(id) {
-  if (this.handlers[id]) {
-    this.handlers[id] = null
-  }
-}
-
-/**
- * Iterate over all the registered interceptors
- *
- * This method is particularly useful for skipping over any
- * interceptors that may have become `null` calling `eject`.
- *
- * @param {Function} fn The function to call for each interceptor
- */
-InterceptorManager.prototype.forEach = function forEach(fn) {
-  this.handlers.forEach(h => {
-    if (h !== null) {
-      fn(h)
-    }
-  })
-}
-
-export default InterceptorManager

Some files were not shown because too many files changed in this diff