Jelajahi Sumber

first commit

19124812874 5 tahun lalu
induk
melakukan
35daff3102

+ 14 - 1
assets/http/api.js

@@ -199,6 +199,17 @@ const healthCode = {
  const statistical={
  	 todayData:p => http.get(statisticalUrl.todayData, {params:p}),
  }
+ 
+ //出入记录
+ let accessrecordUrl={
+ 	 page:'/community/accessrecord/list'
+ }
+ const accessrecord={
+ 	 page:p => http.get(accessrecordUrl.page, {params:p}),
+ }
+ 
+ 
+ 
 
 export const api={
 	//上传文件
@@ -236,6 +247,8 @@ export const api={
 	//开门设备
 	device,
 	//统计
-	statistical
+	statistical,
+	//出入记录
+	accessrecord
 	
 }

+ 4 - 6
assets/http/service.js

@@ -1,11 +1,9 @@
 import Request from '../../utils/my-request/index.js'
 
-// let baseURL='http://192.168.1.211:9527/'
-// let baseURL='http://192.168.1.117:9527/'
-//远程
-// let baseURL='http://139.9.103.171:9527/'
-let baseURL='https://park.58fo.com/api/'
 
+// let	baseURL = 'http://192.168.1.117:9527/'
+
+let	baseURL = 'https://park.58fo.com/api/'
 
 let tokenUrl=baseURL+"blade-auth/oauth/token?tenantId=804981&password=ea3c40c0df5477c525543b0e85548004&username=wpadmin"
 
@@ -81,7 +79,7 @@ http.interceptors.response.use(async (response) => { /* 请求之后拦截器。
           position: 'bottom',
           title: '网络异常'
       })
-      return err
+      return Promise.reject(err)
   })
 export {
   http

+ 1 - 1
pages.json

@@ -117,7 +117,7 @@
 			"name":"my-camera",
             "style" :                                                                                    
             {
-                "navigationBarTitleText": "拍照",
+                "navigationBarTitleText": "",
                 "enablePullDownRefresh": false
             }
             

+ 4 - 10
pages/device/device.vue

@@ -76,15 +76,6 @@ export default {
 				this.device_list= res.data.records
 			})
 		},
-		open(){
-			//进度条加载
-			this.isloading=true
-			setTimeout(()=>{
-				that.isloading=false
-				that.isopen=true
-				that.$showModel('开门成功',false)
-			},2300)
-		},
 		/**
 		 * 立即开门
 		 */
@@ -103,8 +94,11 @@ export default {
 					}else{
 						that.isopen=false
 					}
+				}).catch(err=>{
+					this.isloading=false
+					that.isopen=false
 				})
-			},2300)
+			},20)
 		},
 	}
 };

+ 47 - 253
pages/index/access-record/access-record.vue

@@ -1,190 +1,65 @@
 <template>
