xiaoxin пре 2 година
родитељ
комит
d68e5974d1
31 измењених фајлова са 6094 додато и 119 уклоњено
  1. 28 0
      node_modules/.package-lock.json
  2. 48 0
      package-lock.json
  3. 1 0
      package.json
  4. 7 0
      pages.json
  5. 3 3
      pages/bind/bind.vue
  6. 2 2
      pages/login/login.vue
  7. 11 4
      pages/login2/login2.vue
  8. 1 1
      pages/switch/switch.vue
  9. 110 17
      pagesReservation/backlog/backlog.vue
  10. 16 2
      pagesReservation/record/record.vue
  11. 158 0
      pagesReservation/register/register.vue
  12. 422 0
      pagesReservation/set/set.vue
  13. BIN
      static/images/close.png
  14. BIN
      static/images/uploading.png
  15. 1 0
      unpackage/dist/dev/mp-weixin/app.js
  16. 2 1
      unpackage/dist/dev/mp-weixin/app.json
  17. 4871 0
      unpackage/dist/dev/mp-weixin/common/vendor.js
  18. 1 1
      unpackage/dist/dev/mp-weixin/pages/bind/bind.js
  19. 1 1
      unpackage/dist/dev/mp-weixin/pages/bind/bind.wxml
  20. 107 39
      unpackage/dist/dev/mp-weixin/pagesReservation/backlog/backlog.js
  21. 1 0
      unpackage/dist/dev/mp-weixin/pagesReservation/backlog/backlog.json
  22. 1 1
      unpackage/dist/dev/mp-weixin/pagesReservation/backlog/backlog.wxml
  23. 14 0
      unpackage/dist/dev/mp-weixin/pagesReservation/backlog/backlog.wxss
  24. 16 2
      unpackage/dist/dev/mp-weixin/pagesReservation/record/record.js
  25. 105 19
      unpackage/dist/dev/mp-weixin/pagesReservation/register/register.js
  26. 1 1
      unpackage/dist/dev/mp-weixin/pagesReservation/register/register.wxml
  27. 31 0
      unpackage/dist/dev/mp-weixin/pagesReservation/register/register.wxss
  28. 2 1
      unpackage/dist/dev/mp-weixin/project.config.json
  29. 3 24
      unpackage/dist/dev/mp-weixin/project.private.config.json
  30. 6 0
      utils/cos.js
  31. 124 0
      utils/imageCompress.js

+ 28 - 0
node_modules/.package-lock.json

@@ -3,10 +3,38 @@
   "lockfileVersion": 3,
   "requires": true,
   "packages": {
+    "node_modules/@xmldom/xmldom": {
+      "version": "0.8.10",
+      "resolved": "https://registry.npmmirror.com/@xmldom/xmldom/-/xmldom-0.8.10.tgz",
+      "integrity": "sha512-2WALfTl4xo2SkGCYRt6rDTFfk9R1czmBvUQy12gK2KuRKIpWEhcbbzy8EZXtz/jkRqHX8bFEc6FC1HjX4TUWYw==",
+      "engines": {
+        "node": ">=10.0.0"
+      }
+    },
+    "node_modules/cos-wx-sdk-v5": {
+      "version": "1.7.0",
+      "resolved": "https://registry.npmmirror.com/cos-wx-sdk-v5/-/cos-wx-sdk-v5-1.7.0.tgz",
+      "integrity": "sha512-DBP+DfYPVRq/djM0Tyr/fAnl4QhL0+TEFxwailh5mh2IgSmzHJEgsCtVnbZyCEdKKocVn68zhawsTMzT9hyz6g==",
+      "dependencies": {
+        "@xmldom/xmldom": "^0.8.6",
+        "mime": "^2.4.6"
+      }
+    },
     "node_modules/crypto-js": {
       "version": "4.2.0",
       "resolved": "https://registry.npmmirror.com/crypto-js/-/crypto-js-4.2.0.tgz",
       "integrity": "sha512-KALDyEYgpY+Rlob/iriUtjV6d5Eq+Y191A5g4UqLAi8CyGP9N1+FdVbkc1SxKc2r4YAYqG8JzO2KGL+AizD70Q=="
+    },
+    "node_modules/mime": {
+      "version": "2.6.0",
+      "resolved": "https://registry.npmmirror.com/mime/-/mime-2.6.0.tgz",
+      "integrity": "sha512-USPkMeET31rOMiarsBNIHZKLGgvKc/LrjofAnBlOttf5ajRvqiRA8QsenbcooctK6d6Ts6aqZXBA+XbkKthiQg==",
+      "bin": {
+        "mime": "cli.js"
+      },
+      "engines": {
+        "node": ">=4.0.0"
+      }
     }
   }
 }

+ 48 - 0
package-lock.json

@@ -5,20 +5,68 @@
   "packages": {
     "": {
       "dependencies": {
+        "cos-wx-sdk-v5": "^1.7.0",
         "crypto-js": "^4.2.0"
       }
     },
+    "node_modules/@xmldom/xmldom": {
+      "version": "0.8.10",
+      "resolved": "https://registry.npmmirror.com/@xmldom/xmldom/-/xmldom-0.8.10.tgz",
+      "integrity": "sha512-2WALfTl4xo2SkGCYRt6rDTFfk9R1czmBvUQy12gK2KuRKIpWEhcbbzy8EZXtz/jkRqHX8bFEc6FC1HjX4TUWYw==",
+      "engines": {
+        "node": ">=10.0.0"
+      }
+    },
+    "node_modules/cos-wx-sdk-v5": {
+      "version": "1.7.0",
+      "resolved": "https://registry.npmmirror.com/cos-wx-sdk-v5/-/cos-wx-sdk-v5-1.7.0.tgz",
+      "integrity": "sha512-DBP+DfYPVRq/djM0Tyr/fAnl4QhL0+TEFxwailh5mh2IgSmzHJEgsCtVnbZyCEdKKocVn68zhawsTMzT9hyz6g==",
+      "dependencies": {
+        "@xmldom/xmldom": "^0.8.6",
+        "mime": "^2.4.6"
+      }
+    },
     "node_modules/crypto-js": {
       "version": "4.2.0",
       "resolved": "https://registry.npmmirror.com/crypto-js/-/crypto-js-4.2.0.tgz",
       "integrity": "sha512-KALDyEYgpY+Rlob/iriUtjV6d5Eq+Y191A5g4UqLAi8CyGP9N1+FdVbkc1SxKc2r4YAYqG8JzO2KGL+AizD70Q=="
+    },
+    "node_modules/mime": {
+      "version": "2.6.0",
+      "resolved": "https://registry.npmmirror.com/mime/-/mime-2.6.0.tgz",
+      "integrity": "sha512-USPkMeET31rOMiarsBNIHZKLGgvKc/LrjofAnBlOttf5ajRvqiRA8QsenbcooctK6d6Ts6aqZXBA+XbkKthiQg==",
+      "bin": {
+        "mime": "cli.js"
+      },
+      "engines": {
+        "node": ">=4.0.0"
+      }
     }
   },
   "dependencies": {
+    "@xmldom/xmldom": {
+      "version": "0.8.10",
+      "resolved": "https://registry.npmmirror.com/@xmldom/xmldom/-/xmldom-0.8.10.tgz",
+      "integrity": "sha512-2WALfTl4xo2SkGCYRt6rDTFfk9R1czmBvUQy12gK2KuRKIpWEhcbbzy8EZXtz/jkRqHX8bFEc6FC1HjX4TUWYw=="
+    },
+    "cos-wx-sdk-v5": {
+      "version": "1.7.0",
+      "resolved": "https://registry.npmmirror.com/cos-wx-sdk-v5/-/cos-wx-sdk-v5-1.7.0.tgz",
+      "integrity": "sha512-DBP+DfYPVRq/djM0Tyr/fAnl4QhL0+TEFxwailh5mh2IgSmzHJEgsCtVnbZyCEdKKocVn68zhawsTMzT9hyz6g==",
+      "requires": {
+        "@xmldom/xmldom": "^0.8.6",
+        "mime": "^2.4.6"
+      }
+    },
     "crypto-js": {
       "version": "4.2.0",
       "resolved": "https://registry.npmmirror.com/crypto-js/-/crypto-js-4.2.0.tgz",
       "integrity": "sha512-KALDyEYgpY+Rlob/iriUtjV6d5Eq+Y191A5g4UqLAi8CyGP9N1+FdVbkc1SxKc2r4YAYqG8JzO2KGL+AizD70Q=="
+    },
+    "mime": {
+      "version": "2.6.0",
+      "resolved": "https://registry.npmmirror.com/mime/-/mime-2.6.0.tgz",
+      "integrity": "sha512-USPkMeET31rOMiarsBNIHZKLGgvKc/LrjofAnBlOttf5ajRvqiRA8QsenbcooctK6d6Ts6aqZXBA+XbkKthiQg=="
     }
   }
 }

