xiaoxin 3 роки тому
батько
коміт
26ccf8c2e6
23 змінених файлів з 54 додано та 99 видалено
  1. 3 0
      pages/addLocation/addLocation.vue
  2. 12 2
      pages/authentication/authentication.vue
  3. 4 3
      pages/cardRecord/cardRecord.vue
  4. 10 21
      pages/home/home.vue
  5. 5 57
      pages/location/location.vue
  6. 4 1
      pages/rulesDetail/rulesDetail.vue
  7. 4 1
      pages/stat/stat.vue
  8. 0 2
      pages/statDetail/statDetail.vue
  9. 1 1
      unpackage/dist/build/h5/index.html
  10. 1 1
      unpackage/dist/build/h5/static/js/index.47e9f9a7.js
  11. 1 0
      unpackage/dist/build/h5/static/js/pages-addLocation-addLocation.f2dcdf35.js
  12. 0 1
      unpackage/dist/build/h5/static/js/pages-addLocation-addLocation.ff542979.js
  13. 4 4
      unpackage/dist/build/h5/static/js/pages-authentication-authentication.1d60e2f3.js
  14. 1 0
      unpackage/dist/build/h5/static/js/pages-cardRecord-cardRecord.03bb276b.js
  15. 0 1
      unpackage/dist/build/h5/static/js/pages-cardRecord-cardRecord.26060da1.js
  16. 1 0
      unpackage/dist/build/h5/static/js/pages-home-home.add921a0.js
  17. 0 1
      unpackage/dist/build/h5/static/js/pages-home-home.bd6d48a4.js
  18. 1 0
      unpackage/dist/build/h5/static/js/pages-location-location.7977bbea.js
  19. 0 1
      unpackage/dist/build/h5/static/js/pages-location-location.a26f95e3.js
  20. 0 1
      unpackage/dist/build/h5/static/js/pages-rulesDetail-rulesDetail.1a7042e0.js
  21. 1 0
      unpackage/dist/build/h5/static/js/pages-rulesDetail-rulesDetail.7c14948b.js
  22. 0 1
      unpackage/dist/build/h5/static/js/pages-stat-stat.272ab79d.js
  23. 1 0
      unpackage/dist/build/h5/static/js/pages-stat-stat.91911e22.js

+ 3 - 0
pages/addLocation/addLocation.vue