-	<view class="container">
-		<view class="tabs" style="width: 420rpx;margin: 0rpx  auto;padding-top: 20rpx;">
-			<scroll-view scroll-x class="nav" >
-				<view class="flex text-center">
-					<view  style="border: 1rpx solid #59a5f0;padding:15rpx 20rpx;" class="flex-sub" :class="index==subsectionCurrent?'nav-checked':'nav-unchecked'" v-for="(item,index) in subsectionList" :key="index" @tap="subsectionChange(index)" >
-						{{item.name}}
-					</view>
-				</view>
-			</scroll-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 class="history">
-							<u-time-line>
-								<u-time-line-item nodeTop="2" v-for="(item,index) in dataList" :key="index">
-									<template v-slot:node>
-										<view class="u-node bg-white" >
-											<u-icon name="clock-fill" color="#59a5f0" :size="28"></u-icon>
-										</view>
-									</template>
-									<template v-slot:content>
-										<view>
-											<view class="">{{item.time}}</view>
-											<view style="width: 636rpx;">
-												<view class="content">
-													<view class="flex justify-between">
-														<view class="">
-															<view class="nav-title">
-																<text class="">人员姓名:</text>
-																<text class="">{{item.name}}</text>
-															</view>
-															<view class="nav-title">
-																<text >所属企业:</text>
-																<text>{{item.enterpriseName}}</text>
-															</view>
-															<view class="nav-title">
-																<text >开门设备:</text>
-																<text>{{item.device}}</text>
-															</view>
-														</view>
-														<view class="" v-if="item.faceImg">
-															<image @click="preViewImg(item.faceImg)" :src="item.faceImg" style="width: 110rpx;height: 110rpx;border-radius: 10rpx;" mode=""></image>
-														</view>
-													</view>
-													<view class="nav-title">
-														<text >开门方式:</text>
-														<text>{{item.openType}}</text>
-													</view>
-												</view>
-												
-											</view>
-										</view>
-									</template>
-								</u-time-line-item>
-							</u-time-line>
-						</view>
-						<u-divider height="80">到底了</u-divider>	
-					</scroll-view>
-				</swiper-item>
-				<swiper-item >
-					<scroll-view scroll-y style="height: 100%;">
-						<view class="history">
-							<u-time-line>
-								<u-time-line-item v-if="index==1" nodeTop="2" v-for="(item,index) in dataList" :key="index">
-									<template v-slot:node>
-										<view class="u-node bg-white" >
-											<u-icon name="clock-fill" color="#59a5f0" :size="28"></u-icon>
-										</view>
-									</template>
-									<template v-slot:content>
-										<view>
-											<view >{{item.time}}</view>
-											<view style="width: 636rpx;">
-												<view class="content">
-													<view class="flex justify-between">
-														<view class="">
-															<view class="nav-title">
-																<text class="">人员姓名:</text>
-																<text class="">{{item.name}}</text>
-															</view>
-															<view class="nav-title">
-																<text >所属企业:</text>
-																<text>{{item.enterpriseName}}</text>
-															</view>
-															<view class="nav-title">
-																<text >开门设备:</text>
-																<text>{{item.device}}</text>
-															</view>
-														</view>
-														<view class="" v-if="item.faceImg">
-															<image @click="preViewImg(item.faceImg)" :src="item.faceImg" style="width: 110rpx;height: 110rpx;border-radius: 10rpx;" mode=""></image>
-														</view>
-													</view>
-													<view class="nav-title">
-														<text >开门方式:</text>
-														<text>{{item.openType}}</text>
-													</view>
-												</view>
-												
-											</view>
-										</view>
-									</template>
-								</u-time-line-item>
-							</u-time-line>
-						</view>
-						<u-divider height="80">到底了</u-divider>
-					</scroll-view>
-				</swiper-item>
-			</swiper>
-		</view>
+	<view>
+	   <mescroll-body ref="mescrollRef" @init="mescrollInit" @down="downCallback" @up="upCallback" :down="downOption" :up="upOption">
+			<card :list="dataList"></card>
+		</mescroll-body>
 	</view>
 </template>
 <script>