+ 1 - 0
package.json

@@ -1,5 +1,6 @@
 {
   "dependencies": {
+    "cos-wx-sdk-v5": "^1.7.0",
     "crypto-js": "^4.2.0"
   }
 }

+ 7 - 0
pages.json

@@ -176,6 +176,13 @@
 					"navigationBarTitleText": "访客预约",
 					"enablePullDownRefresh": false
 				}
+			},
+			{
+				"path" : "set/set",
+				"style" : 
+				{
+					"navigationBarTitleText" : "访客设置"
+				}
 			}
 		]
 	}, {

+ 3 - 3
pages/bind/bind.vue

@@ -8,7 +8,7 @@
 			</view>
 
 			<view class="body_row mt-30">
-				<view class="row_text">号</view>
+				<view class="row_text">号</view>
 				<input class="row_input" type="number" placeholder="请输入编号" placeholder-style="color:#CCCCCC" v-model="number" />
 			</view>
 
@@ -30,7 +30,7 @@ import { myRequest } from '@/utils/api.js'
 
 // 姓名
 const name = ref('')
-// 
+// 
 const number = ref('')
 // 身份证号码
 // const identity = ref('')
@@ -95,7 +95,7 @@ const verifyValue = () => {
 	}
 	if (!number.value) {
 		uni.showToast({
-			title: '请输入号',
+			title: '请输入号',
 			icon: 'none'
 		})
 		return false

+ 2 - 2
pages/login/login.vue

@@ -122,7 +122,7 @@ const getBind = async (wxcode) => {
 
 	if (msg.user.length > 1) {
 		let info = encodeURIComponent(JSON.stringify(msg))
-		uni.redirectTo({
+		uni.reLaunch({
 			url: `/pages/switch/switch?info=${info}`
 		})
 	} else {
@@ -131,7 +131,7 @@ const getBind = async (wxcode) => {
 		uni.setStorageSync('userhead', msg.user[0].userhead)
 		uni.setStorageSync('userInfo', msg.user[0])
 
-		uni.redirectTo({
+		uni.reLaunch({
 			url: '/pages/home/home'
 		})
 	}

+ 11 - 4
pages/login2/login2.vue

@@ -19,8 +19,15 @@ import { decryptDes } from '@/utils/des.js'
 
 // 点击快捷登录按钮回调
 const getPhoneNumber = (e) => {
-	// console.log(e.detail.code)
-	getPhone(e.detail.code)
+	// console.log(e)
+	if (e.detail.code) {
+		getPhone(e.detail.code)
+	} else {
+		uni.showToast({
+			title: '授权失败,请选择其他方式登录',
+			icon: 'none'
+		})
+	}
 }
 
 // 获取用户手机号码
@@ -67,7 +74,7 @@ const getBind = async (wxcode, phone) => {
 
 	if (msg.user.length > 1) {
 		let info = encodeURIComponent(JSON.stringify(msg))
-		uni.redirectTo({
+		uni.reLaunch({
 			url: `/pages/switch/switch?info=${info}`
 		})
 	} else {
@@ -76,7 +83,7 @@ const getBind = async (wxcode, phone) => {
 		uni.setStorageSync('userhead', msg.user[0].userhead)
 		uni.setStorageSync('userInfo', msg.user[0])
 
-		uni.redirectTo({
+		uni.reLaunch({
 			url: '/pages/home/home'
 		})
 	}

+ 1 - 1
pages/switch/switch.vue

@@ -61,7 +61,7 @@ const handleChange = (item) => {
 	// console.log(item)
 	uni.setStorageSync('userhead', item.userhead)
 	uni.setStorageSync('userInfo', item)
-	uni.redirectTo({
+	uni.reLaunch({
 		url: '/pages/home/home'
 	})
 }

+ 110 - 17
pagesReservation/backlog/backlog.vue

@@ -35,12 +35,18 @@
 					</view>
 				</view>
 				<view class="box_btn" v-if="item.statuStr == '待审核'">
-					<view class="button reject" @click.stop="handleReject(item.id)">拒绝</view>
-					<view class="button agree" @click.stop="handleAgree(item.id)">同意,并推送</view>
+					<view class="button reject" @click.stop="handleReject(item)">拒绝</view>
+					<view class="button agree" @click.stop="handleAgree(item)">同意</view>
 				</view>
 			</view>
 		</view>
 
+		<!-- 悬浮设置按钮区域 -->
+		<view class="set" @click="handleClickSet" v-if="showSet">
+			<uni-icons type="gear-filled" size="18"></uni-icons>
+			&nbsp;设置
+		</view>
+
 		<!-- 没有数据时展示的页面 -->
 		<NoData v-if="!list.length" />
 
@@ -108,8 +114,8 @@
 
 				<!-- 底部按钮区域 -->
 				<view class="pop_btn" v-if="popObj.statuStr == '待审核'">
-					<view class="button reject" @click="handleReject(popObj.id)">拒绝</view>
-					<view class="button agree" @click="handleAgree(popObj.id)">同意,并推送</view>
+					<view class="button reject" @click="handleReject(popObj)">拒绝</view>
+					<view class="button agree" @click="handleAgree(popObj)">同意</view>
 				</view>
 			</view>
 		</uni-popup>
@@ -137,7 +143,7 @@ const currentPage = ref(1)
 const total = ref(0)
 
 // 分段器数组
-const controlList = ['待审核', '已拒绝', '已推送']
+const controlList = ['待审核', '已拒绝', '进校核销', '出校核销', '已完成']
 
 // 待办记录
 const list = ref([])
@@ -148,7 +154,14 @@ const popup = ref(null)
 // 弹窗详细信息
 const popObj = ref({})
 
+// 是否展示设置按钮
+const showSet = ref(false)
+
+// 配置信息
+const configInfo = ref({})
+
 onLoad(() => {
+	getConfig()
 	getData()
 })
 
@@ -165,15 +178,44 @@ onReachBottom(() => {
 	}
 })
 
+// 获取配置信息
+const getConfig = async () => {
+	const res = await myRequest({
+		url: '/wanzai/api/smartVisitorParentsConfig/getUserId',
+		data: {
+			userId: uni.getStorageSync('userInfo').id
+		}
+	})
+	// console.log(res)
+	if (res.code == 200) {
+		showSet.value = true
+		const result = JSON.parse(decryptDes(res.data))
+		// console.log(result)
+		configInfo.value = result
+	}
+}
+
 // 获取到访代办数据
 const getData = async () => {
+	let type
+	if (activeCurrent.value == 0) {
+		type = 1
+	} else if (activeCurrent.value == 1) {
+		type = 2
+	} else if (activeCurrent.value == 2) {
+		type = 7
+	} else if (activeCurrent.value == 3) {
+		type = 8
+	} else if (activeCurrent.value == 4) {
+		type = 9
+	}
 	const res = await myRequest({
 		url: '/wanzai/api/smartVisitor/visitingAgencys',
 		data: {
 			currentPage: currentPage.value,
 			pageCount: 6,
 			userId: uni.getStorageSync('userInfo').id,
-			type: activeCurrent.value - 0 + 1
+			type
 		}
 	})
 	// console.log(res)
@@ -199,32 +241,38 @@ const handleClick = (item) => {
 }
 
 // 点击拒绝按钮回调
-const handleReject = (id) => {
-	handleExamine(id, 2)
+const handleReject = (info) => {
+	handleExamine(info, 2)
 }
 
 // 点击同意按钮回调
-const handleAgree = (id) => {
-	handleExamine(id, 1)
+const handleAgree = (info) => {
+	handleExamine(info, 4)
 }
 
 // 审核回调
-const handleExamine = (id, type) => {
+const handleExamine = (info, type) => {
 	uni.showModal({
 		title: '提示',
-		content: type == 1 ? '确定同意并推送吗?' : '确定拒绝吗?',
+		content: type == 4 ? '确定同意吗?' : '确定拒绝吗?',
 		success: (res) => {
 			if (res.confirm) {
-				handleExamineReq(id, type)
+				if (info.visitorType == 1) {
+					// 学生家长预约审核
+					handleExamineReq(info.id, type)
+				} else {
+					// 其他访客预约审核
+					handleExamineReq_other(info.id, type)
+				}
 			}
 		}
 	})
 }
 
-// 审核请求
+// 学生家长预约审核请求
 const handleExamineReq = async (id, type) => {
 	const res = await myRequest({
-		url: '/wanzai/api/smartVisitor/examineRecord',
+		url: '/wanzai/api/smartVisitor/parentsAudit',
 		data: {
 			id,
 			type
@@ -232,7 +280,29 @@ const handleExamineReq = async (id, type) => {
 	})
 	// console.log(res)
 	uni.showToast({
-		title: type == 1 ? '已同意该审核' : '已拒绝该审核',
+		title: type == 4 ? '已同意该审核' : '已拒绝该审核',
+		icon: 'success',
+		duration: 2000
+	})
+	setTimeout(() => {
+		list.value = []
+		currentPage.value = 1
+		getData()
+	}, 2000)
+}
+
+// 其他访客预约审核请求
+const handleExamineReq_other = async (id, type) => {
+	const res = await myRequest({
+		url: '/wanzai/api/smartVisitor/restsAudit',
+		data: {
+			id,
+			type
+		}
+	})
+	// console.log(res)
+	uni.showToast({
+		title: type == 4 ? '已同意该审核' : '已拒绝该审核',
 		icon: 'success',
 		duration: 2000
 	})
@@ -247,6 +317,14 @@ const handleExamineReq = async (id, type) => {
 const closePop = () => {
 	popup.value.close()
 }
+
+// 点击悬浮设置按钮时的回调
+const handleClickSet = () => {
+	let info = JSON.stringify(configInfo.value)
+	uni.navigateTo({
+		url: `/pagesReservation/set/set?info=${info}`
+	})
+}
 </script>
 
 <style lang="scss" scoped>
@@ -359,6 +437,21 @@ const closePop = () => {
 		}
 	}
 
+	.set {
+		position: fixed;
+		bottom: 310rpx;
+		right: 0;
+		display: flex;
+		justify-content: center;
+		align-items: center;
+		width: 169rpx;
+		height: 83rpx;
+		font-size: 28rpx;
+		border-radius: 110rpx 0 0 110rpx;
+		box-shadow: 0 2rpx 9rpx rgba(0, 0, 0, 0.25);
+		background-color: #fff;
+	}
+
 	.popup_box {
 		padding-bottom: 50rpx;
 		width: 710rpx;
@@ -451,4 +544,4 @@ const closePop = () => {
 		background-color: #fff;
 	}
 }
-</style>
+</style>

+ 16 - 2
pagesReservation/record/record.vue

@@ -117,7 +117,7 @@ const currentPage = ref(1)
 const total = ref(0)
 
 // 分段器数组
-const controlList = ['全部', '待审核', '已拒绝', '已推送']
+const controlList = ['全部', '待审核', '已拒绝', '进校核销', '出校核销', '已完成']
 
 // 预约记录数组
 const list = ref([])
@@ -146,13 +146,27 @@ onReachBottom(() => {
 
 // 获取预约记录数据
 const getData = async () => {
+	let type
+	if (activeCurrent.value == 0) {
+		type = 0
+	} else if (activeCurrent.value == 1) {
+		type = 1
+	} else if (activeCurrent.value == 2) {
+		type = 2
+	} else if (activeCurrent.value == 3) {
+		type = 7
+	} else if (activeCurrent.value == 4) {
+		type = 8
+	} else if (activeCurrent.value == 5) {
+		type = 9
+	}
 	const res = await myRequest({
 		url: '/wanzai/api/smartVisitor/appointmentPageRecord',
 		data: {
 			currentPage: currentPage.value,
 			pageCount: 6,
 			userId: uni.getStorageSync('userInfo').id,
-			type: activeCurrent.value
+			type
 		}
 	})
 	// console.log(res)

+ 158 - 0
pagesReservation/register/register.vue

@@ -70,6 +70,26 @@
 				</view>
 			</view>
 
+			<!-- 图片上传区域 -->
+			<view class="body_box no_border" v-if="type == 1">
+				<view class="box_key">
+					图片
+					<span class="span">(上传图片,最多{{ maxImgCount }}张)</span>
+				</view>
+			</view>
+
+			<view class="filePicker" v-if="type == 1">
+				<!-- 图片展示区域 -->
+				<view class="img_box" v-for="(item, index) in imgList" :key="item">
+					<img class="img" mode="aspectFill" :src="item" @click="handleLookImg(imgList, index)" />
+					<!-- 关闭图标 -->
+					<img class="close" src="@/static/images/close.png" @click="handleDelete(index)" />
+				</view>
+
+				<!-- 上传按钮区域 -->
+				<img v-if="imgList.length < maxImgCount" class="uploading" src="@/static/images/uploading.png" @click="uploadingImg" />
+			</view>
+
 			<!-- 车牌号区域 -->
 			<view class="body_box">
 				<view class="box_key">车牌号</view>
@@ -135,6 +155,20 @@
 
 		<!-- 按钮区域 -->
 		<view class="btn" :class="{ active: btnFlag }" @click="handleSubmit">访客预约</view>
+
+		<!-- 用于图片压缩的canvas画布 -->
+		<canvas
+			:style="{
+				width: cw + 'px',
+				height: cw + 'px',
+				position: 'absolute',
+				zIndex: -1,
+				left: '-10000rpx',
+				top: '-10000rpx'
+			}"
+			canvas-id="zipCanvas"
+		></canvas>
+		<!--画布结束-->
 	</view>
 </template>
 
@@ -145,6 +179,8 @@ import { myRequest } from '@/utils/api.js'
 import { time_format } from '@/utils/formatTime.js'
 import { isVehicleNumber } from '@/utils/plate.js'
 import { decryptDes } from '@/utils/des.js'
+import getLessLimitSizeImage from '@/utils/imageCompress.js'
+import { cos } from '@/utils/cos.js'
 
 // 判断是哪种身份 1为学生家长 2为其他访客
 const type = ref('')
@@ -167,6 +203,9 @@ const visIdNumber = ref('')
 // 访问事由
 const visReason = ref('')
 
+// 展示的图片
+const imgList = ref([])
+
 // 车牌号
 const visCarNumber = ref('')
 
@@ -185,6 +224,12 @@ const passivePhone = ref('')
 // 是否授权证件号
 const authValue = ref(false)
 
+// 图片上传的最大数
+const maxImgCount = ref(3)
+
+//画板边长默认是屏幕宽度,正方形画布
+const cw = uni.getSystemInfoSync().windowWidth
+
 // 预约按钮是否高亮展示
 const btnFlag = computed(() => {
 	const tem = list.value.some((item) => item.isChecked)
@@ -260,6 +305,7 @@ const parentAppointment = async () => {
 			visitReason: visReason.value,
 			carNum: visCarNumber.value,
 			peerNum: visPeopleNum.value ? visPeopleNum.value : 0,
+			image: imgList.value.join(','),
 			students: temList
 		}
 	})
@@ -463,6 +509,81 @@ const handleClick = (item) => {
 const handleAuth = () => {
 	authValue.value = !authValue.value
 }
+
+// 点击上传图片时的回调
+const uploadingImg = () => {
+	uni.chooseMedia({
+		count: maxImgCount.value - imgList.value.length,
+		mediaType: ['image'],
+		sizeType: ['compressed'],
+		success: (res) => {
+			// console.log(res)
+			res.tempFiles.forEach((ele) => {
+				//这里的id和页面中写的html代码的canvas的id要一致
+				let canvasId = 'zipCanvas'
+				//原图的路径
+				let imagePath = ele.tempFilePath
+				//大小限制1024kb
+				let limitSize = 1024 * 3
+				//初始绘画区域是画布自身的宽度也就是屏幕宽度
+				let drawWidth = uni.getSystemInfoSync().windowWidth
+				// 图片过大压缩
+				getLessLimitSizeImage(canvasId, imagePath, limitSize, drawWidth, (resPath) => {
+					handleUploadMini(resPath, 1)
+				})
+			})
+		}
+	})
+}
+
+// 上传请求
+const handleUploadMini = (ele) => {
+	// 开始上传
+	uni.showLoading({
+		title: '上传中',
+		mask: true
+	})
+
+	let filePath = ele
+	let Key = filePath.substr(filePath.lastIndexOf('/') + 1)
+
+	cos.postObject(
+		{
+			Bucket: 'wanzai-1306339220',
+			Region: 'ap-shanghai',
+			Key: Key,
+			FilePath: filePath,
+			onProgress: (info) => {
+				// console.log(info)
+			}
+		},
+		(err, data) => {
+			if (err) {
+				console.log('上传失败', err)
+			} else {
+				console.log('上传成功', data)
+
+				uni.hideLoading()
+				let imgUrl = 'https://' + data.Location
+				imgList.value.push(imgUrl)
+				console.log(imgList.value)
+			}
+		}
+	)
+}
+
+// 删除图片回调
+const handleDelete = (index) => {
+	imgList.value.splice(index, 1)
+}
+
+// 点击图片回调
+const handleLookImg = (urls, current) => {
+	uni.previewImage({
+		urls,
+		current
+	})
+}
 </script>
 
 <style lang="scss" scoped>
@@ -490,6 +611,11 @@ const handleAuth = () => {
 				.key_icon {
 					color: #d43030;
 				}
+
+				.span {
+					font-size: 20rpx;
+					color: #999999;
+				}
 			}
 
 			.box_value {
@@ -517,6 +643,38 @@ const handleAuth = () => {
 			}
 		}
 
+		.filePicker {
+			display: flex;
+			margin-bottom: 20rpx;
+			height: 100rpx;
+
+			.img_box {
+				position: relative;
+				margin-right: 20rpx;
+				width: 100rpx;
+				height: 100rpx;
+
+				.img {
+					width: 100rpx;
+					height: 100rpx;
+				}
+
+				.close {
+					position: absolute;
+					top: 0;
+					right: 0;
+					width: 40rpx;
+					height: 40rpx;
+					background-color: rgba(000, 000, 000, 0.3);
+				}
+			}
+
+			.uploading {
+				width: 100rpx;
+				height: 100rpx;
+			}
+		}
+
 		.no_border {
 			border: none;
 		}

+ 422 - 0
pagesReservation/set/set.vue

@@ -0,0 +1,422 @@
+<template>
+	<view class="set">
+		<!-- 年级区域 -->
+		<view class="box">
+			年级
+			<!-- <picker @change="bindPickerChange" :value="gradeCurrentIndex" :range="gradeArray">
+				<view class="box_select">
+					{{ gradeArray[gradeCurrentIndex] }}
+					<img class="img" src="@/static/images/bottom.png" alt="" />
+				</view>
+			</picker> -->
+			<view class="box_select">{{ configInfo.gradeName }}</view>
+		</view>
+
+		<!-- 班级区域 -->
+		<view class="box">
+			班级
+			<!-- <picker @change="bindPickerChange" :value="classCurrentIndex" :range="classArray">
+				<view class="box_select">
+					{{ classArray[classCurrentIndex] }}
+					<img class="img" src="@/static/images/bottom.png" alt="" />
+				</view>
+			</picker> -->
+			<view class="box_select">{{ configInfo.className }}</view>
+		</view>
+
+		<!-- 设置区域 -->
+		<view class="setBox">
+			<view class="title">
+				<view class="circle"></view>
+				小程序设置
+			</view>
+
+			<!-- 小程序是否需要审核 -->
+			<checkbox-group class="checkbox_group">
+				<label class="checkbox" v-for="item in checkItems" :key="item.value" @click="checkboxChange(checkItems, item)">
+					<view>
+						<checkbox color="#3464FF" :value="item.value" :checked="item.checked" />
+					</view>
+					<view>{{ item.name }}</view>
+				</label>
+			</checkbox-group>
+
+			<!-- 小程序是否需要推送 -->
+			<checkbox-group class="checkbox_group">
+				<label class="checkbox" v-for="item in pushItems" :key="item.value" @click="checkboxChange(pushItems, item)">
+					<view>
+						<checkbox color="#3464FF" :value="item.value" :checked="item.checked" />
+					</view>
+					<view>{{ item.name }}</view>
+				</label>
+			</checkbox-group>
+
+			<!-- 小程序是否需要核销区域 -->
+			<checkbox-group class="checkbox_group">
+				<label class="checkbox" v-for="item in cancelItems" :key="item.value" @click="checkboxChange(cancelItems, item)">
+					<view>
+						<checkbox color="#3464FF" :value="item.value" :checked="item.checked" />
+					</view>
+					<view>{{ item.name }}</view>
+				</label>
+			</checkbox-group>
+
+			<view class="title">
+				<view class="circle"></view>
+				大屏设置
+			</view>
+
+			<!-- 大屏是否需要审核 -->
+			<checkbox-group class="checkbox_group">
+				<label class="checkbox" v-for="item in checkItems_screen" :key="item.value" @click="checkboxChange(checkItems_screen, item)">
+					<view>
+						<checkbox color="#3464FF" :value="item.value" :checked="item.checked" />
+					</view>
+					<view>{{ item.name }}</view>
+				</label>
+			</checkbox-group>
+
+			<!-- 大屏是否需要推送 -->
+			<checkbox-group class="checkbox_group">
+				<label class="checkbox" v-for="item in pushItems_screen" :key="item.value" @click="checkboxChange(pushItems_screen, item)">
+					<view>
+						<checkbox color="#3464FF" :value="item.value" :checked="item.checked" />
+					</view>
+					<view>{{ item.name }}</view>
+				</label>
+			</checkbox-group>
+
+			<!-- 大屏是否需要核销区域 -->
+			<checkbox-group class="checkbox_group">
+				<label class="checkbox" v-for="item in cancelItems_screen" :key="item.value" @click="checkboxChange(cancelItems_screen, item)">
+					<view>
+						<checkbox color="#3464FF" :value="item.value" :checked="item.checked" />
+					</view>
+					<view>{{ item.name }}</view>
+				</label>
+			</checkbox-group>
+
+			<view class="title">
+				<view class="circle"></view>
+				门禁车闸设置
+			</view>
+
+			<!-- 门禁车闸是否需要联动区域 -->
+			<checkbox-group class="checkbox_group">
+				<label class="checkbox" v-for="item in doorItems" :key="item.value" @click="checkboxChange(doorItems, item)">
+					<view>
+						<checkbox color="#3464FF" :value="item.value" :checked="item.checked" />
+					</view>
+					<view>{{ item.name }}</view>
+				</label>
+			</checkbox-group>
+		</view>
+
+		<!-- 按钮区域 -->
+		<view class="btns">
+			<view class="btn cancel" @click="handleCancle">取消</view>
+			<view class="btn save" @click="handleSave">保存</view>
+		</view>
+	</view>
+</template>
+
+<script setup>
+import { ref, nextTick } from 'vue'
+import backlogVue from '../backlog/backlog.vue'
+import { onLoad } from '@dcloudio/uni-app'
+import { myRequest } from '../../utils/api'
+
+// 年级数组
+// const gradeArray = ref(['2022', '2023', '2024', '2025'])
+// 当前选择的年级索引
+// const gradeCurrentIndex = ref(0)
+
+// 班级数组
+// const classArray = ref(['1班', '2班', '3班', '4班'])
+// 当前选择的班级索引
+// const classCurrentIndex = ref(0)
+
+// 小程序审核数组
+const checkItems = ref([
+	{
+		value: 1,
+		name: '需要审核',
+		checked: false
+	},
+	{
+		value: 4,
+		name: '不需要审核',
+		checked: false
+	}
+])
+
+// 小程序推送数组
+const pushItems = ref([
+	{
+		value: 5,
+		name: '需要推送',
+		checked: false
+	},
+	{
+		value: 3,
+		name: '不需要推送',
+		checked: false
+	}
+])
+
+// 小程序核销数组
+const cancelItems = ref([
+	{
+		value: 6,
+		name: '需要核销',
+		checked: false
+	},
+	{
+		value: 9,
+		name: '不需要核销',
+		checked: false
+	}
+])
+
+// 大屏审核数组
+const checkItems_screen = ref([
+	{
+		value: 1,
+		name: '需要审核',
+		checked: false
+	},
+	{
+		value: 4,
+		name: '不需要审核',
+		checked: false
+	}
+])
+
+// 大屏推送数组
+const pushItems_screen = ref([
+	{
+		value: 5,
+		name: '需要推送',
+		checked: false
+	},
+	{
+		value: 3,
+		name: '不需要推送',
+		checked: false
+	}
+])
+
+// 大屏核销数组
+const cancelItems_screen = ref([
+	{
+		value: 6,
+		name: '需要核销',
+		checked: false
+	},
+	{
+		value: 9,
+		name: '不需要核销',
+		checked: false
+	}
+])
+
+// 门禁车闸数组
+const doorItems = ref([
+	{
+		value: 0,
+		name: '需要联动',
+		checked: false
+	},
+	{
+		value: 1,
+		name: '不需要联动',
+		checked: false
+	}
+])
+
+// 配置信息
+const configInfo = ref({})
+
+onLoad((options) => {
+	configInfo.value = JSON.parse(options.info)
+	// console.log(configInfo.value)
+
+	handleMatch(checkItems.value, configInfo.value.appAuditConfig)
+	handleMatch(pushItems.value, configInfo.value.appPushConfig)
+	handleMatch(cancelItems.value, configInfo.value.appCancelConfig)
+	handleMatch(checkItems_screen.value, configInfo.value.screenAuditConfig)
+	handleMatch(pushItems_screen.value, configInfo.value.screenPushConfig)
+	handleMatch(cancelItems_screen.value, configInfo.value.screenCancelConfig)
+	handleMatch(doorItems.value, configInfo.value.accessConfig)
+})
+
+// 勾选时的回调
+const checkboxChange = (list, item) => {
+	list.forEach((ele) => {
+		ele.checked = false
+	})
+	nextTick(() => {
+		item.checked = true
+	})
+}
+
+// 取消按钮回调
+const handleCancle = () => {
+	uni.navigateBack(1)
+}
+
+// 保存按钮回调
+const handleSave = async () => {
+	let appAuditConfig = handleMatchValue(checkItems.value)
+	let appPushConfig = handleMatchValue(pushItems.value)
+	let appCancelConfig = handleMatchValue(cancelItems.value)
+	let screenAuditConfig = handleMatchValue(checkItems_screen.value)
+	let screenPushConfig = handleMatchValue(pushItems_screen.value)
+	let screenCancelConfig = handleMatchValue(cancelItems_screen.value)
+	let accessConfig = handleMatchValue(doorItems.value)
+
+	const res = await myRequest({
+		url: '/wanzai/api/smartVisitorParentsConfig/update',
+		method: 'post',
+		data: {
+			id: configInfo.value.id,
+			classId: configInfo.value.classId,
+			appAuditConfig,
+			appPushConfig,
+			appCancelConfig,
+			screenAuditConfig,
+			screenPushConfig,
+			screenCancelConfig,
+			accessConfig
+		}
+	})
+	// console.log(res)
+	if (res.code == 200) {
+		uni.showToast({
+			title: res.message,
+			icon: 'none',
+			duration: 2000
+		})
+
+		setTimeout(() => {
+			uni.redirectTo({
+				url: '/pagesReservation/backlog/backlog'
+			})
+		}, 2000)
+	}
+}
+
+// 匹配出哪个是勾选上的
+const handleMatch = (list, v) => {
+	list.forEach((ele) => {
+		if (ele.value == v) {
+			ele.checked = true
+		}
+	})
+}
+
+// 匹配出当前勾选上的值
+const handleMatchValue = (list) => {
+	let Obj = list.find((ele) => ele.checked)
+	return Obj.value
+}
+</script>
+
+<style lang="scss" scoped>
+.set {
+	box-sizing: border-box;
+	padding: 30rpx 20rpx 150rpx;
+	min-height: 100vh;
+	background-color: #f1f6fe;
+
+	.box {
+		display: flex;
+		justify-content: space-between;
+		align-items: center;
+		margin-bottom: 20rpx;
+		height: 90rpx;
+		font-size: 28rpx;
+
+		.box_select {
+			display: flex;
+			justify-content: space-between;
+			align-items: center;
+			padding: 0 20rpx;
+			box-sizing: border-box;
+			width: 628rpx;
+			height: 90rpx;
+			border-radius: 15rpx;
+			background-color: #fff;
+
+			.img {
+				width: 33rpx;
+				height: 33rpx;
+			}
+		}
+	}
+
+	.setBox {
+		box-sizing: border-box;
+		padding: 0 30rpx;
+		width: 710rpx;
+		height: 847rpx;
+		background-color: #fff;
+
+		.title {
+			display: flex;
+			align-items: center;
+			height: 90rpx;
+			font-size: 28rpx;
+			font-weight: bold;
+
+			.circle {
+				margin-right: 20rpx;
+				width: 20rpx;
+				height: 20rpx;
+				border-radius: 50%;
+				background-color: #3464ff;
+			}
+		}
+
+		.checkbox_group {
+			display: flex;
+			align-items: center;
+			margin-bottom: 35rpx;
+
+			.checkbox {
+				display: flex;
+				align-items: center;
+				margin-right: 70rpx;
+			}
+		}
+	}
+
+	.btns {
+		display: flex;
+		justify-content: space-around;
+		align-items: center;
+		margin-top: 100rpx;
+		height: 100rpx;
+
+		.btn {
+			display: flex;
+			justify-content: center;
+			align-items: center;
+			width: 297rpx;
+			height: 100rpx;
+			font-size: 32rpx;
+			border-radius: 8rpx;
+		}
+
+		.cancel {
+			color: #0061ff;
+			border: 2rpx solid #0061ff;
+		}
+
+		.save {
+			color: #fff;
+			background-color: #0061ff;
+		}
+	}
+}
+</style>

BIN
static/images/close.png


BIN
static/images/uploading.png


+ 1 - 0
unpackage/dist/dev/mp-weixin/app.js

@@ -27,6 +27,7 @@ if (!Math) {
   "./pagesReservation/record/record.js";
   "./pagesReservation/backlog/backlog.js";
   "./pagesReservation/QRCode/QRCode.js";
+  "./pagesReservation/set/set.js";
   "./pagesWarning/home/home.js";
 }
 const _sfc_main = {

+ 2 - 1
unpackage/dist/dev/mp-weixin/app.json

@@ -29,7 +29,8 @@
         "register/register",
         "record/record",
         "backlog/backlog",
-        "QRCode/QRCode"
+        "QRCode/QRCode",
+        "set/set"
       ]
     },
     {

Разлика између датотеке није приказан због своје велике величине
+ 4871 - 0
unpackage/dist/dev/mp-weixin/common/vendor.js


+ 1 - 1
unpackage/dist/dev/mp-weixin/pages/bind/bind.js

@@ -56,7 +56,7 @@ const _sfc_main = {
       }
       if (!number.value) {
         common_vendor.index.showToast({
-          title: "请输入号",
+          title: "请输入号",
           icon: "none"
         });
         return false;

Разлика између датотеке није приказан због своје велике величине
+ 1 - 1
unpackage/dist/dev/mp-weixin/pages/bind/bind.wxml


+ 107 - 39
unpackage/dist/dev/mp-weixin/pagesReservation/backlog/backlog.js

@@ -1,15 +1,18 @@
 "use strict";
 const common_vendor = require("../../common/vendor.js");
 const utils_api = require("../../utils/api.js");
+const utils_des = require("../../utils/des.js");
 if (!Array) {
   const _easycom_uni_segmented_control2 = common_vendor.resolveComponent("uni-segmented-control");
+  const _easycom_uni_icons2 = common_vendor.resolveComponent("uni-icons");
   const _easycom_uni_popup2 = common_vendor.resolveComponent("uni-popup");
-  (_easycom_uni_segmented_control2 + _easycom_uni_popup2)();
+  (_easycom_uni_segmented_control2 + _easycom_uni_icons2 + _easycom_uni_popup2)();
 }
 const _easycom_uni_segmented_control = () => "../../uni_modules/uni-segmented-control/components/uni-segmented-control/uni-segmented-control.js";
+const _easycom_uni_icons = () => "../../uni_modules/uni-icons/components/uni-icons/uni-icons.js";
 const _easycom_uni_popup = () => "../../uni_modules/uni-popup/components/uni-popup/uni-popup.js";
 if (!Math) {
-  (_easycom_uni_segmented_control + NoData + _easycom_uni_popup + Tabber)();
+  (_easycom_uni_segmented_control + _easycom_uni_icons + NoData + _easycom_uni_popup + Tabber)();
 }
 const Tabber = () => "../../components/tabber.js";
 const NoData = () => "../../components/noData.js";
@@ -19,11 +22,14 @@ const _sfc_main = {
     const activeCurrent = common_vendor.ref(0);
     const currentPage = common_vendor.ref(1);
     const total = common_vendor.ref(0);
-    const controlList = ["待审核", "已拒绝", "已推送"];
+    const controlList = ["待审核", "已拒绝", "进校核销", "出校核销", "已完成"];
     const list = common_vendor.ref([]);
     const popup = common_vendor.ref(null);
     const popObj = common_vendor.ref({});
+    const showSet = common_vendor.ref(false);
+    const configInfo = common_vendor.ref({});
     common_vendor.onLoad(() => {
+      getConfig();
       getData();
     });
     common_vendor.onReachBottom(() => {
@@ -37,14 +43,39 @@ const _sfc_main = {
         });
       }
     });
+    const getConfig = async () => {
+      const res = await utils_api.myRequest({
+        url: "/wanzai/api/smartVisitorParentsConfig/getUserId",
+        data: {
+          userId: common_vendor.index.getStorageSync("userInfo").id
+        }
+      });
+      if (res.code == 200) {
+        showSet.value = true;
+        const result = JSON.parse(utils_des.decryptDes(res.data));
+        configInfo.value = result;
+      }
+    };
     const getData = async () => {
+      let type;
+      if (activeCurrent.value == 0) {
+        type = 1;
+      } else if (activeCurrent.value == 1) {
+        type = 2;
+      } else if (activeCurrent.value == 2) {
+        type = 7;
+      } else if (activeCurrent.value == 3) {
+        type = 8;
+      } else if (activeCurrent.value == 4) {
+        type = 9;
+      }
       const res = await utils_api.myRequest({
         url: "/wanzai/api/smartVisitor/visitingAgencys",
         data: {
           currentPage: currentPage.value,
           pageCount: 6,
           userId: common_vendor.index.getStorageSync("userInfo").id,
-          type: activeCurrent.value - 0 + 1
+          type
         }
       });
       const result = res.data;
@@ -63,33 +94,56 @@ const _sfc_main = {
       popObj.value = item;
       popup.value.open();
     };
-    const handleReject = (id) => {
-      handleExamine(id, 2);
+    const handleReject = (info) => {
+      handleExamine(info, 2);
     };
-    const handleAgree = (id) => {
-      handleExamine(id, 1);
+    const handleAgree = (info) => {
+      handleExamine(info, 4);
     };
-    const handleExamine = (id, type) => {
+    const handleExamine = (info, type) => {
       common_vendor.index.showModal({
         title: "提示",
-        content: type == 1 ? "确定同意并推送吗?" : "确定拒绝吗?",
+        content: type == 4 ? "确定同意吗?" : "确定拒绝吗?",
         success: (res) => {
           if (res.confirm) {
-            handleExamineReq(id, type);
+            if (info.visitorType == 1) {
+              handleExamineReq(info.id, type);
+            } else {
+              handleExamineReq_other(info.id, type);
+            }
           }
         }
       });
     };
     const handleExamineReq = async (id, type) => {
       await utils_api.myRequest({
-        url: "/wanzai/api/smartVisitor/examineRecord",
+        url: "/wanzai/api/smartVisitor/parentsAudit",
+        data: {
+          id,
+          type
+        }
+      });
+      common_vendor.index.showToast({
+        title: type == 4 ? "已同意该审核" : "已拒绝该审核",
+        icon: "success",
+        duration: 2e3
+      });
+      setTimeout(() => {
+        list.value = [];
+        currentPage.value = 1;
+        getData();
+      }, 2e3);
+    };
+    const handleExamineReq_other = async (id, type) => {
+      await utils_api.myRequest({
+        url: "/wanzai/api/smartVisitor/restsAudit",
         data: {
           id,
           type
         }
       });
       common_vendor.index.showToast({
-        title: type == 1 ? "已同意该审核" : "已拒绝该审核",
+        title: type == 4 ? "已同意该审核" : "已拒绝该审核",
         icon: "success",
         duration: 2e3
       });
@@ -102,6 +156,12 @@ const _sfc_main = {
     const closePop = () => {
       popup.value.close();
     };
+    const handleClickSet = () => {
+      let info = JSON.stringify(configInfo.value);
+      common_vendor.index.navigateTo({
+        url: `/pagesReservation/set/set?info=${info}`
+      });
+    };
     return (_ctx, _cache) => {
       return common_vendor.e({
         a: common_vendor.o(onClickItem),
@@ -134,48 +194,56 @@ const _sfc_main = {
             m: common_vendor.t(item.respondentName),
             n: item.statuStr == "待审核"
           }, item.statuStr == "待审核" ? {
-            o: common_vendor.o(($event) => handleReject(item.id), item.id),
-            p: common_vendor.o(($event) => handleAgree(item.id), item.id)
+            o: common_vendor.o(($event) => handleReject(item), item.id),
+            p: common_vendor.o(($event) => handleAgree(item), item.id)
           } : {}, {
             q: item.id,
             r: common_vendor.o(($event) => handleClick(item), item.id)
           });
         }),
-        d: !list.value.length
+        d: showSet.value
+      }, showSet.value ? {
+        e: common_vendor.p({
+          type: "gear-filled",
+          size: "18"
+        }),
+        f: common_vendor.o(handleClickSet)
+      } : {}, {
+        g: !list.value.length
       }, !list.value.length ? {} : {}, {
-        e: common_vendor.o(closePop),
-        f: popObj.value.statuStr == "待审核"
+        h: common_vendor.o(closePop),
+        i: popObj.value.statuStr == "待审核"
       }, popObj.value.statuStr == "待审核" ? {
-        g: common_vendor.t(popObj.value.statuStr)
+        j: common_vendor.t(popObj.value.statuStr)
       } : {}, {
-        h: popObj.value.statuStr == "已拒绝"
+        k: popObj.value.statuStr == "已拒绝"
       }, popObj.value.statuStr == "已拒绝" ? {
-        i: common_vendor.t(popObj.value.statuStr)
+        l: common_vendor.t(popObj.value.statuStr)
       } : {}, {
-        j: popObj.value.statuStr == "已推送"
+        m: popObj.value.statuStr == "已推送"
       }, popObj.value.statuStr == "已推送" ? {
-        k: common_vendor.t(popObj.value.statuStr)
+        n: common_vendor.t(popObj.value.statuStr)
       } : {}, {
-        l: common_vendor.t(popObj.value.visitorType === 1 ? "学生家长预约" : "其他访客预约"),
-        m: common_vendor.t(popObj.value.userName),
-        n: common_vendor.t(popObj.value.userPhone),
-        o: common_vendor.t(popObj.value.visitorTime),
-        p: common_vendor.t(popObj.value.userNumber),
-        q: common_vendor.t(popObj.value.visitReason),
-        r: common_vendor.t(popObj.value.carNum ? popObj.value.carNum : "无"),
-        s: common_vendor.t(popObj.value.peerNum ? popObj.value.carNum : "无"),
-        t: common_vendor.t(popObj.value.visitorType === 1 ? "受访学生" : "受访人"),
-        v: common_vendor.t(popObj.value.respondentName),
-        w: common_vendor.t(popObj.value.responcode || popObj.value.respondentPhone),
-        x: popObj.value.statuStr == "待审核"
+        o: common_vendor.t(popObj.value.visitorType === 1 ? "学生家长预约" : "其他访客预约"),
+        p: common_vendor.t(popObj.value.userName),
+        q: common_vendor.t(popObj.value.userPhone),
+        r: common_vendor.t(popObj.value.visitorTime),
+        s: common_vendor.t(popObj.value.userNumber),
+        t: common_vendor.t(popObj.value.visitReason),
+        v: common_vendor.t(popObj.value.carNum ? popObj.value.carNum : "无"),
+        w: common_vendor.t(popObj.value.peerNum ? popObj.value.carNum : "无"),
+        x: common_vendor.t(popObj.value.visitorType === 1 ? "受访学生" : "受访人"),
+        y: common_vendor.t(popObj.value.respondentName),
+        z: common_vendor.t(popObj.value.responcode || popObj.value.respondentPhone),
+        A: popObj.value.statuStr == "待审核"
       }, popObj.value.statuStr == "待审核" ? {
-        y: common_vendor.o(($event) => handleReject(popObj.value.id)),
-        z: common_vendor.o(($event) => handleAgree(popObj.value.id))
+        B: common_vendor.o(($event) => handleReject(popObj.value)),
+        C: common_vendor.o(($event) => handleAgree(popObj.value))
       } : {}, {
-        A: common_vendor.sr(popup, "a46ecdc3-2", {
+        D: common_vendor.sr(popup, "a46ecdc3-3", {
           "k": "popup"
         }),
-        B: common_vendor.p({
+        E: common_vendor.p({
           type: "center",
           ["is-mask-click"]: false
         })

+ 1 - 0
unpackage/dist/dev/mp-weixin/pagesReservation/backlog/backlog.json

@@ -3,6 +3,7 @@
   "enablePullDownRefresh": false,
   "usingComponents": {
     "uni-segmented-control": "../../uni_modules/uni-segmented-control/components/uni-segmented-control/uni-segmented-control",
+    "uni-icons": "../../uni_modules/uni-icons/components/uni-icons/uni-icons",
     "uni-popup": "../../uni_modules/uni-popup/components/uni-popup/uni-popup",
     "tabber": "../../components/tabber",
     "no-data": "../../components/noData"

Разлика између датотеке није приказан због своје велике величине
+ 1 - 1
unpackage/dist/dev/mp-weixin/pagesReservation/backlog/backlog.wxml


+ 14 - 0
unpackage/dist/dev/mp-weixin/pagesReservation/backlog/backlog.wxss

@@ -92,6 +92,20 @@
   width: 214rpx;
   background-color: #0061ff;
 }
+.container .set.data-v-a46ecdc3 {
+  position: fixed;
+  bottom: 310rpx;
+  right: 0;
+  display: flex;
+  justify-content: center;
+  align-items: center;
+  width: 169rpx;
+  height: 83rpx;
+  font-size: 28rpx;
+  border-radius: 110rpx 0 0 110rpx;
+  box-shadow: 0 2rpx 9rpx rgba(0, 0, 0, 0.25);
+  background-color: #fff;
+}
 .container .popup_box.data-v-a46ecdc3 {
   padding-bottom: 50rpx;
   width: 710rpx;

+ 16 - 2
unpackage/dist/dev/mp-weixin/pagesReservation/record/record.js

@@ -21,7 +21,7 @@ const _sfc_main = {
     const activeCurrent = common_vendor.ref(0);
     const currentPage = common_vendor.ref(1);
     const total = common_vendor.ref(0);
-    const controlList = ["全部", "待审核", "已拒绝", "已推送"];
+    const controlList = ["全部", "待审核", "已拒绝", "进校核销", "出校核销", "已完成"];
     const list = common_vendor.ref([]);
     const popup = common_vendor.ref(null);
     const popObj = common_vendor.ref({});
@@ -40,13 +40,27 @@ const _sfc_main = {
       }
     });
     const getData = async () => {
+      let type;
+      if (activeCurrent.value == 0) {
+        type = 0;
+      } else if (activeCurrent.value == 1) {
+        type = 1;
+      } else if (activeCurrent.value == 2) {
+        type = 2;
+      } else if (activeCurrent.value == 3) {
+        type = 7;
+      } else if (activeCurrent.value == 4) {
+        type = 8;
+      } else if (activeCurrent.value == 5) {
+        type = 9;
+      }
       const res = await utils_api.myRequest({
         url: "/wanzai/api/smartVisitor/appointmentPageRecord",
         data: {
           currentPage: currentPage.value,
           pageCount: 6,
           userId: common_vendor.index.getStorageSync("userInfo").id,
-          type: activeCurrent.value
+          type
         }
       });
       const result = JSON.parse(utils_des.decryptDes(res.data));

+ 105 - 19
unpackage/dist/dev/mp-weixin/pagesReservation/register/register.js

@@ -1,9 +1,12 @@
 "use strict";
 const common_vendor = require("../../common/vendor.js");
+const common_assets = require("../../common/assets.js");
 const utils_api = require("../../utils/api.js");
 const utils_formatTime = require("../../utils/formatTime.js");
 const utils_plate = require("../../utils/plate.js");
 const utils_des = require("../../utils/des.js");
+const utils_imageCompress = require("../../utils/imageCompress.js");
+const utils_cos = require("../../utils/cos.js");
 if (!Array) {
   const _easycom_uni_datetime_picker2 = common_vendor.resolveComponent("uni-datetime-picker");
   _easycom_uni_datetime_picker2();
@@ -22,12 +25,15 @@ const _sfc_main = {
     const visEndTime = common_vendor.ref("");
     const visIdNumber = common_vendor.ref("");
     const visReason = common_vendor.ref("");
+    const imgList = common_vendor.ref([]);
     const visCarNumber = common_vendor.ref("");
     const visPeopleNum = common_vendor.ref("");
     const list = common_vendor.ref([]);
     const passiveName = common_vendor.ref("");
     const passivePhone = common_vendor.ref("");
     const authValue = common_vendor.ref(false);
+    const maxImgCount = common_vendor.ref(3);
+    const cw = common_vendor.index.getSystemInfoSync().windowWidth;
     const btnFlag = common_vendor.computed(() => {
       const tem = list.value.some((item) => item.isChecked);
       if (visName.value && visPhone.value && visStartTime.value && visEndTime.value && [type.value === "1" && !visIdNumber.value] && visReason.value && [type.value === "1" && !list.value.length] && [type.value === "1" && !tem] && [type.value === "2" && !passiveName.value] && [
@@ -86,6 +92,7 @@ const _sfc_main = {
           visitReason: visReason.value,
           carNum: visCarNumber.value,
           peerNum: visPeopleNum.value ? visPeopleNum.value : 0,
+          image: imgList.value.join(","),
           students: temList
         }
       });
@@ -268,6 +275,62 @@ const _sfc_main = {
     const handleAuth = () => {
       authValue.value = !authValue.value;
     };
+    const uploadingImg = () => {
+      common_vendor.index.chooseMedia({
+        count: maxImgCount.value - imgList.value.length,
+        mediaType: ["image"],
+        sizeType: ["compressed"],
+        success: (res) => {
+          res.tempFiles.forEach((ele) => {
+            let canvasId = "zipCanvas";
+            let imagePath = ele.tempFilePath;
+            let limitSize = 1024 * 3;
+            let drawWidth = common_vendor.index.getSystemInfoSync().windowWidth;
+            utils_imageCompress.getLessLimitSizeImage(canvasId, imagePath, limitSize, drawWidth, (resPath) => {
+              handleUploadMini(resPath);
+            });
+          });
+        }
+      });
+    };
+    const handleUploadMini = (ele) => {
+      common_vendor.index.showLoading({
+        title: "上传中",
+        mask: true
+      });
+      let filePath = ele;
+      let Key = filePath.substr(filePath.lastIndexOf("/") + 1);
+      utils_cos.cos.postObject(
+        {
+          Bucket: "wanzai-1306339220",
+          Region: "ap-shanghai",
+          Key,
+          FilePath: filePath,
+          onProgress: (info) => {
+          }
+        },
+        (err, data) => {
+          if (err) {
+            console.log("上传失败", err);
+          } else {
+            console.log("上传成功", data);
+            common_vendor.index.hideLoading();
+            let imgUrl = "https://" + data.Location;
+            imgList.value.push(imgUrl);
+            console.log(imgList.value);
+          }
+        }
+      );
+    };
+    const handleDelete = (index) => {
+      imgList.value.splice(index, 1);
+    };
+    const handleLookImg = (urls, current) => {
+      common_vendor.index.previewImage({
+        urls,
+        current
+      });
+    };
     return (_ctx, _cache) => {
       return common_vendor.e({
         a: type.value == 1,
@@ -293,29 +356,49 @@ const _sfc_main = {
       } : {}, {
         r: visReason.value,
         s: common_vendor.o(($event) => visReason.value = $event.detail.value),
-        t: visCarNumber.value,
-        v: common_vendor.o(($event) => visCarNumber.value = $event.detail.value),
-        w: visPeopleNum.value,
-        x: common_vendor.o(common_vendor.m(($event) => visPeopleNum.value = $event.detail.value, {
+        t: type.value == 1
+      }, type.value == 1 ? {
+        v: common_vendor.t(maxImgCount.value)
+      } : {}, {
+        w: type.value == 1
+      }, type.value == 1 ? common_vendor.e({
+        x: common_vendor.f(imgList.value, (item, index, i0) => {
+          return {
+            a: item,
+            b: common_vendor.o(($event) => handleLookImg(imgList.value, index), item),
+            c: common_vendor.o(($event) => handleDelete(index), item),
+            d: item
+          };
+        }),
+        y: common_assets._imports_0$5,
+        z: imgList.value.length < maxImgCount.value
+      }, imgList.value.length < maxImgCount.value ? {
+        A: common_assets._imports_1,
+        B: common_vendor.o(uploadingImg)
+      } : {}) : {}, {
+        C: visCarNumber.value,
+        D: common_vendor.o(($event) => visCarNumber.value = $event.detail.value),
+        E: visPeopleNum.value,
+        F: common_vendor.o(common_vendor.m(($event) => visPeopleNum.value = $event.detail.value, {
           number: true
         })),
-        y: type.value == 2
+        G: type.value == 2
       }, type.value == 2 ? {
-        z: type.value == 2,
-        A: passiveName.value,
-        B: common_vendor.o(($event) => passiveName.value = $event.detail.value)
+        H: type.value == 2,
+        I: passiveName.value,
+        J: common_vendor.o(($event) => passiveName.value = $event.detail.value)
       } : {}, {
-        C: type.value == 2
+        K: type.value == 2
       }, type.value == 2 ? {
-        D: type.value == 2,
-        E: passivePhone.value,
-        F: common_vendor.o(($event) => passivePhone.value = $event.detail.value)
+        L: type.value == 2,
+        M: passivePhone.value,
+        N: common_vendor.o(($event) => passivePhone.value = $event.detail.value)
       } : {}, {
-        G: type.value == 1
+        O: type.value == 1
       }, type.value == 1 ? {} : {}, {
-        H: type.value == 1
+        P: type.value == 1
       }, type.value == 1 ? {
-        I: common_vendor.f(list.value, (item, k0, i0) => {
+        Q: common_vendor.f(list.value, (item, k0, i0) => {
           return {
             a: item.isChecked,
             b: common_vendor.t(item.name),
@@ -325,10 +408,13 @@ const _sfc_main = {
           };
         })
       } : {}, {
-        J: authValue.value,
-        K: common_vendor.o(handleAuth),
-        L: btnFlag.value ? 1 : "",
-        M: common_vendor.o(handleSubmit)
+        R: authValue.value,
+        S: common_vendor.o(handleAuth),
+        T: btnFlag.value ? 1 : "",
+        U: common_vendor.o(handleSubmit),
+        V: common_vendor.unref(cw) + "px",
+        W: common_vendor.unref(cw) + "px",
+        X: -1
       });
     };
   }

Разлика између датотеке није приказан због своје велике величине
+ 1 - 1
unpackage/dist/dev/mp-weixin/pagesReservation/register/register.wxml


+ 31 - 0
unpackage/dist/dev/mp-weixin/pagesReservation/register/register.wxss

@@ -23,6 +23,10 @@
 .container .body .body_box .box_key .key_icon.data-v-0b2c2ae2 {
   color: #d43030;
 }
+.container .body .body_box .box_key .span.data-v-0b2c2ae2 {
+  font-size: 20rpx;
+  color: #999999;
+}
 .container .body .body_box .box_value.data-v-0b2c2ae2 {
   display: flex;
   justify-content: flex-end;
@@ -42,6 +46,33 @@
 .container .body .body_box .box_value .activeTime.data-v-0b2c2ae2 {
   color: #000;
 }
+.container .body .filePicker.data-v-0b2c2ae2 {
+  display: flex;
+  margin-bottom: 20rpx;
+  height: 100rpx;
+}
+.container .body .filePicker .img_box.data-v-0b2c2ae2 {
+  position: relative;
+  margin-right: 20rpx;
+  width: 100rpx;
+  height: 100rpx;
+}
+.container .body .filePicker .img_box .img.data-v-0b2c2ae2 {
+  width: 100rpx;
+  height: 100rpx;
+}
+.container .body .filePicker .img_box .close.data-v-0b2c2ae2 {
+  position: absolute;
+  top: 0;
+  right: 0;
+  width: 40rpx;
+  height: 40rpx;
+  background-color: rgba(0, 0, 0, 0.3);
+}
+.container .body .filePicker .uploading.data-v-0b2c2ae2 {
+  width: 100rpx;
+  height: 100rpx;
+}
 .container .body .no_border.data-v-0b2c2ae2 {
   border: none;
 }

+ 2 - 1
unpackage/dist/dev/mp-weixin/project.config.json

@@ -15,7 +15,8 @@
       "ignore": [],
       "disablePlugins": [],
       "outputPath": ""
-    }
+    },
+    "ignoreUploadUnusedFiles": false
   },
   "compileType": "miniprogram",
   "libVersion": "latest",

+ 3 - 24
unpackage/dist/dev/mp-weixin/project.private.config.json

@@ -8,15 +8,8 @@
     "miniprogram": {
       "list": [
         {
-          "name": "pages/myMsg/myMsg",
-          "pathName": "pages/myMsg/myMsg",
-          "query": "",
-          "launchMode": "default",
-          "scene": null
-        },
-        {
-          "name": "pages/switch/switch",
-          "pathName": "pages/switch/switch",
+          "name": "pagesReservation/backlog/backlog",
+          "pathName": "pagesReservation/backlog/backlog",
           "query": "",
           "launchMode": "default",
           "scene": null
@@ -27,23 +20,9 @@
           "query": "",
           "launchMode": "default",
           "scene": null
-        },
-        {
-          "name": "pages/timeGroup/timeGroup",
-          "pathName": "pages/timeGroup/timeGroup",
-          "query": "",
-          "launchMode": "default",
-          "scene": null
-        },
-        {
-          "name": "pages/main/main",
-          "pathName": "pages/main/main",
-          "query": "",
-          "launchMode": "default",
-          "scene": null
         }
       ]
     }
   },
-  "libVersion": "3.3.2"
+  "libVersion": "3.4.5"
 }

+ 6 - 0
utils/cos.js

@@ -0,0 +1,6 @@
+import COS from "cos-wx-sdk-v5"
+export const cos = new COS({
+	SecretId: 'AKIDCPVZdcWIxgHpy5FYxVyPiqkZGrhdXUBg',
+	SecretKey: 'NkyCN3cz97qKaeXLvHOGxOcdS8f184pL',
+	SimpleUploadMethod: 'putObject',
+})

+ 124 - 0
utils/imageCompress.js

@@ -0,0 +1,124 @@
+//通过canvas将图片压缩至指定大小
+
+//判断图片大小是否满足需求,limitSize的单位是kb
+function imageSizeIsLessLimitSize(imagePath, limitSize, lessCallback, moreCallback) {
+	//获取文件信息
+	wx.getFileSystemManager().getFileInfo({
+		filePath: imagePath,
+		success: (res) => {
+			// console.log("压缩前图片大小", res.size / 1024, 'kb');
+			//如果图片太大了走moreCallback
+			if (res.size > 1024 * limitSize) {
+				moreCallback()
+			}
+			//图片满足要求了走lessCallback
+			else {
+				lessCallback()
+			}
+		}
+	})
+}
+
+//将图片画在画布上并获取画好之后的图片的路径
+function getCanvasImage(canvasId, imagePath, imageW, imageH, getImgSuccess) {
+
+	// 像素比
+	let pixelRatio
+	uni.getSystemInfo({
+		success: (res) => {
+			// console.log(res)
+			pixelRatio = res.devicePixelRatio
+		}
+	});
+
+	//创建画布内容
+	const ctx = wx.createCanvasContext(canvasId);
+
+	//图片画上去,imageW和imageH是画上去的尺寸,图像和画布间隔都是0
+	ctx.drawImage(imagePath, 0, 0, imageW / pixelRatio, imageH / pixelRatio);
+	//这里一定要加定时器,给足够的时间去画(所以每次递归最少要耗时200ms,多次递归很耗时!)
+	ctx.draw(false, setTimeout(() => {
+		//把当前画布指定区域的内容导出生成指定大小的图片,并返回文件路径
+		wx.canvasToTempFilePath({
+			canvasId: canvasId,
+			x: 0,
+			y: 0,
+			width: imageW / pixelRatio,
+			height: imageH / pixelRatio,
+			quality: 1, //最高质量
+			success: (res) => {
+				// console.log(res.tempFilePath);
+				//将取出的图片路径通过回调函数返回
+				getImgSuccess(res.tempFilePath);
+			}
+		})
+	}, 500));
+}
+
+//主函数,默认限制大小1024kb即1mb,drawWidth是绘画区域的大小
+//初始值传入为画布自身的边长(我们这是一个正方形的画布)
+function getLessLimitSizeImage(canvasId, imagePath, limitSize = 1024, drawWidth, callback) {
+	//判断图片尺寸是否满足要求
+	imageSizeIsLessLimitSize(imagePath, limitSize,
+		(lessRes) => {
+			//满足要求走callback,将压缩后的文件路径返回
+			callback(imagePath);
+		},
+		(moreRes) => {
+			//不满足要求需要压缩的时候
+			wx.getImageInfo({
+				src: imagePath,
+				success: (imageInfo) => {
+
+					let maxSide = Math.max(imageInfo.width, imageInfo.height);
+					let windowW = drawWidth;
+
+					let scale = 1;
+					/*
+					这里的目的是当绘画区域缩小的比图片自身尺寸还要小的时候
+					取图片长宽的最大值,然后和当前绘画区域计算出需要放缩的比例
+					然后再画经过放缩后的尺寸,保证画出的一定是一个完整的图片。由于每次递归绘画区域都会缩小,
+					所以不用担心scale永远都是1绘画尺寸永远不变的情况,只要不满足压缩后体积的要求
+					就会缩小绘画区域,早晚会有绘画区域小于图片尺寸的情况发生
+					*/
+					if (maxSide > windowW) {
+						scale = windowW / maxSide;
+					}
+
+					let imgW
+					let imgH
+
+					// 判断图片是否翻转了
+					if (imageInfo.orientation.indexOf('right') !== -1 || imageInfo.orientation.indexOf(
+							'left') !== -1) {
+						//trunc是去掉小数
+						imgW = Math.trunc(imageInfo.height * scale);
+						imgH = Math.trunc(imageInfo.width * scale);
+					} else {
+						imgW = Math.trunc(imageInfo.width * scale);
+						imgH = Math.trunc(imageInfo.height * scale);
+					}
+
+					// console.log('调用压缩', imgW, imgH);
+
+					//图片在规定绘画区域上画并获取新的图片的path
+					getCanvasImage(canvasId, imagePath, imgW, imgH,
+						(pressImgPath) => {
+							/*
+							再去检查是否满足要求,始终缩小绘画区域,让图片适配绘画区域
+							这里乘以0.95是必须的,如果不缩小绘画区域,会出现尺寸比绘画区域小,
+							而体积比要求压缩体积大的情况出现,就会无穷递归下去,因为scale的值永远是1
+							但0.95不是固定的,你可以根据需要自己改,0到1之间,越小则绘画区域缩小的越快
+							但不建议取得太小,绘画区域缩小的太快,压出来的将总是很糊的
+							*/
+							getLessLimitSizeImage(canvasId, pressImgPath, limitSize, drawWidth *
+								0.95, callback);
+						}
+					)
+				}
+			})
+		}
+	)
+}
+
+export default getLessLimitSizeImage