@@ -156,6 +156,9 @@ export default {
 		},
 		// 搜索框失焦回调
 		handleSearch() {
+			if (!this.searchValue) {
+				return
+			}
 			if (this.timer) {
 				clearTimeout(this.timer)
 			}

+ 12 - 2
pages/authentication/authentication.vue

@@ -70,9 +70,14 @@ export default {
 		handleTakePhotoClick() {
 			uni.chooseImage({
 				count: 1,
+				sizeType: ['compressed'],
 				sourceType: ['camera'],
 				success: res => {
 					// console.log(res);
+					uni.showLoading({
+						title: '上传中',
+						mask: true
+					})
 					uni.uploadFile({
 						url: `https://chtech.ncjti.edu.cn/campusclock/attendance/api/file/upload`,
 						filePath: res.tempFilePaths[0],
@@ -98,6 +103,10 @@ export default {
 		},
 		// 对比人脸请求
 		handleEncrypt(imgUrl) {
+			uni.showLoading({
+				title: '认证中',
+				mask: true
+			})
 			uni.request({
 				url: '/testingServer/faceVerification/api/identity-comparison-record/comparison',
 				method: 'post',
@@ -128,8 +137,9 @@ export default {
 							}, 1500)
 						} else {
 							uni.showToast({
-								title: result.desc,
-								icon: 'error'
+								title: `${result.desc},请重新认证`,
+								icon: 'error',
+								duration: 2000
 							})
 						}
 					}

+ 4 - 3
pages/cardRecord/cardRecord.vue

@@ -29,7 +29,10 @@
 			<view class="box" v-for="(item, index) in list" :key="index">
 				<!-- 人物信息区域 -->
 				<view class="person">
-					<view class="img"><img :src="item.headImage || '../../static/imgs/headImage.png'" /></view>
+					<view class="img">
+						<img v-if="item.headImage" :src="item.headImage" />
+						<img v-else src="../../static/imgs/headImage.png" />
+					</view>
 					<view class="info">
 						<view class="name">{{ item.name }}</view>
 						<view class="college">{{ item.college ? item.college : '南昌交通学院' }}</view>
@@ -464,8 +467,6 @@ export default {
 
 	.popup_img {
 		width: 600rpx;
-		height: 600rpx;
-		background-color: #fff;
 
 		img {
 			width: 100%;

+ 10 - 21
pages/home/home.vue

@@ -3,7 +3,10 @@
 		<view class="placeholder"></view>
 		<!-- 头部学生信息区域 -->
 		<view class="header">
-			<view class="img"><img :src="userInfo.headImage || headImage" /></view>
+			<view class="img">
+				<img v-if="userInfo.headImage" :src="userInfo.headImage" />
+				<img v-else src="../../static/imgs/headImage.png" />
+			</view>
 			<view class="msg">
 				<view class="name">{{ userInfo.name || '用户' }}</view>
 				<view class="major">{{ userInfo.college || '南昌交通学院' }}</view>
@@ -82,8 +85,6 @@
 </template>
 
 <script>
-import headImage from '../../static/imgs/headImage.png'
-
 export default {
 	data() {
 		return {
@@ -128,8 +129,7 @@ export default {
 			// 是否需要人脸识别
 			faceRecognition: true,
 			// 是否需要拍摄场景照片
-			takePicture: true,
-			headImage: headImage
+			takePicture: true
 		}
 	},
 	onLoad() {
@@ -230,6 +230,10 @@ export default {
 		},
 		// 获取当前定位位置信息
 		getLocationData() {
+			uni.showLoading({
+				title: '定位中',
+				mask: true
+			})
 			// 获取经纬度
 			uni.getLocation({
 				type: 'gcj02',
@@ -365,25 +369,10 @@ export default {
 					uni.navigateTo({
 						url: `/pages/authentication/authentication?id=${this.contrastObj.id}&address=${this.address}&latitude=${this.myLat}&longitude=${this.myLng}&flag=1`
 					})
-					// uni.navigateTo({
-					// 	url: `/pages/location/location?obj=${obj}&flag=1`
-					// })
 				}
 			}
 		},
-		// handlePunch(info) {
-		// 	if (this.flags) {
-		// 		let obj = JSON.stringify(info)
-		// 		// 如果需要场景照片
-		// 		if (this.takePicture) {
-		// 			uni.navigateTo({
-		// 				url: `/pages/location/location?obj=${obj}&flag=1`
-		// 			})
-		// 		} else {
-		// 			this.handleUploading()
-		// 		}
-		// 	}
-		// },
+
 		// 打卡请求
 		async handleUploading() {
 			let res = await this.$myRequest_clockIn({

+ 5 - 57
pages/location/location.vue

@@ -150,69 +150,18 @@ export default {
 			}, 1500)
 		},
 		// 点击拍照图标回调
-		// handlePhoto() {
-		// 	// 获取用户摄像头权限
-		// 	uni.authorize({
-		// 		scope: 'scope.camera',
-		// 		success: () => {
-		// 			uni.chooseImage({
-		// 				count: 1,
-		// 				sourceType: ['camera'],
-		// 				success: res => {
-		// 					// console.log(res);
-		// 					uni.uploadFile({
-		// 						url: `https://chtech.ncjti.edu.cn/campusclock/attendance/api/file/upload`,
-		// 						filePath: res.tempFilePaths[0],
-		// 						name: 'file',
-		// 						header: {
-		// 							platform: 2,
-		// 							'Accept-Language': 'zh-CN,zh;q=0.9'
-		// 						},
-		// 						success: uploadFileRes => {
-		// 							let imgUrl = JSON.parse(uploadFileRes.data).data
-		// 							// if (this.flag == 1) {
-		// 							// 	this.handleUploading(imgUrl)
-		// 							// } else {
-		// 							// 	uni.redirectTo({
-		// 							// 		url: `/pages/authentication/authentication?imgUrl=${imgUrl}&id=${this.id}&address=${this.address}&latitude=${this.latitude}&longitude=${this.longitude}`
-		// 							// 	})
-		// 							// }
-		// 							this.handleUploading(imgUrl)
-		// 						},
-		// 						fail: () => {
-		// 							uni.showToast({
-		// 								title: '上传失败',
-		// 								icon: 'error'
-		// 							})
-		// 						}
-		// 					})
-		// 				}
-		// 			})
-		// 		},
-		// 		fail() {
-		// 			uni.showModal({
-		// 				title: '提示',
-		// 				content: '请先开启摄像头权限,否则将无法使用打卡功能',
-		// 				cancelText: '不授权',
-		// 				confirmText: '授权',
-		// 				success: function(res) {
-		// 					if (res.confirm) {
-		// 						uni.openSetting({
-		// 							success(res) {}
-		// 						})
-		// 					}
-		// 				}
-		// 			})
-		// 		}
-		// 	})
-		// },
 		handlePhoto() {
 			// 选择图片
 			uni.chooseImage({
 				count: 1,
+				sizeType: ['compressed'],
 				sourceType: ['camera'],
 				success: res => {
 					// console.log(res);
+					uni.showLoading({
+						title: '上传中',
+						mask: true
+					})
 					uni.uploadFile({
 						url: `https://chtech.ncjti.edu.cn/campusclock/attendance/api/file/upload`,
 						filePath: res.tempFilePaths[0],
@@ -232,7 +181,6 @@ export default {
 									}`
 								})
 							}
-							// this.handleUploading(imgUrl)
 						},
 						fail: () => {
 							uni.showToast({

+ 4 - 1
pages/rulesDetail/rulesDetail.vue

@@ -12,7 +12,10 @@
 			<view class="listbox" v-if="list.length">
 				<!-- 每一个盒子区域 -->
 				<view class="item" v-for="item in list" :key="item.id" @click="handleGoStatDetail(item.userId)">
-					<view class="left"><img :src="item.headImage || '../../static/imgs/headImage.png'" /></view>
+					<view class="left">
+						<img v-if="item.headImage" :src="item.headImage" />
+						<img v-else src="../../static/imgs/headImage.png" />
+					</view>
 					<view class="center">
 						<view class="name">{{ item.name }}</view>
 						<view class="college">{{ item.college ? item.college : '南昌交通学院' }}</view>

+ 4 - 1
pages/stat/stat.vue

@@ -87,7 +87,10 @@
 
 				<view class="e_list" v-if="errList.length">
 					<view class="e_box" v-for="item in errList" :key="item.userId">
-						<view class="e_img"><img :src="item.headImage || '../../static/imgs/headImage.png'" /></view>
+						<view class="e_img">
+							<img v-if="item.headImage" :src="item.headImage" />
+							<img v-else src="../../static/imgs/headImage.png" />
+						</view>
 						<view class="e_name">{{ item.name }}</view>
 						<view class="e_msg">未打卡{{ item.times }}次</view>
 					</view>

+ 0 - 2
pages/statDetail/statDetail.vue

@@ -472,8 +472,6 @@ export default {
 
 	.popup_img {
 		width: 600rpx;
-		height: 600rpx;
-		background-color: #fff;
 
 		img {
 			width: 100%;

Різницю між файлами не показано, бо вона завелика
+ 1 - 1
unpackage/dist/build/h5/index.html


Різницю між файлами не показано, бо вона завелика
+ 1 - 1
unpackage/dist/build/h5/static/js/index.47e9f9a7.js


Різницю між файлами не показано, бо вона завелика
+ 1 - 0
unpackage/dist/build/h5/static/js/pages-addLocation-addLocation.f2dcdf35.js


Різницю між файлами не показано, бо вона завелика
+ 0 - 1
unpackage/dist/build/h5/static/js/pages-addLocation-addLocation.ff542979.js


Різницю між файлами не показано, бо вона завелика
+ 4 - 4
unpackage/dist/build/h5/static/js/pages-authentication-authentication.1d60e2f3.js


Різницю між файлами не показано, бо вона завелика
+ 1 - 0
unpackage/dist/build/h5/static/js/pages-cardRecord-cardRecord.03bb276b.js


Різницю між файлами не показано, бо вона завелика
+ 0 - 1
unpackage/dist/build/h5/static/js/pages-cardRecord-cardRecord.26060da1.js


Різницю між файлами не показано, бо вона завелика
+ 1 - 0
unpackage/dist/build/h5/static/js/pages-home-home.add921a0.js


Різницю між файлами не показано, бо вона завелика
+ 0 - 1
unpackage/dist/build/h5/static/js/pages-home-home.bd6d48a4.js


Різницю між файлами не показано, бо вона завелика
+ 1 - 0
unpackage/dist/build/h5/static/js/pages-location-location.7977bbea.js


Різницю між файлами не показано, бо вона завелика
+ 0 - 1
unpackage/dist/build/h5/static/js/pages-location-location.a26f95e3.js


Різницю між файлами не показано, бо вона завелика
+ 0 - 1
unpackage/dist/build/h5/static/js/pages-rulesDetail-rulesDetail.1a7042e0.js


Різницю між файлами не показано, бо вона завелика
+ 1 - 0
unpackage/dist/build/h5/static/js/pages-rulesDetail-rulesDetail.7c14948b.js


Різницю між файлами не показано, бо вона завелика
+ 0 - 1
unpackage/dist/build/h5/static/js/pages-stat-stat.272ab79d.js


Різницю між файлами не показано, бо вона завелика
+ 1 - 0
unpackage/dist/build/h5/static/js/pages-stat-stat.91911e22.js