+	import card from "./comps/card.vue"
+	import MescrollMixin from "@/components/mescroll-body/mescroll-mixins.js";
 	export default {
+		mixins: [MescrollMixin],
 		components:{
-			
+			card
 		},
 		data() {
 			return {
-				dateShow:false,
+				loginType:'',
+				downOption: { 
+					auto:false
+				},
 				dataList:[],
-				subsectionCurrent:0,
-				swiperCurrent:0,
-				subsectionList:[
-					{
-						name: '全部记录'
-					},
-					{
-						name: '迟到记录'
-					}
-				]
-				
 			}
 		},
 		onLoad() {
-			this.fetchStaticData()
+			this.loginType=this.$cache.get('loginType')
 		},
 		methods: {
-			subsectionChange(index){
-				this.subsectionCurrent=index
+			downCallback(){
+				setTimeout(()=>{
+					uni.showToast({title:"刷新成功",icon:"none"})
+					this.mescroll.resetUpScroll();
+				},1500)
 			},
-			swiperChange(e) {
-			  uni.pageScrollTo({
-			      scrollTop: 0,
-			      duration: 0
-			  });
-			  this.subsectionCurrent = e.detail.current
-			},
-			animationfinish({detail: { current }}) {
-				this.swiperCurrent = current;
-				this.subsectionCurrent = current;
-			},
-			preViewImg(img){
-				let urls=[img]
-				uni.previewImage({
-					urls:urls
-				})
-			},
-			fetchStaticData(){
-				this.dataList=[
-					{
-						name:'张文祥',
-						enterpriseName:'宁夏新金凰印刷有限公司',
-						device:'园区大门',
-						openType:'小程序一键开门',
-						time:'2020-12-19 17:02:45'
-					},
-					{
-						name:'张文祥',
-						enterpriseName:'宁夏新金凰印刷有限公司',
-						device:'园区大门',
-						openType:'面部识别开门',
-						faceImg:'http://139.9.103.171:1888/miniofile/cyzhyc/adcb07fe-d31c-4fdf-80cd-d35385936814-template.png',
-						time:'2020-12-19 17:02:45'
-					},
-					{
-						name:'张文祥',
-						enterpriseName:'宁夏新金凰印刷有限公司',
-						device:'园区大门',
-						openType:'小程序一键开门',
-						time:'2020-12-19 17:02:45'
-					},
-				]
+			upCallback(mescroll){
+				let params={
+					current:mescroll.num,
+					size:mescroll.size,
+				}
+				if (this.loginType==this.$loginType.AGENCY) {
+					//管理员
+					params.tenantId=this.$cache.get('agencyTenantId')
+				}else if (this.loginType==this.$loginType.STAFF) {
+					//员工
+					params.userId=this.$cache.get('userId')
+				}else if (this.loginType==this.$loginType.ENTERPRISE) {
+					//企业
+					params.enterpriseId=this.$cache.get('enterpriseId')
+				}
+				try{
+					this.$api.accessrecord.page(params).then(res=>{
+						let data=res.data.records
+						this.mescroll.endBySize(data.length, res.total)
+						if (mescroll.num==1) this.dataList=[]
+						this.dataList=this.dataList.concat(data)
+						setTimeout(()=>{
+							this.mescroll.endBySize(data.length, res.total)
+						},20)
+					})
+				}catch(e){
+					this.mescroll.endErr();
+				}
 			}
 		}
 	}
@@ -194,85 +69,4 @@
 page{
 	background-color: #FFFFFF;
 }
-.nav .cu-item {
-    height: 70rpx;
-    display: inline-block;
-    line-height: 70rpx;
-    margin: 0 10rpx;
-    padding: 0 20rpx;
-}
-
-.nav-title {
-	font-size: 28upx;
-	font-weight: 300;
-	padding-top: 20rpx;
-}
-.history{
-	box-sizing: border-box;
-	padding: 40rpx 20rpx 20rpx 50rpx;
-}
-.content{
-	box-shadow: 0 8rpx 10rpx rgba(234, 234, 234, 0.5),8rpx 0rpx 10rpx rgba(234, 234, 234,.5),-8rpx 0rpx 10rpx rgba(234, 234, 234,.5);
-	background-color: #FFFFFF;
-	padding: 20rpx;
-	border-radius: 10rpx;
-	margin: 20rpx 0;
-}
-
-.nav-checked{
-	background-color: #59a5f0;
-	color: #FFFFFF;
-	font-weight: 800;
-}
-
-.nav-unchecked{
-	background-color: #FFFFFF;
-	color: #59a5f0;
-}
-	
-.text-checked{
-	font-weight: 800;
-	background-color: #FFFFFF;
-	color: #2f7ff5;
-	font-size: 800;
-}
-view{
-	box-sizing: border-box;
-}
-.container {
-	  height: calc(100vh);
-	  padding: 120rpx 0rpx 0rpx;
-	 .tabs {
-		height: 120rpx;
-		position: fixed;
-		top: 0rpx;
-		left: 0;
-		right: 0;
-		width: 100%;
-		z-index: 3;
-	  }
-}
-	.scroll-view {
-		height: 150rpx;
-		white-space: nowrap;
-		width: 100%;
-		position: relative;
-		top: -30rpx;
-	}
-	.scroll-view-item {
-		color: #FFFFFF;
-		background-image: linear-gradient(to right, #2f7ff5, #2f7ff5);
-		display: inline-block;
-		text-align: left;
-		padding: 20rpx 40rpx;
-		margin:0 8rpx;
-		width:24%;
-		border-radius: 12rpx;
-	}
-	.scroll-view-item:first-child{
-		margin-left: 30rpx;
-	}
-	.scroll-view-item:last-child{
-		margin-right: 30rpx;
-	}
-</style>
+</style>

+ 94 - 0
pages/index/access-record/comps/card.vue

@@ -0,0 +1,94 @@
+<template>
+	<view class="history">
+		<u-time-line>
+			<u-time-line-item nodeTop="2" v-for="(item,index) in list" :key="index">
+				<template v-slot:node>
+					<view class="u-node bg-white" >
+						<u-icon name="clock-fill" color="#59a5f0" :size="28"></u-icon>
+					</view>
+				</template>
+				<template v-slot:content>
+					<view>
+						<view class="">{{item.openTime}}</view>
+						<view style="width: 636rpx;">
+							<view class="content">
+								<view class="flex justify-between">
+									<view class="">
+										<view class="nav-title">
+											<text class="">人员姓名:</text>
+											<text class="">{{item.userName}}</text>
+										</view>
+										<view v-if="item.temperature" class="nav-title">
+											<text >测量体温:</text>
+											<text class="text-red">{{item.temperature}} ℃</text>
+										</view>
+										<view class="nav-title">
+											<text >所属企业:</text>
+											<text>{{item.enterpriseName}}</text>
+										</view>
+										<!-- <view class="nav-title">
+											<text >开门地址:</text>
+											<text>{{item.deviceAddress}}</text>
+										</view> -->
+									</view>
+									<view class="" v-if="item.faceUrl">
+										<image @click="$util.preview(item.faceUrl)" :src="item.faceUrl" style="width: 110rpx;height: 110rpx;border-radius: 10rpx;" mode=""></image>
+									</view>
+								</view>
+								<view class="nav-title">
+									<text >开门方式:</text>
+									<text v-if="item.openType==1">人脸识别开门</text>
+									<text v-if="item.openType==2">小程序一键开门</text>
+								</view>
+							</view>
+							
+						</view>
+					</view>
+				</template>
+			</u-time-line-item>
+		</u-time-line>
+	</view>
+</template>
+
+<script>
+export default {
+	props:{
+		list:{
+			type:Array
+		}
+	},
+	data() {
+		return {
+			
+		};
+	},
+	onLoad() {
+		
+	},
+	methods:{
+		
+	}
+};
+</script>
+
+<style lang="scss" scoped>
+	page{
+		background-color: #FFFFFF;
+	}
+	.nav-title {
+		font-size: 28upx;
+		font-weight: 300;
+		padding-top: 20rpx;
+	}
+	.history{
+		box-sizing: border-box;
+		padding: 40rpx 20rpx 20rpx 50rpx;
+	}
+	.content{
+		box-shadow: 0 8rpx 10rpx rgba(234, 234, 234, 0.5),8rpx 0rpx 10rpx rgba(234, 234, 234,.5),-8rpx 0rpx 10rpx rgba(234, 234, 234,.5);
+		background-color: #FFFFFF;
+		padding: 20rpx;
+		border-radius: 10rpx;
+		margin: 20rpx 0;
+	}
+</style>

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

@@ -56,14 +56,14 @@
 				detail:{},
 				bannerList: [
 					{
-					  'image': "http://139.9.103.171:1888/miniofile/xlyq/banner01.jpg"
+					  'banners': "http://139.9.103.171:1888/miniofile/xlyq/banner01.jpg"
 					},
 				],
 			}
 		},
 		onLoad() {
 			this.fetchDeatil()
-			this.fetchBanner()
+			// this.fetchBanner()
 		},
 		methods: {
 			fetchBanner(){

+ 0 - 0
pages/index/car/card.vue → pages/index/car/comps/card.vue


+ 4 - 8
pages/index/car/item.vue → pages/index/car/comps/item.vue

@@ -1,11 +1,7 @@
 <template>
-	<view class="">
-		<u-toast ref="uToast"/>
-		<MeScroll  :up="up" :down="down" @up="upFn" :fixed="false" @down="downFn" @init="initMeScroll">
-			<card :list="dataList" :current="i"></card>
-		</MeScroll>
-	</view>
-	
+	<MeScroll  :up="up" :down="down" @up="upFn" :fixed="false" @down="downFn" @init="initMeScroll">
+		<card :list="dataList" :current="i"></card>
+	</MeScroll>
 </template>
 <script>
 	import MeScroll from '@/components/mescroll-body/mescroll-uni.vue'
@@ -97,7 +93,7 @@
 			 * */
 			downFn(mescroll) {
 				setTimeout(()=>{
-					this.$showToast('刷新成功')
+					this.$u.toast('刷新成功')
 					this.mescroll.resetUpScroll()
 				},1500)
 			},

+ 4 - 105
pages/index/car/detail.vue

@@ -2,8 +2,8 @@
 	<view style="background-color: #FFFFFF;min-height: 100vh;">
 		<view style="padding: 20rpx;">
 			<view style="position: relative;">
-				<image v-if="current==0" @click="previewImg(detailData.enterImgPath)":src="detailData.enterImgPath?detailData.enterImgPath:'/static/index/noimg3.png'"  style="width: 100%;height: 400rpx;"></image>
-				<image v-if="current==1" @click="previewImg(detailData.outImgPath)" :src="detailData.outImgPath?detailData.outImgPath:'/static/index/noimg3.png'"  style="width: 100%;height: 400rpx;"></image>
+				<image v-if="current==0" @click="$util.preview(detailData.enterImgPath)" :src="detailData.enterImgPath?detailData.enterImgPath:'/static/index/noimg3.png'"  style="width: 100%;height: 400rpx;"></image>
+				<image v-if="current==1" @click="$util.preview(detailData.outImgPath)" :src="detailData.outImgPath?detailData.outImgPath:'/static/index/noimg3.png'"  style="width: 100%;height: 400rpx;"></image>
 				<text style="font-size: 32rpx;color: #FFFFFF;position: absolute;bottom: 20rpx;left: 20rpx;">{{detailData.carNo}}</text>
 			</view>
 			<u-cell-group >
@@ -12,7 +12,7 @@
 				<u-cell-item :icon-style="iconStyle"  :arrow="false"  icon="clock-fill"  title="入场时间:" :value="detailData.enterTime"></u-cell-item>
 				<u-cell-item v-if="current==1" :icon-style="iconStyle"  :arrow="false"  icon="map-fill"  title="出口车道:" :value="detailData.outGateName"></u-cell-item>
 				<u-cell-item v-if="current==1" :icon-style="iconStyle"  :arrow="false"  icon="clock-fill"  title="出场时间:" :value="detailData.outTime"></u-cell-item>
-				<u-cell-item :icon-style="iconStyle" :border-bottom="false"  :arrow="false"  icon="rmb-circle-fill"  title="进出费用:" :value="'¥'+detailData.totalAmount"></u-cell-item>
+				<u-cell-item :icon-style="iconStyle" :border-bottom="false"  :arrow="false"  icon="rmb-circle-fill"  title="进出费用:" :value="detailData.totalAmount?'¥'+detailData.totalAmount:'¥0'"></u-cell-item>
 			</u-cell-group>
 		</view>
 	</view>
@@ -51,111 +51,10 @@ export default {
 			}
 			
 		},
-		previewImg(img){
-			let imgs=[]
-			imgs.push(img)
-			uni.previewImage({
-				urls:imgs
-			})
-		}
 	}
 };
 </script>
 
 <style lang="scss" scoped>
 	
