Explorar o código

不知道改了啥,就是改了很多东西

19124812874 %!s(int64=5) %!d(string=hai) anos
pai
achega
276ff2d67b

+ 24 - 48
App.vue

@@ -1,12 +1,30 @@
 <script>
-	//临时对接社区
-	var md5 = require("./utils/md5.js");
 	export default {
 		onLaunch: function() {
-			uni.setEnableDebug({
-			    enableDebug: true
-			})
-			console.log('App Launch')
+			//更新版本
+			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')
@@ -14,48 +32,6 @@
 		onHide: function() {
 			console.log('App Hide')
 		},
-		/**
-		 * 临时对接社区,到时候需要删除
-		 */
-		globalData: {
-			//机构id
-			org_id: "1",
-			token: "j2qctr89u1xfmbjkp69hegfmqhwquycw",
-			//远程的
-			apiurl: "http://139.9.103.171:9082/app/",
-			//封装request请求
-			postRequest: function (params, operation, callBack) {
-			  let that = this; //公共参数
-			  params['org_id'] = that.org_id;
-			  params['token'] = that.token; 
-			  let jsonStr = JSON.stringify(params); //数据md5签名
-			
-			  let dataSign = md5.hex_md5(jsonStr);
-			  uni.request({
-				url: that.apiurl + operation,
-				method: 'POST',
-				header: {
-				  'content-type': 'application/json',
-				  'data-sign': dataSign
-				},
-				data: jsonStr,
-				success: function (res) {
-				  callBack(res);
-				},
-				fail: function (res) {
-				  uni.hideLoading();
-				  uni.showModal({
-					title: '警告',
-					content: '网络异常' + res.errMsg,
-					showCancel: false,
-					confirmText: '确认'
-				  });
-				}
-			  });
-			},
-			
-		},
-		
 	}
 </script>
 

+ 7 - 1
assets/colorui/main.css

@@ -671,12 +671,18 @@ radio.white.checked .uni-radio-input {
 	display: none;
 }
 
-.cu-btn.sm {
+.cu-btn.xs {
 	padding: 0 20upx;
 	font-size: 20upx;
 	height: 48upx;
 }
 
+.cu-btn.sm {
+	padding: 0 20upx;
+	font-size: 18upx;
+	height: 48upx;
+}
+
 .cu-btn.df {
 	padding: 0 24upx;
 	font-size: 26upx;

+ 21 - 3
assets/http/api.js

@@ -20,8 +20,12 @@ const SMSApi = {
 
 //微信基本参数
 let wxData={
-	appId:'wx4d345bcdef6d1c36',
-	secret:'a92e5d89c0ca8cfc0357576d76d87c23',
+	//国信的
+	appId:'wx988577c5a9061283',
+	secret:'5013c82bf72e6266dfb2720757433e74',
+	//园区的
+	// appId:'wxcfb2b48079ca59e4',
+	// secret:'30f9cf566aa57892e55aee0406356b9e',
 	subscribe_grant_type:'client_credential', //订阅消息的grant_type
 }
 //微信url
@@ -29,12 +33,17 @@ 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}),
+	
+	//获取小程序的audit状态
+	getAppletStatus:p => http.get(wxUrl.getAppletStatus, {params:p}),
 }
 
 
@@ -113,6 +122,13 @@ const notice = {
 	page:p => http.get(noticeUrl.page, {params:p}),
 }
 
+//测温记录
+let temperatureRecordUrl={
+	page:'/smartapplication/temperaturerecord/getTemperatureRecord'
+}
+const temperatureRecord = {
+	page:p => http.get(temperatureRecordUrl.page, {params:p}),
+}
 
 
 export const api={
@@ -139,7 +155,9 @@ export const api={
 	//用户反馈
 	feedback,
 	//园区公告
-	notice
+	notice,
+	//测温记录
+	temperatureRecord
 	
 	
 }

+ 1 - 1
assets/http/service.js

@@ -4,7 +4,7 @@ import Request from '../../utils/my-request/index.js'
 //w2 wifi
 // let baseURL='http://192.168.0.101:9527/'
 //思奇特
-// let baseURL='http://192.168.2.229:9527/'
+// let baseURL='http://192.168.2.200:9527/'
 
 //远程
 // let baseURL='http://139.9.103.171:9527/'

+ 1 - 1
main.js

@@ -39,7 +39,7 @@ Vue.prototype.$device_type={
 }
 
 //订阅消息模板
-Vue.prototype.$tmplIds=['veqKChqdSGXaidd4h4OOzTv6nm-qVwwT__Pz0ghRyFY']
+Vue.prototype.$tmplIds=['QeE-CxbJGd05fo0lGkVa39wj3L5rKeXZclFsyC4am00']
 //小程序版本
 Vue.prototype.$miniprogramState={
 	DEVELOPER:'developer', //开发版

+ 1 - 1
manifest.json

@@ -57,7 +57,7 @@
     "quickapp" : {},
     /* 小程序特有相关 */
     "mp-weixin" : {
-        "appid" : "wx4d345bcdef6d1c36",
+        "appid" : "wxcfb2b48079ca59e4",
         "setting" : {
             "urlCheck" : false
         },

+ 2 - 2
pages.json

@@ -59,7 +59,7 @@
 			"name":"auth",
             "style" :                                                                                    
             {
-                "navigationBarTitleText": "员工认证",
+                "navigationBarTitleText": "",
                 "enablePullDownRefresh": false
             }
             
@@ -117,7 +117,7 @@
 			"name":"my-camera",
             "style" :                                                                                    
             {
-                "navigationBarTitleText": "",
+                "navigationBarTitleText": "拍照",
                 "enablePullDownRefresh": false
             }
             

+ 110 - 91
pages/auth/auth.vue

@@ -1,102 +1,107 @@
 <template>
-	<view style="padding: 0 20rpx 20rpx;">
-		<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="card">
-				<u-form :model="model"  ref="uForm" >
-					<u-form-item  :label-width="labelWidth"  label="姓名" >
-						<u-input  placeholder="请输入姓名" v-model="model.realName" type="text"></u-input>
-					</u-form-item>
-					<u-form-item  :label-width="labelWidth"   label="性别" >
-						<u-input  type="select" :select-open="sexSelectShow" v-model="sexSelectList[sexSelectIndex].text" placeholder="请选择性别" @click="sexSelectShow = true"></u-input>
-					</u-form-item>
-					<u-form-item   label="身份证号"  :label-width="labelWidth">
-						<u-input maxlength="18"  placeholder="请输入身份证号" v-model="model.idcard" type="idcard"></u-input>
-					</u-form-item>
-					<u-form-item   label="手机号码"  :label-width="labelWidth">
-						<u-input maxlength="11"  placeholder="请输入手机号" v-model="model.phone" type="number"></u-input>
-					</u-form-item>
-					<u-form-item :border-bottom="false"  label="脸部信息采集"  :label-width="labelWidth"></u-form-item>
-				</u-form>
-				
-				<view @click="faceSelectShow=true" class="flex justify-center padding-bottom-50">
-					<view class=" ">
-						<upload-img
-						   :width="$isEmpty(model.face)?350:560"
-						   :height="$isEmpty(model.face)?350:420"
-						  :currentImage="model.face"
-						  bgsrc="http://139.9.103.171:1888/miniofile/xlyq/face1.png"
-						  >
-						</upload-img>
-						<view class="text-center padding-top-20" style="color: #59a5f0;">
-						 <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>
+	<view class="">
+		<view style="padding: 0 20rpx 20rpx;" v-if="appletStatus==1">
+			<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="card">
+					<u-form :model="model"  ref="uForm" >
+						<u-form-item  :label-width="labelWidth"  label="姓名" >
+							<u-input  placeholder="请输入姓名" v-model="model.realName" type="text"></u-input>
+						</u-form-item>
+						<u-form-item  :label-width="labelWidth"   label="性别" >
+							<u-input  type="select" :select-open="sexSelectShow" v-model="sexSelectList[sexSelectIndex].text" placeholder="请选择性别" @click="sexSelectShow = true"></u-input>
+						</u-form-item>
+						<u-form-item   label="身份证号"  :label-width="labelWidth">
+							<u-input maxlength="18"  placeholder="请输入身份证号" v-model="model.idcard" type="idcard"></u-input>
+						</u-form-item>
+						<u-form-item   label="手机号码"  :label-width="labelWidth">
+							<u-input maxlength="11"  placeholder="请输入手机号" v-model="model.phone" type="number"></u-input>
+						</u-form-item>
+						<u-form-item :border-bottom="false"  label="脸部信息采集"  :label-width="labelWidth"></u-form-item>
+					</u-form>
+					
+					<view @click="faceSelectShow=true" class="flex justify-center padding-bottom-50">
+						<view class=" ">
+							<upload-img
+							   :width="$isEmpty(model.face)?350:560"
+							   :height="$isEmpty(model.face)?350:420"
+							  :currentImage="model.face"
+							  bgsrc="http://139.9.103.171:1888/miniofile/xlyq/face1.png"
+							  >
+							</upload-img>
+							<view class="text-center padding-top-20" style="color: #59a5f0;">
+							 <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>
+							</view>
 						</view>
 					</view>
 				</view>
 			</view>
-		</view>
-		<view class="auth">
-			<text class="cuIcon-titles text-blue padding-right-10"></text>
-			<text>企业信息认证</text>
-			<view class="card">
-				<u-form :model="model"  ref="uForm" >
-					<u-form-item  :label-width="labelWidth"   label="公司园区" >
-						<u-input  type="select" :select-open="ganderSelectShow" v-model="gander"  placeholder="请选择工作园区" @click="ganderShow"></u-input>
-					</u-form-item>
-					<u-form-item  :label-width="labelWidth"   label="园区区域" >
-						<u-input  type="select" :select-open="residentialSelectShow" v-model="residential"  placeholder="请选择园区区域" @click="residentialShow"></u-input>
-					</u-form-item>
-					<u-form-item  :label-width="labelWidth"   label="所属企业" >
-						<u-input  type="select" :select-open="companySelectShow" v-model="company" placeholder="请选择所属企业" @click="companyShow"></u-input>
-					</u-form-item>
-				</u-form>
-			</view>
-		</view>
-		<view class="auth">
-			<text class="cuIcon-titles text-blue padding-right-10"></text>
-			<text>其他信息</text>
-			<view class="card">
-				<u-form :model="model"  ref="uForm" >
-					<u-form-item :border-bottom="false" :label-width="labelWidth"   label="备注(可选)" ></u-form-item>
-					<textarea value="" v-model="model.remarks" placeholder="填写备注信息" />
-				</u-form>
+			<view class="auth">
+				<text class="cuIcon-titles text-blue padding-right-10"></text>
+				<text>企业信息认证</text>
+				<view class="card">
+					<u-form :model="model"  ref="uForm" >
+						<u-form-item  :label-width="labelWidth"   label="公司园区" >
+							<u-input  type="select" :select-open="ganderSelectShow" v-model="gander"  placeholder="请选择工作园区" @click="ganderShow"></u-input>
+						</u-form-item>
+						<u-form-item  :label-width="labelWidth"   label="园区区域" >
+							<u-input  type="select" :select-open="residentialSelectShow" v-model="residential"  placeholder="请选择园区区域" @click="residentialShow"></u-input>
+						</u-form-item>
+						<u-form-item  :label-width="labelWidth"   label="所属企业" >
+							<u-input  type="select" :select-open="companySelectShow" v-model="company" placeholder="请选择所属企业" @click="companyShow"></u-input>
+						</u-form-item>
+					</u-form>
+				</view>
 			</view>
-		</view>
-		
-		<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>
+			<view class="auth">
+				<text class="cuIcon-titles text-blue padding-right-10"></text>
+				<text>其他信息</text>
+				<view class="card">
+					<u-form :model="model"  ref="uForm" >
+						<u-form-item :border-bottom="false" :label-width="labelWidth"   label="备注(可选)" ></u-form-item>
+						<textarea value="" v-model="model.remarks" placeholder="填写备注信息" />
+					</u-form>
 				</view>
-				<view class="padding-top-10 text-sm text-gray">
-					<text>开启订阅后,认证审核通知将推送到您的微信上</text>
+			</view>
+			
+			<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>
+					</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>
+				<button v-else @opensetting="opensetting" open-type="openSetting"class="cu-btn sm round bg-blue">
+					订阅
+				</button>
 			</view>
-			<button v-if="subscribeShow" @click="subscribe" class="cu-btn sm round bg-blue">
-				订阅
-			</button>
-			<button v-else @opensetting="opensetting" open-type="openSetting"class="cu-btn sm round bg-blue">
-				订阅
+			<button  open-type="getUserInfo" @getuserinfo="submit"  class="cu-btn bg-blue round flex" style="padding: 40rpx 0;margin-top: 40rpx;">
+				<text v-text="operationType==0?'提交':'重新审核'"></text>
 			</button>
+			<!-- 性别 -->
+			<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="residentialSelectShow" @confirm="residentialSelectCallback" :range="residentialSelectList" range-key="name" mode="selector"></u-picker>
+			<!-- 企业 -->
+			<u-picker v-model="companySelectShow" @confirm="companySelectCallback" :range="companySelectList" range-key="enterpriseName" mode="selector"></u-picker>
+			<u-action-sheet @click="faceSelectCallback"  z-index="999999" :list="faceSelectList" v-model="faceSelectShow"></u-action-sheet>
+		</view>
+		<view v-else>
+			
 		</view>
-		<button  open-type="getUserInfo" @getuserinfo="submit"  class="cu-btn bg-blue round flex" style="padding: 40rpx 0;margin-top: 40rpx;">
-			<text v-text="operationType==0?'提交':'重新审核'"></text>
-		</button>
-		<!-- 性别 -->
-		<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="residentialSelectShow" @confirm="residentialSelectCallback" :range="residentialSelectList" range-key="name" mode="selector"></u-picker>
-		<!-- 企业 -->
-		<u-picker v-model="companySelectShow" @confirm="companySelectCallback" :range="companySelectList" range-key="enterpriseName" mode="selector"></u-picker>
-		<u-action-sheet @click="faceSelectCallback"  z-index="999999" :list="faceSelectList" v-model="faceSelectShow"></u-action-sheet>
 	</view>
 </template>
 
@@ -109,7 +114,8 @@
 		},
 		data() {
 			return {
-				
+				//0 体验版 1正式版
+				appletStatus:0,
 				
 				open:false,
 				
@@ -166,6 +172,8 @@
 			}
 		},
 		onShow() {
+			this.handelAppletAudit()
+			
 			let currPage=this.getPageCtx()
 			if (!this.$isEmpty(currPage.data.image)) {
 				this.uploadFile(currPage.data.image)
@@ -203,6 +211,18 @@
 			}
 		},
 		methods: {
+			handelAppletAudit(){
+				this.appletStatus=uni.getStorageSync("appletStatus")
+				if (this.appletStatus==1) {
+					uni.setNavigationBarTitle({
+						title:'员工认证'
+					})
+				}else{
+					uni.setNavigationBarTitle({
+						title:'待开发'
+					})
+				}
+			},
 			tip(){
 				this.$showModel('认证审核通过后将通过微信服务通知您',false,'通知功能')
 			},
@@ -329,10 +349,9 @@
 					//重新审核
 					this.model.examine=0
 				}
-				
+				this.model.createType=1
 				this.$api.enterprisestaff.submit(this.model).then(res=>{
 					if (res.code==200) {
-						let content=''
 						if (this.operationType==0) {
 							that.$showModel('提交成功,请耐心等待企业管理者审核',false).then(res=>{
 								this.$Router.replaceAll({name:'login'})

+ 3 - 3
pages/company/company.vue

@@ -55,8 +55,8 @@
 					</view>
 				</view>
 				
-				<view class="cu-item">
-					<view class="content">
+				<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>
@@ -66,7 +66,7 @@
 				</view>
 				
 				<view class="cu-item">
-					<view class="content">
+					<view class="content" style="flex-basis: 45%;">
 						<text class="cuIcon-focus" style="font-size: 32rpx;"></text>
 						<text class="">注册地址</text>
 					</view>

+ 4 - 4
pages/index/access-record/access-record.vue

@@ -163,22 +163,22 @@
 			fetchStaticData(){
 				this.dataList=[
 					{
-						name:'李德希',
+						name:'张文祥',
 						enterpriseName:'宁夏新金凰印刷有限公司',
 						device:'园区大门',
 						openType:'小程序一键开门',
 						time:'2020-12-19 17:02:45'
 					},
 					{
-						name:'李德希',
+						name:'张文祥',
 						enterpriseName:'宁夏新金凰印刷有限公司',
 						device:'园区大门',
 						openType:'面部识别开门',
-						faceImg:'http://139.9.103.171:1888/miniofile/xlyq/del/ldx.png',
+						faceImg:'http://139.9.103.171:1888/miniofile/cyzhyc/adcb07fe-d31c-4fdf-80cd-d35385936814-template.png',
 						time:'2020-12-19 17:02:45'
 					},
 					{
-						name:'李德希',
+						name:'张文祥',
 						enterpriseName:'宁夏新金凰印刷有限公司',
 						device:'园区大门',
 						openType:'小程序一键开门',

+ 1 - 0
pages/index/index.vue

@@ -21,6 +21,7 @@
 					<image   :src="item.image" mode="aspectFill" ></image>
 				</swiper-item>
 			</swiper>
+			
 			<!-- 公告 -->
 			<view v-if="!$isEmpty(noticeList)" class="">
 				<view class="bg-white" style="height: 10rpx;"></view>

+ 20 - 22
pages/index/my-temperature/deatil.vue

@@ -4,39 +4,44 @@
 			<view class="flex justify-between">
 				<view class="">
 					<view class="item">
-						<text class="cuIcon-people text-blue margin-right-10"></text>
+						<text class="cuIcon-peoplefill text-blue margin-right-10"></text>
 						<text class="text-bold padding-right-10">姓名:</text>
-						<text >{{dataDetail.name}}</text>
+						<text >{{dataDetail.personName}}</text>
 					</view>
 					<view class="item">
 						<text class="cuIcon-male text-blue margin-right-10"></text>
 						<text class="text-bold padding-right-10">性别:</text>
-						<text>{{dataDetail.sex}}</text>
+						<text v-text="dataDetail.gender==0?'男':'女'"></text>
 					</view>
 					<view class="item">
-						<text class="cuIcon-hot text-blue margin-right-10"></text>
+						<text class="cuIcon-hotfill text-blue margin-right-10"></text>
 						<text class="text-bold padding-right-10">体温:</text>
 						<text>{{dataDetail.temperature}} ℃</text>
 					</view>
 					<view class="item">
-						<text class="cuIcon-activity text-blue margin-right-10"></text>
-						<text class="text-bold padding-right-10">所属企业:</text>
-						<text>{{dataDetail.enterprise}}</text>
+						<text class="cuIcon-activityfill text-blue margin-right-10"></text>
+						<text class="text-bold padding-right-10">相机名称:</text>
+						<text>{{dataDetail.cameraName}}</text>
 					</view>
 				</view>
 				<view class="padding-top-20">
-					<image @click="previewImg(dataDetail.image)"  style="width: 220rpx;height: 250rpx;border-radius: 12rpx;"  :src="dataDetail.image"></image>
+					<image @click="previewImg(dataDetail.faceUrl)"  style="width: 220rpx;height: 250rpx;border-radius: 12rpx;"  :src="dataDetail.faceUrl"></image>
 				</view>
 			</view>
 			<view class="item">
-				<text class="cuIcon-news text-blue margin-right-10"></text>
-				<text class="text-bold padding-right-10">身份证号:</text>
-				<text>{{dataDetail.idCard}}</text>
+				<text class="cuIcon-mobilefill text-blue margin-right-10"></text>
+				<text class="text-bold padding-right-10">手机号:</text>
+				<text>{{dataDetail.phone}}</text>
 			</view>
 			<view class="item">
-				<text class="cuIcon-time text-blue margin-right-10"></text>
+				<text class="cuIcon-timefill text-blue margin-right-10"></text>
 				<text class="text-bold padding-right-10">测温时间:</text>
-				<text>{{dataDetail.time}}</text>
+				<text>{{dataDetail.recogTime}}</text>
+			</view>
+			<view class="item">
+				<text class="cuIcon-locationfill text-blue margin-right-10"></text>
+				<text class="text-bold padding-right-10">安装位置:</text>
+				<text>{{dataDetail.address?dataDetail.address:'未知'}}</text>
 			</view>
 		</view>
 	</view>
@@ -47,18 +52,11 @@
 	export default {
 		data() {
 			return {
-				dataDetail:{
-					'name':'李德希',
-					'sex':'男',
-					'enterprise':'宁夏新金凰印刷有限公司',
-					'temperature':'35.5',
-					'image':'http://139.9.103.171:1888/miniofile/xlyq/del/cewen1.jpg',
-					'idCard':'440881199604264598',
-					'time':'2020-12-15 14:18:56'
-				}
+				dataDetail:{}
 			}
 		},
 		onShow() {
+			this.dataDetail=getApp().globalData.staffTemperature
 		},
 		methods: {
 			previewImg(img){

+ 42 - 69
pages/index/my-temperature/my-temperature.vue

@@ -14,84 +14,39 @@
 				@animationfinish="animationfinish">
 				<swiper-item >
 					<scroll-view scroll-y style="height: 100%;">
-						<view  @click="goDetail(item)" class="mine_order_statue" >
-							<view class="flex justify-between" style="padding: 10rpx 0 10rpx 10rpx ;">
-								<view class="flex">
-									<image  src="http://139.9.103.171:1888/miniofile/xlyq/del/cewen1.jpg"  ></image>
-									<view  class="flex flex-direction justify-around padding-left-30">
-										<view class="">
-											<text class="text-bold">姓名:</text>
-											<text>李德希</text>
-										</view>
-										<view class="">
-											<text class="text-bold">温度:</text>
-											<text>36.2 ℃ </text>
-										</view>
-										<view class="">
-											<text class="text-bold">测温时间:</text>
-											<text>2020-12-15 14:18:56</text>
+						<view class="" v-if="!this.$isEmpty(dataList)">
+							<view v-for="(item,index) in dataList" :key="index"  @click="goDetail(item)" class="mine_order_statue" >
+								<view class="flex justify-between" style="padding: 10rpx 0 10rpx 10rpx ;">
+									<view class="flex">
+										<image  :src="item.faceUrl"  ></image>
+										<view  class="flex flex-direction justify-around padding-left-30">
+											<view class="">
+												<text class="text-bold">姓名:</text>
+												<text>{{item.personName}}</text>
+											</view>
+											<view class="">
+												<text class="text-bold">温度:</text>
+												<text>{{item.temperature}} ℃ </text>
+											</view>
+											<view class="">
+												<text class="text-bold">测温时间:</text>
+												<text>{{item.recogTime}}</text>
+											</view>
 										</view>
 									</view>
-								</view>
-								<view class="flex align-center justify-center">
-									<text class="cuIcon-right"></text>
-								</view>
-							</view>
-						</view>
-						<view  @click="goDetail(item)" class="mine_order_statue" >
-							<view class="flex justify-between" style="padding: 10rpx 0 10rpx 10rpx ;">
-								<view class="flex">
-									<image  src="http://139.9.103.171:1888/miniofile/xlyq/del/cewen2.jpg"  ></image>
-									<view  class="flex flex-direction justify-around padding-left-30">
-										<view class="">
-											<text class="text-bold">姓名:</text>
-											<text>李德希</text>
-										</view>
-										<view class="">
-											<text class="text-bold">温度:</text>
-											<text>37.5 ℃ </text>
-											<text class="text-red">【异常】</text>
-										</view>
-										<view class="">
-											<text class="text-bold">测温时间:</text>
-											<text>2020-12-17 14:18:56</text>
-										</view>
+									<view class="flex align-center justify-center">
+										<text class="cuIcon-right"></text>
 									</view>
 								</view>
-								<view class="flex align-center justify-center">
-									<text class="cuIcon-right"></text>
-								</view>
 							</view>
+							<u-divider bgColor="#f1f1f1" height="80">到底了</u-divider>
 						</view>
+						<u-empty v-else marginTop="-100"  text="暂无记录" src="http://139.9.103.171:1888/miniofile/xlyq/empty/empty.png"></u-empty>
 					</scroll-view>
 				</swiper-item>
 				<swiper-item >
 					<scroll-view scroll-y style="height: 100%;">
-						<view  @click="goDetail(item)" class="mine_order_statue" >
-							<view class="flex justify-between" style="padding: 10rpx 0 10rpx 10rpx ;">
-								<view class="flex">
-									<image  src="http://139.9.103.171:1888/miniofile/xlyq/del/cewen1.jpg"  ></image>
-									<view  class="flex flex-direction justify-around padding-left-30">
-										<view class="">
-											<text class="text-bold">姓名:</text>
-											<text>李德希</text>
-										</view>
-										<view class="">
-											<text class="text-bold">温度:</text>
-											<text>37.5 ℃ </text>
-											<text class="text-red">【异常】</text>
-										</view>
-										<view class="">
-											<text class="text-bold">测温时间:</text>
-											<text>2020-12-17 14:18:56</text>
-										</view>
-									</view>
-								</view>
-								<view class="flex align-center justify-center">
-									<text class="cuIcon-right"></text>
-								</view>
-							</view>
-						</view>
+						<u-empty marginTop="-100"  text="暂无异常记录" src="http://139.9.103.171:1888/miniofile/xlyq/empty/empty.png"></u-empty>
 					</scroll-view>
 				</swiper-item>
 			</swiper>
@@ -114,12 +69,30 @@
 					{
 						name: '异常记录'
 					}
-				]
+				],
+				dataList:[]
 				
 			}
 		},
+		onLoad() {
+			this.fetchStaffTemperature()
+		},
 		methods: {
+			fetchStaffTemperature(){
+				let phone=this.$cache.get('phone')
+				if (this.$isEmpty(phone)) {
+					this.$showModel('系统异常').then(res=>{
+						uni.navigateBack({
+							delta:1
+						})
+					})
+				}
+				this.$api.temperatureRecord.page({phone:phone,size:300}).then(res=>{
+					this.dataList=res.data.records
+				})
+			},
 			goDetail(item){
+				getApp().globalData.staffTemperature=item
 				uni.navigateTo({
 					url:"/pages/index/staff-temperature/detail"
 				})

+ 82 - 62
pages/index/myinfo/myinfo.vue

@@ -1,73 +1,77 @@
 <template>
-	<view style="padding: 0 20rpx 20rpx;">
-		<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="card">
-				<u-form :model="model"  ref="uForm" >
-					<u-form-item  :label-width="labelWidth"  label="姓名" >
-						<u-input disabled  :value="model.realName" type="text"></u-input>
-					</u-form-item>
-					<u-form-item  :label-width="labelWidth"   label="性别" >
-						<u-input disabled :value="model.sex==2?'女':'男'"  @click="sexSelectShow = true"></u-input>
-					</u-form-item>
-					<u-form-item   label="身份证号"  :label-width="labelWidth">
-						<u-input disabled maxlength="18"   :value="model.idcard" type="idcard"></u-input>
-					</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>
-					</u-form-item>
-					<u-form-item :border-bottom="false"  label="脸部信息"  :label-width="labelWidth"></u-form-item>
-				</u-form>
-				<view @click="faceSelectShow=true" class="flex justify-center padding-bottom-50">
-					<view class=" ">
-						<upload-img
-						   :width="$isEmpty(model.face)?350:560"
-						   :height="$isEmpty(model.face)?350:420"
-						  :currentImage="model.face"
-						  bgsrc="http://139.9.103.171:1888/miniofile/xlyq/face1.png"
-						  >
-						</upload-img>
-						<view class="text-center padding-top-20" style="color: #0081ff;">
-							 <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>
+	<view class="">
+		<view v-if="appletStatus==1" style="padding: 0 20rpx 20rpx;">
+			<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="card">
+					<u-form :model="model"  ref="uForm" >
+						<u-form-item  :label-width="labelWidth"  label="姓名" >
+							<u-input disabled  :value="model.realName" type="text"></u-input>
+						</u-form-item>
+						<u-form-item  :label-width="labelWidth"   label="性别" >
+							<u-input disabled :value="model.sex==2?'女':'男'"  @click="sexSelectShow = true"></u-input>
+						</u-form-item>
+						<u-form-item   label="身份证号"  :label-width="labelWidth">
+							<u-input disabled maxlength="18"   :value="model.idcard" type="idcard"></u-input>
+						</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>
+						</u-form-item>
+						<u-form-item :border-bottom="false"  label="脸部信息"  :label-width="labelWidth"></u-form-item>
+					</u-form>
+					<view @click="faceSelectShow=true" class="flex justify-center padding-bottom-50">
+						<view class=" ">
+							<upload-img
+							   :width="$isEmpty(model.face)?350:560"
+							   :height="$isEmpty(model.face)?350:420"
+							  :currentImage="model.face"
+							  bgsrc="http://139.9.103.171:1888/miniofile/xlyq/face1.png"
+							  >
+							</upload-img>
+							<view class="text-center padding-top-20" style="color: #0081ff;">
+								 <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>
+							</view>
 						</view>
 					</view>
 				</view>
 			</view>
-		</view>
-		<view class="auth">
-			<text class="cuIcon-titles text-blue padding-right-10"></text>
-			<text>企业信息</text>
-			<view class="card">
-				<u-form :model="model"  ref="uForm" >
-					<u-form-item  :label-width="labelWidth"   label="公司园区" >
-						<u-input disabled  :value="model.agencyName" ></u-input>
-					</u-form-item>
-					<u-form-item  :label-width="labelWidth"   label="园区区域" >
-						<u-input disabled  :value="model.residentialName"  ></u-input>
-					</u-form-item>
-					<u-form-item  :label-width="labelWidth"   label="所属企业" >
-						<u-input disabled  :value="model.enterpriseName" ></u-input>
-					</u-form-item>
-				</u-form>
+			<view class="auth">
+				<text class="cuIcon-titles text-blue padding-right-10"></text>
+				<text>企业信息</text>
+				<view class="card">
+					<u-form :model="model"  ref="uForm" >
+						<u-form-item  :label-width="labelWidth"   label="公司园区" >
+							<u-input disabled  :value="model.agencyName" ></u-input>
+						</u-form-item>
+						<u-form-item  :label-width="labelWidth"   label="园区区域" >
+							<u-input disabled  :value="model.residentialName"  ></u-input>
+						</u-form-item>
+						<u-form-item  :label-width="labelWidth"   label="所属企业" >
+							<u-input disabled  :value="model.enterpriseName" ></u-input>
+						</u-form-item>
+					</u-form>
+				</view>
 			</view>
-		</view>
-		
-		<view  v-if="!$isEmpty(newFace)">
-			<view class="bg-white" style="height: 100rpx;"></view>
-			<view   @click="submit"  class="footer-fixed cu-btn  bg-blue flex" style="padding: 45rpx;">
-				确认修改
+			
+			<view  v-if="!$isEmpty(newFace)">
+				<view class="bg-white" style="height: 100rpx;"></view>
+				<view   @click="submit"  class="footer-fixed cu-btn  bg-blue flex" style="padding: 45rpx;">
+					确认修改
+				</view>
 			</view>
+			<u-action-sheet @click="faceSelectCallback"  z-index="999999" :list="faceSelectList" v-model="faceSelectShow"></u-action-sheet>
+		</view>
+		<view class="" v-else>
+			
 		</view>
-		
-		<u-action-sheet @click="faceSelectCallback"  z-index="999999" :list="faceSelectList" v-model="faceSelectShow"></u-action-sheet>
 	</view>
 </template>
 
@@ -80,6 +84,8 @@
 		},
 		data() {
 			return {
+				appletStatus:0,
+				
 				labelWidth:'200',
 				model:{},
 				//上传人脸的方式
@@ -94,6 +100,8 @@
 			}
 		},
 		onShow() {
+			this.handelAppletAudit()
+			
 			let currPage=this.getPageCtx()
 			if (!this.$isEmpty(currPage.data.image)) {
 				this.uploadFile(currPage.data.image)
@@ -104,6 +112,18 @@
 			this.fetchUserInfo()
 		},
 		methods: {
+			handelAppletAudit(){
+				this.appletStatus=uni.getStorageSync("appletStatus")
+				if (this.appletStatus==1) {
+					uni.setNavigationBarTitle({
+						title:'我的资料'
+					})
+				}else{
+					uni.setNavigationBarTitle({
+						title:'待开发'
+					})
+				}
+			},
 			/**
 			 * 换绑手机号
 			 */

+ 20 - 22
pages/index/staff-temperature/detail.vue

@@ -4,39 +4,44 @@
 			<view class="flex justify-between">
 				<view class="">
 					<view class="item">
-						<text class="cuIcon-people text-blue margin-right-10"></text>
+						<text class="cuIcon-peoplefill text-blue margin-right-10"></text>
 						<text class="text-bold padding-right-10">姓名:</text>
-						<text >{{dataDetail.name}}</text>
+						<text >{{dataDetail.personName}}</text>
 					</view>
 					<view class="item">
 						<text class="cuIcon-male text-blue margin-right-10"></text>
 						<text class="text-bold padding-right-10">性别:</text>
-						<text>{{dataDetail.sex}}</text>
+						<text v-text="dataDetail.gender==0?'男':'女'"></text>
 					</view>
 					<view class="item">
-						<text class="cuIcon-hot text-blue margin-right-10"></text>
+						<text class="cuIcon-hotfill text-blue margin-right-10"></text>
 						<text class="text-bold padding-right-10">体温:</text>
 						<text>{{dataDetail.temperature}} ℃</text>
 					</view>
 					<view class="item">
-						<text class="cuIcon-activity text-blue margin-right-10"></text>
-						<text class="text-bold padding-right-10">所属企业:</text>
-						<text>{{dataDetail.enterprise}}</text>
+						<text class="cuIcon-activityfill text-blue margin-right-10"></text>
+						<text class="text-bold padding-right-10">相机名称:</text>
+						<text>{{dataDetail.cameraName}}</text>
 					</view>
 				</view>
 				<view class="padding-top-20">
-					<image @click="previewImg(dataDetail.image)"  style="width: 220rpx;height: 250rpx;border-radius: 12rpx;"  :src="dataDetail.image"></image>
+					<image @click="previewImg(dataDetail.faceUrl)"  style="width: 220rpx;height: 250rpx;border-radius: 12rpx;"  :src="dataDetail.faceUrl"></image>
 				</view>
 			</view>
 			<view class="item">
-				<text class="cuIcon-news text-blue margin-right-10"></text>
-				<text class="text-bold padding-right-10">身份证号:</text>
-				<text>{{dataDetail.idCard}}</text>
+				<text class="cuIcon-mobilefill text-blue margin-right-10"></text>
+				<text class="text-bold padding-right-10">手机号:</text>
+				<text>{{dataDetail.phone}}</text>
 			</view>
 			<view class="item">
-				<text class="cuIcon-time text-blue margin-right-10"></text>
+				<text class="cuIcon-timefill text-blue margin-right-10"></text>
 				<text class="text-bold padding-right-10">测温时间:</text>
-				<text>{{dataDetail.time}}</text>
+				<text>{{dataDetail.recogTime}}</text>
+			</view>
+			<view class="item">
+				<text class="cuIcon-locationfill text-blue margin-right-10"></text>
+				<text class="text-bold padding-right-10">安装位置:</text>
+				<text>{{dataDetail.address?dataDetail.address:'未知'}}</text>
 			</view>
 		</view>
 	</view>
@@ -47,18 +52,11 @@
 	export default {
 		data() {
 			return {
-				dataDetail:{
-					'name':'李德希',
-					'sex':'男',
-					'enterprise':'宁夏新金凰印刷有限公司',
-					'temperature':'37.5',
-					'image':'http://139.9.103.171:1888/miniofile/xlyq/del/cewen1.jpg',
-					'idCard':'440881199604264598',
-					'time':'2020-12-15 14:18:56'
-				}
+				dataDetail:{}
 			}
 		},
 		onShow() {
+			this.dataDetail=getApp().globalData.staffTemperature
 		},
 		methods: {
 			previewImg(img){

+ 42 - 79
pages/index/staff-temperature/staff-temperature.vue

@@ -9,99 +9,44 @@
 				</view>
 			</scroll-view>
 		</view>
-<!-- 		<view class="tabs">
-			<scroll-view scroll-x class="nav" style="background-color: #efefef;color: #5b5b5b;">
-				<view class="flex text-center">
-					<view class="cu-item flex-sub" :class="index==subsectionCurrent?'text-checked':''" v-for="(item,index) in subsectionList" :key="index" @tap="subsectionChange(index)" >
-						{{item.name}}
-					</view>
-				</view>
-			</scroll-view>
-			<view class="" style="height: 20rpx;"></view>
-		</view> -->
 		<view style="height: 100%;">
 			<swiper style="height: 100%;" :current="subsectionCurrent"  @change="swiperChange"
 				@animationfinish="animationfinish">
 				<swiper-item >
 					<scroll-view scroll-y style="height: 100%;">
-						<view  @click="goDetail(item)" class="mine_order_statue" >
-							<view class="flex justify-between" style="padding: 10rpx 0 10rpx 10rpx ;">
-								<view class="flex">
-									<image  src="http://139.9.103.171:1888/miniofile/xlyq/del/cewen1.jpg"  ></image>
-									<view  class="flex flex-direction justify-around padding-left-30">
-										<view class="">
-											<text class="text-bold">姓名:</text>
-											<text>李德希</text>
-										</view>
-										<view class="">
-											<text class="text-bold">温度:</text>
-											<text>36.2 ℃ </text>
-										</view>
-										<view class="">
-											<text class="text-bold">测温时间:</text>
-											<text>2020-12-15 14:18:56</text>
+						<view class="" v-if="!this.$isEmpty(dataList)">
+							<view v-for="(item,index) in dataList" :key="index"  @click="goDetail(item)" class="mine_order_statue" >
+								<view class="flex justify-between" style="padding: 10rpx 0 10rpx 10rpx ;">
+									<view class="flex">
+										<image  :src="item.faceUrl"  ></image>
+										<view  class="flex flex-direction justify-around padding-left-30">
+											<view class="">
+												<text class="text-bold">姓名:</text>
+												<text>{{item.personName}}</text>
+											</view>
+											<view class="">
+												<text class="text-bold">温度:</text>
+												<text>{{item.temperature}} ℃ </text>
+											</view>
+											<view class="">
+												<text class="text-bold">测温时间:</text>
+												<text>{{item.recogTime}}</text>
+											</view>
 										</view>
 									</view>
-								</view>
-								<view class="flex align-center justify-center">
-									<text class="cuIcon-right"></text>
-								</view>
-							</view>
-						</view>
-						<view  @click="goDetail(item)" class="mine_order_statue" >
-							<view class="flex justify-between" style="padding: 10rpx 0 10rpx 10rpx ;">
-								<view class="flex">
-									<image  src="http://139.9.103.171:1888/miniofile/xlyq/del/cewen2.jpg"  ></image>
-									<view  class="flex flex-direction justify-around padding-left-30">
-										<view class="">
-											<text class="text-bold">姓名:</text>
-											<text>李德希</text>
-										</view>
-										<view class="">
-											<text class="text-bold">温度:</text>
-											<text>37.5 ℃ </text>
-											<text class="text-red">【异常】</text>
-										</view>
-										<view class="">
-											<text class="text-bold">测温时间:</text>
-											<text>2020-12-17 14:18:56</text>
-										</view>
+									<view class="flex align-center justify-center">
+										<text class="cuIcon-right"></text>
 									</view>
 								</view>
-								<view class="flex align-center justify-center">
-									<text class="cuIcon-right"></text>
-								</view>
 							</view>
+							<u-divider bgColor="#f1f1f1" height="80">到底了</u-divider>
 						</view>
+						<u-empty v-else marginTop="-100"  text="暂无记录" src="http://139.9.103.171:1888/miniofile/xlyq/empty/empty.png"></u-empty>
 					</scroll-view>
 				</swiper-item>
 				<swiper-item >
 					<scroll-view scroll-y style="height: 100%;">
-						<view  @click="goDetail(item)" class="mine_order_statue" >
-							<view class="flex justify-between" style="padding: 10rpx 0 10rpx 10rpx ;">
-								<view class="flex">
-									<image  src="http://139.9.103.171:1888/miniofile/xlyq/del/cewen1.jpg"  ></image>
-									<view  class="flex flex-direction justify-around padding-left-30">
-										<view class="">
-											<text class="text-bold">姓名:</text>
-											<text>李德希</text>
-										</view>
-										<view class="">
-											<text class="text-bold">温度:</text>
-											<text>37.5 ℃ </text>
-											<text class="text-red">【异常】</text>
-										</view>
-										<view class="">
-											<text class="text-bold">测温时间:</text>
-											<text>2020-12-17 14:18:56</text>
-										</view>
-									</view>
-								</view>
-								<view class="flex align-center justify-center">
-									<text class="cuIcon-right"></text>
-								</view>
-							</view>
-						</view>
+						<u-empty marginTop="-100"  text="暂无异常记录" src="http://139.9.103.171:1888/miniofile/xlyq/empty/empty.png"></u-empty>
 					</scroll-view>
 				</swiper-item>
 			</swiper>
@@ -124,12 +69,30 @@
 					{
 						name: '异常记录'
 					}
-				]
+				],
+				dataList:[]
 				
 			}
 		},
+		onLoad() {
+			this.fetchStaffTemperature()
+		},
 		methods: {
+			fetchStaffTemperature(){
+				let creditCode=this.$cache.get('creditCode')
+				if (this.$isEmpty(creditCode)) {
+					this.$showModel('系统异常').then(res=>{
+						uni.navigateBack({
+							delta:1
+						})
+					})
+				}
+				this.$api.temperatureRecord.page({enterpriseCreditCode:creditCode,size:300}).then(res=>{
+					this.dataList=res.data.records
+				})
+			},
 			goDetail(item){
+				getApp().globalData.staffTemperature=item
 				uni.navigateTo({
 					url:"/pages/index/staff-temperature/detail"
 				})

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

@@ -130,7 +130,7 @@ export default {
 				touser:msgData.openId,
 				lang:"zh_CN",
 				page:'/pages/index/index',
-				miniprogramState:this.$miniprogramState.TRIAL,
+				miniprogramState:this.$miniprogramState.FORMAL,
 			    templateId: this.$tmplIds[0],
 				  "data": {
 					  "thing13": {

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

@@ -139,7 +139,7 @@
 					touser:msgData.openId,
 					lang:"zh_CN",
 					page:'/pages/index/index',
-					miniprogramState:this.$miniprogramState.TRIAL,
+					miniprogramState:this.$miniprogramState.FORMAL,
 				    templateId: this.$tmplIds[0],
 					  "data": {
 						  "thing13": {

+ 23 - 8
pages/login/login.vue

@@ -120,7 +120,15 @@ export default {
 			})
 		}
 	},
+	onShow() {
+		this.getAppletStatus()
+	},
 	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
@@ -291,10 +299,7 @@ export default {
 		//员工登录
 		async staffLogin(){
 			if (this.phone=='19124812874') {
-				//供微信审核人员审核的账号
-				uni.navigateTo({
-					url:"/pages/auth/auth?operationType=1&phone="+this.phone
-				})
+				this.userLogin()
 				return
 			}
 			if (!this.phone) {
@@ -327,19 +332,25 @@ export default {
 		//用户登陆
 		async userLogin(){
 			//通过手机号查找该员工信息
-			let staffRes=await this.$api.enterprisestaff.detail({phone:this.phone})
-			if (this.$isEmpty(staffRes.data)) {
+			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=staffRes.data
+				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)
 					getApp().globalData.userInfo=userInfo
 					//存储手机号,便于拉取用户信息
@@ -360,10 +371,14 @@ export default {
 		 * 微信快速登陆
 		 */
 		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: '完成员工认证的用户才可以使用微信快速登陆',
+						title: '请先用绑定的手机号登陆!',
 						type: 'primary',
 						duration: '2500'
 					})

+ 1 - 1
router.js

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

+ 5 - 5
utils/cache.js

@@ -78,6 +78,7 @@ simpleCache.clear = function() {
 simpleCache.image_cache=function(id_key,image_url,isError,time=3*24*60*60) {
 	let imgTemp= simpleCache.get(id_key)
 	if(!imgTemp){
+		console.log("我来自网络")
 		//本地没有缓存,需要下载
 		uni.downloadFile({
 		    url: image_url, 
@@ -88,15 +89,14 @@ simpleCache.image_cache=function(id_key,image_url,isError,time=3*24*60*60) {
 		        }
 		    }
 		});
-		console.log("我来自网络")
 		return image_url
 	}else{
 		if(isError){
-			console.log("我发生错误了")
-			return imgTemp
-		}else{
-			console.log("我没有发生错误")
+			console.log("缓存发生错误了,从网络中获取")
 			return image_url
+		}else{
+			console.log("缓存没有发生错误,从缓存中获取")
+			return imgTemp
 		}
 	}
 }