Browse Source

初始化

xuanyan 4 years ago
parent
commit
40a704f10b
49 changed files with 431 additions and 302 deletions
  1. 58 56
      assets/http/api.js
  2. 56 51
      assets/http/service.js
  3. 1 1
      components/infomation/infomation.vue
  4. 2 2
      pages/agency/comps/agency-info.vue
  5. 6 6
      pages/auth/auth.vue
  6. 1 1
      pages/company/company.vue
  7. 4 4
      pages/device/device.vue
  8. 14 29
      pages/enterprise/add.vue
  9. 5 4
      pages/guest/guest.vue
  10. 1 1
      pages/guest/open-door/open-door.vue
  11. 3 2
      pages/guest/records/comps/card.vue
  12. 2 2
      pages/index/agency/agency.vue
  13. 3 8
      pages/index/car/comps/car-manager-card.vue
  14. 1 1
      pages/index/car/comps/item.vue
  15. 8 11
      pages/index/car/comps/my-car-card.vue
  16. 13 47
      pages/index/car/my-car/add.vue
  17. 4 2
      pages/index/fire/list/comps/item.vue
  18. 4 3
      pages/index/index.vue
  19. 3 3
      pages/index/myinfo/myinfo.vue
  20. 3 3
      pages/index/staff-temperature/comps/item.vue
  21. 5 5
      pages/index/staffAudit/comps/card.vue
  22. 2 2
      pages/index/staffAudit/comps/item.vue
  23. 7 7
      pages/index/staffAudit/detail.vue
  24. 1 1
      pages/index/staffAudit/list.vue
  25. 18 14
      pages/login/login.vue
  26. 8 8
      pages/login/login1.vue
  27. 1 1
      pages/mine/editPhone/editPhone.vue
  28. 1 1
      pages/mine/feedback/feedback.vue
  29. 2 2
      pages/mine/mine.vue
  30. 1 1
      pages/news/detail.vue
  31. 1 1
      pages/test/test.vue
  32. 1 1
      party/pages/certification/certification.vue
  33. 1 1
      punch/comps/punch-out/punch-out.vue
  34. 7 0
      store/index.js
  35. 2 2
      uview-ui/components/u-calendar/u-calendar.vue
  36. 3 3
      uview-ui/components/u-cell-item/u-cell-item.vue
  37. 147 0
      uview-ui/components/u-circle-progress/u-line-progress/u-line-progress.vue
  38. 0 2
      uview-ui/components/u-empty/u-empty.vue
  39. 3 2
      uview-ui/components/u-image/u-image.vue
  40. 2 2
      uview-ui/components/u-rate/u-rate.vue
  41. 3 1
      uview-ui/components/u-tabbar/u-tabbar.vue
  42. 1 0
      uview-ui/components/u-tabs/u-tabs.vue
  43. 2 2
      uview-ui/components/u-upload/u-upload.vue
  44. 2 2
      uview-ui/libs/config/config.js
  45. 1 1
      uview-ui/libs/function/test.js
  46. 1 1
      uview-ui/libs/function/timeFormat.js
  47. 14 0
      uview-ui/libs/mixin/mixin.js
  48. 1 1
      uview-ui/libs/request/index.js
  49. 1 1
      uview-ui/package.json

+ 58 - 56
assets/http/api.js

@@ -2,13 +2,13 @@ import {http} from './service.js'
 
 //文件上传
 const uploadFile={
-	submit:p => http.upload('/upload/putfile', {name:'file',filePath:p}),
+	submit:p => http.upload('/blade-resource/oss/endpoint/put-pic-md5', {name:'file',filePath:p}),
 }
 
 //短信api
 const SMSApi = {
-	sendSms:p => http.post('huawei/sms/sendSms'+p),
-	validCode:p => http.post('huawei/sms/validCode'+p),
+	sendSms:p => http.post('/park-app-service/huawei/sms/sendSms'+p),
+	validCode:p => http.post('/park-app-service/huawei/sms/validCode'+p),
 }
 
 //字典