-</style>
-
-<!-- <template>
-	<view class="content ">
-		<view class="flex">
-			<view class="flex flex-direction ">
-				<view class="flex justify-between">
-					<view class="">
-						<view class="item">
-							<text class="cuIcon-newfill text-blue margin-right-10"></text>
-							<text class="text-bold padding-right-10">车牌号:</text>
-							<view class="padding-top-20">{{dataDetail.carNo}}</view>
-						</view>
-						<view class="item">
-							<text class="cuIcon-locationfill text-blue margin-right-10"></text>
-							<text class="text-bold padding-right-10">入口车道:</text>
-							<view class="padding-top-20">{{dataDetail.enterGateName}}</view>
-						</view>
-						<view class="item">
-							<text class="cuIcon-timefill text-blue margin-right-10"></text>
-							<text class="text-bold padding-right-10">进入时间:</text>
-							<view class="padding-top-20">{{dataDetail.enterTime}}</view>
-						</view>
-					</view>
-					<view style="padding-left: 80rpx;">
-						<image @click="previewImg(dataDetail.outImgPath)" style="width: 250rpx;height: 280rpx;border-radius: 12rpx;" mode="scaleToFill" :src="dataDetail.outImgPath"></image>
-					</view>
-				</view>
-				<view class="item">
-					<text class="cuIcon-locationfill text-blue margin-right-10"></text>
-					<text class="text-bold padding-right-10">出口车道:</text>
-					<view class="padding-top-20">{{dataDetail.outGateName}}</view>
-				</view>
-				<view class="item">
-					<text class="cuIcon-timefill text-blue margin-right-10"></text>
-					<text class="text-bold padding-right-10">出去时间:</text>
-					<view class="padding-top-20">{{dataDetail.outTime}}</view>
-				</view>
-				<view class="item">
-					<text class="cuIcon-rechargefill text-blue margin-right-10"></text>
-					<text class="text-bold padding-right-10">进出费用:</text>
-					<view class="padding-top-20 text-price">{{dataDetail.totalAmount}}</view>
-				</view>
-				<view class="item">
-					<text class="cuIcon-peoplefill text-blue margin-right-10"></text>
-					<text class="text-bold padding-right-10">操作人员:</text>
-					<view class="padding-top-20">{{dataDetail.outOperatorName}}</view>
-				</view>
-			</view>
-		</view>
-	</view>
-</template>
-
-<script>
-	var app=getApp()
-	export default {
-		data() {
-			return {
-				id:'',
-				dataDetail:{}
-			}
-		},
-		onLoad(options) {
-			this.id=options.id
-			this.fetchDetail()
-		},
-		methods: {
-			fetchDetail(){
-				this.$api.car.page({id:this.id}).then(res=>{
-					this.dataDetail=res.data.records[0]
-				})
-			},
-			previewImg(img){
-				let imgs=[]
-				imgs.push(img)
-				uni.previewImage({
-					urls:imgs
-				})
-			}
-		}
-	}
-</script>
-
-<style lang="scss">
-	page{
-		background-color: #FFFFFF;
-	}
-	.content{
-		padding:70rpx 60rpx;
-		.item{
-			padding: 22rpx 0;
-		}
-	}
-</style>
- -->
+</style>

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

@@ -24,7 +24,7 @@
 	</view>
 </template>
 <script>
-	import item from "./item.vue"
+	import item from "./comps/item.vue"
 	export default {
 		components: {
 			item

+ 0 - 0
pages/index/fire/list/card.vue → pages/index/fire/list/comps/card.vue


+ 0 - 0
pages/index/fire/list/item.vue → pages/index/fire/list/comps/item.vue


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

@@ -22,7 +22,7 @@
 	</view>
 </template>
 <script>
-	import item from "./item.vue"
+	import item from "./comps/item.vue"
 	export default {
 		components: {
 			item

+ 11 - 3
pages/index/index.vue

@@ -100,7 +100,7 @@ export default {
 			loginType:this.$cache.get('loginType') || '',
 			//tabbar
 			tabbarCurr:0,
-			tabbar:tabbar,
+			tabbar:{},
 			//园区 label
 			
 			ganderShow:false,
@@ -132,9 +132,17 @@ export default {
 			this.fetchWaitAuditNum()
 		}
 	},
+	onReady() {
+		if (this.$cache.get('loginType')!=this.$loginType.STAFF) {
+			let tmp=this.$u.deepClone(tabbar)
+			tmp.list.splice(1,1)
+			this.tabbar=tmp
+		}else{
+			this.tabbar=tabbar
+		}
+	},
 	onLoad() {
 		this.fetchStaticData()
-		this.fetchBanner()
 		this.fetchUserInfo()
 		this.fetchNewsList()
 	},
@@ -352,7 +360,7 @@ export default {
 					name: 'The vehicle record',
 					color: '#fcf5f3',
 					icon: '../../static/index/gander/car.png',
-					url:'/pages/index/car/car',
+					url:'/pages/index/car/list',
 					count:0,
 					show:this.loginType==this.$loginType.AGENCY
 				}, 

+ 0 - 0
pages/index/staff-temperature/card.vue → pages/index/staff-temperature/comps/card.vue


+ 0 - 0
pages/index/staff-temperature/item.vue → pages/index/staff-temperature/comps/item.vue


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

@@ -24,7 +24,7 @@
 	</view>
 </template>
 <script>
-	import item from "./item.vue"
+	import item from "./comps/item.vue"
 	export default {
 		components: {
 			item

+ 0 - 0
pages/index/staffAudit/card.vue → pages/index/staffAudit/comps/card.vue


+ 0 - 0
pages/index/staffAudit/item.vue → pages/index/staffAudit/comps/item.vue


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

@@ -89,7 +89,7 @@
 				</view>
 			</view>
 		</view>
-		<view v-if="dataDetail.examine==0" class="footer-fixed   bg-white flex justify-end margin-right-30" style="padding: 25rpx 20rpx;box-sizing: border-box;z-index: 999;border-top: 1rpx solid #DEDEDE;">
+		<view v-if="dataDetail.examine==0" class="footer-fixed    bg-white flex justify-end margin-right-30" style="padding: 25rpx 20rpx;box-sizing: border-box;z-index: 999;border-top: 1rpx solid #DEDEDE;">
 			<view @click="pass" class="cu-btn df bg-blue light round margin-right-20" >
 				审核通过
 			</view>

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

@@ -46,7 +46,7 @@
 	</view>
 </template>
 <script>
-	import item from "./item.vue"
+	import item from "./comps/item.vue"
 	export default {
 		components: {
 			item

+ 1 - 0
pages/login/login.vue

@@ -418,6 +418,7 @@ export default {
 					getApp().globalData.userInfo=userInfo
 					//存储手机号,便于拉取用户信息
 					this.$cache.put('phone',userInfo.phone)
+					this.$cache.put('userId',userInfo.id)
 					this.$cache.put('enterpriseId',userInfo.enterpriseId)
 					this.handelSuccessLogin('staff')
 				}else if (userInfo.examine==2) {

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

@@ -13,7 +13,7 @@
 				</u-form-item>
 			</u-form>
 		</view>
-		<view @click="submit"  class="footer-fixed cu-btn  bg-blue flex" style="padding: 45rpx;">
+		<view @click="submit"  class="footer-fixed cu-btn  bg-color-base flex" style="padding: 45rpx;">
 			确认修改
 		</view>
 	</view>

+ 10 - 4
pages/mine/mine.vue

@@ -41,9 +41,6 @@
 				</view>
 			</view>
 		</view>
-		
-		
-		
 		<view class="item_list" >
 			<view class="item" v-if="item.show"  v-for="(item, index) in systemItemList" :key="index" @tap="tapToMenu(item.name)">
 				<view class="item_content">
@@ -85,7 +82,7 @@ export default {
 			},
 			//tabbar
 			tabbarCurr:2,
-			tabbar:tabbar,
+			tabbar:{},
 			
 			//登陆类型
 			loginType:'',
@@ -103,6 +100,15 @@ export default {
 	onShow() {
 		this.apiGetUserInfo()
 	},
+	onReady() {
+		if (this.$cache.get('loginType')!=this.$loginType.STAFF) {
+			let tmp=this.$u.deepClone(tabbar)
+			tmp.list.splice(1,1)
+			this.tabbar=tmp
+		}else{
+			this.tabbar=tabbar
+		}
+	},
 	onLoad() {
 		that=this
 		

+ 17 - 1
pages/my-camera/my-camera.vue

@@ -1,5 +1,5 @@
 <template>
-	<view class="warp">
+	<view class="warp" v-if="appletStatus==1">
 		<view class="center">
 			<image class="content" v-if="src!=null" :src="src" ></image>
 			<camera class="content" v-else :device-position="position" flash="auto" @error="error" >
@@ -25,6 +25,9 @@
 	export default {
 		data() {
 			return {
+				//0 体验版 1正式版
+				appletStatus:0,
+				
 				//0 人面 1 证件
 				type:0,
 				
@@ -35,8 +38,21 @@
 		},
 		onLoad(options) {
 			this.type=options.type || 0
+			this.handelAppletAudit()
 		},
 		methods: {
+			handelAppletAudit(){
+				this.appletStatus=uni.getStorageSync("appletStatus")
+				if (this.appletStatus==1) {
+					uni.setNavigationBarTitle({
+						title:'拍照'
+					})
+				}else{
+					uni.setNavigationBarTitle({
+						title:'待开发'
+					})
+				}
+			},
 			//确认
 			confirm(){
 				console.log(this.src)

+ 12 - 1
utils/util.js

@@ -8,7 +8,18 @@ util.copy=content=>{
 }
 
 
-// 图片缓存
+//预览图片
+// this.$util.preview('http://....png')
+// this.$util.$preview('../../test.png')
+// this.$util.$preview(['http://....png', '../../test.png'])
+util.preview=async (src)=> {
+	const urls = typeof src === 'string' ? [src] : src
+	const filePath = async src => src.match(/^http/) ? src : (await uni.compressImage({ src, quality: 100 }))[1].tempFilePath
+	for (let i = 0; i < urls.length; i++) {
+		urls[i] = await filePath(urls[i])
+	}
+	uni.previewImage({ urls })
+},