@@ -28,21 +28,21 @@ let wxData={
 
 //微信api
 const wxApi = {
-	subscribe:p => http.post('/wx/msgSend', p),
-	getAccessToken:p => http.get('/wx/getAccessToken', {params:p}),
-	getOpenId:p => http.get('/wx/getOpenId', {params:p}),
+	subscribe:p => http.post('/park-app-service/app/msgSend', p),
+	getAccessToken:p => http.get('/park-app-service/app/getAccessToken', {params:p}),
+	getOpenId:p => http.get('/park-app-service/app/getOpenId', {params:p}),
 	//获取小程序的audit状态
-	getAppletStatus:p => http.get('appconf/appconf/getById', {params:p}),
+	getAppletStatus:p => http.get('/park-app-service/app/wxConf/getById', {params:p}),
 }
 
 //登录
-const login=p => http.post('community/enterprisestaff/app/login', p)
+const login=p => http.post('/park-app-service/app/login/login', p)
 
 //修改密码
 const updatePassword=p => http.post('community/enterprisestaff/app/updatePassword'+p)
 
 //获取管理员的openid集合
-const getManagerOpenList=p => http.get('/community/enterprisestaff/app/getManagerList',{params:p})
+const getManagerOpenList=p => http.get('/cyzh-enterprise/staff/app/getManagerList',{params:p})
 
 
 //获取token
@@ -50,16 +50,19 @@ const getToken=p => http.post('blade-auth/oauth/token'+p,{},{header: {"Authoriza
 
 //园区api
 const agency = {
-	getAgencyTenantList:p => http.get('agency/agency/getAgencyTenantList', {params:p}),
-	page:p => http.get('/agency/agency/getAgencyList', {params:p}),
+	getAgencyTenantList:p => http.get('/park-app-service/agency/getAgencyTenantList', {params:p}),
+	page:p => http.get('/cyzh-community/agency/list', {params:p}),
 	submit:p => http.post('/agency/agency/submit', p),
 }
 //区域api
 const residential = {
-	page:p => http.get('/community/residential/listByAgencyId', {params:p}),
+	page:p => http.get('/cyzh-community/residential/list', {params:p}),
 	selectPage:p => http.get('/community/residential/select', {params:p}),
 }
 
+
+
+
 //楼栋
 const building = {
 	page:p => http.get('/building/building/list', {params:p})
@@ -68,40 +71,40 @@ const building = {
 
 //企业api
 const enterprise = {
-	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),
+	page:p => http.get('/cyzh-enterprise/enterprise/list', {params:p}),
+	detail:p => http.get('/cyzh-enterprise/enterprise/detail', {params:p}),
+	submit:p => http.post('/cyzh-enterprise/enterprise/submit', p),
 }
 
 //企业员工
 const enterprisestaff = {
-	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),
+	page:p => http.get('/cyzh-enterprise/staff/list', {params:p}),
+	detail:p => http.get('/cyzh-enterprise/staff/detail', {params:p}),
+	submit:p => http.post('/cyzh-enterprise/staff/submit', p),
 }
 
 //CMS
 const CMS={
-	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),
+	page:p => http.get('/cyzh-estate/article/list', {params:p}),
+	detail:p => http.get('/cyzh-estate/article/detail', {params:p}),
+	addReaderCount:p => http.post('/cyzh-estate/article/addReaderCount', p),
 }
 
 //banner 轮播图
 const banner={
-	page:p => http.get('/estate/banners/list', {params:p}),
+	page:p => http.get('/cyzh-estate/banners/list', {params:p}),
 }
 
 //消防设备
 const fireDevice={
 	//企业角色的设备列表接口
-	page:p => http.get('/smartapplication/smartdevice/list', {params:p}),
+	page:p => http.get('/park-app-service/iotdevice/list', {params:p}),
 	//园区角色的设备列表接口
-	agencyPage:p => http.get('/smartapplication/smartdevice/getDeviceList', {params:p}),
+	agencyPage:p => http.get('/park-app-service/iotdevice/list', {params:p}),
 	//报警记录接口
-	alarmRecord:p => http.get('/smartapplication/smartdevice/getAlarmRecord', {params:p}),
+	alarmRecord:p => http.get('/cyzh-smart-device/iotalarm/list', {params:p}),
 	//电表抄表记录
-	electricmeterrecord:p => http.get('/electricmeterrecord/electricmeterrecord/list', {params:p}),
+	electricmeterrecord:p => http.get('/cyzh-smart-device/electricmeterrecord/list', {params:p}),
 }
 //用户反馈
 const feedback = {
@@ -109,14 +112,14 @@ const feedback = {
 }
 //园区公告
 const notice = {
-	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),
+	page:p => http.get('/cyzh-estate/noticepushrecord/listReturnNotice', {params:p}),
+	remove:p => http.post('/park-app-service/parknotice/remove?ids='+p),
+	submit:p => http.post('/park-app-service/parknotice/save', p),
 }
 
 //测温记录
 const temperatureRecord = {
-	page:p => http.get('/smartapplication/temperaturerecord/getTemperatureRecord', {params:p}),
+	page:p => http.get('/cyzh-smart-device/temperaturerecord/list', {params:p}),
 }
 
 //健康码
@@ -126,64 +129,63 @@ const healthCode = {
 
  const car = {
 	 //出入记录
-	 condition:p => http.get('carenterrecord/carenterrecord/queryRecord', {params:p}),
+	 condition:p => http.get('/cyzh-estate/carenterrecord/queryRecord', {params:p}),
 	 //入场记录
-	 enterPage:p => http.get('/carenterrecord/carenterrecord/list', {params:p}),
+	 enterPage:p => http.get('/cyzh-estate/carenterrecord/list', {params:p}),
 	 //出场记录
-	 outPage:p => http.get('/caroutrecord/caroutrecord/list', {params:p}),
+	 outPage:p => http.get('/cyzh-estate/caroutrecord/list', {params:p}),
 	 
 	 //车辆列表
-	 carList:p => http.get('/community/car/app/list', {params:p}),
+	 carList:p => http.get('/cyzh-estate/car/parkapp/list', {params:p}),
 	 //添加车辆
-	 carAdd:p => http.post('/community/car/submit', p),
+	 carAdd:p => http.post('/cyzh-estate/car/submit', p),
 	 //删除车辆
-	 carRemove:p => http.post('/community/car/remove?ids='+p),
+	 carRemove:p => http.post('/cyzh-estate/car/remove?ids='+p),
 	 //车辆审核
-	 carAudit:p => http.post('/community/car/audit', p),
+	 carAudit:p => http.post('/cyzh-estate/car/audit', p),
  }
 
  //开门设备
  const device={
-	 page:p => http.get('facedevice/facedevice/list', {params:p}),
-	 open:p => http.post('facedevice/facedevice/remoteOpenDoor', p)
+	 page:p => http.get('/cyzh-smart-device/doordevice/list', {params:p}),
+	 open:p => http.post('/park-app-service/doordevice/remoteOpenDoor', p)
  }
  
  //园区统计
  const statistical={
 	 //园区信息统计
-	 agencyStatistical:p => http.get('/statistics/agency', {params:p}),
+	 agencyStatistical:p => http.get('/park-app-service/statistics/agency', {params:p}),
 	 //当日动态数据
- 	 todayData:p => http.get('/statistics/screen/park/todayData', {params:p}),
+ 	 todayData:p => http.get('/park-app-service/statistics/todayData', {params:p}),
 	 //人员进出记录
-	 carTendency:p => http.get('statistics/screen/park/carTendency', {params:p}),
+	 carTendency:p => http.get('/park-app-service/statistics/carTendency', {params:p}),
 	 //三十天内用电量
-	 electricMeterStatic:p => http.get('statistics/electricMeterStatic', {params:p}),
+	 electricMeterStatic:p => http.get('/park-app-service/statistics/electricMeterStatic', {params:p}),
 	 //消防设备数据统计
-	 getGateStatic:p => http.get('smartapplication/smartdevice/getFireStatic', {params:p}),
+	 getGateStatic:p => http.get('/park-app-service/statistics/getFireStatic', {params:p}),
 	 //消防场景告警事件统计
-	 getDeviceJobStaticByApp:p => http.get('jobs/devicejob/getDeviceJobStaticByApp', {params:p}),
-	  
+	 getDeviceJobStaticByApp:p => http.get('/park-app-service/statistics/getDeviceJobStaticByApp', {params:p}),
  }
  
  //出入记录
  const accessrecord={
- 	 page:p => http.get('/community/accessrecord/list', {params:p}),
+ 	 page:p => http.get('/cyzh-estate/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),
-	 remove:p => http.post('estate/guest/remove?ids='+p),
+	 submit:p => http.post('/cyzh-estate/guest/application', p),
+	 page:p => http.get('/cyzh-estate/guest/list', {params:p}),
+	 getByGuestOpenId:p => http.get('/cyzh-estate/guest/getByGuestOpenId', {params:p}),
+	 check:p => http.post('/cyzh-estate/guest/check', p),
+	 remove:p => http.post('/cyzh-estate/guest/remove?ids='+p),
  }
  
  //企业项目
  const enterpriseproject={
-	 submit:p => http.post('enterprise/enterpriseproject/submit', p),
-	 page:p => http.get('enterprise/enterpriseproject/list', {params:p}),
-	 remove:p => http.post('enterprise/enterpriseproject/remove?ids='+p),
+	 submit:p => http.post('/cyzh-enterprise/project/submit', p),
+	 page:p => http.get('/cyzh-enterprise/project/list', {params:p}),
+	 remove:p => http.post('/cyzh-enterprise/project/remove?ids='+p),
  }
  
  //视频监控
@@ -199,7 +201,7 @@ const healthCode = {
 	 branchDetail:p => http.get('party/branch/detail', {params:p}),
 	 //查看员工属于哪个党支部 enterpriseStaffId
 	 branch:p => http.get('party/branch/app/list/', {params:p}),
-	 isPartyMember:p => http.get('party/member/isPartyMember', {params:p}),
+	 isPartyMember:p => http.get('/park-app-service/party/member/isPartyMember', {params:p}),
 	 //党员认证
 	 apply:p => http.post('party/member/apply',p),
 	 //三会一课

+ 56 - 51
assets/http/service.js

@@ -3,8 +3,8 @@ import util from '../../utils/util.js'
 
 // let	baseURL = 'http://192.168.1.244:9527/'
 
-// let	baseURL = 'http://192.168.1.33:9527/'
-let	baseURL = 'http://localhost:9527/'
+let	baseURL = 'http://192.168.1.160'
+// let	baseURL = 'http://8.135.18.59:1889/api'
 
 // let	baseURL = 'http://park.nxzhsq.cn:9527/'
 
@@ -12,7 +12,10 @@ let	baseURL = 'http://localhost:9527/'
 
 const getTokenUrl=()=>{
 	let tokenObj=uni.getStorageSync("tokenObj")
-	return baseURL+`blade-auth/oauth/token?tenantId=${tokenObj.tenantId}&password=${tokenObj.password}&username=${tokenObj.username}`
+	let url = baseURL+`/blade-auth/oauth/token?tenant_id=${tokenObj.tenant_id}&password=${tokenObj.password}&username=${tokenObj.username}&grant_type=password&scope=all&type=account`;
+	// let url = baseURL+"/blade-auth/oauth/token?tenant_id=804981&password=d84786746a846669404dd20587fed3b99ef90f23&username=wpadmin&grant_type=password&scope=all&type=account"
+	console.log("tokenurl:"+url)
+	return url
 }
 //获取token
 const getTokenStorage = () => {
@@ -25,7 +28,7 @@ const getTokenStorage = () => {
 }
 
 //不需要加上Blade-Auth的url
-const WHiTE_LIST=['agency/agency/getAgencyTenantList'] 
+const WHiTE_LIST=['agency/getAgencyTenantList'] 
 
 const http = new Request()
 http.setConfig((config) => { /* 设置全局配置 */
@@ -52,58 +55,60 @@ let isRefreshing = false
 // 重试队列,每一项将是一个待执行的函数形式
 let requests = []
 http.interceptors.response.use(async (response) => { /* 请求之后拦截器。可以使用async await 做异步操作  */
-	//toekn过期处理 
-      if (response.data.code == 401) {
-          let {config} = 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,
-                  method: 'POST',
-                  header:{
-                  	Authorization:"Basic c2FiZXI6c2FiZXJfc2VjcmV0"
-                  },
-              })
-              //否则保存新的token
-              token=res.data.token_type+" "+res.data.access_token
-              uni.setStorageSync('token', token)
-              requests.forEach(cb => cb())
-              // 重试完了清空这个队列
-              requests = []
-              isRefreshing = false
-              return http.request(config)
-          } else {
-              return new Promise((resolve) => {
-                  // 将resolve放进队列,用一个函数形式来保存,等token刷新后直接执行
-                  requests.push(() => {
-                      resolve(http.request(config))
-                  })
-              })
-          }
-      }
+	//toekn过期处理
 	  //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) {
+      console.log(response.data.code)
+	  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) => { // 请求错误做点什么
+  },async (err) => { // 请求错误做点什么
+	  
+	  if (err.data.code == 401) {
+	      let {config} = err
+	      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:url,
+	              method: 'POST',
+	              header:{
+	              	Authorization:"Basic c2FiZXI6c2FiZXJfc2VjcmV0"
+	              },
+	          })
+	          //否则保存新的token
+	          token=res.data.token_type+" "+res.data.access_token
+	          uni.setStorageSync('token', token)
+	          requests.forEach(cb => cb())
+	          // 重试完了清空这个队列
+	          requests = []
+	          isRefreshing = false
+	          return http.request(config)
+	      } else {
+	          return new Promise((resolve) => {
+	              // 将resolve放进队列,用一个函数形式来保存,等token刷新后直接执行
+	              requests.push(() => {
+	                  resolve(http.request(config))
+	              })
+	          })
+	      }
+	  }
       return Promise.reject(err)
   })
 export {

+ 1 - 1
components/infomation/infomation.vue

@@ -7,7 +7,7 @@
 	            <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-cut-2" style="color: #757575;font-size: 24rpx;">
-						<text>{{item.article | formatHtml}}</text>
+						<text>{{item.content | formatHtml}}</text>
 						<!-- <rich-text :nodes="item.article"></rich-text> -->
 					</view>
 	                <view class="uni-media-list-text-bottom">

+ 2 - 2
pages/agency/comps/agency-info.vue

@@ -75,7 +75,7 @@
 		methods: {
 			fetchBanner(){
 				let params={
-					tenantId:this.$cache.get('agencyTenantId')
+					// tenantId:this.$cache.get('agencyTenantId')
 				}
 				this.$api.banner.page(params).then(res=>{
 					if (!this.$isEmpty(res.data.records)) {
@@ -88,7 +88,7 @@
 					id:this.$cache.get('agencyId')
 				}
 				this.$api.agency.page(params).then(res=>{
-					this.detailData=res.data[0]
+					this.detailData=res.data.records[0]
 				})
 			},
 		}

+ 6 - 6
pages/auth/auth.vue

@@ -107,7 +107,7 @@
 			<!-- 性别 -->
 			<u-picker v-model="sexSelectShow" @confirm="sexSelectCallback" :range="sexSelectList" range-key="text" mode="selector"></u-picker>
 			<!-- 园区 -->
-			<u-picker v-model="ganderSelectShow" @confirm="ganderSelectCallback" :range="ganderSelectList" range-key="agencyName" mode="selector"></u-picker>
+			<u-picker v-model="ganderSelectShow" @confirm="ganderSelectCallback" :range="ganderSelectList" range-key="name" mode="selector"></u-picker>
 			<!-- 区域 -->
 			<u-picker v-model="residentialSelectShow" @confirm="residentialSelectCallback" :range="residentialSelectList" range-key="name" mode="selector"></u-picker>
 			<!-- 企业 -->
@@ -389,7 +389,7 @@
 				}
 				if (this.operationType==1) {
 					//重新审核
-					this.model.examine=0
+					this.model.auditStatus=0
 				}
 				this.model.createType=1 //1小程序认证方式 0:后台数据导入
 				let res=await this.$api.enterprisestaff.submit(this.model)
@@ -461,7 +461,7 @@
 			 */
 			fetchAgencyList(){
 				this.$api.agency.page().then(res=>{
-					this.ganderSelectList=res.data
+					this.ganderSelectList=res.data.records
 				})
 			},
 			/**
@@ -476,8 +476,8 @@
 					this.resetEnterprise()
 				}
 				this.ganderSelectIndex=e[0]
-				this.gander=this.ganderSelectList[this.ganderSelectIndex].agencyName
-				this.model.agencyName=this.ganderSelectList[this.ganderSelectIndex].agencyName
+				this.gander=this.ganderSelectList[this.ganderSelectIndex].name
+				this.model.agencyName=this.ganderSelectList[this.ganderSelectIndex].name
 				this.model.agencyId=this.ganderSelectList[this.ganderSelectIndex].id
 				//加载区域
 				this.fetchResidentialList(this.model.agencyId)
@@ -633,7 +633,7 @@
 			//处理照片,拍照上传和相册上传的共同处理方法
 			uploadFile(imgUrl){
 				this.$api.uploadFile.submit(imgUrl).then(res=>{
-					that.model.face=res.data
+					that.model.face=res.data.link
 				})
 			},
 		},

+ 1 - 1
pages/company/company.vue

@@ -147,7 +147,7 @@
 			},
 			fetchBanner(){
 				let params={
-					tenantId:this.$cache.get('agencyTenantId')
+					// tenantId:this.$cache.get('agencyTenantId')
 				}
 				this.$api.banner.page(params).then(res=>{
 					if (!this.$isEmpty(res.data.records)) {

+ 4 - 4
pages/device/device.vue

@@ -6,10 +6,10 @@
 				<view class="flex justify-between">
 					<view class="flex"  style="width: 80%;">
 						<view class="tag" :class="item.tagColor">
-							<text>{{item.cameraName.substr(0,1)}}</text>
+							<text>{{item.name.substr(0,1)}}</text>
 						</view>
 						<view class="flex justify-center align-center padding-left-20 text-lg">
-							<text>{{item.cameraName}}</text>
+							<text>{{item.name}}</text>
 							<!-- <view v-if="defaultDoorValue==item.macAddress" class="margin-left-10 sm cu-tag bg-orange">
 								默认
 							</view> -->
@@ -94,7 +94,7 @@ export default {
 		if (loginType==this.$loginType.STAFF) {
 			this.getUserId()
 		}
-		
+		      
 	},
 	onShow() {
 		if (this.canReset) {
@@ -138,7 +138,7 @@ export default {
 		getUserId(){
 			if (this.$isEmpty(getApp().globalData.userInfo)) {
 				let phone=this.$cache.get('phone')
-				this.$api.enterprisestaff.page({phone:phone,examine:1}).then(res=>{
+				this.$api.enterprisestaff.page({phone:phone,auditStatus:1}).then(res=>{
 					let userInfo=res.data.records[0]
 					this.userId=userInfo.id
 				})

+ 14 - 29
pages/enterprise/add.vue

@@ -129,35 +129,7 @@
 				location:'',
 				//企业类型
 				enterpriseTypeShow: false,
-				enterpriseTypeList: [{
-						label: '有限责任公司',
-						value: '有限责任公司'
-					},
-					{
-						label: '股份有限公司',
-						value: '股份有限公司'
-					},
-					{
-						label: '个人独资企业',
-						value: '个人独资企业'
-					},
-					{
-						label: '一人有限公司',
-						value: '一人有限公司'
-					},
-					{
-						label: '合伙企业',
-						value: '合伙企业'
-					},
-					{
-						label: '个体工商户',
-						value: '个体工商户'
-					},
-					{
-						label: '其他',
-						value: '其他'
-					},
-				],
+				enterpriseTypeList: [],
 				//成立日期
 				registeredDateShow: false,
 				params: {
@@ -210,6 +182,7 @@
 		},
 		onLoad() {
 			this.fetchResidentialList()
+			this.fetchEnterpriseList()
 		},
 		onReady() {
 			this.$refs.uForm.setRules(this.rules);
@@ -234,6 +207,18 @@
 			enterpriseTypeConfirm(e){
 				this.model.enterpriseType=e[0].value
 			},
+			fetchEnterpriseList(){
+				this.enterpriseTypeList=[]
+				this.$api.dict({code:'enterprise_type'}).then(res=>{
+					res.data.forEach(item=>{
+						let obj={
+							label:item.dictValue,
+							value:item.dictValue
+						}
+						 this.enterpriseTypeList.push(obj)
+					})
+				})
+			},
 			//成立日期
 			registeredDateConfirm(e) {
 				this.model.registeredDate = e.year + '-' + e.month + '-' + e.day

+ 5 - 4
pages/guest/guest.vue

@@ -154,7 +154,7 @@
 					enterpriseId:'',
 					guestName:'',
 					guestTel:'',
-					guestSex:'',//1 男 2 女
+					guestSex:'1',//1 男 2 女
 					guestIdcard:'',//身份证号
 					guestReason:'',//访问缘由
 					interviewTime:'',//访问时间
@@ -324,9 +324,10 @@
 			//选择园区
 			selectAgency(item){
 				let params={
-					tenantId:item.tenantId,
+					tenant_id:item.tenantId,
 					username:item.account,
-					password:item.password
+					password:item.password,
+					grant_type: "password"
 				}
 				this.model.agencyId=item.id
 				this.agencyName=item.agencyName
@@ -406,7 +407,7 @@
 			//处理照片,拍照上传和相册上传的共同处理方法
 			uploadFile(imgUrl){
 				this.$api.uploadFile.submit(imgUrl).then(res=>{
-					that.model.imageUri=res.data
+					that.model.imageUri=res.data.link
 				})
 			},
 			async send(openId){

+ 1 - 1
pages/guest/open-door/open-door.vue

@@ -94,7 +94,7 @@ export default {
 		getUserId(){
 			if (this.$isEmpty(getApp().globalData.userInfo)) {
 				let phone=this.$cache.get('phone')
-				this.$api.enterprisestaff.page({phone:phone,examine:1}).then(res=>{
+				this.$api.enterprisestaff.page({phone:phone,auditStatus:1}).then(res=>{
 					let userInfo=res.data.records[0]
 					this.userId=userInfo.id
 				})

+ 3 - 2
pages/guest/records/comps/card.vue

@@ -131,9 +131,10 @@ export default {
 			let res=await this.$api.agency.getAgencyTenantList(params)
 			let data=res.data[0]
 			let tokenParams={
-				tenantId:data.tenantId,
+				tenant_id:data.tenantId,
 				username:data.account,
-				password:data.password
+				password:data.password,
+				grant_type: "password"
 			}
 			this.$cache.put('tokenObj',tokenParams)
 			let resp=await this.$api.getToken(this.$u.queryParams(tokenParams))

+ 2 - 2
pages/index/agency/agency.vue

@@ -71,7 +71,7 @@
 		methods: {
 			fetchBanner(){
 				let params={
-					tenantId:this.$cache.get('agencyTenantId')
+					// tenantId:this.$cache.get('agencyTenantId')
 				}
 				this.$api.banner.page(params).then(res=>{
 					if (!this.$isEmpty(res.data.records)) {
@@ -81,7 +81,7 @@
 			},
 			fetchDeatil(){
 				this.$api.agency.page({id:this.id}).then(res=>{
-					this.detail=res.data[0]
+					this.detail=res.data.records[0]
 				})
 			},
 		}

+ 3 - 8
pages/index/car/comps/car-manager-card.vue

@@ -96,14 +96,6 @@
 				this.$emit('fail',item)
 			},
 			getDict(){
-				let dict=this.$cache.get('dict')
-				if (dict) {
-					//缓存中有字典值
-					this.carTypeList=dict.carTypeList
-					this.carPropertiesList=dict.carPropertiesList
-					this.fuelCategoryList=dict.fuelCategoryList
-					return
-				}
 				//车辆类型
 				this.$api.dict({code:'car_type'}).then(res=>{
 					res.data.forEach((item)=>{
@@ -113,6 +105,7 @@
 						}
 						this.carTypeList.push(tmp)
 					})
+					this.$u.vuex('vuex_carTypeList',this.carTypeList)
 				})
 				//车辆性质
 				this.$api.dict({code:'car_properties'}).then(res=>{
@@ -123,6 +116,7 @@
 						}
 						this.carPropertiesList.push(tmp)
 					})
+					this.$u.vuex('vuex_carPropertiesList',this.carPropertiesList)
 				})
 				//燃油类别
 				this.$api.dict({code:'fuel_category'}).then(res=>{
@@ -133,6 +127,7 @@
 						}
 						this.fuelCategoryList.push(tmp)
 					})
+					this.$u.vuex('vuex_fuelCategoryList',this.fuelCategoryList)
 				})
 			},
 		}

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

@@ -70,7 +70,7 @@
 				let params={
 					current:mescroll.num,
 					size:mescroll.size,
-					tenantId:this.tenantId,
+					// tenantId:this.tenantId,
 					carNo:this.params.carNo
 				}
 				let res=null

+ 8 - 11
pages/index/car/comps/my-car-card.vue

@@ -116,14 +116,8 @@
 				}
 			},
 			getDict(){
-				let dict=this.$cache.get('dict')
-				if (dict) {
-					//缓存中有字典值
-					this.carTypeList=dict.carTypeList
-					this.carPropertiesList=dict.carPropertiesList
-					this.fuelCategoryList=dict.fuelCategoryList
-					return
-				}
+				var _that = this;
+
 				//车辆类型
 				this.$api.dict({code:'car_type'}).then(res=>{
 					res.data.forEach((item)=>{
@@ -131,8 +125,9 @@
 							value:item.dictKey,
 							label:item.dictValue
 						}
-						this.carTypeList.push(tmp)
+						_that.carTypeList.push(tmp)
 					})
+					_that.$u.vuex('vuex_carTypeList',_that.carTypeList)
 				})
 				//车辆性质
 				this.$api.dict({code:'car_properties'}).then(res=>{
@@ -141,8 +136,9 @@
 							value:item.dictKey,
 							label:item.dictValue
 						}
-						this.carPropertiesList.push(tmp)
+						_that.carPropertiesList.push(tmp)
 					})
+					_that.$u.vuex('vuex_carPropertiesList',_that.carPropertiesList)
 				})
 				//燃油类别
 				this.$api.dict({code:'fuel_category'}).then(res=>{
@@ -151,8 +147,9 @@
 							value:item.dictKey,
 							label:item.dictValue
 						}
-						this.fuelCategoryList.push(tmp)
+						_that.fuelCategoryList.push(tmp)
 					})
+					_that.$u.vuex('vuex_fuelCategoryList',_that.fuelCategoryList)
 				})
 			},
 		}

+ 13 - 47
pages/index/car/my-car/add.vue

@@ -159,9 +159,8 @@
 				},
 			}
 		},
-		onLoad(options ) {
+		onLoad(options) {
 			that=this
-			
 			let loginType=this.$cache.get('loginType')
 			this.userId=this.$cache.get('userId')
 			this.agencyId=this.$cache.get('agencyId')
@@ -172,8 +171,6 @@
 					this.$navigateBack()
 				})
 			}
-			//获取字典
-			this.getDict()
 			this.parseParams(options)
 			
 		},
@@ -189,9 +186,18 @@
 		},
 		methods: {
 			parseParams(options){
+				this.carTypeList=this.vuex_carTypeList
+				this.carPropertiesList=this.vuex_carPropertiesList
+				this.fuelCategoryList=this.vuex_fuelCategoryList
 				if (this.$isEmpty(options)) {
 					return
 				}
+				if (!this.$isEmpty(options.id)) {
+					uni.setNavigationBarTitle({
+						title:"编辑车辆"
+					})
+				}
+				
 				this.model=options
 				this.carNoInputList=options.number.split('')
 				this.carTypeList.forEach(item=>{
@@ -252,46 +258,6 @@
 					}
 				})
 			},
-			getDict(){
-				let dict=this.$cache.get('dict')
-				if (dict) {
-					//缓存中有字典值
-					this.carTypeList=dict.carTypeList
-					this.carPropertiesList=dict.carPropertiesList
-					this.fuelCategoryList=dict.fuelCategoryList
-					return
-				}
-				//车辆类型
-				this.$api.dict({code:'car_type'}).then(res=>{
-					res.data.forEach((item)=>{
-						let tmp={
-							value:item.dictKey,
-							label:item.dictValue
-						}
-						this.carTypeList.push(tmp)
-					})
-				})
-				//车辆性质
-				this.$api.dict({code:'car_properties'}).then(res=>{
-					res.data.forEach((item)=>{
-						let tmp={
-							value:item.dictKey,
-							label:item.dictValue
-						}
-						this.carPropertiesList.push(tmp)
-					})
-				})
-				//燃油类别
-				this.$api.dict({code:'fuel_category'}).then(res=>{
-					res.data.forEach((item)=>{
-						let tmp={
-							value:item.dictKey,
-							label:item.dictValue
-						}
-						this.fuelCategoryList.push(tmp)
-					})
-				})
-			},
 			carTypeConfirm(e){
 				this.model.type=e[0].value
 				this.carTypeLabel=e[0].label
@@ -310,11 +276,11 @@
 				  this.$api.uploadFile.submit(res[0]).then(res=>{
 				  	if (type==1) {
 				  		//车辆照片
-				  		that.model.carImg=res.data
+				  		that.model.carImg=res.data.link
 				  	}else if (type==2) {
-				  		that.model.vehicleDrivingLicense1=res.data//行驶证正面
+				  		that.model.vehicleDrivingLicense1=res.data.link//行驶证正面
 				  	}else if (type==3) {
-				  		that.model.vehicleDrivingLicense2=res.data//行驶证反面
+				  		that.model.vehicleDrivingLicense2=res.data.link//行驶证反面
 				  	}
 				  })
 			  })

+ 4 - 2
pages/index/fire/list/comps/item.vue

@@ -77,10 +77,12 @@
 				}
 				if (loginType==this.$loginType.ENTERPRISE) {
 					//公司统一信用代码
-					params.creditCode=this.$cache.get('creditCode')
+					// params.creditCode=this.$cache.get('creditCode')
+					//公司id
+					params.enterpriseId=this.$cache.get('enterpriseId')
 				}else if (loginType==this.$loginType.AGENCY) {
 					//园区tenantId
-					params.tenantId=this.$cache.get('agencyTenantId')
+					// params.tenantId=this.$cache.get('agencyTenantId')
 				}
 				
 				if (this.fireType==0) {

+ 4 - 3
pages/index/index.vue

@@ -234,7 +234,7 @@ export default {
 		},
 		fetchBanner(){
 			let params={
-				tenantId:this.$cache.get('agencyTenantId')
+				// tenantId:this.$cache.get('agencyTenantId')
 			}
 			this.$api.banner.page(params).then(res=>{
 				if (!this.$isEmpty(res.data.records)) {
@@ -251,6 +251,7 @@ export default {
 				agencyId:this.$cache.get('agencyId').toString()
 			}
 			this.$api.CMS.page(params).then(res=>{
+				console.log("newList:"+JSON.stringify(res))
 				this.newsList=res.data.records
 			})
 		},
@@ -261,7 +262,7 @@ export default {
 		   if (this.loginType==this.$loginType.STAFF) {
 				//员工
 				let phone=this.$cache.get('phone')
-				this.$api.enterprisestaff.page({phone:phone,examine:1}).then(res=>{
+				this.$api.enterprisestaff.page({phone:phone,auditStatus:1}).then(res=>{
 					let userInfo=res.data.records[0]
 					getApp().globalData.userInfo=userInfo
 					this.$u.vuex('vuex_userInfo',userInfo)
@@ -288,7 +289,7 @@ export default {
 			let that=this
 			let params={
 				size:200,
-				examine:0
+				auditStatus:0
 			}
 			if (this.loginType==this.$loginType.ENTERPRISE) {
 				params.enterpriseId=this.$cache.get('enterpriseId')

+ 3 - 3
pages/index/myinfo/myinfo.vue

@@ -142,7 +142,7 @@
 			async fetchUserInfo(){
 				if (this.$isEmpty(getApp().globalData.userInfo)) {
 					let phone=this.$cache.get('phone')
-					let res=await this.$api.enterprisestaff.page({phone:phone,examine:1})
+					let res=await this.$api.enterprisestaff.page({phone:phone,auditStatus:1})
 					this.model=res.data.records[0]
 				}else{
 					this.model=getApp().globalData.userInfo
@@ -197,8 +197,8 @@
 			//处理照片,拍照上传和相册上传的共同处理方法
 			uploadFile(imgUrl){
 				this.$api.uploadFile.submit(imgUrl).then(res=>{
-					that.model.face=res.data
-					that.newFace=res.data
+					that.model.face=res.data.link
+					that.newFace=res.data.link
 				})
 			},
 		}

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

@@ -79,14 +79,14 @@
 					params.tenantId=tenantId
 				}else if (this.loginType==this.$loginType.ENTERPRISE) {
 					//企业
-					let creditCode=this.$cache.get('creditCode')
-					params.enterpriseCreditCode=creditCode
+					let enterpriseId=this.$cache.get('enterpriseId')
+					// params.enterpriseCreditCode=creditCode
+					params.enterpriseId=enterpriseId
 				}else if (this.loginType==this.$loginType.STAFF) {
 					//员工
 					let phone=this.$cache.get('phone')
 					params.phone=phone
 				}
-				
 				try{
 					this.$api.temperatureRecord.page(params).then(res=>{
 						let data=res.data.records

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

@@ -9,9 +9,9 @@
 					</view>
 				</view>
 				<view class="right">
-					<text class="" v-if="item.examine==1">已通过</text>
-					<text style="color: #ea7500;" v-if="item.examine==0">待审核</text>
-					<text style="color: #da0000;" v-if="item.examine==2">未通过</text>
+					<text class="" v-if="item.auditStatus==1">已通过</text>
+					<text style="color: #ea7500;" v-if="item.auditStatus==0">待审核</text>
+					<text style="color: #da0000;" v-if="item.auditStatus==2">未通过</text>
 				</view>
 			</view>
 			<view class="item">
@@ -38,10 +38,10 @@
 			</view>
 			<view class="bottom" >
 				<!-- 待审核,显示取消工单 -->
-				<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 @click.stop="pass(item)" v-if="item.auditStatus==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" style="font-size: 22rpx;" class="cu-btn  sm round bg-red " >
+				<view @click.stop="fail(item)" v-if="item.auditStatus==0" style="font-size: 22rpx;" class="cu-btn  sm round bg-red " >
 					审核不通过
 				</view>
 			</view>

+ 2 - 2
pages/index/staffAudit/comps/item.vue

@@ -84,7 +84,7 @@
 				let that=this
 				let item=this.$u.deepClone(data)
 				this.$showModel("确定审核通过该员工信息吗?").then(res=>{
-					item.examine=1
+					item.auditStatus=1
 					item.auditTime=this.$createDateTime()
 					this.$api.enterprisestaff.submit(item).then(res=>{
 						if (res.success==true) {
@@ -167,7 +167,7 @@
 				
 				if (this.item.value!=-1) {
 					//不是查询全部就传examine
-					obj.examine=this.item.value
+					obj.auditStatus=this.item.value
 				}
 				try{
 					this.$api.enterprisestaff.page(obj).then(res=>{

+ 7 - 7
pages/index/staffAudit/detail.vue

@@ -18,9 +18,9 @@
 					</view>
 				</view>
 				<view class="right">
-					<text class="" v-if="dataDetail.examine==1">已通过</text>
-					<text style="color: #ea7500;" v-if="dataDetail.examine==0">待审核</text>
-					<text style="color: #da0000;" v-if="dataDetail.examine==2">未通过</text>
+					<text class="" v-if="dataDetail.auditStatus==1">已通过</text>
+					<text style="color: #ea7500;" v-if="dataDetail.auditStatus==0">待审核</text>
+					<text style="color: #da0000;" v-if="dataDetail.auditStatus==2">未通过</text>
 				</view>
 			</view>
 			<view class="item">
@@ -72,11 +72,11 @@
 							<text class="padding-right-10">提交时间:</text>
 							<text>{{dataDetail.createTime}}</text>
 						</view>
-						<view class="content" v-if="dataDetail.examine!=0">
+						<view class="content" v-if="dataDetail.auditStatus!=0">
 							<text class="padding-right-10" >审核时间:</text>
 							<text v-text="dataDetail.auditTime?dataDetail.auditTime:''"></text>
 						</view>
-						<view class="content" v-if="dataDetail.examine!=0">
+						<view class="content" v-if="dataDetail.auditStatus!=0">
 							<text class="padding-right-10">审核意见:</text>
 							<text v-text="dataDetail.opinion?dataDetail.opinion:''"></text>
 						</view>
@@ -89,7 +89,7 @@
 				</view>
 			</view>
 		</view>
-		<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 v-if="dataDetail.auditStatus==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>
@@ -220,7 +220,7 @@ export default {
 		 */
 		submitFailAudit(){
 			let item=this.$u.deepClone(this.dataDetail)
-			item.examine=2
+			item.auditStatus=2
 			item.auditTime=this.$createDateTime()
 			item.opinion=this.opinion
 			this.$api.enterprisestaff.submit(item).then(res=>{

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

@@ -118,7 +118,7 @@
 			submitFailAudit(){
 				let item=this.$u.deepClone(this.failItem)
 				let that=this
-				item.examine=2
+				item.auditStatus=2
 				item.opinion=that.opinion
 				item.auditTime=this.$createDateTime()
 				that.$api.enterprisestaff.submit(item).then(res=>{

+ 18 - 14
pages/login/login.vue

@@ -103,7 +103,7 @@
 			</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>
+					<text>{{item.name}}</text>
 				</view>
 				<u-divider v-if="agencyList.length>=20" height="80">只显示20条数据</u-divider>
 			</scroll-view>
@@ -257,9 +257,10 @@ export default {
 				this.agencyList.forEach(item=>{
 					if(item.id==that.agencyId){
 						let params={
-							tenantId:item.tenantId,
+							tenant_id:item.tenantId,
 							username:item.account,
-							password:item.password
+							password:item.password,
+							grant_type: "password"
 						}
 						//放进缓存中,并获取token
 						that.$cache.put('tokenObj',params)
@@ -302,7 +303,7 @@ export default {
 		getAgencyList(){
 			let params={
 				size:20,
-				agencyName:this.agencyKeyWord
+				name:this.agencyKeyWord
 			}
 			this.$api.agency.getAgencyTenantList(params).then(res=>{
 				this.agencyList = res.data
@@ -312,12 +313,15 @@ export default {
 		selectAgency(item){
 			console.log(item);
 			let params={
-				tenantId:item.tenantId,
+				tenant_id:item.tenantId,
 				username:item.account,
-				password:item.password
+				password:item.password,
+				grant_type: "password",
+				scope:"all",
+				type:"account"
 			}
 			this.agencyId=item.id
-			this.agencyName=item.agencyName
+			this.agencyName=item.name
 			this.agencyShow=false
 			this.$cache.put('tokenObj',params)
 			//获取token
@@ -444,10 +448,10 @@ export default {
 				})
 			}else{
 				let userInfo=records[0]
-				if (userInfo.examine==0) {
+				if (userInfo.auditStatus==0) {
 					//有员工信息,但审核未通过,提示等待审核
 					this.$showModel('您的认证信息尚未审核,请联系企业负责人审核',false)
-				}else if(userInfo.examine==1){
+				}else if(userInfo.auditStatus==1){
 					//后台导入的员工信息没有openid,需要在小程序重新插入
 					if (this.$isEmpty(userInfo.openId)&&!this.$isEmpty(this.openId)) {
 						userInfo.openId=this.openId
@@ -461,7 +465,7 @@ export default {
 					this.$cache.put('userId',userInfo.id)
 					this.$cache.put('enterpriseId',userInfo.enterpriseId)
 					this.handelSuccessLogin('staff')
-				}else if (userInfo.examine==2) {
+				}else if (userInfo.auditStatus==2) {
 					//审核不通过
 					this.$showModel('您的认证信息审核不通过,是否重新认证!').then(res=>{
 						uni.navigateTo({
@@ -559,8 +563,8 @@ export default {
 				this.$u.toast('账号或密码错误')
 				return
 			}
-			//订阅消息通知
-			await this.$mpi.subscribe(this.$adminTmplIds)
+			//订阅消息通知  -- 登录不了,暂时去掉,
+			// await this.$mpi.subscribe(this.$adminTmplIds)
 			//输入密码成功
 			//园区信息
 			this.$cache.put('loginAccount',this.agencyAccount)
@@ -645,8 +649,8 @@ export default {
 		    }
 		},
 		getAppletStatus(){
-			this.$api.wxApi.getAppletStatus({id:1}).then(res=>{
-				uni.setStorageSync("appletStatus",res.data.isOnline)
+			this.$api.wxApi.getAppletStatus({id:2}).then(res=>{
+				uni.setStorageSync("appletStatus",res.data.appletType)
 			})
 		},
 		tabSelect(index){

+ 8 - 8
pages/login/login1.vue

@@ -170,8 +170,8 @@ export default {
 	},
 	methods: {
 		getAppletStatus(){
-			this.$api.wxApi.getAppletStatus({id:1}).then(res=>{
-				uni.setStorageSync("appletStatus",res.data.isOnline)
+			this.$api.wxApi.getAppletStatus({id:2}).then(res=>{
+				uni.setStorageSync("appletStatus",res.data.appletType)
 			})
 		},
 		scrolltolower(e){
@@ -243,7 +243,7 @@ export default {
 		 */
 		fetchAgencyList(){
 			this.$api.agency.page({size:200}).then(res=>{
-				this.ganderSelectList=res.data
+				this.ganderSelectList=res.data.records
 			})
 		},
 		/**
@@ -407,10 +407,10 @@ export default {
 				this.$Router.push({name:'auth',params:data})
 			}else{
 				let userInfo=records[0]
-				if (userInfo.examine==0) {
+				if (userInfo.auditStatus==0) {
 					//有员工信息,但审核未通过,提示等待审核
 					this.$showModel('您的认证信息尚未审核,请联系企业负责人审核',false)
-				}else if(userInfo.examine==1){
+				}else if(userInfo.auditStatus==1){
 					//后台导入的员工信息没有openid,需要在小程序重新插入
 					if (this.$isEmpty(userInfo.openId)&&!this.$isEmpty(this.openId)) {
 						userInfo.openId=this.openId
@@ -424,7 +424,7 @@ export default {
 					this.$cache.put('userId',userInfo.id)
 					this.$cache.put('enterpriseId',userInfo.enterpriseId)
 					this.handelSuccessLogin('staff')
-				}else if (userInfo.examine==2) {
+				}else if (userInfo.auditStatus==2) {
 					//审核不通过
 					this.$showModel('您的认证信息审核不通过,是否重新认证!').then(res=>{
 						uni.navigateTo({
@@ -442,7 +442,7 @@ export default {
 				this.$showModel('获取微信openId失败,请用手机号登录',false)
 				return
 			}
-			this.$api.enterprisestaff.page({openId:this.openId,examine:1}).then(res=>{
+			this.$api.enterprisestaff.page({openId:this.openId,auditStatus:1}).then(res=>{
 				if (this.$isEmpty(res.data.records)) {
 					this.$refs.uTips.show({
 						title: '请先用绑定的手机号登陆!',
@@ -483,7 +483,7 @@ export default {
 					//公司信息
 					let userInfo=res.data.records[0]
 					this.$api.agency.page({residentialId:userInfo.residentialId}).then(agencyRes=>{
-						this.$cache.put('agencyId',agencyRes.data[0].id)
+						this.$cache.put('agencyId',agencyRes.data.records[0].id)
 					})
 					getApp().globalData.userInfo=userInfo
 					//存储公司统一信用代码,便于拉取企业信息

+ 1 - 1
pages/mine/editPhone/editPhone.vue

@@ -67,7 +67,7 @@ export default {
 		 * 获取用户信息
 		 */
 		fetchUserInfo(){
-			this.$api.enterprisestaff.page({phone:this.phone,examine:1}).then(res=>{
+			this.$api.enterprisestaff.page({phone:this.phone,auditStatus:1}).then(res=>{
 				this.userInfo=res.data.records[0]
 			})
 		},

+ 1 - 1
pages/mine/feedback/feedback.vue

@@ -174,7 +174,7 @@
 						const tempFilePaths = res.tempFilePaths;
 						for (let index in tempFilePaths) {
 							that.$api.uploadFile.submit(tempFilePaths[index]).then(res=>{
-								that.imgList.push(res.data)
+								that.imgList.push(res.data.link)
 							})
 						}
 					}

+ 2 - 2
pages/mine/mine.vue

@@ -152,7 +152,7 @@
 			 */
 			fetchStaffInfo(){
 				let phone= this.$cache.get('phone')
-				this.$api.enterprisestaff.page({phone:phone,examine:1}).then(res=>{
+				this.$api.enterprisestaff.page({phone:phone,auditStatus:1}).then(res=>{
 					this.title=res.data.records[0].enterpriseName
 				})
 			},
@@ -171,7 +171,7 @@
 			fetchAgencyInfo(){
 				let agencyId=this.$cache.get('agencyId')
 				this.$api.agency.page({id:agencyId}).then(res=>{
-					this.title=res.data[0].agencyName
+					this.title=res.data.records[0].name
 				})
 			},
 			/**

+ 1 - 1
pages/news/detail.vue

@@ -14,7 +14,7 @@
 		</view>
 		<view class="content-view-box">
 			<view class="font-view">
-				<rich-text :nodes="dataDetail.article"></rich-text>
+				<rich-text :nodes="dataDetail.content"></rich-text>
 			</view>
 		</view>
 		<u-divider height="80">到底了</u-divider>

+ 1 - 1
pages/test/test.vue

@@ -94,7 +94,7 @@
 			chooseImage(type) {
 			  this.$mpi.chooseImage().then(res=>{
 				  this.$api.uploadFile.submit(res[0]).then(res=>{
-				  	this.model.memberPic=res.data
+				  	this.model.memberPic=res.data.link
 				  })
 			  })
 			},

+ 1 - 1
party/pages/certification/certification.vue

@@ -127,7 +127,7 @@
 			  let that=this
 			  that.$mpi.chooseImage().then(res=>{
 				  that.$api.uploadFile.submit(res[0]).then(res=>{
-				  	that.model.memberPic=res.data
+				  	that.model.memberPic=res.data.link
 				  })
 			  })
 			},

+ 1 - 1
punch/comps/punch-out/punch-out.vue

@@ -219,7 +219,7 @@
 					checkinType: 2,//外出打卡
 					ruleId: this.vuex_punch_rules.id,
 					note:this.remark,
-					faceImg:res.data
+					faceImg:res.data.link
 				}
 				this.$api.punch.save(params).then(res => {
 					if (res.success == true) {

+ 7 - 0
store/index.js

@@ -47,6 +47,13 @@ const store = new Vuex.Store({
 		vuex_location:lifeData.vuex_location ? lifeData.vuex_location : null,
 		//打开规则
 		vuex_punch_rules:lifeData.vuex_punch_rules ? lifeData.vuex_punch_rules : null,
+		
+		//车辆类型
+		vuex_carTypeList:lifeData.vuex_carTypeList ? lifeData.vuex_carTypeList : null,
+		//车辆性质
+		vuex_carPropertiesList:lifeData.vuex_carPropertiesList ? lifeData.vuex_carPropertiesList : null,
+		//燃油类别
+		vuex_fuelCategoryList:lifeData.vuex_fuelCategoryList ? lifeData.vuex_fuelCategoryList : null,
 	},
 	mutations: {
 		$uStore(state, payload) {

+ 2 - 2
uview-ui/components/u-calendar/u-calendar.vue

@@ -68,8 +68,8 @@
 	 * @property {Boolean} change-year 是否显示顶部的切换年份方向的按钮(默认true)
 	 * @property {Boolean} change-month 是否显示顶部的切换月份方向的按钮(默认true)
 	 * @property {String Number} max-year 可切换的最大年份(默认2050)
-	 * @property {String Number} min-year 最小可选日期(默认1950)
-	 * @property {String Number} min-date 可切换的最小年份(默认1950-01-01)
+	 * @property {String Number} min-year 可切换的最小年份(默认1950)
+	 * @property {String Number} min-date 最小可选日期(默认1950-01-01)
 	 * @property {String Number} max-date 最大可选日期(默认当前日期)
 	 * @property {String Number} 弹窗顶部左右两边的圆角值,单位rpx(默认20)
 	 * @property {Boolean} mask-close-able 是否允许通过点击遮罩关闭日历(默认true)

+ 3 - 3
uview-ui/components/u-cell-item/u-cell-item.vue

@@ -22,17 +22,17 @@
 				titleStyle
 			]"
 		>
-			<block v-if="title">{{ title }}</block>
+			<block v-if="title !== ''">{{ title }}</block>
 			<slot name="title" v-else></slot>
 
 			<view class="u-cell__label" v-if="label || $slots.label" :style="[labelStyle]">
-				<block v-if="label">{{ label }}</block>
+				<block v-if="label !== ''">{{ label }}</block>
 				<slot name="label" v-else></slot>
 			</view>
 		</view>
 
 		<view class="u-cell__value" :style="[valueStyle]">
-			<block class="u-cell__value" v-if="value">{{ value }}</block>
+			<block class="u-cell__value" v-if="value !== ''">{{ value }}</block>
 			<slot v-else></slot>
 		</view>
 		<view class="u-flex u-cell_right" v-if="$slots['right-icon']">

+ 147 - 0
uview-ui/components/u-circle-progress/u-line-progress/u-line-progress.vue

@@ -0,0 +1,147 @@
+<template>
+	<view class="u-progress" :style="{
+		borderRadius: round ? '100rpx' : 0,
+		height: height + 'rpx',
+		backgroundColor: inactiveColor
+	}">
+		<view :class="[
+			type ? `u-type-${type}-bg` : '',
+			striped ? 'u-striped' : '',
+			striped && stripedActive ? 'u-striped-active' : ''
+		]" class="u-active" :style="[progressStyle]">
+			<slot v-if="$slots.default || $slots.$default" />
+			<block v-else-if="showPercent">
+				{{percent + '%'}}
+			</block>
+		</view>
+	</view>
+</template>
+
+<script>
+	/**
+	 * lineProgress 线型进度条
+	 * @description 展示操作或任务的当前进度,比如上传文件,是一个线形的进度条。
+	 * @tutorial https://www.uviewui.com/components/lineProgress.html
+	 * @property {String Number} percent 进度条百分比值,为数值类型,0-100
+	 * @property {Boolean} round 进度条两端是否为半圆(默认true)
+	 * @property {String} type 如设置,active-color值将会失效
+	 * @property {String} active-color 进度条激活部分的颜色(默认#19be6b)
+	 * @property {String} inactive-color 进度条的底色(默认#ececec)
+	 * @property {Boolean} show-percent 是否在进度条内部显示当前的百分比值数值(默认true)
+	 * @property {String Number} height 进度条的高度,单位rpx(默认28)
+	 * @property {Boolean} striped 是否显示进度条激活部分的条纹(默认false)
+	 * @property {Boolean} striped-active 条纹是否具有动态效果(默认false)
+	 * @example <u-line-progress :percent="70" :show-percent="true"></u-line-progress>
+	 */
+	export default {
+		name: "u-line-progress",
+		props: {
+			// 两端是否显示半圆形
+			round: {
+				type: Boolean,
+				default: true
+			},
+			// 主题颜色
+			type: {
+				type: String,
+				default: ''
+			},
+			// 激活部分的颜色
+			activeColor: {
+				type: String,
+				default: '#19be6b'
+			},
+			inactiveColor: {
+				type: String,
+				default: '#ececec'
+			},
+			// 进度百分比,数值
+			percent: {
+				type: Number,
+				default: 0
+			},
+			// 是否在进度条内部显示百分比的值
+			showPercent: {
+				type: Boolean,
+				default: true
+			},
+			// 进度条的高度,单位rpx
+			height: {
+				type: [Number, String],
+				default: 28
+			},
+			// 是否显示条纹
+			striped: {
+				type: Boolean,
+				default: false
+			},
+			// 条纹是否显示活动状态
+			stripedActive: {
+				type: Boolean,
+				default: false
+			}
+		},
+		data() {
+			return {
+
+			}
+		},
+		computed: {
+			progressStyle() {
+				let style = {};
+				style.width = this.percent + '%';
+				if(this.activeColor) style.backgroundColor = this.activeColor;
+				return style;
+			}
+		},
+		methods: {
+
+		}
+	}
+</script>
+
+<style lang="scss" scoped>
+	@import "../../libs/css/style.components.scss";
+	
+	.u-progress {
+		overflow: hidden;
+		height: 15px;
+		/* #ifndef APP-NVUE */
+		display: inline-flex;
+		/* #endif */
+		align-items: center;
+		width: 100%;
+		border-radius: 100rpx;
+	}
+
+	.u-active {
+		width: 0;
+		height: 100%;
+		align-items: center;
+		@include vue-flex;
+		justify-items: flex-end;
+		justify-content: space-around;
+		font-size: 20rpx;
+		color: #ffffff;
+		transition: all 0.4s ease;
+	}
+
+	.u-striped {
+		background-image: linear-gradient(45deg, rgba(255, 255, 255, 0.15) 25%, transparent 25%, transparent 50%, rgba(255, 255, 255, 0.15) 50%, rgba(255, 255, 255, 0.15) 75%, transparent 75%, transparent);
+		background-size: 39px 39px;
+	}
+
+	.u-striped-active {
+		animation: progress-stripes 2s linear infinite;
+	}
+
+	@keyframes progress-stripes {
+		0% {
+			background-position: 0 0;
+		}
+
+		100% {
+			background-position: 39px 0;
+		}
+	}
+</style>

+ 0 - 2
uview-ui/components/u-empty/u-empty.vue

@@ -10,8 +10,6 @@
 			:label-color="color"
 			:label-size="fontSize"
 			:size="iconSize"
-			width ="350"
-			height="240"
 			:color="iconColor"
 			margin-top="14"
 		></u-icon>

+ 3 - 2
uview-ui/components/u-image/u-image.vue

@@ -8,6 +8,7 @@
 			@load="onLoadHandler"
 			:lazy-load="lazyLoad"
 			class="u-image__image"
+			:show-menu-by-longpress="showMenuByLongpress"
 			:style="{
 				borderRadius: shape == 'circle' ? '50%' : $u.addUnit(borderRadius)
 			}"
@@ -198,10 +199,10 @@ export default {
 			this.$emit('click');
 		},
 		// 图片加载失败
-		onErrorHandler() {
+		onErrorHandler(err) {
 			this.loading = false;
 			this.isError = true;
-			this.$emit('error');
+			this.$emit('error', err);
 		},
 		// 图片加载完成,标记loading结束
 		onLoadHandler() {

+ 2 - 2
uview-ui/components/u-rate/u-rate.vue

@@ -178,14 +178,14 @@ export default {
 		// 获取评分组件盒子的布局信息
 		getElRectById() {
 			// uView封装的获取节点的方法,详见文档
-			this.$u.getRect('#' + this.elId).then(res => {
+			this.$uGetRect('#' + this.elId).then(res => {
 				this.starBoxLeft = res.left
 			})
 		},
 		// 获取单个星星的尺寸
 		getElRectByClass() {
 			// uView封装的获取节点的方法,详见文档
-			this.$u.getRect('.' + this.elClass).then(res => {
+			this.$uGetRect('.' + this.elClass).then(res => {
 				this.starWidth = res.width
 				// 把每个星星右边到组件盒子左边的距离放入数组中
 				for (let i = 0; i < this.count; i++) {

+ 3 - 1
uview-ui/components/u-tabbar/u-tabbar.vue

@@ -22,7 +22,7 @@
 						:custom-prefix="item.customIcon ? 'custom-icon' : 'uicon'"
 					></u-icon>
 					<u-badge :count="item.count" :is-dot="item.isDot"
-						v-if="item.count"
+						v-if="item.count || item.isDot"
 						:offset="[-2, getOffsetRight(item.count, item.isDot)]"
 					></u-badge>
 				</view>
@@ -295,6 +295,8 @@
 					bottom: 14rpx;
 					left: 50%;
 					transform: translateX(-50%);
+					width: 100%;
+					text-align: center;
 				}
 			}
 

+ 1 - 0
uview-ui/components/u-tabs/u-tabs.vue

@@ -202,6 +202,7 @@
 					'transition-duration': `${this.barFirstTimeMove ? 0 : this.duration }s`,
 					'background-color': this.activeColor,
 					height: this.barHeight + 'rpx',
+					opacity: this.barFirstTimeMove ? 0 : 1,
 					// 设置一个很大的值,它会自动取能用的最大值,不用高度的一半,是因为高度可能是单数,会有小数出现
 					'border-radius': `${this.barHeight / 2}px`
 				};

+ 2 - 2
uview-ui/components/u-upload/u-upload.vue

@@ -428,10 +428,10 @@ export default {
 						this.uploadError(index, data);
 					} else {
 						// 上传成功
-						this.lists[index].response = data;
+						this.lists[index].response = data.link;
 						this.lists[index].progress = 100;
 						this.lists[index].error = false;
-						this.$emit('on-success', data, index, this.lists, this.index);
+						this.$emit('on-success', data.link, index, this.lists, this.index);
 					}
 				},
 				fail: e => {

+ 2 - 2
uview-ui/libs/config/config.js

@@ -1,5 +1,5 @@
-// 此版本发布于2020-11-19
-let version = '1.8.2';
+// 此版本发布于2020-03-17
+let version = '1.8.4';
 
 export default {
 	v: version,

+ 1 - 1
uview-ui/libs/function/test.js

@@ -9,7 +9,7 @@ function email(value) {
  * 验证手机格式
  */
 function mobile(value) {
-	return /^1[23456789]\d{9}$/.test(value)
+	return /^1[3-9]\d{9}$/.test(value)
 }
 
 /**

+ 1 - 1
uview-ui/libs/function/timeFormat.js

@@ -28,7 +28,7 @@ function timeFormat(dateTime = null, fmt = 'yyyy-mm-dd') {
 	if (!dateTime) dateTime = Number(new Date());
 	// 如果dateTime长度为10或者13,则为秒和毫秒的时间戳,如果超过13位,则为其他的时间格式
 	if (dateTime.toString().length == 10) dateTime *= 1000;
-	let date = new Date(Number(dateTime));
+	let date = new Date(dateTime);
 	let ret;
 	let opt = {
 		"y+": date.getFullYear().toString(), // 年

+ 14 - 0
uview-ui/libs/mixin/mixin.js

@@ -46,5 +46,19 @@ module.exports = {
 	},
 	onReachBottom() {
 		uni.$emit('uOnReachBottom')
+	},
+	beforeDestroy() {
+		// 判断当前页面是否存在parent和chldren,一般在checkbox和checkbox-group父子联动的场景会有此情况
+		// 组件销毁时,移除子组件在父组件children数组中的实例,释放资源,避免数据混乱
+		if(this.parent && uni.$u.test.array(this.parent.children)) {
+			// 组件销毁时,移除父组件中的children数组中对应的实例
+			const childrenList = this.parent.children
+			childrenList.map((child, index) => {
+				// 如果相等,则移除
+				if(child === this) {
+					childrenList.splice(index, 1)
+				}
+			})
+		}
 	}
 }

+ 1 - 1
uview-ui/libs/request/index.js

@@ -23,7 +23,7 @@ class Request {
 		options.responseType = options.responseType || this.config.responseType;
 		options.url = options.url || '';
 		options.params = options.params || {};
-		options.header = Object.assign(this.config.header, options.header);
+		options.header = Object.assign({}, this.config.header, options.header);
 		options.method = options.method || this.config.method;
 
 		return new Promise((resolve, reject) => {

+ 1 - 1
uview-ui/package.json

@@ -1,6 +1,6 @@
 {
 	"name": "uview-ui",
-	"version": "1.8.2",
+	"version": "1.8.4",
 	"description": "uView UI,是uni-app生态优秀的UI框架,全面的组件和便捷的工具会让您信手拈来,如鱼得水",
 	"main": "index.js",
 	"keywords": [