xiaoxin 2 yıl önce
ebeveyn
işleme
0b6662c2b2
70 değiştirilmiş dosya ile 1867 ekleme ve 1158 silme
  1. 10 1
      components/headerInput.vue
  2. 4 4
      components/listView.vue
  3. 1 0
      components/noData.vue
  4. 8 5
      components/tabber.vue
  5. 6 0
      pages.json
  6. 105 6
      pages/bind/bind.vue
  7. 20 8
      pages/change/change.vue
  8. 2 2
      pages/grade/grade.vue
  9. 97 31
      pages/home/home.vue
  10. 21 208
      pages/index/index.vue
  11. 240 0
      pages/login/login.vue
  12. 15 4
      pages/myCenter/myCenter.vue
  13. 72 28
      pages/myMsg/myMsg.vue
  14. 77 4
      pages/quickMark/quickMark.vue
  15. 1 1
      pages/student/student.vue
  16. 48 38
      pages/track/track.vue
  17. 85 65
      pagesReservation/backlog/backlog.vue
  18. 42 11
      pagesReservation/record/record.vue
  19. 12 6
      pagesReservation/register/register.vue
  20. 6 6
      pagesReservation/reservation/reservation.vue
  21. 126 59
      pagesWarning/home/home.vue
  22. BIN
      static/images/icon.png
  23. 248 284
      uni_modules/uv-steps/components/uv-steps-item/uv-steps-item.vue
  24. 1 0
      unpackage/dist/dev/mp-weixin/app.js
  25. 1 0
      unpackage/dist/dev/mp-weixin/app.json
  26. 2 0
      unpackage/dist/dev/mp-weixin/common/vendor.js
  27. 7 1
      unpackage/dist/dev/mp-weixin/components/headerInput.js
  28. 3 4
      unpackage/dist/dev/mp-weixin/components/listView.js
  29. 5 3
      unpackage/dist/dev/mp-weixin/components/tabber.js
  30. 83 1
      unpackage/dist/dev/mp-weixin/pages/bind/bind.js
  31. 1 1
      unpackage/dist/dev/mp-weixin/pages/bind/bind.wxml
  32. 6 1
      unpackage/dist/dev/mp-weixin/pages/bind/bind.wxss
  33. 18 8
      unpackage/dist/dev/mp-weixin/pages/change/change.js
  34. 1 1
      unpackage/dist/dev/mp-weixin/pages/change/change.wxml
  35. 1 1
      unpackage/dist/dev/mp-weixin/pages/grade/grade.js
  36. 1 1
      unpackage/dist/dev/mp-weixin/pages/grade/grade.wxss
  37. 100 34
      unpackage/dist/dev/mp-weixin/pages/home/home.js
  38. 2 1
      unpackage/dist/dev/mp-weixin/pages/home/home.json
  39. 1 1
      unpackage/dist/dev/mp-weixin/pages/home/home.wxml
  40. 21 79
      unpackage/dist/dev/mp-weixin/pages/index/index.js
  41. 2 4
      unpackage/dist/dev/mp-weixin/pages/index/index.json
  42. 1 1
      unpackage/dist/dev/mp-weixin/pages/index/index.wxml
  43. 0 67
      unpackage/dist/dev/mp-weixin/pages/index/index.wxss
  44. 8 1
      unpackage/dist/dev/mp-weixin/pages/myCenter/myCenter.js
  45. 1 1
      unpackage/dist/dev/mp-weixin/pages/myCenter/myCenter.wxml
  46. 55 6
      unpackage/dist/dev/mp-weixin/pages/myMsg/myMsg.js
  47. 1 1
      unpackage/dist/dev/mp-weixin/pages/myMsg/myMsg.wxml
  48. 5 0
      unpackage/dist/dev/mp-weixin/pages/myMsg/myMsg.wxss
  49. 58 2
      unpackage/dist/dev/mp-weixin/pages/quickMark/quickMark.js
  50. 1 1
      unpackage/dist/dev/mp-weixin/pages/student/student.wxss
  51. 49 48
      unpackage/dist/dev/mp-weixin/pages/track/track.js
  52. 2 1
      unpackage/dist/dev/mp-weixin/pages/track/track.json
  53. 1 1
      unpackage/dist/dev/mp-weixin/pages/track/track.wxml
  54. 5 0
      unpackage/dist/dev/mp-weixin/pages/track/track.wxss
  55. 88 75
      unpackage/dist/dev/mp-weixin/pagesReservation/backlog/backlog.js
  56. 2 1
      unpackage/dist/dev/mp-weixin/pagesReservation/backlog/backlog.json
  57. 1 1
      unpackage/dist/dev/mp-weixin/pagesReservation/backlog/backlog.wxml
  58. 7 1
      unpackage/dist/dev/mp-weixin/pagesReservation/backlog/backlog.wxss
  59. 41 8
      unpackage/dist/dev/mp-weixin/pagesReservation/record/record.js
  60. 1 1
      unpackage/dist/dev/mp-weixin/pagesReservation/record/record.wxml
  61. 5 1
      unpackage/dist/dev/mp-weixin/pagesReservation/record/record.wxss
  62. 11 6
      unpackage/dist/dev/mp-weixin/pagesReservation/register/register.js
  63. 6 7
      unpackage/dist/dev/mp-weixin/pagesReservation/reservation/reservation.js
  64. 1 1
      unpackage/dist/dev/mp-weixin/pagesReservation/reservation/reservation.wxss
  65. 3 2
      unpackage/dist/dev/mp-weixin/project.private.config.json
  66. BIN
      unpackage/dist/dev/mp-weixin/static/images/icon.png
  67. 3 8
      unpackage/dist/dev/mp-weixin/uni_modules/uv-steps/components/uv-steps-item/uv-steps-item.js
  68. 1 1
      unpackage/dist/dev/mp-weixin/uni_modules/uv-steps/components/uv-steps-item/uv-steps-item.wxss
  69. 3 3
      utils/api.js
  70. 5 0
      utils/previewImage.js

+ 10 - 1
components/headerInput.vue

@@ -6,10 +6,19 @@
 </template>
 
 <script setup>
+import { ref } from 'vue'
+
 const $emit = defineEmits(['changeInputValue'])
 
+const timer = ref(null)
+
 const handleInput = (e) => {
-	$emit('changeInputValue', e.detail.value)
+	if (timer.value) {
+		clearTimeout(timer.value)
+	}
+	timer.value = setTimeout(() => {
+		$emit('changeInputValue', e.detail.value)
+	}, 500)
 }
 </script>
 

+ 4 - 4
components/listView.vue

@@ -20,15 +20,15 @@ onLoad(() => {})
 
 // 点击每一个学生回调
 const goPage = (id) => {
-	console.log(id)
+	// console.log(id)
 
-	if (props.appType == '通讯录') {
+	if (props.appType == '学生轨迹') {
 		uni.navigateTo({
-			url: '/pages/student/student'
+			url: `/pages/track/track?id=${id}`
 		})
 	} else {
 		uni.navigateTo({
-			url: '/pages/track/track'
+			url: '/pages/student/student'
 		})
 	}
 }

+ 1 - 0
components/noData.vue

@@ -12,6 +12,7 @@
 	display: flex;
 	flex-direction: column;
 	align-items: center;
+	padding-bottom: 65rpx;
 
 	.img {
 		margin-top: 160rpx;

+ 8 - 5
components/tabber.vue

@@ -8,8 +8,9 @@
 import { ref } from 'vue'
 import { onLoad } from '@dcloudio/uni-app'
 
+// 展示的导航栏
 const allList = ref([])
-// 导航栏数组
+// 教师权限导航栏数组
 const tabList = ref([
 	{
 		id: 1,
@@ -27,7 +28,7 @@ const tabList = ref([
 		icon: 'clock'
 	}
 ])
-
+// 家长权限导航栏数组
 const tabList2 = ref([
 	{
 		id: 1,
@@ -50,11 +51,13 @@ const customStyle = {
 }
 
 onLoad(() => {
-	const userType = uni.getStorageSync('userType')
+	const userType = uni.getStorageSync('userInfo').identityId
 
-	if (userType == 0) {
+	if (userType == 1) {
+		allList.value = tabList2.value
+	} else if (userType == 2) {
 		allList.value = tabList2.value
-	} else {
+	} else if (userType == 3) {
 		allList.value = tabList.value
 	}
 	const i = uni.getStorageSync('Tab-activeIndex')

+ 6 - 0
pages.json

@@ -2,6 +2,12 @@
 	"pages": [{
 			"path": "pages/index/index",
 			"style": {
+				"navigationBarTitleText": "授权"
+			}
+		},
+		{
+			"path": "pages/login/login",
+			"style": {
 				"navigationBarTitleText": "登录"
 			}
 		},

+ 105 - 6
pages/bind/bind.vue

@@ -3,17 +3,22 @@
 		<view class="body">
 			<!-- 输入框区域 -->
 			<view class="body_row mt-40">
-				姓名
-				<input class="row_input" type="text" placeholder="请输入姓名" placeholder-style="color:#CCCCCC" />
+				<view class="row_text">姓名</view>
+				<input class="row_input" type="text" placeholder="请输入姓名" placeholder-style="color:#CCCCCC" v-model="name" />
 			</view>
 
 			<view class="body_row mt-30">
-				编号
-				<input class="row_input" type="text" placeholder="请输入编号" placeholder-style="color:#CCCCCC" />
+				<view class="row_text">编号</view>
+				<input class="row_input" type="number" placeholder="请输入编号" placeholder-style="color:#CCCCCC" v-model="number" />
+			</view>
+
+			<view class="body_row mt-30">
+				<view class="row_text">身份证</view>
+				<input class="row_input" type="number" placeholder="请输入身份证" placeholder-style="color:#CCCCCC" v-model="identity" />
 			</view>
 
 			<!-- 确定按钮区域 -->
-			<view class="body_btn">确认</view>
+			<view class="body_btn" @click="handleConfirm">确认</view>
 		</view>
 	</view>
 </template>
@@ -21,8 +26,96 @@
 <script setup>
 import { ref } from 'vue'
 import { onLoad } from '@dcloudio/uni-app'
+import { myRequest } from '@/utils/api.js'
+
+// 姓名
+const name = ref('')
+// 编号
+const number = ref('')
+// 身份证号码
+const identity = ref('')
 
 onLoad(() => {})
+
+// 点击确认按钮回调
+const handleConfirm = () => {
+	const flag = verifyValue()
+	if (flag) {
+		bindReq()
+	}
+}
+
+// 绑定请求
+const bindReq = async () => {
+	const res = await myRequest({
+		url: '/wanzai/api/smartUser/bindStudent',
+		method: 'post',
+		data: {
+			userId: uni.getStorageSync('userInfo').id,
+			name: name.value,
+			cardNo: number.value,
+			idCard: identity.value
+		}
+	})
+	// console.log(res)
+	uni.showToast({
+		title: res.message,
+		icon: 'none',
+		duration: 2000
+	})
+	if (res.code == 200) {
+		setTimeout(() => {
+			uni.redirectTo({
+				url: '/pages/home/home'
+			})
+		}, 2000)
+	}
+}
+
+// 验证表格数据是否符合规范
+const verifyValue = () => {
+	// 姓名验证规则
+	const regName = /^[\u4e00-\u9fa5]{2,4}$/
+	// 身份证号码验证规则
+	const regIdentity = /(^\d{15}$)|(^\d{18}$)|(^\d{17}(\d|X|x)$)/
+
+	if (!name.value) {
+		uni.showToast({
+			title: '请输入姓名',
+			icon: 'none'
+		})
+		return false
+	}
+	if (!regName.test(name.value)) {
+		uni.showToast({
+			title: '姓名格式错误',
+			icon: 'none'
+		})
+		return false
+	}
+	if (!number.value) {
+		uni.showToast({
+			title: '请输入编号',
+			icon: 'none'
+		})
+		return false
+	}
+	if (!identity.value) {
+		uni.showToast({
+			title: '请输入身份证',
+			icon: 'none'
+		})
+		return false
+	}
+	if (!regIdentity.test(identity.value)) {
+		uni.showToast({
+			title: '证件号格式错误',
+			icon: 'none'
+		})
+		return false
+	}
+	return true
+}
 </script>
 
 <style lang="scss" scoped>
@@ -46,10 +139,16 @@ onLoad(() => {})
 			height: 90rpx;
 			font-size: 28rpx;
 
+			.row_text {
+				flex: 1;
+				padding-right: 30rpx;
+				text-align-last: justify;
+			}
+
 			.row_input {
 				box-sizing: border-box;
 				padding: 0 30rpx;
-				width: 628rpx;
+				width: 590rpx;
 				height: 90rpx;
 				border-radius: 15rpx;
 				background-color: #f2f2f2;

+ 20 - 8
pages/change/change.vue

@@ -6,12 +6,12 @@
 				<radio class="box_radio" :checked="item.isCheck" color="#1E7DFB" />
 				<view class="box_info">
 					<view class="">{{ item.name }}</view>
-					<view class="">{{ item.number }}</view>
+					<view class="">{{ item.cardNo }}</view>
 				</view>
 			</view>
 
 			<!-- 确认按钮区域 -->
-			<view class="body_btn">确认</view>
+			<view class="body_btn" @click="handleConfirm">确认</view>
 		</view>
 	</view>
 </template>
@@ -20,14 +20,19 @@
 import { ref } from 'vue'
 import { onLoad } from '@dcloudio/uni-app'
 
-onLoad(() => {})
+onLoad((options) => {
+	list.value = JSON.parse(options.list) || []
+	currentId.value = options.id
+	list.value.forEach((ele) => {
+		if (ele.id == currentId.value) {
+			ele.isCheck = true
+		}
+	})
+})
 
+const currentId = ref()
 // 小孩列表数据
-const list = ref([
-	{ id: 1, name: '张三', number: '26105615262', isCheck: false },
-	{ id: 2, name: '李四', number: '26105615262', isCheck: false },
-	{ id: 3, name: '王五', number: '26105615262', isCheck: false }
-])
+const list = ref([])
 
 const change = (item) => {
 	list.value.forEach((ele) => {
@@ -35,6 +40,13 @@ const change = (item) => {
 	})
 	item.isCheck = !item.isCheck
 }
+
+// 确认按钮回调
+const handleConfirm = () => {
+	const temObj = list.value.find((ele) => ele.isCheck)
+	uni.$emit('updateObj', temObj)
+	uni.navigateBack(1)
+}
 </script>
 
 <style lang="scss" scoped>

+ 2 - 2
pages/grade/grade.vue

@@ -45,7 +45,7 @@ const list = ref([
 const appType = ref('')
 
 onLoad((options) => {
-	appType.value = options.type
+	appType.value = options.type || ''
 })
 
 // 输入框组件自定义事件
@@ -66,7 +66,7 @@ const changeInputValue = (data) => {
 	.img_bg {
 		position: absolute;
 		top: -70rpx;
-		right: -32rpx;
+		right: 0;
 		width: 589rpx;
 		height: 320rpx;
 		pointer-events: none;

+ 97 - 31
pages/home/home.vue

@@ -17,9 +17,12 @@
 			<!-- 学校名称区域 -->
 			<view class="header_school">万载县第三中学</view>
 			<!-- 学生姓名区域 -->
-			<view class="header_name">张三</view>
+			<view class="header_name">{{ userInfo.name }}</view>
 			<!-- 学生年级区域 -->
-			<view class="header_grade">{{ userType === 0 ? '家长' : '教师' }}</view>
+			<view class="header_grade" v-if="userInfo.identityId == 1">家长</view>
+			<view class="header_grade" v-if="userInfo.identityId == 2">学生</view>
+			<view class="header_grade" v-if="userInfo.identityId == 3">教师</view>
+
 			<!-- 二维码区域 -->
 			<view class="header_code">
 				<uv-qrcode ref="qrcodeRef" size="82rpx" :value="QRCodeUrl" :options="options" @click="handleClickCode"></uv-qrcode>
@@ -29,15 +32,17 @@
 		<!-- 详细信息区域 -->
 		<view class="body">
 			<!-- 个人信息区域 -->
-			<view class="body_header" v-if="userType == 0">
+			<view class="body_header" v-if="userInfo.identityId == 1">
 				<img class="info_bg" src="../../static/images/info-bg.png" />
 
-				<img class="info_img" src="../../static/images/user-photo.png" />
-				<view class="info_name">王佳明</view>
+				<img v-if="childMsgList.length" mode="aspectFill" class="info_img" :src="currentChild.headImage || '../../static/images/user-photo.png'" />
+				<view v-if="childMsgList.length" class="info_name">{{ currentChild.name }}</view>
 
-				<view class="info_detail" @click="goPage('/pages/myMsg/myMsg')">个人信息></view>
+				<view v-if="childMsgList.length" class="info_detail" @click="goPage(`/pages/myMsg/myMsg?id=${currentChild.id}`)">孩子信息></view>
 
-				<view class="info_change" @click="goPage('/pages/change/change')">切换 ></view>
+				<view v-if="childMsgList.length > 1" class="info_change" @click="goPage(`/pages/change/change?list=${JSON.stringify(childMsgList)}&id=${currentChild.id}`)">
+					切换 >
+				</view>
 
 				<!-- 关联区域 -->
 				<view class="info_bind">
@@ -47,20 +52,24 @@
 			</view>
 
 			<!-- 应用列表区域 -->
-			<view class="body_list">
+			<view class="body_list" v-if="useAppList.length">
 				<!-- 每一个应用区域 -->
 				<view class="list_box" v-for="item in useAppList" :key="item.id" @click="goPage(item.path)">
 					<img class="box_img" :src="item.url" />
 					{{ item.title }}
 				</view>
 			</view>
+
+			<NoData v-if="!useAppList.length" />
 		</view>
 	</view>
 </template>
 
 <script setup>
 import { ref } from 'vue'
-import { onLoad, onPageScroll, onPullDownRefresh } from '@dcloudio/uni-app'
+import { onLoad, onPageScroll, onPullDownRefresh, onShow } from '@dcloudio/uni-app'
+import { myRequest } from '@/utils/api.js'
+import NoData from '@/components/noData.vue'
 
 onLoad(() => {
 	// 获取系统信息
@@ -74,19 +83,31 @@ onLoad(() => {
 		}
 	})
 
-	userType.value = uni.getStorageSync('userType')
-	console.log('身份类型', userType.value)
+	userInfo.value = uni.getStorageSync('userInfo')
 
-	// 获取权限app
-	const appList = uni.getStorageSync('appList')
-	if (appList) {
-		useAppList.value = filterApp(list.value, appList)
+	if (userInfo.value.identityId == 1) {
+		getChildMsg()
 	}
+
+	// 获取用户应用权限列表
+	getUseAppList()
+
+	uni.$on('updateObj', updateObj)
+})
+
+onShow(() => {
+	// 获取身份码信息
+	getQrcode()
 })
 
 // 页面下拉刷新回调
 onPullDownRefresh(() => {
+	getQrcode()
 	qrcodeRef.value.remake()
+	if (userInfo.value.identityId == 1) {
+		getChildMsg()
+	}
+	getUseAppList()
 	setTimeout(() => {
 		uni.stopPullDownRefresh()
 	}, 1500)
@@ -100,7 +121,14 @@ onPageScroll((e) => {
 	}
 })
 
-const userType = ref()
+// 用户信息
+const userInfo = ref({})
+
+// 绑定小孩信息
+const childMsgList = ref([])
+
+// 当前展示的小孩信息
+const currentChild = ref({})
 
 // 顶部导航栏显示隐藏控制
 const showHeader = ref(false)
@@ -119,32 +147,27 @@ const list = ref([
 	{
 		id: 3,
 		title: '学生轨迹',
-		url: '../../static/images/icon.png',
 		path: '/pages/track/track'
 	},
 	{
 		id: 7,
 		title: '消息通知',
-		url: '../../static/images/icon.png',
 		path: '/pages/msgWarn/msgWarn'
 	},
 	{
 		id: 8,
 		title: '访客预约',
-		url: '../../static/images/icon.png',
 		path: '/pagesReservation/reservation/reservation'
 	},
 	{
 		id: 10,
 		title: '校园预警',
-		url: '../../static/images/icon.png',
 		path: '/pagesWarning/home/home'
 	},
 	{
 		id: 11,
 		title: '通讯录',
-		url: '../../static/images/icon.png',
-		path: '/pages/grade/grade?type=通讯录'
+		path: '/pages/grade/grade'
 	}
 ])
 
@@ -152,19 +175,65 @@ const list = ref([
 const useAppList = ref([])
 
 // 二维码信息
-const QRCodeUrl = ref('123')
+const QRCodeUrl = ref('')
 
 // 二维码自定义样式
 const options = {
-	typeNumber: 4,
+	typeNumber: -1,
 	foregroundImageBorderRadius: 5,
 	foregroundImageSrc: '/static/images/school-logo.jpg'
 }
 
+// 获取身份码信息
+const getQrcode = async () => {
+	const res = await myRequest({
+		url: '/wanzai/api/smartQrcode/generateQrcode',
+		data: {
+			userId: uni.getStorageSync('userInfo').id
+		}
+	})
+	// console.log(res)
+	QRCodeUrl.value = res.data.qrcode
+}
+
+// 获取绑定小孩的信息
+const getChildMsg = async () => {
+	const res = await myRequest({
+		url: '/wanzai/api/smartUser/queryAffiliateUserById',
+		data: {
+			id: uni.getStorageSync('userInfo').id
+		}
+	})
+	// console.log(res)
+	childMsgList.value = res.data
+
+	if (childMsgList.value.length) {
+		currentChild.value = childMsgList.value[0]
+	}
+}
+
+// 获取用户应用权限列表
+const getUseAppList = async () => {
+	const res = await myRequest({
+		url: '/wanzai/api/smartIdentity/queryIdentityApplyById',
+		data: {
+			id: uni.getStorageSync('userInfo').identityId
+		}
+	})
+	// console.log(res)
+	useAppList.value = res.data
+}
+
 // 跳转页面函数
 const goPage = (url) => {
 	if (url === '/pages/track/track') {
-		if (userType.value == 1) {
+		if (userInfo.value.identityId == 1) {
+			uni.navigateTo({
+				url: `/pages/track/track?id=${currentChild.value.id}`
+			})
+			return
+		}
+		if (userInfo.value.identityId == 3) {
 			uni.navigateTo({
 				url: '/pages/grade/grade?type=学生轨迹'
 			})
@@ -186,11 +255,8 @@ const handleClickCode = () => {
 	})
 }
 
-// 过滤方法
-const filterApp = (arr1, arr2) => {
-	return arr1.filter((item) => {
-		return arr2.includes(item.title)
-	})
+const updateObj = (data) => {
+	currentChild.value = data
 }
 </script>
 
@@ -394,4 +460,4 @@ const filterApp = (arr1, arr2) => {
 		}
 	}
 }
-</style>
+</style>

+ 21 - 208
pages/index/index.vue

@@ -1,231 +1,44 @@
 <template>
-	<view class="container">
-		<img class="img" src="@/static/images/school-logo.jpg" />
-		<view class="logo_name">万载三中</view>
-
-		<!-- 手机号码输入框区域 -->
-		<view class="phone">
-			<input class="phone_input" type="text" placeholder="手机号" placeholder-style="color:#CCCCCC;" v-model="phone" />
-		</view>
-
-		<!-- 验证码区域 -->
-		<view class="code">
-			<input class="code_input" type="text" placeholder="验证码" placeholder-style="color:#CCCCCC;" v-model="codeValue" />
-
-			<uv-code uniqueKey="login" keepRunning ref="codeDom" @change="codeChange"></uv-code>
-			<view class="code_box" @click="getCode">{{ tips }}</view>
-		</view>
-
-		<!-- 登录按钮区域 -->
-		<view class="loginBtn" :class="{ active: btnFlag }" @click="handleLogin">登录</view>
-	</view>
+	<view class="container"></view>
 </template>
 
 <script setup>
-import { ref, computed } from 'vue'
 import { onLoad } from '@dcloudio/uni-app'
 import { myRequest } from '@/utils/api.js'
 
-// 手机号码
-const phone = ref('')
-// 验证码
-const codeValue = ref('')
-// 验证码Dom
-const codeDom = ref(null)
-// 登录按钮是否高亮
-const btnFlag = computed(() => {
-	// 手机号码验证规则
-	const regPhone = /^1[3-9]\d{9}$/
-	if (phone.value && regPhone.test(phone.value) && codeValue.value) {
-		return true
-	} else {
-		return false
-	}
+onLoad(() => {
+	uni.login({
+		success: (res) => {
+			vertify(res.code)
+		}
+	})
 })
 
-// 提示语
-const tips = ref('')
-
-// 家长
-const plist = ref(['学生轨迹', '消息通知', '访客预约', '校园预警'])
-
-// 老师
-const tlist = ref(['学生轨迹', '消息通知', '访客预约', '校园预警', '通讯录'])
-
-onLoad(() => {})
-
-// 获取验证码按钮点击回调
-const getCode = () => {
-	// 手机号码验证规则
-	const regPhone = /^1[3-9]\d{9}$/
-	if (phone.value && regPhone.test(phone.value)) {
-		if (codeDom.value.canGetCode) {
-			// 模拟向后端请求验证码
-			uni.showLoading({
-				title: '正在获取验证码'
-			})
-			setTimeout(() => {
-				uni.hideLoading()
-				uni.showToast({
-					title: '验证码已发送',
-					icon: 'none'
-				})
-				codeDom.value.start()
-			}, 2000)
-		} else {
-			uni.showToast({
-				title: '倒计时结束后再发送',
-				icon: 'none'
-			})
+const vertify = async (code) => {
+	const res = await myRequest({
+		url: '/wanzai/api/wechat/vertify',
+		data: {
+			code
 		}
-	} else {
-		uni.showToast({
-			title: '请先输入正确的手机号码',
-			icon: 'none'
-		})
-	}
-}
-
-// 登录按钮回调
-const handleLogin = () => {
-	// const flag = verifyValue()
-	// if (flag) {
-	// 	uni.setStorageSync('userId', 25)
-	// 	uni.setStorageSync('userType', 1)
-	// 	uni.navigateTo({
-	// 		url: '/pages/home/home'
-	// 	})
-	// }
-	// 0 代表家长  1 代表老师
-	let userType = 1
-	uni.setStorageSync('userType', userType)
-	if (userType == 0) {
-		uni.setStorageSync('appList', plist.value)
-		uni.setStorageSync('userId', 25)
-	} else {
-		uni.setStorageSync('appList', tlist.value)
-		uni.setStorageSync('userId', 26)
-	}
-	uni.navigateTo({
-		url: '/pages/home/home'
 	})
-}
-
-// 验证表格数据是否符合规范
-const verifyValue = () => {
-	// 手机号码验证规则
-	const regPhone = /^1[3-9]\d{9}$/
-
-	if (!phone.value) {
-		uni.showToast({
-			title: '请输入手机号',
-			icon: 'none'
-		})
-		return false
-	}
-
-	if (!regPhone.test(phone.value)) {
-		uni.showToast({
-			title: '手机号码格式错误',
-			icon: 'none'
+	// console.log(res)
+	if (res.code == 200) {
+		uni.setStorageSync('token', JSON.parse(res.message).token)
+		uni.setStorageSync('userInfo', JSON.parse(res.message).user[0])
+		uni.redirectTo({
+			url: '/pages/home/home'
 		})
-		return false
-	}
-
-	if (!codeValue.value) {
-		uni.showToast({
-			title: '请输入验证码',
-			icon: 'none'
+	} else {
+		uni.redirectTo({
+			url: '/pages/login/login'
 		})
-		return false
 	}
-	return true
-}
-
-const codeChange = (text) => {
-	tips.value = text
 }
 </script>
 
 <style lang="scss" scoped>
 .container {
-	display: flex;
-	flex-direction: column;
-	align-items: center;
 	min-height: 100vh;
 	background-color: #f8f8fa;
-
-	.img {
-		margin-top: 120rpx;
-		width: 200rpx;
-		height: 200rpx;
-		border-radius: 20rpx;
-	}
-
-	.logo_name {
-		margin-top: 25rpx;
-		font-size: 36rpx;
-	}
-
-	.phone {
-		box-sizing: border-box;
-		margin-top: 80rpx;
-		padding: 0 20rpx;
-		width: 538rpx;
-		height: 80rpx;
-		border-radius: 8rpx;
-		box-shadow: 0 0 10rpx #ccc;
-		background-color: #fff;
-
-		.phone_input {
-			height: 100%;
-		}
-	}
-
-	.code {
-		display: flex;
-		justify-content: space-between;
-		align-items: center;
-		box-sizing: border-box;
-		margin-top: 40rpx;
-		padding: 0 20rpx;
-		width: 538rpx;
-		height: 80rpx;
-		border-radius: 8rpx;
-		box-shadow: 0 0 10rpx #ccc;
-		background-color: #fff;
-
-		.code_input {
-			width: 55%;
-			height: 100%;
-		}
-
-		.code_box {
-			display: flex;
-			justify-content: center;
-			align-items: center;
-			width: 35%;
-			height: 80rpx;
-			color: #3c9cff;
-			font-size: 26rpx;
-		}
-	}
-
-	.loginBtn {
-		display: flex;
-		justify-content: center;
-		align-items: center;
-		margin-top: 50rpx;
-		width: 538rpx;
-		height: 80rpx;
-		color: #a0a1a4;
-		border-radius: 8rpx;
-		background-color: #e5e6eb;
-	}
-
-	.active {
-		color: #fff;
-		background-color: #0061ff;
-	}
 }
 </style>

+ 240 - 0
pages/login/login.vue

@@ -0,0 +1,240 @@
+<template>
+	<view class="container">
+		<img class="img" src="@/static/images/school-logo.jpg" />
+		<view class="logo_name">万载三中</view>
+
+		<!-- 手机号码输入框区域 -->
+		<view class="phone">
+			<input class="phone_input" type="number" placeholder="手机号" placeholder-style="color:#CCCCCC;" v-model="phone" />
+		</view>
+
+		<!-- 验证码区域 -->
+		<view class="code">
+			<input class="code_input" type="number" placeholder="验证码" placeholder-style="color:#CCCCCC;" v-model="codeValue" />
+
+			<uv-code uniqueKey="login" keepRunning ref="codeDom" @change="codeChange"></uv-code>
+			<view class="code_box" @click="getCode">{{ tips }}</view>
+		</view>
+
+		<!-- 登录按钮区域 -->
+		<view class="loginBtn" :class="{ active: btnFlag }" @click="handleLogin">登录</view>
+	</view>
+</template>
+
+<script setup>
+import { ref, computed } from 'vue'
+import { onLoad } from '@dcloudio/uni-app'
+import { myRequest } from '@/utils/api.js'
+
+// 手机号码
+const phone = ref('')
+// 验证码
+const codeValue = ref('')
+// 验证码Dom
+const codeDom = ref(null)
+// 登录按钮是否高亮
+const btnFlag = computed(() => {
+	// 手机号码验证规则
+	const regPhone = /^1[3-9]\d{9}$/
+	if (phone.value && regPhone.test(phone.value) && codeValue.value) {
+		return true
+	} else {
+		return false
+	}
+})
+
+// 提示语
+const tips = ref('')
+
+onLoad(() => {})
+
+// 获取验证码按钮点击回调
+const getCode = async () => {
+	// 手机号码验证规则
+	const regPhone = /^1[3-9]\d{9}$/
+	if (!phone.value) {
+		uni.showToast({
+			title: '请先输入手机号码',
+			icon: 'none'
+		})
+		return
+	}
+	if (!regPhone.test(phone.value)) {
+		uni.showToast({
+			title: '手机号码格式错误',
+			icon: 'none'
+		})
+		return
+	}
+
+	if (codeDom.value.canGetCode) {
+		const res = await myRequest({
+			url: '/wanzai/api/wechat/sendMessage',
+			data: {
+				phone: phone.value
+			}
+		})
+		// console.log(res)
+		uni.showToast({
+			title: '验证码已发送',
+			icon: 'none'
+		})
+		codeDom.value.start()
+	} else {
+		uni.showToast({
+			title: '倒计时结束后再发送',
+			icon: 'none'
+		})
+	}
+}
+
+// 登录按钮回调
+const handleLogin = () => {
+	const flag = verifyValue()
+	if (flag) {
+		uni.login({
+			success: (res) => {
+				// console.log(res)
+				getBind(res.code)
+			}
+		})
+	}
+}
+
+const getBind = async (wxcode) => {
+	const res = await myRequest({
+		url: '/wanzai/api/wechat/vertifyMessage',
+		data: {
+			phone: phone.value,
+			code: codeValue.value,
+			wxcode
+		}
+	})
+	// console.log(res)
+
+	// 1 代表家长  2 代表学生  3 代表老师
+	uni.setStorageSync('token', res.data.token)
+	uni.setStorageSync('userInfo', res.data.user)
+	uni.navigateTo({
+		url: '/pages/home/home'
+	})
+}
+
+// 验证表格数据是否符合规范
+const verifyValue = () => {
+	// 手机号码验证规则
+	const regPhone = /^1[3-9]\d{9}$/
+
+	if (!phone.value) {
+		uni.showToast({
+			title: '请输入手机号',
+			icon: 'none'
+		})
+		return false
+	}
+
+	if (!regPhone.test(phone.value)) {
+		uni.showToast({
+			title: '手机号码格式错误',
+			icon: 'none'
+		})
+		return false
+	}
+
+	if (!codeValue.value) {
+		uni.showToast({
+			title: '请输入验证码',
+			icon: 'none'
+		})
+		return false
+	}
+	return true
+}
+
+const codeChange = (text) => {
+	tips.value = text
+}
+</script>
+
+<style lang="scss" scoped>
+.container {
+	display: flex;
+	flex-direction: column;
+	align-items: center;
+	min-height: 100vh;
+	background-color: #f8f8fa;
+
+	.img {
+		margin-top: 120rpx;
+		width: 200rpx;
+		height: 200rpx;
+		border-radius: 20rpx;
+	}
+
+	.logo_name {
+		margin-top: 25rpx;
+		font-size: 36rpx;
+	}
+
+	.phone {
+		box-sizing: border-box;
+		margin-top: 80rpx;
+		padding: 0 20rpx;
+		width: 538rpx;
+		height: 80rpx;
+		border-radius: 8rpx;
+		box-shadow: 0 0 10rpx #ccc;
+		background-color: #fff;
+
+		.phone_input {
+			height: 100%;
+		}
+	}
+
+	.code {
+		display: flex;
+		justify-content: space-between;
+		align-items: center;
+		box-sizing: border-box;
+		margin-top: 40rpx;
+		padding: 0 20rpx;
+		width: 538rpx;
+		height: 80rpx;
+		border-radius: 8rpx;
+		box-shadow: 0 0 10rpx #ccc;
+		background-color: #fff;
+
+		.code_input {
+			width: 55%;
+			height: 100%;
+		}
+
+		.code_box {
+			display: flex;
+			justify-content: center;
+			align-items: center;
+			width: 35%;
+			height: 80rpx;
+			color: #3c9cff;
+			font-size: 26rpx;
+		}
+	}
+
+	.loginBtn {
+		display: flex;
+		justify-content: center;
+		align-items: center;
+		margin-top: 50rpx;
+		width: 538rpx;
+		height: 80rpx;
+		color: #a0a1a4;
+		border-radius: 8rpx;
+		background-color: #e5e6eb;
+	}
+
+	.active {
+		color: #fff;
+		background-color: #0061ff;
+	}
+}
+</style>

+ 15 - 4
pages/myCenter/myCenter.vue

@@ -3,9 +3,14 @@
 		<!-- 顶部个人信息区域 -->
 		<view class="header">
 			<img class="header_img" src="../../static/images/center-bg.png" />
-			<img mode="aspectFill" class="user_photo" src="../../static/images/header.png" />
-			<view class="user_name">张三</view>
-			<view class="user_grade">万载三中 / 初一 / 2班</view>
+			<img
+				mode="aspectFill"
+				class="user_photo"
+				:src="userInfo.headImage || '../../static/images/header.png'"
+				@click="previewImage(userInfo.headImage || '../../static/images/header.png')"
+			/>
+			<view class="user_name">{{ userInfo.name }}</view>
+			<view class="user_grade">{{ userInfo.departmentName }}</view>
 		</view>
 
 		<!-- 列表区域 -->
@@ -23,8 +28,14 @@
 <script setup>
 import { ref } from 'vue'
 import { onLoad } from '@dcloudio/uni-app'
+import { previewImage } from '@/utils/previewImage.js'
 
-onLoad(() => {})
+// 用户信息
+const userInfo = ref({})
+
+onLoad(() => {
+	userInfo.value = uni.getStorageSync('userInfo')
+})
 
 // 列表信息
 const list = ref([

+ 72 - 28
pages/myMsg/myMsg.vue

@@ -4,43 +4,48 @@
 			<!-- 编号区域 -->
 			<view class="box_item">
 				<view class="item_key">编号</view>
-				<view class="item_value">202356562</view>
+				<view class="item_value">{{ userInfo.cardNo }}</view>
 			</view>
 
 			<!-- 姓名区域 -->
 			<view class="box_item">
 				<view class="item_key">姓名</view>
-				<view class="item_value">张三</view>
+				<view class="item_value">{{ userInfo.name }}</view>
 			</view>
 			<!-- 身份区域 -->
 			<view class="box_item">
 				<view class="item_key">身份</view>
-				<view class="item_value">家长</view>
+				<view class="item_value" v-if="userInfo.identityId == 1">家长</view>
+				<view class="item_value" v-if="userInfo.identityId == 2">学生</view>
+				<view class="item_value" v-if="userInfo.identityId == 3">教师</view>
 			</view>
 			<!-- 身份证区域 -->
 			<view class="box_item">
 				<view class="item_key">身份证</view>
-				<view class="item_value">360525689656521612</view>
+				<view class="item_value">{{ userInfo.idCard ? userInfo.idCard : '暂无' }}</view>
 			</view>
 			<!-- 性别区域 -->
 			<view class="box_item">
 				<view class="item_key">性别</view>
-				<view class="item_value">男</view>
+				<view class="item_value">{{ userInfo.sexId == 0 ? '女' : '' }}</view>
 			</view>
 			<!-- 部门区域 -->
 			<view class="box_item">
 				<view class="item_key">部门</view>
-				<view class="item_value">万载三中初一二班</view>
+				<view class="item_value">{{ userInfo.departmentName }}</view>
 			</view>
 			<!-- 角色区域 -->
 			<view class="box_item">
 				<view class="item_key">角色</view>
-				<view class="item_value">超级管理员</view>
+				<view class="item_value">暂无</view>
 			</view>
 			<!-- 人脸照片区域 -->
 			<view class="box_item no_border">
 				<view class="item_key">人脸照片</view>
-				<view class="item_value">暂无</view>
+				<view class="item_value" v-if="userInfo.headImage" @click="previewImage(userInfo.headImage)">
+					<img class="img" mode="aspectFill" :src="userInfo.headImage" />
+				</view>
+				<view class="item_value" v-else>暂无</view>
 			</view>
 		</view>
 
@@ -49,24 +54,24 @@
 			<view class="box_item">
 				<view class="item_key">年级</view>
 				<view class="item_value">
-					暂无
-					<img class="value_img" src="../../static/images/right.png" />
+					{{ userInfo.grade ? userInfo.grade : '暂无' }}
+					<!-- <img class="value_img" src="../../static/images/right.png" /> -->
 				</view>
 			</view>
 			<!-- 学院区域 -->
 			<view class="box_item">
 				<view class="item_key">学院</view>
 				<view class="item_value">
-					暂无
-					<img class="value_img" src="../../static/images/right.png" />
+					{{ userInfo.college ? userInfo.college : '暂无' }}
+					<!-- <img class="value_img" src="../../static/images/right.png" /> -->
 				</view>
 			</view>
 			<!--  班级区域 -->
 			<view class="box_item no_border">
 				<view class="item_key">班级</view>
 				<view class="item_value">
-					暂无
-					<img class="value_img" src="../../static/images/right.png" />
+					{{ userInfo.school_class ? userInfo.school_class : '暂无' }}
+					<!-- <img class="value_img" src="../../static/images/right.png" /> -->
 				</view>
 			</view>
 		</view>
@@ -75,17 +80,21 @@
 			<!-- 校区区域 -->
 			<view class="box_item">
 				<view class="item_key">校区</view>
-				<view class="item_value">暂无</view>
+				<view class="item_value">
+					{{ userInfo.campus ? userInfo.campus : '暂无' }}
+				</view>
 			</view>
 			<!-- 宿舍号区域 -->
 			<view class="box_item">
 				<view class="item_key">宿舍号</view>
-				<view class="item_value">暂无</view>
+				<view class="item_value">
+					{{ userInfo.dormitoryNumber ? userInfo.dormitoryNumber : '暂无' }}
+				</view>
 			</view>
 			<!--  手机号区域 -->
 			<view class="box_item no_border">
 				<view class="item_key">手机号</view>
-				<view class="item_value">13689568978</view>
+				<view class="item_value">{{ userInfo.phone ? userInfo.phone : '暂无' }}</view>
 			</view>
 		</view>
 
@@ -93,47 +102,76 @@
 			<!-- 关联人区域 -->
 			<view class="box_item">
 				<view class="item_key">关联人</view>
-				<view class="item_value">张三</view>
+				<view class="item_value">{{ userInfo.affiliateName ? userInfo.affiliateName : '暂无' }}</view>
 			</view>
 			<!-- 职称区域 -->
 			<view class="box_item">
 				<view class="item_key">职称</view>
-				<view class="item_value">暂无</view>
+				<view class="item_value">
+					{{ userInfo.title ? userInfo.title : '暂无' }}
+				</view>
 			</view>
 			<!--  家庭地址区域 -->
 			<view class="box_item">
 				<view class="item_key">家庭地址</view>
-				<view class="item_value">暂无</view>
+				<view class="item_value">
+					{{ userInfo.address ? userInfo.address : '暂无' }}
+				</view>
 			</view>
 			<!-- 民族区域 -->
 			<view class="box_item">
 				<view class="item_key">民族</view>
-				<view class="item_value">汉</view>
+				<view class="item_value">
+					{{ userInfo.nation ? userInfo.nation : '暂无' }}
+				</view>
 			</view>
 			<!-- 生源地区域 -->
 			<view class="box_item">
 				<view class="item_key">生源地</view>
-				<view class="item_value">暂无</view>
+				<view class="item_value">
+					{{ userInfo.ofStudent ? userInfo.ofStudent : '暂无' }}
+				</view>
 			</view>
 			<!--  毕业学校区域 -->
 			<view class="box_item">
 				<view class="item_key">毕业学校</view>
-				<view class="item_value">暂无</view>
+				<view class="item_value">{{ userInfo.graduate ? userInfo.graduate : '暂无' }}</view>
 			</view>
 			<!--  职务区域 -->
 			<view class="box_item no_border">
 				<view class="item_key">职务</view>
-				<view class="item_value">暂无</view>
+				<view class="item_value">{{ userInfo.zhiwu ? userInfo.zhiwu : '暂无' }}</view>
 			</view>
 		</view>
 	</view>
 </template>
 
-<script>
-export default {
-	data() {
-		return {}
+<script setup>
+import { ref } from 'vue'
+import { onLoad } from '@dcloudio/uni-app'
+import { previewImage } from '@/utils/previewImage.js'
+import { myRequest } from '@/utils/api.js'
+
+// 用户信息
+const userInfo = ref({})
+
+onLoad((options) => {
+	if (options.id) {
+		getUserInfo(options.id)
+	} else {
+		userInfo.value = uni.getStorageSync('userInfo')
 	}
+})
+
+const getUserInfo = async (id) => {
+	const res = await myRequest({
+		url: '/wanzai/api/smartUser/queryInfoData',
+		data: {
+			id
+		}
+	})
+	// console.log(res)
+	userInfo.value = res.data
 }
 </script>
 
@@ -168,6 +206,12 @@ export default {
 				align-items: center;
 				color: #808080;
 
+				.img {
+					width: 65rpx;
+					height: 65rpx;
+					border-radius: 50%;
+				}
+
 				.value_img {
 					margin-left: 10rpx;
 					width: 31rpx;

+ 77 - 4
pages/quickMark/quickMark.vue

@@ -8,7 +8,8 @@
 
 <script setup>
 import { ref } from 'vue'
-import { onLoad, onUnload } from '@dcloudio/uni-app'
+import { onLoad, onUnload, onShow } from '@dcloudio/uni-app'
+import { myRequest } from '@/utils/api.js'
 
 // 二维码信息内容
 const QRCodeUrl = ref('')
@@ -18,20 +19,65 @@ const brightness = ref(0)
 
 // 二维码自定义样式
 const options = {
-	typeNumber: 4,
+	typeNumber: -1,
 	foregroundImageBorderRadius: 5,
 	foregroundImageSrc: '/static/images/school-logo.jpg'
 }
 
+const timer = ref(null)
+
+const timerCode = ref(null)
+
 onLoad((data) => {
-	// 监听用户截屏事件
-	uni.onUserCaptureScreen(showTips)
 	// 获取二维码信息内容
 	QRCodeUrl.value = data.value
+
+	// 监听用户截屏事件
+	uni.onUserCaptureScreen(showTips)
+
 	// 获取屏幕亮度
 	getBrightness()
 	// 设置屏幕亮度
 	setBrightness(1)
+
+	//开启定时器 监听ios用户是否录屏
+	timer.value = setInterval(() => {
+		uni.getScreenRecordingState({
+			success: (res) => {
+				if (res.state == 'on') {
+					uni.showModal({
+						title: '提示',
+						content: '此页面不允许录屏',
+						showCancel: false,
+						success: () => {
+							uni.redirectTo({
+								url: '/pages/home/home'
+							})
+						}
+					})
+				}
+			}
+		})
+	}, 1000)
+
+	// 开启安卓用户禁止截屏
+	if (wx.setVisualEffectOnCapture) {
+		wx.setVisualEffectOnCapture({
+			visualEffect: 'hidden',
+			complete: function (res) {
+				console.log('开启', res)
+			}
+		})
+	}
+})
+
+onShow(() => {
+	if (timerCode.value) {
+		clearInterval(timerCode.value)
+	}
+	timerCode.value = setInterval(() => {
+		getQrcode()
+	}, 55000)
 })
 
 onUnload(() => {
@@ -39,8 +85,35 @@ onUnload(() => {
 	uni.offUserCaptureScreen()
 	// 恢复屏幕亮度
 	setBrightness(brightness.value)
+
+	// 清除定时器
+	clearInterval(timer.value)
+
+	// 关闭安卓用户禁止截屏
+	if (wx.setVisualEffectOnCapture) {
+		wx.setVisualEffectOnCapture({
+			visualEffect: 'none',
+			complete: function (res) {
+				console.log('解除', res)
+			}
+		})
+	}
+
+	clearInterval(timerCode.value)
 })
 
+// 获取身份码信息
+const getQrcode = async () => {
+	const res = await myRequest({
+		url: '/wanzai/api/smartQrcode/generateQrcode',
+		data: {
+			userId: uni.getStorageSync('userInfo').id
+		}
+	})
+	// console.log(res)
+	QRCodeUrl.value = res.data.qrcode
+}
+
 // 获取屏幕亮度
 const getBrightness = () => {
 	uni.getScreenBrightness({

+ 1 - 1
pages/student/student.vue

@@ -77,7 +77,7 @@ const callPhone = () => {
 	.img_bg {
 		position: absolute;
 		top: -70rpx;
-		right: -32rpx;
+		right: 0;
 		width: 589rpx;
 		height: 320rpx;
 		pointer-events: none;

+ 48 - 38
pages/track/track.vue

@@ -2,7 +2,9 @@
 	<view class="container">
 		<!-- 顶部筛选区域 -->
 		<view class="search">
-			<view class="search_box" :class="{ active: item.id === activeIndex }" v-for="item in searchList" :key="item.id" @click="changeIndex(item.id)">{{ item.text }}</view>
+			<view class="search_box" :class="{ active: item.value === activeIndex }" v-for="item in searchList" :key="item.value" @click="changeIndex(item.value)">
+				{{ item.text }}
+			</view>
 		</view>
 
 		<!-- 地图区域 -->
@@ -15,20 +17,25 @@
 			<view class="track_title">全天状态</view>
 
 			<!-- 步骤条区域 -->
-			<uv-steps activeColor="#1E7DFB" direction="column" dot :current="list.length">
+			<uv-steps activeColor="#1E7DFB" direction="column" dot :current="list.length" v-if="list.length">
 				<uv-steps-item v-for="item in list" :key="item.id" :customStyle="customStyle">
 					<template v-slot:title>
 						<view class="track_time">
-							{{ item.title }}
+							{{ item.type }}
 						</view>
 					</template>
 					<template v-slot:desc>
-						<view class="track_desc">
-							{{ item.desc }}
+						<view class="track_desc">地点:{{ item.location }}</view>
+						<view class="track_desc">时间:{{ item.dateTime }}</view>
+						<view class="track_desc" v-if="item.image">
+							图片:
+							<img class="img" mode="aspectFill" :src="item.image" @click="previewImage(item.image)" />
 						</view>
 					</template>
 				</uv-steps-item>
 			</uv-steps>
+
+			<NoData v-else />
 		</view>
 	</view>
 </template>
@@ -37,8 +44,16 @@
 import { ref } from 'vue'
 import { onLoad } from '@dcloudio/uni-app'
 import MapContainer from '@/components/MapContainer.vue'
+import NoData from '@/components/noData.vue'
+import { myRequest } from '@/utils/api.js'
+import { previewImage } from '@/utils/previewImage.js'
+
+onLoad((options) => {
+	currentId.value = options.id
+	getData()
+})
 
-onLoad(() => {})
+const currentId = ref()
 
 // 筛选区域当前索引
 const activeIndex = ref(0)
@@ -46,56 +61,45 @@ const activeIndex = ref(0)
 // 筛选区域数组
 const searchList = ref([
 	{
-		id: 0,
+		value: 0,
 		text: '今天'
 	},
 	{
-		id: 1,
+		value: 1,
 		text: '昨天'
 	},
 	{
-		id: 2,
+		value: 2,
 		text: '前天'
 	}
 ])
 
 // 学生轨迹数组
-const list = ref([
-	{
-		id: 1,
-		title: '入校06:00',
-		desc: '地点:万载三中大门口'
-	},
-	{
-		id: 2,
-		title: '入校07:00',
-		desc: '地点:万载三中大门口'
-	},
-	{
-		id: 3,
-		title: '入校08:00',
-		desc: '地点:万载三中大门口'
-	},
-	{
-		id: 4,
-		title: '入校09:00',
-		desc: '地点:万载三中大门口'
-	},
-	{
-		id: 5,
-		title: '入校10:00',
-		desc: '地点:万载三中大门口'
-	}
-])
+const list = ref([])
 
 // 步骤条样式
 const customStyle = {
 	marginBottom: '30rpx'
 }
 
+const getData = async () => {
+	const res = await myRequest({
+		url: '/wanzai/api/smartFaceDiscern/track',
+		data: {
+			id: currentId.value,
+			dateTime: activeIndex.value
+		}
+	})
+	// console.log(res)
+	if (res.code == 200) {
+		list.value = res.data
+	}
+}
+
 // 切换筛选时间时的函数
-const changeIndex = (id) => {
-	activeIndex.value = id
+const changeIndex = (v) => {
+	activeIndex.value = v
+	getData()
 }
 </script>
 
@@ -151,9 +155,15 @@ const changeIndex = (id) => {
 		}
 
 		.track_desc {
+			display: flex;
 			margin-top: 10rpx;
 			color: #808080;
 			font-size: 24rpx;
+
+			.img {
+				width: 100rpx;
+				height: 160rpx;
+			}
 		}
 	}
 }

+ 85 - 65
pagesReservation/backlog/backlog.vue

@@ -9,38 +9,41 @@
 			<view class="body_box" v-for="item in list" :key="item.id" @click="handleClick(item)">
 				<view class="box_title">
 					<view class="title_msg">
-						<view class="msg_name">{{ item.name }}</view>
-						<view class="msg_time">/{{ item.time }}</view>
+						<view class="msg_name">{{ item.userName }}</view>
+						<view class="msg_time">/{{ item.createTime }}</view>
 					</view>
-					<view class="title_type" v-if="item.type == '待审核'">{{ item.type }}</view>
-					<view class="title_type red" v-if="item.type == '已拒绝'">{{ item.type }}</view>
-					<view class="title_type green" v-if="item.type == '已推送'">{{ item.type }}</view>
+					<view class="title_type" v-if="item.statuStr == '待审核'">{{ item.statuStr }}</view>
+					<view class="title_type red" v-if="item.statuStr == '已拒绝'">{{ item.statuStr }}</view>
+					<view class="title_type green" v-if="item.statuStr == '已推送'">{{ item.statuStr }}</view>
 				</view>
 				<view class="box_info">
 					<view class="info_box">
 						<view class="box_key">类别</view>
-						<view class="box_value">{{ item.status === 0 ? '学生家长预约' : '其他访客预约' }}</view>
+						<view class="box_value">{{ item.visitorType === 1 ? '学生家长预约' : '其他访客预约' }}</view>
 					</view>
 					<view class="info_box">
 						<view class="box_key">来访时间</view>
-						<view class="box_value">{{ item.time }}</view>
+						<view class="box_value">{{ item.visitorTime }}</view>
 					</view>
 					<view class="info_box">
 						<view class="box_key">访问事由</view>
-						<view class="box_value">{{ item.desc }}</view>
+						<view class="box_value">{{ item.visitReason }}</view>
 					</view>
 					<view class="info_box">
-						<view class="box_key">{{ item.status === 0 ? '受访学生' : '受访人' }}</view>
-						<view class="box_value">{{ item.name2 }}</view>
+						<view class="box_key">{{ item.visitorType === 1 ? '受访学生' : '受访人' }}</view>
+						<view class="box_value">{{ item.respondentName }}</view>
 					</view>
 				</view>
-				<view class="box_btn" v-if="item.type == '待审核'">
-					<view class="button reject" @click.stop="handleReject">拒绝</view>
-					<view class="button agree" @click.stop="handleAgree">同意,并推送</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>
 			</view>
 		</view>
 
+		<!-- 没有数据时展示的页面 -->
+		<NoData v-if="!list.length" />
+
 		<!-- 详情弹窗区域 -->
 		<uni-popup ref="popup" type="center" :is-mask-click="false">
 			<view class="popup_box">
@@ -53,68 +56,74 @@
 				<!-- 弹窗详细信息区域 -->
 				<view class="pop_info">
 					<view class="info_key">状态:</view>
-					<view class="info_value blue" v-if="popObj.type == '待审核'">{{ popObj.type }}</view>
-					<view class="info_value red" v-if="popObj.type == '已拒绝'">{{ popObj.type }}</view>
-					<view class="info_value green" v-if="popObj.type == '已推送'">{{ popObj.type }}</view>
+					<view class="info_value blue" v-if="popObj.statuStr == '待审核'">{{ popObj.statuStr }}</view>
+					<view class="info_value red" v-if="popObj.statuStr == '已拒绝'">{{ popObj.statuStr }}</view>
+					<view class="info_value green" v-if="popObj.statuStr == '已推送'">{{ popObj.statuStr }}</view>
+				</view>
+
+				<view class="pop_info">
+					<view class="info_key">类别:</view>
+					<view class="info_value">{{ popObj.visitorType === 1 ? '学生家长预约' : '其他访客预约' }}</view>
 				</view>
 
 				<view class="pop_info">
 					<view class="info_key">访客姓名:</view>
-					<view class="info_value">{{ popObj.name }}</view>
+					<view class="info_value">{{ popObj.userName }}</view>
 				</view>
 
 				<view class="pop_info">
 					<view class="info_key">访客手机号:</view>
-					<view class="info_value">136562262626</view>
+					<view class="info_value">{{ popObj.userPhone }}</view>
 				</view>
 
 				<view class="pop_info">
 					<view class="info_key">来访时间:</view>
-					<view class="info_value">{{ popObj.time }}</view>
+					<view class="info_value">{{ popObj.visitorTime }}</view>
 				</view>
 
 				<view class="pop_info">
 					<view class="info_key">证件号:</view>
-					<view class="info_value">2662626262626262626</view>
+					<view class="info_value">{{ popObj.userNumber }}</view>
 				</view>
 
 				<view class="pop_info">
 					<view class="info_key">访问事由:</view>
-					<view class="info_value">{{ popObj.desc }}</view>
+					<view class="info_value">{{ popObj.visitReason }}</view>
 				</view>
 
 				<view class="pop_info">
 					<view class="info_key">车牌号:</view>
-					<view class="info_value">无</view>
+					<view class="info_value">{{ popObj.carNum ? popObj.carNum : '' }}</view>
 				</view>
 
 				<view class="pop_info">
 					<view class="info_key">同行人数:</view>
-					<view class="info_value">无</view>
+					<view class="info_value">{{ popObj.peerNum ? popObj.carNum : '' }}</view>
 				</view>
 
 				<view class="pop_info">
-					<view class="info_key">受访学生:</view>
-					<view class="info_value">张三(262626)</view>
+					<view class="info_key">{{ popObj.visitorType === 1 ? '受访学生' : '受访人' }}:</view>
+					<view class="info_value">{{ popObj.respondentName }}({{ popObj.responcode || popObj.respondentPhone }})</view>
 				</view>
 
 				<!-- 底部按钮区域 -->
-				<view class="pop_btn" v-if="popObj.type == '待审核'">
-					<view class="button reject" @click="handleReject">拒绝</view>
-					<view class="button agree" @click="handleAgree">同意,并推送</view>
+				<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>
 			</view>
 		</uni-popup>
 
 		<!-- 底部导航栏区域 -->
-		<tabber />
+		<Tabber />
 	</view>
 </template>
 
 <script setup>
 import { ref } from 'vue'
 import { onLoad, onReachBottom } from '@dcloudio/uni-app'
-import tabber from '@/components/tabber.vue'
+import Tabber from '@/components/tabber.vue'
+import NoData from '@/components/noData.vue'
 import { myRequest } from '@/utils/api.js'
 
 // 分段器当前索引
@@ -130,35 +139,7 @@ const total = ref(0)
 const controlList = ['待审核', '已拒绝', '已推送']
 
 // 待办记录
-const list = ref([
-	{
-		id: 1,
-		name: '张三',
-		time: '2023-12-13  10:23',
-		type: '待审核',
-		desc: '给孩子送棉被',
-		status: 0,
-		name2: '小刘'
-	},
-	{
-		id: 2,
-		name: '张三',
-		time: '2023-12-13  10:23',
-		type: '已拒绝',
-		desc: '给孩子送棉被',
-		status: 0,
-		name2: '小刘'
-	},
-	{
-		id: 3,
-		name: '张三',
-		time: '2023-12-13  10:23',
-		type: '已推送',
-		desc: '给孩子送棉被',
-		status: 0,
-		name2: '小刘'
-	}
-])
+const list = ref([])
 
 // 弹窗元素标记
 const popup = ref(null)
@@ -190,7 +171,7 @@ const getData = async () => {
 		data: {
 			currentPage: currentPage.value,
 			pageCount: 6,
-			userId: uni.getStorageSync('userId'),
+			userId: uni.getStorageSync('userInfo').id,
 			type: activeCurrent.value - 0 + 1
 		}
 	})
@@ -216,13 +197,48 @@ const handleClick = (item) => {
 }
 
 // 点击拒绝按钮回调
-const handleReject = () => {
-	console.log('拒绝')
+const handleReject = (id) => {
+	handleExamine(id, 2)
 }
 
 // 点击同意按钮回调
-const handleAgree = () => {
-	console.log('同意')
+const handleAgree = (id) => {
+	handleExamine(id, 1)
+}
+
+// 审核回调
+const handleExamine = (id, type) => {
+	uni.showModal({
+		title: '提示',
+		content: type == 1 ? '确定同意并推送吗?' : '确定拒绝吗?',
+		success: (res) => {
+			if (res.confirm) {
+				handleExamineReq(id, type)
+			}
+		}
+	})
+}
+
+// 审核请求
+const handleExamineReq = async (id, type) => {
+	const res = await myRequest({
+		url: '/wanzai/api/smartVisitor/examineRecord',
+		data: {
+			id,
+			type
+		}
+	})
+	// console.log(res)
+	uni.showToast({
+		title: type == 1 ? '已同意该审核' : '已拒绝该审核',
+		icon: 'success',
+		duration: 2000
+	})
+	setTimeout(() => {
+		list.value = []
+		currentPage.value = 1
+		getData()
+	}, 2000)
 }
 
 // 点击弹窗 x 图标时的回调
@@ -301,7 +317,11 @@ const closePop = () => {
 					}
 
 					.box_value {
+						flex: 1;
 						margin-left: 95rpx;
+						overflow: hidden;
+						text-overflow: ellipsis;
+						white-space: nowrap;
 					}
 				}
 			}
@@ -362,7 +382,6 @@ const closePop = () => {
 
 		.pop_info {
 			display: flex;
-			align-items: center;
 			margin-top: 22rpx;
 			padding: 0 35rpx;
 			font-size: 28rpx;
@@ -372,6 +391,7 @@ const closePop = () => {
 			}
 
 			.info_value {
+				flex: 1;
 			}
 
 			.blue {

+ 42 - 11
pagesReservation/record/record.vue

@@ -26,7 +26,7 @@
 					</view>
 				</view>
 				<view class="box_btn" v-if="item.statuStr == '待审核'">
-					<view class="button" @click.stop="handleCancel">取消预约</view>
+					<view class="button" @click.stop="handleCancel(item.id)">取消预约</view>
 				</view>
 			</view>
 		</view>
@@ -58,7 +58,7 @@
 
 				<view class="pop_info">
 					<view class="info_key">访客手机号:</view>
-					<view class="info_value">136562262626</view>
+					<view class="info_value">{{ popObj.userPhone }}</view>
 				</view>
 
 				<view class="pop_info">
@@ -68,7 +68,7 @@
 
 				<view class="pop_info">
 					<view class="info_key">证件号:</view>
-					<view class="info_value">2662626262626262626</view>
+					<view class="info_value">{{ popObj.userNumber }}</view>
 				</view>
 
 				<view class="pop_info">
@@ -78,17 +78,17 @@
 
 				<view class="pop_info">
 					<view class="info_key">车牌号:</view>
-					<view class="info_value">无</view>
+					<view class="info_value">{{ popObj.carNum ? popObj.carNum : '' }}</view>
 				</view>
 
 				<view class="pop_info">
 					<view class="info_key">同行人数:</view>
-					<view class="info_value">无</view>
+					<view class="info_value">{{ popObj.peerNum ? popObj.peerNum : '' }}</view>
 				</view>
 
 				<view class="pop_info">
-					<view class="info_key">受访学生:</view>
-					<view class="info_value">张三(262626)</view>
+					<view class="info_key">{{ popObj.visitorType == 1 ? '受访学生' : '受访人' }}:</view>
+					<view class="info_value">{{ popObj.respondentName }}({{ popObj.responcode || popObj.respondentPhone }})</view>
 				</view>
 			</view>
 		</uni-popup>
@@ -149,7 +149,7 @@ const getData = async () => {
 		data: {
 			currentPage: currentPage.value,
 			pageCount: 6,
-			userId: uni.getStorageSync('userId'),
+			userId: uni.getStorageSync('userInfo').id,
 			type: activeCurrent.value
 		}
 	})
@@ -175,8 +175,37 @@ const onClickItem = (e) => {
 }
 
 // 点击取消按钮回调
-const handleCancel = () => {
-	console.log('取消')
+const handleCancel = (id) => {
+	uni.showModal({
+		title: '提示',
+		content: '确定取消预约吗?',
+		success: (res) => {
+			if (res.confirm) {
+				handleCancelReq(id)
+			}
+		}
+	})
+}
+
+// 取消预约请求
+const handleCancelReq = async (id) => {
+	const res = await myRequest({
+		url: '/wanzai/api/smartVisitor/deleteSmartVisitorById',
+		data: {
+			id
+		}
+	})
+	// console.log(res)
+	uni.showToast({
+		title: '取消预约成功',
+		icon: 'none',
+		duration: 2000
+	})
+	setTimeout(() => {
+		currentPage.value = 1
+		list.value = []
+		getData()
+	}, 2000)
 }
 
 // 点击弹窗 x 图标时的回调
@@ -311,9 +340,10 @@ const closePop = () => {
 
 		.pop_info {
 			display: flex;
-			align-items: center;
+			box-sizing: border-box;
 			margin-top: 22rpx;
 			padding: 0 35rpx;
+			width: 100%;
 			font-size: 28rpx;
 
 			.info_key {
@@ -321,6 +351,7 @@ const closePop = () => {
 			}
 
 			.info_value {
+				flex: 1;
 			}
 
 			.blue {

+ 12 - 6
pagesReservation/register/register.vue

@@ -215,7 +215,7 @@ const getList = async () => {
 	const res = await myRequest({
 		url: '/wanzai/api/smartUser/queryAffiliateUserById',
 		data: {
-			id: uni.getStorageSync('userId')
+			id: uni.getStorageSync('userInfo').id
 		}
 	})
 	// console.log(res)
@@ -247,7 +247,7 @@ const parentAppointment = async () => {
 		url: '/wanzai/api/smartVisitor/parentsAppointment',
 		method: 'post',
 		data: {
-			userId: uni.getStorageSync('userId'),
+			userId: uni.getStorageSync('userInfo').id,
 			visitorTime: visStartTime.value,
 			visitReason: visReason.value,
 			carNum: visCarNumber.value,
@@ -262,7 +262,10 @@ const parentAppointment = async () => {
 		duration: 2000
 	})
 	setTimeout(() => {
-		uni.navigateBack(1)
+		uni.setStorageSync('Tab-activeIndex', 1)
+		uni.redirectTo({
+			url: '/pagesReservation/record/record'
+		})
 	}, 2000)
 }
 
@@ -272,7 +275,7 @@ const otherAppointment = async () => {
 		url: '/wanzai/api/smartVisitor/otherAppointment',
 		method: 'post',
 		data: {
-			userId: uni.getStorageSync('userId'),
+			userId: uni.getStorageSync('userInfo').id,
 			visitorTime: visStartTime.value,
 			visitReason: visReason.value,
 			carNum: visCarNumber.value,
@@ -281,14 +284,17 @@ const otherAppointment = async () => {
 			respondentPhone: passivePhone.value
 		}
 	})
-	console.log(res)
+	// console.log(res)
 	uni.showToast({
 		title: res.message,
 		icon: 'none',
 		duration: 2000
 	})
 	setTimeout(() => {
-		uni.navigateBack(1)
+		uni.setStorageSync('Tab-activeIndex', 2)
+		uni.redirectTo({
+			url: '/pagesReservation/record/record'
+		})
 	}, 2000)
 }
 

+ 6 - 6
pagesReservation/reservation/reservation.vue

@@ -12,14 +12,14 @@
 			<view class="body_title">选择预约方式</view>
 
 			<!-- 学生家长预约选项区域 -->
-			<view class="body_box" @click="goPage('/pagesReservation/register/register?type=1')" v-if="userType == 0">
+			<view class="body_box" @click="goPage('/pagesReservation/register/register?type=1')" v-if="userInfo.identityId == 1">
 				<img class="box_img" src="../../static/images/reservation.png" />
 				<view class="box_text">学生家长预约</view>
 				<img class="box_icon" src="../../static/images/right-blue.png" />
 			</view>
 
 			<!-- 其他访客预约选项区域 -->
-			<view class="body_box" @click="goPage('/pagesReservation/register/register?type=2')" v-if="userType == 1">
+			<view class="body_box" @click="goPage('/pagesReservation/register/register?type=2')" v-if="userInfo.identityId == 3">
 				<img class="box_img" src="../../static/images/reservation2.png" />
 				<view class="box_text">其他访客预约</view>
 				<img class="box_icon" src="../../static/images/right-blue.png" />
@@ -43,11 +43,11 @@ import { ref } from 'vue'
 import { onLoad } from '@dcloudio/uni-app'
 import tabber from '@/components/tabber.vue'
 
-const userType = ref('')
+// 用户信息
+const userInfo = ref('')
 
 onLoad(() => {
-	userType.value = uni.getStorageSync('userType')
-	console.log(userType.value)
+	userInfo.value = uni.getStorageSync('userInfo')
 })
 const goPage = (url) => {
 	uni.navigateTo({
@@ -65,7 +65,7 @@ const goPage = (url) => {
 	.img_bg {
 		position: absolute;
 		top: -70rpx;
-		right: -32rpx;
+		right: 0;
 		width: 589rpx;
 		height: 320rpx;
 		pointer-events: none;

+ 126 - 59
pagesWarning/home/home.vue

@@ -2,9 +2,9 @@
 	<view class="container">
 		<!-- 头部筛选区域 -->
 		<view class="search">
-			<picker style="width: 50%" :value="typeIndex" :range="typeList" range-key="text" @change="bindTypeChange">
+			<picker style="width: 50%" :value="typeIndex" :range="typeList" @change="bindTypeChange">
 				<view class="search-left">
-					{{ typeList[typeIndex].text }}
+					{{ typeList[typeIndex] }}
 					<view class="search-img">
 						<img class="img" src="@/static/images/bottom2.png" />
 					</view>
@@ -25,42 +25,39 @@
 		<view class="container-item" v-for="item in listData" :key="item.id">
 			<!-- 标题区域 -->
 			<view class="item-title">
-				<view class="title-info">{{ item.warningType }}</view>
-				<view class="title-state">待处理</view>
+				<view class="title-info">{{ item.type }}</view>
+				<view class="title-state" v-if="item.statu == 0">待处理</view>
+				<view class="title-state color" v-else>已处理</view>
 			</view>
 			<!-- 告警时间区域 -->
 			<view class="item-box">
 				<view class="box-key">告警时间</view>
-				<view class="box-value">{{ time_format(item.dateTime) }}</view>
+				<view class="box-value">{{ item.dateTime }}</view>
 			</view>
 			<!-- 姓名区域 -->
 			<view class="item-box">
 				<view class="box-key">姓名</view>
-				<view v-if="item.name" class="box-value">{{ item.name }}</view>
-				<view v-else class="box-value">陌生人</view>
+				<view class="box-value">{{ item.name ? item.name : '未知' }}</view>
 			</view>
 			<!-- 地点区域 -->
 			<view class="item-box">
 				<view class="box-key">地点</view>
-				<view class="box-value">{{ item.address }}</view>
+				<view class="box-value">{{ item.location }}</view>
 			</view>
 			<!-- 图片区域 -->
 			<view class="item-box2">
 				<view class="box-key">图片</view>
-				<view class="box-img" @click="handleBigImg(item.pictureUrl)"><img :src="item.pictureUrl" /></view>
+				<view class="box-img" @click="previewImage(item.image)"><img mode="aspectFill" class="img" :src="item.image" /></view>
 			</view>
 			<!-- 按钮区域 -->
-			<view class="item-button">
+			<view class="item-button" v-if="item.statu == 0">
 				<view class="button-finish" @click="handleFinish(item.id)">处理完成</view>
 				<view class="button-err" @click="handleErr(item.id)">误报</view>
 			</view>
 		</view>
 
 		<!-- 无数据时展示的区域 -->
-		<view class="list-noData" v-if="listData.length === 0">
-			<img mode="aspetcFill" class="img" src="@/static/images/noData.png" />
-			<view>暂无数据</view>
-		</view>
+		<NoData v-if="!listData.length" />
 	</view>
 </template>
 
@@ -69,37 +66,22 @@ import { ref } from 'vue'
 import { onLoad, onPullDownRefresh, onReachBottom } from '@dcloudio/uni-app'
 // 导入时间相关函数
 import { time_format, getNowDate } from '@/utils/formatTime.js'
+import { myRequest } from '@/utils/api.js'
+import NoData from '@/components/noData.vue'
+import { previewImage } from '@/utils/previewImage.js'
 
 // 状态筛选框数组当前索引
 const typeIndex = ref(0)
 
 // 状态筛选框数组
-const typeList = ref([
-	{
-		text: '全部',
-		value: 0
-	},
-	{
-		text: '越界预警',
-		value: 1
-	},
-	{
-		text: '区域入侵预警',
-		value: 2
-	},
-	{
-		text: '进入区域',
-		value: 3
-	},
-	{
-		text: '离开区域',
-		value: 4
-	}
-])
+const typeList = ref([])
 
 // 状态筛选框改变数据时的回调
 const bindTypeChange = (e) => {
 	typeIndex.value = e.detail.value
+	listData.value = []
+	currentPage.value = 1
+	getData()
 }
 
 // 日期筛选框绑定日期
@@ -108,26 +90,117 @@ const date = ref(getNowDate())
 // 日期筛选框改变数据时的回调
 const bindDateChange = (e) => {
 	date.value = e.detail.value
+	listData.value = []
+	currentPage.value = 1
+	getData()
 }
 
+// 当前页
+const currentPage = ref(1)
+
+// 总条数
+const total = ref(null)
+
 // 预警列表数据
 const listData = ref([])
 
-onLoad(() => {})
+onLoad(() => {
+	getTypeList()
+	getData()
+})
+
+// 页面上拉到最底部时触发的回调
+onReachBottom(() => {
+	if (total.value > listData.value.length) {
+		currentPage.value++
+		getData()
+	} else {
+		uni.showToast({
+			title: '没有更多数据了',
+			icon: 'none'
+		})
+	}
+})
+
+// 获取筛选框数组
+const getTypeList = async () => {
+	const res = await myRequest({
+		url: '/wanzai/api/smartWarning/warningType'
+	})
+	// console.log(res)
+	typeList.value = res.data.reverse()
+}
 
-// 点击图片回调
-const handleBigImg = (imgUrl) => {
-	console.log(imgUrl)
+// 获取预警列表数据
+const getData = async () => {
+	const res = await myRequest({
+		url: '/wanzai/api/smartWarning/pageWarning',
+		data: {
+			currentPage: currentPage.value,
+			pageCount: 6,
+			type: typeList.value[typeIndex.value] || '全部',
+			dateTime: date.value
+		}
+	})
+	// console.log(res)
+	listData.value = [...listData.value, ...res.data.list]
+	total.value = res.data.totalCount
 }
+
 // 处理完成按钮回调
-const handleFinish = () => {}
+const handleFinish = (id) => {
+	uni.showModal({
+		title: '提示',
+		editable: true,
+		placeholderText: '请输入处理情况备注',
+		success: (res) => {
+			if (res.confirm) {
+				handleOperation(id, res.content)
+			}
+		}
+	})
+}
 
 // 误报按钮回调
-const handleErr = () => {}
+const handleErr = (id) => {
+	uni.showModal({
+		title: '提示',
+		content: '确定是误报吗?',
+		success: (res) => {
+			if (res.confirm) {
+				handleOperation(id)
+			}
+		}
+	})
+}
+
+// 处理请求
+const handleOperation = async (id, remark) => {
+	const res = await myRequest({
+		url: '/wanzai/api/smartWarning/operation',
+		method: 'post',
+		data: {
+			id,
+			remark
+		}
+	})
+	// console.log(res)
+	uni.showToast({
+		title: res.message,
+		icon: 'success',
+		duration: 2000
+	})
+	setTimeout(() => {
+		listData.value = []
+		currentPage.value = 1
+		getData()
+	}, 2000)
+}
 </script>
 
 <style lang="scss" scoped>
 .container {
+	min-height: 100vh;
 	background-color: #f2f2f2;
 
 	.search {
@@ -174,9 +247,8 @@ const handleErr = () => {}
 	}
 
 	.container-item {
-		padding: 0 30rpx;
+		padding: 0 30rpx 20rpx 30rpx;
 		margin-bottom: 20rpx;
-		height: 601rpx;
 		background-color: #fff;
 
 		.item-title {
@@ -193,6 +265,11 @@ const handleErr = () => {}
 
 			.title-state {
 				font-size: 28rpx;
+
+				color: #d43030;
+			}
+
+			.color {
 				color: #5a61f4;
 			}
 		}
@@ -217,7 +294,6 @@ const handleErr = () => {}
 		.item-box2 {
 			display: flex;
 			align-items: center;
-			height: 98rpx;
 			font-size: 28rpx;
 
 			.box-key {
@@ -227,10 +303,12 @@ const handleErr = () => {}
 				text-align-last: justify;
 			}
 			.box-img {
+				flex: 1;
 				height: 100%;
 
-				img {
-					height: 100%;
+				.img {
+					width: 320rpx;
+					height: 180rpx;
 				}
 			}
 		}
@@ -267,16 +345,5 @@ const handleErr = () => {}
 			}
 		}
 	}
-
-	.list-noData {
-		padding-top: 150rpx;
-		background-color: #fff;
-		text-align: center;
-		color: #999999;
-
-		.img {
-			width: 600rpx;
-		}
-	}
 }
-</style>
+</style>

BIN
static/images/icon.png


+ 248 - 284
uni_modules/uv-steps/components/uv-steps-item/uv-steps-item.vue

@@ -1,347 +1,311 @@
 <template>
-	<view 
-		class="uv-steps-item" 
-		ref="uv-steps-item" 
-		:class="[`uv-steps-item--${parentData.direction}`]"
-		:style="[$uv.addStyle(customStyle)]"
-		>
-		<view 
-			class="uv-steps-item__line" 
-			v-if="index + 1 < childLength"
-			:class="[`uv-steps-item__line--${parentData.direction}`]" 
-			:style="[lineStyle]">
-		</view>
-		<view 
-			:class="[
-				'uv-steps-item__wrapper',
-				`uv-steps-item__wrapper--${parentData.direction}`, 
-				parentData.dot && `uv-steps-item__wrapper--${parentData.direction}--dot`
-			]">
+	<view class="uv-steps-item" ref="uv-steps-item" :class="[`uv-steps-item--${parentData.direction}`]" :style="[$uv.addStyle(customStyle)]">
+		<view class="uv-steps-item__line" v-if="index + 1 < childLength" :class="[`uv-steps-item__line--${parentData.direction}`]" :style="[lineStyle]"></view>
+		<view :class="['uv-steps-item__wrapper', `uv-steps-item__wrapper--${parentData.direction}`, parentData.dot && `uv-steps-item__wrapper--${parentData.direction}--dot`]">
 			<slot name="icon">
-				<view 
-					class="uv-steps-item__wrapper__dot" 
-					v-if="parentData.dot" 
+				<view
+					class="uv-steps-item__wrapper__dot"
+					v-if="parentData.dot"
 					:style="{
 						backgroundColor: statusColor
-					}">
-				</view>
-				<view 
-					class="uv-steps-item__wrapper__icon" 
-					v-else-if="parentData.activeIcon || parentData.inactiveIcon">
-					<uv-icon 
+					}"
+				></view>
+				<view class="uv-steps-item__wrapper__icon" v-else-if="parentData.activeIcon || parentData.inactiveIcon">
+					<uv-icon
 						:name="index <= parentData.current ? parentData.activeIcon : parentData.inactiveIcon"
 						:size="iconSize"
-						:color="index <= parentData.current ? parentData.activeColor : parentData.inactiveColor">
-					</uv-icon>
+						:color="index <= parentData.current ? parentData.activeColor : parentData.inactiveColor"
+					></uv-icon>
 				</view>
-				<view 
-					v-else 
+				<view
+					v-else
 					:style="{
 						backgroundColor: statusClass === 'process' ? parentData.activeColor : 'transparent',
 						borderColor: statusColor
-					}" 
-					class="uv-steps-item__wrapper__circle">
-					<text 
+					}"
+					class="uv-steps-item__wrapper__circle"
+				>
+					<text
 						v-if="statusClass === 'process' || statusClass === 'wait'"
-						class="uv-steps-item__wrapper__circle__text" 
+						class="uv-steps-item__wrapper__circle__text"
 						:style="{
 							color: index == parentData.current ? '#ffffff' : parentData.inactiveColor
-						}">{{ index + 1}}</text>
-					<uv-icon 
-						v-else 
-						:color="statusClass === 'error' ? 'error' : parentData.activeColor" 
-						size="12"
-						:name="statusClass === 'error' ? 'close' : 'checkmark'">
-					</uv-icon>
+						}"
+					>
+						{{ index + 1 }}
+					</text>
+					<uv-icon v-else :color="statusClass === 'error' ? 'error' : parentData.activeColor" size="12" :name="statusClass === 'error' ? 'close' : 'checkmark'"></uv-icon>
 				</view>
 			</slot>
 		</view>
-		<view 
-			:class="[
-				'uv-steps-item__content',
-				`uv-steps-item__content--${parentData.direction}`
-			]"
-			:style="[contentStyle]"
-		>
+		<view :class="['uv-steps-item__content', `uv-steps-item__content--${parentData.direction}`]" :style="[contentStyle]">
 			<slot name="title">
-				<uv-text
-					:text="title" 
-					:type="parentData.current == index ? 'main' : 'content'" 
-					lineHeight="20px"
-					:size="parentData.current == index ? 14 : 13"
-				></uv-text>
+				<uv-text :text="title" :type="parentData.current == index ? 'main' : 'content'" lineHeight="20px" :size="parentData.current == index ? 14 : 13"></uv-text>
 			</slot>
 			<slot name="desc">
-				<uv-text 
-					:text="desc" 
-					type="tips" 
-					size="12"
-				></uv-text>
+				<uv-text :text="desc" type="tips" size="12"></uv-text>
 			</slot>
 		</view>
 	</view>
 </template>
 
 <script>
-	import mpMixin from '@/uni_modules/uv-ui-tools/libs/mixin/mpMixin.js'
-	import mixin from '@/uni_modules/uv-ui-tools/libs/mixin/mixin.js'
-	import props from './props.js';
-	// #ifdef APP-NVUE
-	const dom = uni.requireNativePlugin('dom')
-	// #endif
-	/**
-	 * StepsItem 步骤条的子组件
-	 * @description 本组件需要和uv-steps配合使用
-	 * @tutorial https://www.uvui.cn/components/steps.html
-	 * @property {String}			title			标题文字
-	 * @property {String}			current			描述文本
-	 * @property {String | Number}	iconSize		图标大小  (默认 17 )
-	 * @property {Boolean}			error			当前步骤是否处于失败状态  (默认 false )
-	 * @example <uv-steps current="0"><uv-steps-item title="已出库" desc="10:35" ></uv-steps-item></uv-steps>
-	 */
-	export default {
-		name: 'uv-steps-item',
-		mixins: [mpMixin, mixin, props],
-		data() {
-			return {
-				index: 0,
-				childLength: 0,
-				showLine: false,
-				size: {
-					height: 0,
-					width: 0
-				},
-				parentData: {
-					direction: 'row',
-					current: 0,
-					activeColor: '',
-					inactiveColor: '',
-					activeIcon: '',
-					inactiveIcon: '',
-					dot: false
-				}
+import mpMixin from '@/uni_modules/uv-ui-tools/libs/mixin/mpMixin.js'
+import mixin from '@/uni_modules/uv-ui-tools/libs/mixin/mixin.js'
+import props from './props.js'
+// #ifdef APP-NVUE
+const dom = uni.requireNativePlugin('dom')
+// #endif
+/**
+ * StepsItem 步骤条的子组件
+ * @description 本组件需要和uv-steps配合使用
+ * @tutorial https://www.uvui.cn/components/steps.html
+ * @property {String}			title			标题文字
+ * @property {String}			current			描述文本
+ * @property {String | Number}	iconSize		图标大小  (默认 17 )
+ * @property {Boolean}			error			当前步骤是否处于失败状态  (默认 false )
+ * @example <uv-steps current="0"><uv-steps-item title="已出库" desc="10:35" ></uv-steps-item></uv-steps>
+ */
+export default {
+	name: 'uv-steps-item',
+	mixins: [mpMixin, mixin, props],
+	data() {
+		return {
+			index: 0,
+			childLength: 0,
+			showLine: false,
+			size: {
+				height: 0,
+				width: 0
+			},
+			parentData: {
+				direction: 'row',
+				current: 0,
+				activeColor: '',
+				inactiveColor: '',
+				activeIcon: '',
+				inactiveIcon: '',
+				dot: false
+			}
+		}
+	},
+	watch: {
+		parentData(newValue, oldValue) {}
+	},
+	created() {
+		this.init()
+	},
+	computed: {
+		lineStyle() {
+			const style = {}
+			if (this.parentData.direction === 'row') {
+				style.width = this.size.width + 'px'
+				style.left = this.size.width / 2 + 'px'
+			} else {
+				style.height = this.size.height + 'px'
 			}
+			style.backgroundColor = this.parent.children?.[this.index + 1]?.error
+				? '#f56c6c'
+				: this.index < this.parentData.current
+				? this.parentData.activeColor
+				: this.parentData.inactiveColor
+			return style
 		},
-		watch: {
-			'parentData'(newValue, oldValue) {}
+		statusClass() {
+			const { index, error } = this
+			const { current } = this.parentData
+			if (current == index) {
+				return error === true ? 'error' : 'process'
+			} else if (error) {
+				return 'error'
+			} else if (current > index) {
+				return 'finish'
+			} else {
+				return 'wait'
+			}
 		},
-		created() {
-			this.init()
+		statusColor() {
+			let color = ''
+			switch (this.statusClass) {
+				case 'finish':
+					color = this.parentData.activeColor
+					break
+				case 'error':
+					color = '#f56c6c'
+					break
+				case 'process':
+					color = this.parentData.dot ? this.parentData.activeColor : 'transparent'
+					break
+				default:
+					color = this.parentData.inactiveColor
+					break
+			}
+			return color
 		},
-		computed: {
-			lineStyle() {
-				const style = {}
-				if (this.parentData.direction === 'row') {
-					style.width = this.size.width + 'px'
-					style.left = this.size.width / 2 + 'px'
-				} else {
-					style.height = this.size.height + 'px'
-				}
-				style.backgroundColor = this.parent.children?.[this.index + 1]?.error ? '#f56c6c' : this.index < this.parentData.current ? this.parentData.activeColor : this.parentData.inactiveColor
-				return style
-			},
-			statusClass() {
-				const {
-					index,
-					error
-				} = this
-				const {
-					current
-				} = this.parentData
-				if (current == index) {
-					return error === true ? 'error' : 'process'
-				} else if (error) {
-					return 'error'
-				} else if (current > index) {
-					return 'finish'
-				} else {
-					return 'wait'
-				}
-			},
-			statusColor() {
-				let color = ''
-				switch (this.statusClass) {
-					case 'finish':
-						color = this.parentData.activeColor
-						break
-					case 'error':
-						color = '#f56c6c'
-						break
-					case 'process':
-						color = this.parentData.dot ? this.parentData.activeColor : 'transparent'
-						break
-					default:
-						color = this.parentData.inactiveColor
-						break
-				}
-				return color
-			},
-			contentStyle() {
-				const style = {}
-				if (this.parentData.direction === 'column') {
-					style.marginLeft = this.parentData.dot ? '2px' : '6px'
-					style.marginTop = this.parentData.dot ? '0px' : '6px'
-				} else {
-					style.marginTop = this.parentData.dot ? '2px' : '6px'
-					style.marginLeft = this.parentData.dot ? '2px' : '6px'
-				}
-				return style
+		contentStyle() {
+			const style = {}
+			if (this.parentData.direction === 'column') {
+				style.marginLeft = this.parentData.dot ? '2px' : '6px'
+				style.marginTop = this.parentData.dot ? '0px' : '6px'
+			} else {
+				style.marginTop = this.parentData.dot ? '2px' : '6px'
+				style.marginLeft = this.parentData.dot ? '2px' : '6px'
 			}
+			return style
+		}
+	},
+	mounted() {
+		this.parent && this.parent.updateFromChild()
+		this.$uv.sleep().then(() => {
+			this.getStepsItemRect()
+		})
+	},
+	methods: {
+		init() {
+			// 初始化数据
+			this.updateParentData()
+			if (!this.parent) {
+				return this.$uv.error('uv-steps-item必须要搭配uv-steps组件使用')
+			}
+			this.index = this.parent.children.indexOf(this)
+			this.childLength = this.parent.children.length
 		},
-		mounted() {
-			this.parent && this.parent.updateFromChild()
-			this.$uv.sleep().then(() => {
-				this.getStepsItemRect()
-			})
+		updateParentData() {
+			// 此方法在mixin中
+			this.getParentData('uv-steps')
 		},
-		methods: {
-			init() {
-				// 初始化数据
-				this.updateParentData()
-				if (!this.parent) {
-					return this.$uv.error('uv-steps-item必须要搭配uv-steps组件使用')
-				}
-				this.index = this.parent.children.indexOf(this)
-				this.childLength = this.parent.children.length
-			},
-			updateParentData() {
-				// 此方法在mixin中
-				this.getParentData('uv-steps')
-			},
-			// 父组件数据发生变化
-			updateFromParent() {
-				this.init()
-			},
-			// 获取组件的尺寸,用于设置横线的位置
-			getStepsItemRect() {
-				// #ifndef APP-NVUE
-				this.$uvGetRect('.uv-steps-item').then(size => {
-					this.size = size
-				})
-				// #endif
-				// #ifdef APP-NVUE
-				dom.getComponentRect(this.$refs['uv-steps-item'], res => {
-					const {
-						size
-					} = res
-					this.size = size
-				})
-				// #endif
-			}
+		// 父组件数据发生变化
+		updateFromParent() {
+			this.init()
+		},
+		// 获取组件的尺寸,用于设置横线的位置
+		getStepsItemRect() {
+			// #ifndef APP-NVUE
+			this.$uvGetRect('.uv-steps-item').then((size) => {
+				this.size = size
+			})
+			// #endif
+			// #ifdef APP-NVUE
+			dom.getComponentRect(this.$refs['uv-steps-item'], (res) => {
+				const { size } = res
+				this.size = size
+			})
+			// #endif
 		}
 	}
+}
 </script>
 
 <style lang="scss" scoped>
-	@import '@/uni_modules/uv-ui-tools/libs/css/components.scss';
-	@import '@/uni_modules/uv-ui-tools/libs/css/color.scss';
-	.uv-steps-item {
-		flex: 1;
-		@include flex;
-
-		&--row {
-			flex-direction: column;
-			align-items: center;
-			position: relative;
-		}
+@import '@/uni_modules/uv-ui-tools/libs/css/components.scss';
+@import '@/uni_modules/uv-ui-tools/libs/css/color.scss';
+.uv-steps-item {
+	flex: 1;
+	@include flex;
 
-		&--column {
-			position: relative;
-			flex-direction: row;
-			justify-content: flex-start;
-			padding-bottom: 5px;
-		}
+	&--row {
+		flex-direction: column;
+		align-items: center;
+		position: relative;
+	}
 
-		&__wrapper {
-			@include flex;
-			justify-content: center;
-			align-items: center;
-			position: relative;
-			background-color: #fff;
+	&--column {
+		position: relative;
+		flex-direction: row;
+		justify-content: flex-start;
+		padding-bottom: 5px;
+	}
 
-			&--column {
-				width: 20px;
-				height: 32px;
+	&__wrapper {
+		@include flex;
+		justify-content: center;
+		align-items: center;
+		position: relative;
+		background-color: #f1f6fe;
 
-				&--dot {
-					height: 20px;
-					width: 20px;
-				}
-			}
+		&--column {
+			width: 20px;
+			height: 32px;
 
-			&--row {
-				width: 32px;
+			&--dot {
 				height: 20px;
-
-				&--dot {
-					width: 20px;
-					height: 20px;
-				}
+				width: 20px;
 			}
+		}
+
+		&--row {
+			width: 32px;
+			height: 20px;
 
-			&__circle {
+			&--dot {
 				width: 20px;
 				height: 20px;
-				/* #ifndef APP-NVUE */
-				box-sizing: border-box;
-				flex-shrink: 0;
-				/* #endif */
-				border-radius: 100px;
-				border-width: 1px;
-				border-color: $uv-tips-color;
-				border-style: solid;
+			}
+		}
+
+		&__circle {
+			width: 20px;
+			height: 20px;
+			/* #ifndef APP-NVUE */
+			box-sizing: border-box;
+			flex-shrink: 0;
+			/* #endif */
+			border-radius: 100px;
+			border-width: 1px;
+			border-color: $uv-tips-color;
+			border-style: solid;
+			@include flex(row);
+			align-items: center;
+			justify-content: center;
+			transition: background-color 0.3s;
+
+			&__text {
+				color: $uv-tips-color;
+				font-size: 11px;
 				@include flex(row);
 				align-items: center;
 				justify-content: center;
-				transition: background-color 0.3s;
-
-				&__text {
-					color: $uv-tips-color;
-					font-size: 11px;
-					@include flex(row);
-					align-items: center;
-					justify-content: center;
-					text-align: center;
-					line-height: 11px;
-				}
+				text-align: center;
+				line-height: 11px;
 			}
+		}
 
-			&__dot {
-				width: 10px;
-				height: 10px;
-				border-radius: 100px;
-				background-color: $uv-content-color;
-			}
+		&__dot {
+			width: 10px;
+			height: 10px;
+			border-radius: 100px;
+			background-color: $uv-content-color;
 		}
+	}
 
-		&__content {
-			@include flex;
-			flex: 1;
+	&__content {
+		@include flex;
+		flex: 1;
 
-			&--row {
-				flex-direction: column;
-				align-items: center;
-			}
+		&--row {
+			flex-direction: column;
+			align-items: center;
+		}
 
-			&--column {
-				flex-direction: column;
-				margin-left: 6px;
-			}
+		&--column {
+			flex-direction: column;
+			margin-left: 6px;
 		}
+	}
 
-		&__line {
-			position: absolute;
-			background: $uv-tips-color;
+	&__line {
+		position: absolute;
+		background: $uv-tips-color;
 
-			&--row {
-				top: 10px;
-				height: 1px;
-			}
+		&--row {
+			top: 10px;
+			height: 1px;
+		}
 
-			&--column {
-				width: 1px;
-				left: 10px;
-			}
+		&--column {
+			width: 1px;
+			left: 10px;
 		}
 	}
+}
 </style>

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

@@ -3,6 +3,7 @@ Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
 const common_vendor = require("./common/vendor.js");
 if (!Math) {
   "./pages/index/index.js";
+  "./pages/login/login.js";
   "./pages/home/home.js";
   "./pages/myCenter/myCenter.js";
   "./pages/myMsg/myMsg.js";

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

@@ -1,6 +1,7 @@
 {
   "pages": [
     "pages/index/index",
+    "pages/login/login",
     "pages/home/home",
     "pages/myCenter/myCenter",
     "pages/myMsg/myMsg",

+ 2 - 0
unpackage/dist/dev/mp-weixin/common/vendor.js

@@ -7166,6 +7166,7 @@ const createSubpackageApp = initCreateSubpackageApp();
 const createHook = (lifecycle) => (hook, target = getCurrentInstance()) => {
   !isInSSRComponentSetup && injectHook(lifecycle, hook, target);
 };
+const onShow = /* @__PURE__ */ createHook(ON_SHOW);
 const onLoad = /* @__PURE__ */ createHook(ON_LOAD);
 const onUnload = /* @__PURE__ */ createHook(ON_UNLOAD);
 const onPageScroll = /* @__PURE__ */ createHook(ON_PAGE_SCROLL);
@@ -7186,6 +7187,7 @@ exports.onLoad = onLoad;
 exports.onPageScroll = onPageScroll;
 exports.onPullDownRefresh = onPullDownRefresh;
 exports.onReachBottom = onReachBottom;
+exports.onShow = onShow;
 exports.onUnload = onUnload;
 exports.p = p;
 exports.r = r;

+ 7 - 1
unpackage/dist/dev/mp-weixin/components/headerInput.js

@@ -12,8 +12,14 @@ const _sfc_main = {
   __name: "headerInput",
   emits: ["changeInputValue"],
   setup(__props, { emit: $emit }) {
+    const timer = common_vendor.ref(null);
     const handleInput = (e) => {
-      $emit("changeInputValue", e.detail.value);
+      if (timer.value) {
+        clearTimeout(timer.value);
+      }
+      timer.value = setTimeout(() => {
+        $emit("changeInputValue", e.detail.value);
+      }, 500);
     };
     return (_ctx, _cache) => {
       return {

+ 3 - 4
unpackage/dist/dev/mp-weixin/components/listView.js

@@ -11,14 +11,13 @@ const _sfc_main = {
     common_vendor.onLoad(() => {
     });
     const goPage = (id) => {
-      console.log(id);
-      if (props.appType == "通讯录") {
+      if (props.appType == "学生轨迹") {
         common_vendor.index.navigateTo({
-          url: "/pages/student/student"
+          url: `/pages/track/track?id=${id}`
         });
       } else {
         common_vendor.index.navigateTo({
-          url: "/pages/track/track"
+          url: "/pages/student/student"
         });
       }
     };

+ 5 - 3
unpackage/dist/dev/mp-weixin/components/tabber.js

@@ -48,10 +48,12 @@ const _sfc_main = {
       height: "120rpx"
     };
     common_vendor.onLoad(() => {
-      const userType = common_vendor.index.getStorageSync("userType");
-      if (userType == 0) {
+      const userType = common_vendor.index.getStorageSync("userInfo").identityId;
+      if (userType == 1) {
         allList.value = tabList2.value;
-      } else {
+      } else if (userType == 2) {
+        allList.value = tabList2.value;
+      } else if (userType == 3) {
         allList.value = tabList.value;
       }
       const i = common_vendor.index.getStorageSync("Tab-activeIndex");

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

@@ -1,12 +1,94 @@
 "use strict";
 const common_vendor = require("../../common/vendor.js");
+const utils_api = require("../../utils/api.js");
 const _sfc_main = {
   __name: "bind",
   setup(__props) {
+    const name = common_vendor.ref("");
+    const number = common_vendor.ref("");
+    const identity = common_vendor.ref("");
     common_vendor.onLoad(() => {
     });
+    const handleConfirm = () => {
+      const flag = verifyValue();
+      if (flag) {
+        bindReq();
+      }
+    };
+    const bindReq = async () => {
+      const res = await utils_api.myRequest({
+        url: "/wanzai/api/smartUser/bindStudent",
+        method: "post",
+        data: {
+          userId: common_vendor.index.getStorageSync("userInfo").id,
+          name: name.value,
+          cardNo: number.value,
+          idCard: identity.value
+        }
+      });
+      common_vendor.index.showToast({
+        title: res.message,
+        icon: "none",
+        duration: 2e3
+      });
+      if (res.code == 200) {
+        setTimeout(() => {
+          common_vendor.index.redirectTo({
+            url: "/pages/home/home"
+          });
+        }, 2e3);
+      }
+    };
+    const verifyValue = () => {
+      const regName = /^[\u4e00-\u9fa5]{2,4}$/;
+      const regIdentity = /(^\d{15}$)|(^\d{18}$)|(^\d{17}(\d|X|x)$)/;
+      if (!name.value) {
+        common_vendor.index.showToast({
+          title: "请输入姓名",
+          icon: "none"
+        });
+        return false;
+      }
+      if (!regName.test(name.value)) {
+        common_vendor.index.showToast({
+          title: "姓名格式错误",
+          icon: "none"
+        });
+        return false;
+      }
+      if (!number.value) {
+        common_vendor.index.showToast({
+          title: "请输入编号",
+          icon: "none"
+        });
+        return false;
+      }
+      if (!identity.value) {
+        common_vendor.index.showToast({
+          title: "请输入身份证",
+          icon: "none"
+        });
+        return false;
+      }
+      if (!regIdentity.test(identity.value)) {
+        common_vendor.index.showToast({
+          title: "证件号格式错误",
+          icon: "none"
+        });
+        return false;
+      }
+      return true;
+    };
     return (_ctx, _cache) => {
-      return {};
+      return {
+        a: name.value,
+        b: common_vendor.o(($event) => name.value = $event.detail.value),
+        c: number.value,
+        d: common_vendor.o(($event) => number.value = $event.detail.value),
+        e: identity.value,
+        f: common_vendor.o(($event) => identity.value = $event.detail.value),
+        g: common_vendor.o(handleConfirm)
+      };
     };
   }
 };

Dosya farkı çok büyük olduğundan ihmal edildi
+ 1 - 1
unpackage/dist/dev/mp-weixin/pages/bind/bind.wxml


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

@@ -20,10 +20,15 @@
   height: 90rpx;
   font-size: 28rpx;
 }
+.container .body .body_row .row_text.data-v-8c1ad2ae {
+  flex: 1;
+  padding-right: 30rpx;
+  text-align-last: justify;
+}
 .container .body .body_row .row_input.data-v-8c1ad2ae {
   box-sizing: border-box;
   padding: 0 30rpx;
-  width: 628rpx;
+  width: 590rpx;
   height: 90rpx;
   border-radius: 15rpx;
   background-color: #f2f2f2;

+ 18 - 8
unpackage/dist/dev/mp-weixin/pages/change/change.js

@@ -3,30 +3,40 @@ const common_vendor = require("../../common/vendor.js");
 const _sfc_main = {
   __name: "change",
   setup(__props) {
-    common_vendor.onLoad(() => {
+    common_vendor.onLoad((options) => {
+      list.value = JSON.parse(options.list) || [];
+      currentId.value = options.id;
+      list.value.forEach((ele) => {
+        if (ele.id == currentId.value) {
+          ele.isCheck = true;
+        }
+      });
     });
-    const list = common_vendor.ref([
-      { id: 1, name: "张三", number: "26105615262", isCheck: false },
-      { id: 2, name: "李四", number: "26105615262", isCheck: false },
-      { id: 3, name: "王五", number: "26105615262", isCheck: false }
-    ]);
+    const currentId = common_vendor.ref();
+    const list = common_vendor.ref([]);
     const change = (item) => {
       list.value.forEach((ele) => {
         ele.isCheck = false;
       });
       item.isCheck = !item.isCheck;
     };
+    const handleConfirm = () => {
+      const temObj = list.value.find((ele) => ele.isCheck);
+      common_vendor.index.$emit("updateObj", temObj);
+      common_vendor.index.navigateBack(1);
+    };
     return (_ctx, _cache) => {
       return {
         a: common_vendor.f(list.value, (item, k0, i0) => {
           return {
             a: item.isCheck,
             b: common_vendor.t(item.name),
-            c: common_vendor.t(item.number),
+            c: common_vendor.t(item.cardNo),
             d: item.id,
             e: common_vendor.o(($event) => change(item), item.id)
           };
-        })
+        }),
+        b: common_vendor.o(handleConfirm)
       };
     };
   }

+ 1 - 1
unpackage/dist/dev/mp-weixin/pages/change/change.wxml

@@ -1 +1 @@
-<view class="container data-v-7835c6a4"><view class="body data-v-7835c6a4"><view wx:for="{{a}}" wx:for-item="item" wx:key="d" class="body_box data-v-7835c6a4" bindtap="{{item.e}}"><radio class="box_radio data-v-7835c6a4" checked="{{item.a}}" color="#1E7DFB"/><view class="box_info data-v-7835c6a4"><view class=" data-v-7835c6a4">{{item.b}}</view><view class=" data-v-7835c6a4">{{item.c}}</view></view></view><view class="body_btn data-v-7835c6a4">确认</view></view></view>
+<view class="container data-v-7835c6a4"><view class="body data-v-7835c6a4"><view wx:for="{{a}}" wx:for-item="item" wx:key="d" class="body_box data-v-7835c6a4" bindtap="{{item.e}}"><radio class="box_radio data-v-7835c6a4" checked="{{item.a}}" color="#1E7DFB"/><view class="box_info data-v-7835c6a4"><view class=" data-v-7835c6a4">{{item.b}}</view><view class=" data-v-7835c6a4">{{item.c}}</view></view></view><view class="body_btn data-v-7835c6a4" bindtap="{{b}}">确认</view></view></view>

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

@@ -32,7 +32,7 @@ const _sfc_main = {
     ]);
     const appType = common_vendor.ref("");
     common_vendor.onLoad((options) => {
-      appType.value = options.type;
+      appType.value = options.type || "";
     });
     const changeInputValue = (data) => {
       console.log(data);

+ 1 - 1
unpackage/dist/dev/mp-weixin/pages/grade/grade.wxss

@@ -10,7 +10,7 @@
 .container .img_bg.data-v-7d1a7ab2 {
   position: absolute;
   top: -70rpx;
-  right: -32rpx;
+  right: 0;
   width: 589rpx;
   height: 320rpx;
   pointer-events: none;

+ 100 - 34
unpackage/dist/dev/mp-weixin/pages/home/home.js

@@ -1,13 +1,15 @@
 "use strict";
 const common_vendor = require("../../common/vendor.js");
+const utils_api = require("../../utils/api.js");
 if (!Array) {
   const _easycom_uv_qrcode2 = common_vendor.resolveComponent("uv-qrcode");
   _easycom_uv_qrcode2();
 }
 const _easycom_uv_qrcode = () => "../../uni_modules/uv-qrcode/components/uv-qrcode/uv-qrcode.js";
 if (!Math) {
-  _easycom_uv_qrcode();
+  (_easycom_uv_qrcode + NoData)();
 }
+const NoData = () => "../../components/noData.js";
 const _sfc_main = {
   __name: "home",
   setup(__props) {
@@ -22,15 +24,23 @@ const _sfc_main = {
           customBarH.value = custom.height;
         }
       });
-      userType.value = common_vendor.index.getStorageSync("userType");
-      console.log("身份类型", userType.value);
-      const appList = common_vendor.index.getStorageSync("appList");
-      if (appList) {
-        useAppList.value = filterApp(list.value, appList);
+      userInfo.value = common_vendor.index.getStorageSync("userInfo");
+      if (userInfo.value.identityId == 1) {
+        getChildMsg();
       }
+      getUseAppList();
+      common_vendor.index.$on("updateObj", updateObj);
+    });
+    common_vendor.onShow(() => {
+      getQrcode();
     });
     common_vendor.onPullDownRefresh(() => {
+      getQrcode();
       qrcodeRef.value.remake();
+      if (userInfo.value.identityId == 1) {
+        getChildMsg();
+      }
+      getUseAppList();
       setTimeout(() => {
         common_vendor.index.stopPullDownRefresh();
       }, 1500);
@@ -42,53 +52,86 @@ const _sfc_main = {
         showHeader.value = false;
       }
     });
-    const userType = common_vendor.ref();
+    const userInfo = common_vendor.ref({});
+    const childMsgList = common_vendor.ref([]);
+    const currentChild = common_vendor.ref({});
     const showHeader = common_vendor.ref(false);
     const statusBarH = common_vendor.ref(0);
     const customBarH = common_vendor.ref(0);
     const qrcodeRef = common_vendor.ref(null);
-    const list = common_vendor.ref([
+    common_vendor.ref([
       {
         id: 3,
         title: "学生轨迹",
-        url: "../../static/images/icon.png",
         path: "/pages/track/track"
       },
       {
         id: 7,
         title: "消息通知",
-        url: "../../static/images/icon.png",
         path: "/pages/msgWarn/msgWarn"
       },
       {
         id: 8,
         title: "访客预约",
-        url: "../../static/images/icon.png",
         path: "/pagesReservation/reservation/reservation"
       },
       {
         id: 10,
         title: "校园预警",
-        url: "../../static/images/icon.png",
         path: "/pagesWarning/home/home"
       },
       {
         id: 11,
         title: "通讯录",
-        url: "../../static/images/icon.png",
-        path: "/pages/grade/grade?type=通讯录"
+        path: "/pages/grade/grade"
       }
     ]);
     const useAppList = common_vendor.ref([]);
-    const QRCodeUrl = common_vendor.ref("123");
+    const QRCodeUrl = common_vendor.ref("");
     const options = {
-      typeNumber: 4,
+      typeNumber: -1,
       foregroundImageBorderRadius: 5,
       foregroundImageSrc: "/static/images/school-logo.jpg"
     };
+    const getQrcode = async () => {
+      const res = await utils_api.myRequest({
+        url: "/wanzai/api/smartQrcode/generateQrcode",
+        data: {
+          userId: common_vendor.index.getStorageSync("userInfo").id
+        }
+      });
+      QRCodeUrl.value = res.data.qrcode;
+    };
+    const getChildMsg = async () => {
+      const res = await utils_api.myRequest({
+        url: "/wanzai/api/smartUser/queryAffiliateUserById",
+        data: {
+          id: common_vendor.index.getStorageSync("userInfo").id
+        }
+      });
+      childMsgList.value = res.data;
+      if (childMsgList.value.length) {
+        currentChild.value = childMsgList.value[0];
+      }
+    };
+    const getUseAppList = async () => {
+      const res = await utils_api.myRequest({
+        url: "/wanzai/api/smartIdentity/queryIdentityApplyById",
+        data: {
+          id: common_vendor.index.getStorageSync("userInfo").identityId
+        }
+      });
+      useAppList.value = res.data;
+    };
     const goPage = (url) => {
       if (url === "/pages/track/track") {
-        if (userType.value == 1) {
+        if (userInfo.value.identityId == 1) {
+          common_vendor.index.navigateTo({
+            url: `/pages/track/track?id=${currentChild.value.id}`
+          });
+          return;
+        }
+        if (userInfo.value.identityId == 3) {
           common_vendor.index.navigateTo({
             url: "/pages/grade/grade?type=学生轨迹"
           });
@@ -107,10 +150,8 @@ const _sfc_main = {
         url: `/pages/quickMark/quickMark?value=${QRCodeUrl.value}`
       });
     };
-    const filterApp = (arr1, arr2) => {
-      return arr1.filter((item) => {
-        return arr2.includes(item.title);
-      });
+    const updateObj = (data) => {
+      currentChild.value = data;
     };
     return (_ctx, _cache) => {
       return common_vendor.e({
@@ -121,32 +162,57 @@ const _sfc_main = {
         e: customBarH.value * 2 + "rpx",
         f: statusBarH.value * 2 + "rpx",
         g: showHeader.value,
-        h: common_vendor.t(userType.value === 0 ? "家长" : "教师"),
-        i: common_vendor.sr(qrcodeRef, "07e72d3c-0", {
+        h: common_vendor.t(userInfo.value.name),
+        i: userInfo.value.identityId == 1
+      }, userInfo.value.identityId == 1 ? {} : {}, {
+        j: userInfo.value.identityId == 2
+      }, userInfo.value.identityId == 2 ? {} : {}, {
+        k: userInfo.value.identityId == 3
+      }, userInfo.value.identityId == 3 ? {} : {}, {
+        l: common_vendor.sr(qrcodeRef, "07e72d3c-0", {
           "k": "qrcodeRef"
         }),
-        j: common_vendor.o(handleClickCode),
-        k: common_vendor.p({
+        m: common_vendor.o(handleClickCode),
+        n: common_vendor.p({
           size: "82rpx",
           value: QRCodeUrl.value,
           options
         }),
-        l: userType.value == 0
-      }, userType.value == 0 ? {
-        m: common_vendor.o(($event) => goPage("/pages/myMsg/myMsg")),
-        n: common_vendor.o(($event) => goPage("/pages/change/change")),
-        o: common_vendor.o(($event) => goPage("/pages/bind/bind")),
-        p: common_vendor.o(($event) => goPage("/pages/bind/bind"))
+        o: userInfo.value.identityId == 1
+      }, userInfo.value.identityId == 1 ? common_vendor.e({
+        p: childMsgList.value.length
+      }, childMsgList.value.length ? {
+        q: currentChild.value.headImage || "../../static/images/user-photo.png"
       } : {}, {
-        q: common_vendor.f(useAppList.value, (item, k0, i0) => {
+        r: childMsgList.value.length
+      }, childMsgList.value.length ? {
+        s: common_vendor.t(currentChild.value.name)
+      } : {}, {
+        t: childMsgList.value.length
+      }, childMsgList.value.length ? {
+        v: common_vendor.o(($event) => goPage(`/pages/myMsg/myMsg?id=${currentChild.value.id}`))
+      } : {}, {
+        w: childMsgList.value.length > 1
+      }, childMsgList.value.length > 1 ? {
+        x: common_vendor.o(($event) => goPage(`/pages/change/change?list=${JSON.stringify(childMsgList.value)}&id=${currentChild.value.id}`))
+      } : {}, {
+        y: common_vendor.o(($event) => goPage("/pages/bind/bind")),
+        z: common_vendor.o(($event) => goPage("/pages/bind/bind"))
+      }) : {}, {
+        A: useAppList.value.length
+      }, useAppList.value.length ? {
+        B: common_vendor.f(useAppList.value, (item, k0, i0) => {
           return {
             a: item.url,
             b: common_vendor.t(item.title),
             c: item.id,
             d: common_vendor.o(($event) => goPage(item.path), item.id)
           };
-        }),
-        r: common_vendor.s(_ctx.__cssVars())
+        })
+      } : {}, {
+        C: !useAppList.value.length
+      }, !useAppList.value.length ? {} : {}, {
+        D: common_vendor.s(_ctx.__cssVars())
       });
     };
   }

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

@@ -3,6 +3,7 @@
   "enablePullDownRefresh": true,
   "navigationStyle": "custom",
   "usingComponents": {
-    "uv-qrcode": "../../uni_modules/uv-qrcode/components/uv-qrcode/uv-qrcode"
+    "uv-qrcode": "../../uni_modules/uv-qrcode/components/uv-qrcode/uv-qrcode",
+    "no-data": "../../components/noData"
   }
 }

Dosya farkı çok büyük olduğundan ihmal edildi
+ 1 - 1
unpackage/dist/dev/mp-weixin/pages/home/home.wxml


+ 21 - 79
unpackage/dist/dev/mp-weixin/pages/index/index.js

@@ -1,95 +1,37 @@
 "use strict";
 const common_vendor = require("../../common/vendor.js");
-const common_assets = require("../../common/assets.js");
-if (!Array) {
-  const _easycom_uv_code2 = common_vendor.resolveComponent("uv-code");
-  _easycom_uv_code2();
-}
-const _easycom_uv_code = () => "../../uni_modules/uv-code/components/uv-code/uv-code.js";
-if (!Math) {
-  _easycom_uv_code();
-}
+const utils_api = require("../../utils/api.js");
 const _sfc_main = {
   __name: "index",
   setup(__props) {
-    const phone = common_vendor.ref("");
-    const codeValue = common_vendor.ref("");
-    const codeDom = common_vendor.ref(null);
-    const btnFlag = common_vendor.computed(() => {
-      const regPhone = /^1[3-9]\d{9}$/;
-      if (phone.value && regPhone.test(phone.value) && codeValue.value) {
-        return true;
-      } else {
-        return false;
-      }
-    });
-    const tips = common_vendor.ref("");
-    common_vendor.ref(["学生轨迹", "消息通知", "访客预约", "校园预警"]);
-    const tlist = common_vendor.ref(["学生轨迹", "消息通知", "访客预约", "校园预警", "通讯录"]);
     common_vendor.onLoad(() => {
+      common_vendor.index.login({
+        success: (res) => {
+          vertify(res.code);
+        }
+      });
     });
-    const getCode = () => {
-      const regPhone = /^1[3-9]\d{9}$/;
-      if (phone.value && regPhone.test(phone.value)) {
-        if (codeDom.value.canGetCode) {
-          common_vendor.index.showLoading({
-            title: "正在获取验证码"
-          });
-          setTimeout(() => {
-            common_vendor.index.hideLoading();
-            common_vendor.index.showToast({
-              title: "验证码已发送",
-              icon: "none"
-            });
-            codeDom.value.start();
-          }, 2e3);
-        } else {
-          common_vendor.index.showToast({
-            title: "倒计时结束后再发送",
-            icon: "none"
-          });
+    const vertify = async (code) => {
+      const res = await utils_api.myRequest({
+        url: "/wanzai/api/wechat/vertify",
+        data: {
+          code
         }
+      });
+      if (res.code == 200) {
+        common_vendor.index.setStorageSync("token", JSON.parse(res.message).token);
+        common_vendor.index.setStorageSync("userInfo", JSON.parse(res.message).user[0]);
+        common_vendor.index.redirectTo({
+          url: "/pages/home/home"
+        });
       } else {
-        common_vendor.index.showToast({
-          title: "请先输入正确的手机号码",
-          icon: "none"
+        common_vendor.index.redirectTo({
+          url: "/pages/login/login"
         });
       }
     };
-    const handleLogin = () => {
-      let userType = 1;
-      common_vendor.index.setStorageSync("userType", userType);
-      {
-        common_vendor.index.setStorageSync("appList", tlist.value);
-        common_vendor.index.setStorageSync("userId", 26);
-      }
-      common_vendor.index.navigateTo({
-        url: "/pages/home/home"
-      });
-    };
-    const codeChange = (text) => {
-      tips.value = text;
-    };
     return (_ctx, _cache) => {
-      return {
-        a: common_assets._imports_0,
-        b: phone.value,
-        c: common_vendor.o(($event) => phone.value = $event.detail.value),
-        d: codeValue.value,
-        e: common_vendor.o(($event) => codeValue.value = $event.detail.value),
-        f: common_vendor.sr(codeDom, "1cf27b2a-0", {
-          "k": "codeDom"
-        }),
-        g: common_vendor.o(codeChange),
-        h: common_vendor.p({
-          uniqueKey: "login",
-          keepRunning: true
-        }),
-        i: common_vendor.t(tips.value),
-        j: common_vendor.o(getCode),
-        k: common_vendor.unref(btnFlag) ? 1 : "",
-        l: common_vendor.o(handleLogin)
-      };
+      return {};
     };
   }
 };

+ 2 - 4
unpackage/dist/dev/mp-weixin/pages/index/index.json

@@ -1,6 +1,4 @@
 {
-  "navigationBarTitleText": "登录",
-  "usingComponents": {
-    "uv-code": "../../uni_modules/uv-code/components/uv-code/uv-code"
-  }
+  "navigationBarTitleText": "授权",
+  "usingComponents": {}
 }

Dosya farkı çok büyük olduğundan ihmal edildi
+ 1 - 1
unpackage/dist/dev/mp-weixin/pages/index/index.wxml


+ 0 - 67
unpackage/dist/dev/mp-weixin/pages/index/index.wxss

@@ -1,73 +1,6 @@
 /* 水平间距 */
 /* 水平间距 */
 .container.data-v-1cf27b2a {
-  display: flex;
-  flex-direction: column;
-  align-items: center;
   min-height: 100vh;
   background-color: #f8f8fa;
-}
-.container .img.data-v-1cf27b2a {
-  margin-top: 120rpx;
-  width: 200rpx;
-  height: 200rpx;
-  border-radius: 20rpx;
-}
-.container .logo_name.data-v-1cf27b2a {
-  margin-top: 25rpx;
-  font-size: 36rpx;
-}
-.container .phone.data-v-1cf27b2a {
-  box-sizing: border-box;
-  margin-top: 80rpx;
-  padding: 0 20rpx;
-  width: 538rpx;
-  height: 80rpx;
-  border-radius: 8rpx;
-  box-shadow: 0 0 10rpx #ccc;
-  background-color: #fff;
-}
-.container .phone .phone_input.data-v-1cf27b2a {
-  height: 100%;
-}
-.container .code.data-v-1cf27b2a {
-  display: flex;
-  justify-content: space-between;
-  align-items: center;
-  box-sizing: border-box;
-  margin-top: 40rpx;
-  padding: 0 20rpx;
-  width: 538rpx;
-  height: 80rpx;
-  border-radius: 8rpx;
-  box-shadow: 0 0 10rpx #ccc;
-  background-color: #fff;
-}
-.container .code .code_input.data-v-1cf27b2a {
-  width: 55%;
-  height: 100%;
-}
-.container .code .code_box.data-v-1cf27b2a {
-  display: flex;
-  justify-content: center;
-  align-items: center;
-  width: 35%;
-  height: 80rpx;
-  color: #3c9cff;
-  font-size: 26rpx;
-}
-.container .loginBtn.data-v-1cf27b2a {
-  display: flex;
-  justify-content: center;
-  align-items: center;
-  margin-top: 50rpx;
-  width: 538rpx;
-  height: 80rpx;
-  color: #a0a1a4;
-  border-radius: 8rpx;
-  background-color: #e5e6eb;
-}
-.container .active.data-v-1cf27b2a {
-  color: #fff;
-  background-color: #0061ff;
 }

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

@@ -1,9 +1,12 @@
 "use strict";
 const common_vendor = require("../../common/vendor.js");
+const utils_previewImage = require("../../utils/previewImage.js");
 const _sfc_main = {
   __name: "myCenter",
   setup(__props) {
+    const userInfo = common_vendor.ref({});
     common_vendor.onLoad(() => {
+      userInfo.value = common_vendor.index.getStorageSync("userInfo");
     });
     const list = common_vendor.ref([
       {
@@ -26,7 +29,11 @@ const _sfc_main = {
     };
     return (_ctx, _cache) => {
       return {
-        a: common_vendor.f(list.value, (item, k0, i0) => {
+        a: userInfo.value.headImage || "../../static/images/header.png",
+        b: common_vendor.o(($event) => common_vendor.unref(utils_previewImage.previewImage)(userInfo.value.headImage || "../../static/images/header.png")),
+        c: common_vendor.t(userInfo.value.name),
+        d: common_vendor.t(userInfo.value.departmentName),
+        e: common_vendor.f(list.value, (item, k0, i0) => {
           return {
             a: item.url,
             b: common_vendor.t(item.title),

Dosya farkı çok büyük olduğundan ihmal edildi
+ 1 - 1
unpackage/dist/dev/mp-weixin/pages/myCenter/myCenter.wxml


+ 55 - 6
unpackage/dist/dev/mp-weixin/pages/myMsg/myMsg.js

@@ -1,12 +1,61 @@
 "use strict";
 const common_vendor = require("../../common/vendor.js");
+const utils_previewImage = require("../../utils/previewImage.js");
+const utils_api = require("../../utils/api.js");
 const _sfc_main = {
-  data() {
-    return {};
+  __name: "myMsg",
+  setup(__props) {
+    const userInfo = common_vendor.ref({});
+    common_vendor.onLoad((options) => {
+      if (options.id) {
+        getUserInfo(options.id);
+      } else {
+        userInfo.value = common_vendor.index.getStorageSync("userInfo");
+      }
+    });
+    const getUserInfo = async (id) => {
+      const res = await utils_api.myRequest({
+        url: "/wanzai/api/smartUser/queryInfoData",
+        data: {
+          id
+        }
+      });
+      userInfo.value = res.data;
+    };
+    return (_ctx, _cache) => {
+      return common_vendor.e({
+        a: common_vendor.t(userInfo.value.cardNo),
+        b: common_vendor.t(userInfo.value.name),
+        c: userInfo.value.identityId == 1
+      }, userInfo.value.identityId == 1 ? {} : {}, {
+        d: userInfo.value.identityId == 2
+      }, userInfo.value.identityId == 2 ? {} : {}, {
+        e: userInfo.value.identityId == 3
+      }, userInfo.value.identityId == 3 ? {} : {}, {
+        f: common_vendor.t(userInfo.value.idCard ? userInfo.value.idCard : "暂无"),
+        g: common_vendor.t(userInfo.value.sexId == 0 ? "女" : "男"),
+        h: common_vendor.t(userInfo.value.departmentName),
+        i: userInfo.value.headImage
+      }, userInfo.value.headImage ? {
+        j: userInfo.value.headImage,
+        k: common_vendor.o(($event) => common_vendor.unref(utils_previewImage.previewImage)(userInfo.value.headImage))
+      } : {}, {
+        l: common_vendor.t(userInfo.value.grade ? userInfo.value.grade : "暂无"),
+        m: common_vendor.t(userInfo.value.college ? userInfo.value.college : "暂无"),
+        n: common_vendor.t(userInfo.value.school_class ? userInfo.value.school_class : "暂无"),
+        o: common_vendor.t(userInfo.value.campus ? userInfo.value.campus : "暂无"),
+        p: common_vendor.t(userInfo.value.dormitoryNumber ? userInfo.value.dormitoryNumber : "暂无"),
+        q: common_vendor.t(userInfo.value.phone ? userInfo.value.phone : "暂无"),
+        r: common_vendor.t(userInfo.value.affiliateName ? userInfo.value.affiliateName : "暂无"),
+        s: common_vendor.t(userInfo.value.title ? userInfo.value.title : "暂无"),
+        t: common_vendor.t(userInfo.value.address ? userInfo.value.address : "暂无"),
+        v: common_vendor.t(userInfo.value.nation ? userInfo.value.nation : "暂无"),
+        w: common_vendor.t(userInfo.value.ofStudent ? userInfo.value.ofStudent : "暂无"),
+        x: common_vendor.t(userInfo.value.graduate ? userInfo.value.graduate : "暂无"),
+        y: common_vendor.t(userInfo.value.zhiwu ? userInfo.value.zhiwu : "暂无")
+      });
+    };
   }
 };
-function _sfc_render(_ctx, _cache, $props, $setup, $data, $options) {
-  return {};
-}
-const MiniProgramPage = /* @__PURE__ */ common_vendor._export_sfc(_sfc_main, [["render", _sfc_render], ["__scopeId", "data-v-a95eda84"], ["__file", "E:/workSpace/WanZai_School_app/pages/myMsg/myMsg.vue"]]);
+const MiniProgramPage = /* @__PURE__ */ common_vendor._export_sfc(_sfc_main, [["__scopeId", "data-v-a95eda84"], ["__file", "E:/workSpace/WanZai_School_app/pages/myMsg/myMsg.vue"]]);
 wx.createPage(MiniProgramPage);

Dosya farkı çok büyük olduğundan ihmal edildi
+ 1 - 1
unpackage/dist/dev/mp-weixin/pages/myMsg/myMsg.wxml


+ 5 - 0
unpackage/dist/dev/mp-weixin/pages/myMsg/myMsg.wxss

@@ -29,6 +29,11 @@
   align-items: center;
   color: #808080;
 }
+.container .box .box_item .item_value .img.data-v-a95eda84 {
+  width: 65rpx;
+  height: 65rpx;
+  border-radius: 50%;
+}
 .container .box .box_item .item_value .value_img.data-v-a95eda84 {
   margin-left: 10rpx;
   width: 31rpx;

+ 58 - 2
unpackage/dist/dev/mp-weixin/pages/quickMark/quickMark.js

@@ -1,5 +1,6 @@
 "use strict";
 const common_vendor = require("../../common/vendor.js");
+const utils_api = require("../../utils/api.js");
 if (!Array) {
   const _easycom_uv_qrcode2 = common_vendor.resolveComponent("uv-qrcode");
   _easycom_uv_qrcode2();
@@ -14,20 +15,75 @@ const _sfc_main = {
     const QRCodeUrl = common_vendor.ref("");
     const brightness = common_vendor.ref(0);
     const options = {
-      typeNumber: 4,
+      typeNumber: -1,
       foregroundImageBorderRadius: 5,
       foregroundImageSrc: "/static/images/school-logo.jpg"
     };
+    const timer = common_vendor.ref(null);
+    const timerCode = common_vendor.ref(null);
     common_vendor.onLoad((data) => {
-      common_vendor.index.onUserCaptureScreen(showTips);
       QRCodeUrl.value = data.value;
+      common_vendor.index.onUserCaptureScreen(showTips);
       getBrightness();
       setBrightness(1);
+      timer.value = setInterval(() => {
+        common_vendor.index.getScreenRecordingState({
+          success: (res) => {
+            if (res.state == "on") {
+              common_vendor.index.showModal({
+                title: "提示",
+                content: "此页面不允许录屏",
+                showCancel: false,
+                success: () => {
+                  common_vendor.index.redirectTo({
+                    url: "/pages/home/home"
+                  });
+                }
+              });
+            }
+          }
+        });
+      }, 1e3);
+      if (common_vendor.wx$1.setVisualEffectOnCapture) {
+        common_vendor.wx$1.setVisualEffectOnCapture({
+          visualEffect: "hidden",
+          complete: function(res) {
+            console.log("开启", res);
+          }
+        });
+      }
+    });
+    common_vendor.onShow(() => {
+      if (timerCode.value) {
+        clearInterval(timerCode.value);
+      }
+      timerCode.value = setInterval(() => {
+        getQrcode();
+      }, 55e3);
     });
     common_vendor.onUnload(() => {
       common_vendor.index.offUserCaptureScreen();
       setBrightness(brightness.value);
+      clearInterval(timer.value);
+      if (common_vendor.wx$1.setVisualEffectOnCapture) {
+        common_vendor.wx$1.setVisualEffectOnCapture({
+          visualEffect: "none",
+          complete: function(res) {
+            console.log("解除", res);
+          }
+        });
+      }
+      clearInterval(timerCode.value);
     });
+    const getQrcode = async () => {
+      const res = await utils_api.myRequest({
+        url: "/wanzai/api/smartQrcode/generateQrcode",
+        data: {
+          userId: common_vendor.index.getStorageSync("userInfo").id
+        }
+      });
+      QRCodeUrl.value = res.data.qrcode;
+    };
     const getBrightness = () => {
       common_vendor.index.getScreenBrightness({
         success: (res) => {

+ 1 - 1
unpackage/dist/dev/mp-weixin/pages/student/student.wxss

@@ -10,7 +10,7 @@
 .container .img_bg.data-v-809c9d48 {
   position: absolute;
   top: -70rpx;
-  right: -32rpx;
+  right: 0;
   width: 589rpx;
   height: 320rpx;
   pointer-events: none;

+ 49 - 48
unpackage/dist/dev/mp-weixin/pages/track/track.js

@@ -1,5 +1,7 @@
 "use strict";
 const common_vendor = require("../../common/vendor.js");
+const utils_api = require("../../utils/api.js");
+const utils_previewImage = require("../../utils/previewImage.js");
 if (!Array) {
   const _easycom_uv_steps_item2 = common_vendor.resolveComponent("uv-steps-item");
   const _easycom_uv_steps2 = common_vendor.resolveComponent("uv-steps");
@@ -8,90 +10,89 @@ if (!Array) {
 const _easycom_uv_steps_item = () => "../../uni_modules/uv-steps/components/uv-steps-item/uv-steps-item.js";
 const _easycom_uv_steps = () => "../../uni_modules/uv-steps/components/uv-steps/uv-steps.js";
 if (!Math) {
-  (MapContainer + _easycom_uv_steps_item + _easycom_uv_steps)();
+  (MapContainer + _easycom_uv_steps_item + _easycom_uv_steps + NoData)();
 }
 const MapContainer = () => "../../components/MapContainer.js";
+const NoData = () => "../../components/noData.js";
 const _sfc_main = {
   __name: "track",
   setup(__props) {
-    common_vendor.onLoad(() => {
+    common_vendor.onLoad((options) => {
+      currentId.value = options.id;
+      getData();
     });
+    const currentId = common_vendor.ref();
     const activeIndex = common_vendor.ref(0);
     const searchList = common_vendor.ref([
       {
-        id: 0,
+        value: 0,
         text: "今天"
       },
       {
-        id: 1,
+        value: 1,
         text: "昨天"
       },
       {
-        id: 2,
+        value: 2,
         text: "前天"
       }
     ]);
-    const list = common_vendor.ref([
-      {
-        id: 1,
-        title: "入校06:00",
-        desc: "地点:万载三中大门口"
-      },
-      {
-        id: 2,
-        title: "入校07:00",
-        desc: "地点:万载三中大门口"
-      },
-      {
-        id: 3,
-        title: "入校08:00",
-        desc: "地点:万载三中大门口"
-      },
-      {
-        id: 4,
-        title: "入校09:00",
-        desc: "地点:万载三中大门口"
-      },
-      {
-        id: 5,
-        title: "入校10:00",
-        desc: "地点:万载三中大门口"
-      }
-    ]);
+    const list = common_vendor.ref([]);
     const customStyle = {
       marginBottom: "30rpx"
     };
-    const changeIndex = (id) => {
-      activeIndex.value = id;
+    const getData = async () => {
+      const res = await utils_api.myRequest({
+        url: "/wanzai/api/smartFaceDiscern/track",
+        data: {
+          id: currentId.value,
+          dateTime: activeIndex.value
+        }
+      });
+      if (res.code == 200) {
+        list.value = res.data;
+      }
+    };
+    const changeIndex = (v) => {
+      activeIndex.value = v;
+      getData();
     };
     return (_ctx, _cache) => {
-      return {
+      return common_vendor.e({
         a: common_vendor.f(searchList.value, (item, k0, i0) => {
           return {
             a: common_vendor.t(item.text),
-            b: item.id === activeIndex.value ? 1 : "",
-            c: item.id,
-            d: common_vendor.o(($event) => changeIndex(item.id), item.id)
+            b: item.value === activeIndex.value ? 1 : "",
+            c: item.value,
+            d: common_vendor.o(($event) => changeIndex(item.value), item.value)
           };
         }),
-        b: common_vendor.f(list.value, (item, k0, i0) => {
-          return {
-            a: common_vendor.t(item.title),
-            b: common_vendor.t(item.desc),
-            c: item.id,
-            d: "132a14af-2-" + i0 + ",132a14af-1"
-          };
+        b: list.value.length
+      }, list.value.length ? {
+        c: common_vendor.f(list.value, (item, k0, i0) => {
+          return common_vendor.e({
+            a: common_vendor.t(item.type),
+            b: common_vendor.t(item.location),
+            c: common_vendor.t(item.dateTime),
+            d: item.image
+          }, item.image ? {
+            e: item.image,
+            f: common_vendor.o(($event) => common_vendor.unref(utils_previewImage.previewImage)(item.image), item.id)
+          } : {}, {
+            g: item.id,
+            h: "132a14af-2-" + i0 + ",132a14af-1"
+          });
         }),
-        c: common_vendor.p({
+        d: common_vendor.p({
           customStyle
         }),
-        d: common_vendor.p({
+        e: common_vendor.p({
           activeColor: "#1E7DFB",
           direction: "column",
           dot: true,
           current: list.value.length
         })
-      };
+      } : {});
     };
   }
 };

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

@@ -4,6 +4,7 @@
   "usingComponents": {
     "uv-steps-item": "../../uni_modules/uv-steps/components/uv-steps-item/uv-steps-item",
     "uv-steps": "../../uni_modules/uv-steps/components/uv-steps/uv-steps",
-    "map-container": "../../components/MapContainer"
+    "map-container": "../../components/MapContainer",
+    "no-data": "../../components/noData"
   }
 }

Dosya farkı çok büyük olduğundan ihmal edildi
+ 1 - 1
unpackage/dist/dev/mp-weixin/pages/track/track.wxml


+ 5 - 0
unpackage/dist/dev/mp-weixin/pages/track/track.wxss

@@ -44,7 +44,12 @@
   font-weight: bold;
 }
 .container .track .track_desc.data-v-132a14af {
+  display: flex;
   margin-top: 10rpx;
   color: #808080;
   font-size: 24rpx;
+}
+.container .track .track_desc .img.data-v-132a14af {
+  width: 100rpx;
+  height: 160rpx;
 }

+ 88 - 75
unpackage/dist/dev/mp-weixin/pagesReservation/backlog/backlog.js

@@ -9,9 +9,10 @@ if (!Array) {
 const _easycom_uni_segmented_control = () => "../../uni_modules/uni-segmented-control/components/uni-segmented-control/uni-segmented-control.js";
 const _easycom_uni_popup = () => "../../uni_modules/uni-popup/components/uni-popup/uni-popup.js";
 if (!Math) {
-  (_easycom_uni_segmented_control + _easycom_uni_popup + tabber)();
+  (_easycom_uni_segmented_control + NoData + _easycom_uni_popup + Tabber)();
 }
-const tabber = () => "../../components/tabber.js";
+const Tabber = () => "../../components/tabber.js";
+const NoData = () => "../../components/noData.js";
 const _sfc_main = {
   __name: "backlog",
   setup(__props) {
@@ -19,35 +20,7 @@ const _sfc_main = {
     const currentPage = common_vendor.ref(1);
     const total = common_vendor.ref(0);
     const controlList = ["待审核", "已拒绝", "已推送"];
-    const list = common_vendor.ref([
-      {
-        id: 1,
-        name: "张三",
-        time: "2023-12-13  10:23",
-        type: "待审核",
-        desc: "给孩子送棉被",
-        status: 0,
-        name2: "小刘"
-      },
-      {
-        id: 2,
-        name: "张三",
-        time: "2023-12-13  10:23",
-        type: "已拒绝",
-        desc: "给孩子送棉被",
-        status: 0,
-        name2: "小刘"
-      },
-      {
-        id: 3,
-        name: "张三",
-        time: "2023-12-13  10:23",
-        type: "已推送",
-        desc: "给孩子送棉被",
-        status: 0,
-        name2: "小刘"
-      }
-    ]);
+    const list = common_vendor.ref([]);
     const popup = common_vendor.ref(null);
     const popObj = common_vendor.ref({});
     common_vendor.onLoad(() => {
@@ -70,7 +43,7 @@ const _sfc_main = {
         data: {
           currentPage: currentPage.value,
           pageCount: 6,
-          userId: common_vendor.index.getStorageSync("userId"),
+          userId: common_vendor.index.getStorageSync("userInfo").id,
           type: activeCurrent.value - 0 + 1
         }
       });
@@ -89,11 +62,41 @@ const _sfc_main = {
       popObj.value = item;
       popup.value.open();
     };
-    const handleReject = () => {
-      console.log("拒绝");
+    const handleReject = (id) => {
+      handleExamine(id, 2);
+    };
+    const handleAgree = (id) => {
+      handleExamine(id, 1);
+    };
+    const handleExamine = (id, type) => {
+      common_vendor.index.showModal({
+        title: "提示",
+        content: type == 1 ? "确定同意并推送吗?" : "确定拒绝吗?",
+        success: (res) => {
+          if (res.confirm) {
+            handleExamineReq(id, type);
+          }
+        }
+      });
     };
-    const handleAgree = () => {
-      console.log("同意");
+    const handleExamineReq = async (id, type) => {
+      await utils_api.myRequest({
+        url: "/wanzai/api/smartVisitor/examineRecord",
+        data: {
+          id,
+          type
+        }
+      });
+      common_vendor.index.showToast({
+        title: type == 1 ? "已同意该审核" : "已拒绝该审核",
+        icon: "success",
+        duration: 2e3
+      });
+      setTimeout(() => {
+        list.value = [];
+        currentPage.value = 1;
+        getData();
+      }, 2e3);
     };
     const closePop = () => {
       popup.value.close();
@@ -109,59 +112,69 @@ const _sfc_main = {
         }),
         c: common_vendor.f(list.value, (item, k0, i0) => {
           return common_vendor.e({
-            a: common_vendor.t(item.name),
-            b: common_vendor.t(item.time),
-            c: item.type == "待审核"
-          }, item.type == "待审核" ? {
-            d: common_vendor.t(item.type)
+            a: common_vendor.t(item.userName),
+            b: common_vendor.t(item.createTime),
+            c: item.statuStr == "待审核"
+          }, item.statuStr == "待审核" ? {
+            d: common_vendor.t(item.statuStr)
           } : {}, {
-            e: item.type == "已拒绝"
-          }, item.type == "已拒绝" ? {
-            f: common_vendor.t(item.type)
+            e: item.statuStr == "已拒绝"
+          }, item.statuStr == "已拒绝" ? {
+            f: common_vendor.t(item.statuStr)
           } : {}, {
-            g: item.type == "已推送"
-          }, item.type == "已推送" ? {
-            h: common_vendor.t(item.type)
+            g: item.statuStr == "已推送"
+          }, item.statuStr == "已推送" ? {
+            h: common_vendor.t(item.statuStr)
           } : {}, {
-            i: common_vendor.t(item.status === 0 ? "学生家长预约" : "其他访客预约"),
-            j: common_vendor.t(item.time),
-            k: common_vendor.t(item.desc),
-            l: common_vendor.t(item.status === 0 ? "受访学生" : "受访人"),
-            m: common_vendor.t(item.name2),
-            n: item.type == "待审核"
-          }, item.type == "待审核" ? {
-            o: common_vendor.o(handleReject, item.id),
-            p: common_vendor.o(handleAgree, item.id)
+            i: common_vendor.t(item.visitorType === 1 ? "学生家长预约" : "其他访客预约"),
+            j: common_vendor.t(item.visitorTime),
+            k: common_vendor.t(item.visitReason),
+            l: common_vendor.t(item.visitorType === 1 ? "受访学生" : "受访人"),
+            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)
           } : {}, {
             q: item.id,
             r: common_vendor.o(($event) => handleClick(item), item.id)
           });
         }),
-        d: common_vendor.o(closePop),
-        e: popObj.value.type == "待审核"
-      }, popObj.value.type == "待审核" ? {
-        f: common_vendor.t(popObj.value.type)
+        d: !list.value.length
+      }, !list.value.length ? {} : {}, {
+        e: common_vendor.o(closePop),
+        f: popObj.value.statuStr == "待审核"
+      }, popObj.value.statuStr == "待审核" ? {
+        g: common_vendor.t(popObj.value.statuStr)
       } : {}, {
-        g: popObj.value.type == "已拒绝"
-      }, popObj.value.type == "已拒绝" ? {
-        h: common_vendor.t(popObj.value.type)
+        h: popObj.value.statuStr == "已拒绝"
+      }, popObj.value.statuStr == "已拒绝" ? {
+        i: common_vendor.t(popObj.value.statuStr)
       } : {}, {
-        i: popObj.value.type == "已推送"
-      }, popObj.value.type == "已推送" ? {
-        j: common_vendor.t(popObj.value.type)
+        j: popObj.value.statuStr == "已推送"
+      }, popObj.value.statuStr == "已推送" ? {
+        k: common_vendor.t(popObj.value.statuStr)
       } : {}, {
-        k: common_vendor.t(popObj.value.name),
-        l: common_vendor.t(popObj.value.time),
-        m: common_vendor.t(popObj.value.desc),
-        n: popObj.value.type == "待审核"
-      }, popObj.value.type == "待审核" ? {
-        o: common_vendor.o(handleReject),
-        p: common_vendor.o(handleAgree)
+        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 == "待审核"
+      }, popObj.value.statuStr == "待审核" ? {
+        y: common_vendor.o(($event) => handleReject(popObj.value.id)),
+        z: common_vendor.o(($event) => handleAgree(popObj.value.id))
       } : {}, {
-        q: common_vendor.sr(popup, "a46ecdc3-1", {
+        A: common_vendor.sr(popup, "a46ecdc3-2", {
           "k": "popup"
         }),
-        r: common_vendor.p({
+        B: common_vendor.p({
           type: "center",
           ["is-mask-click"]: false
         })

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

@@ -4,6 +4,7 @@
   "usingComponents": {
     "uni-segmented-control": "../../uni_modules/uni-segmented-control/components/uni-segmented-control/uni-segmented-control",
     "uni-popup": "../../uni_modules/uni-popup/components/uni-popup/uni-popup",
-    "tabber": "../../components/tabber"
+    "tabber": "../../components/tabber",
+    "no-data": "../../components/noData"
   }
 }

Dosya farkı çok büyük olduğundan ihmal edildi
+ 1 - 1
unpackage/dist/dev/mp-weixin/pagesReservation/backlog/backlog.wxml


+ 7 - 1
unpackage/dist/dev/mp-weixin/pagesReservation/backlog/backlog.wxss

@@ -61,7 +61,11 @@
   color: #a6a6a6;
 }
 .container .body .body_box .box_info .info_box .box_value.data-v-a46ecdc3 {
+  flex: 1;
   margin-left: 95rpx;
+  overflow: hidden;
+  text-overflow: ellipsis;
+  white-space: nowrap;
 }
 .container .body .body_box .box_btn.data-v-a46ecdc3 {
   display: flex;
@@ -111,7 +115,6 @@
 }
 .container .popup_box .pop_info.data-v-a46ecdc3 {
   display: flex;
-  align-items: center;
   margin-top: 22rpx;
   padding: 0 35rpx;
   font-size: 28rpx;
@@ -119,6 +122,9 @@
 .container .popup_box .pop_info .info_key.data-v-a46ecdc3 {
   color: #999999;
 }
+.container .popup_box .pop_info .info_value.data-v-a46ecdc3 {
+  flex: 1;
+}
 .container .popup_box .pop_info .blue.data-v-a46ecdc3 {
   color: #0061ff;
 }

+ 41 - 8
unpackage/dist/dev/mp-weixin/pagesReservation/record/record.js

@@ -43,7 +43,7 @@ const _sfc_main = {
         data: {
           currentPage: currentPage.value,
           pageCount: 6,
-          userId: common_vendor.index.getStorageSync("userId"),
+          userId: common_vendor.index.getStorageSync("userInfo").id,
           type: activeCurrent.value
         }
       });
@@ -62,8 +62,34 @@ const _sfc_main = {
         getData();
       }
     };
-    const handleCancel = () => {
-      console.log("取消");
+    const handleCancel = (id) => {
+      common_vendor.index.showModal({
+        title: "提示",
+        content: "确定取消预约吗?",
+        success: (res) => {
+          if (res.confirm) {
+            handleCancelReq(id);
+          }
+        }
+      });
+    };
+    const handleCancelReq = async (id) => {
+      await utils_api.myRequest({
+        url: "/wanzai/api/smartVisitor/deleteSmartVisitorById",
+        data: {
+          id
+        }
+      });
+      common_vendor.index.showToast({
+        title: "取消预约成功",
+        icon: "none",
+        duration: 2e3
+      });
+      setTimeout(() => {
+        currentPage.value = 1;
+        list.value = [];
+        getData();
+      }, 2e3);
     };
     const closePop = () => {
       popup.value.close();
@@ -97,7 +123,7 @@ const _sfc_main = {
             j: common_vendor.t(item.visitReason),
             k: item.statuStr == "待审核"
           }, item.statuStr == "待审核" ? {
-            l: common_vendor.o(handleCancel, item.id)
+            l: common_vendor.o(($event) => handleCancel(item.id), item.id)
           } : {}, {
             m: item.id,
             n: common_vendor.o(($event) => handleClick(item), item.id)
@@ -119,12 +145,19 @@ const _sfc_main = {
         k: common_vendor.t(popObj.value.statuStr)
       } : {}, {
         l: common_vendor.t(popObj.value.userName),
-        m: common_vendor.t(popObj.value.visitorTime),
-        n: common_vendor.t(popObj.value.visitReason),
-        o: common_vendor.sr(popup, "00bd71c9-2", {
+        m: common_vendor.t(popObj.value.userPhone),
+        n: common_vendor.t(popObj.value.visitorTime),
+        o: common_vendor.t(popObj.value.userNumber),
+        p: common_vendor.t(popObj.value.visitReason),
+        q: common_vendor.t(popObj.value.carNum ? popObj.value.carNum : "无"),
+        r: common_vendor.t(popObj.value.peerNum ? popObj.value.peerNum : "无"),
+        s: common_vendor.t(popObj.value.visitorType == 1 ? "受访学生" : "受访人"),
+        t: common_vendor.t(popObj.value.respondentName),
+        v: common_vendor.t(popObj.value.responcode || popObj.value.respondentPhone),
+        w: common_vendor.sr(popup, "00bd71c9-2", {
           "k": "popup"
         }),
-        p: common_vendor.p({
+        x: common_vendor.p({
           type: "center",
           ["is-mask-click"]: false
         })

Dosya farkı çok büyük olduğundan ihmal edildi
+ 1 - 1
unpackage/dist/dev/mp-weixin/pagesReservation/record/record.wxml


+ 5 - 1
unpackage/dist/dev/mp-weixin/pagesReservation/record/record.wxss

@@ -108,14 +108,18 @@
 }
 .container .popup_box .pop_info.data-v-00bd71c9 {
   display: flex;
-  align-items: center;
+  box-sizing: border-box;
   margin-top: 22rpx;
   padding: 0 35rpx;
+  width: 100%;
   font-size: 28rpx;
 }
 .container .popup_box .pop_info .info_key.data-v-00bd71c9 {
   color: #999999;
 }
+.container .popup_box .pop_info .info_value.data-v-00bd71c9 {
+  flex: 1;
+}
 .container .popup_box .pop_info .blue.data-v-00bd71c9 {
   color: #0061ff;
 }

+ 11 - 6
unpackage/dist/dev/mp-weixin/pagesReservation/register/register.js

@@ -46,7 +46,7 @@ const _sfc_main = {
       const res = await utils_api.myRequest({
         url: "/wanzai/api/smartUser/queryAffiliateUserById",
         data: {
-          id: common_vendor.index.getStorageSync("userId")
+          id: common_vendor.index.getStorageSync("userInfo").id
         }
       });
       list.value = res.data;
@@ -72,7 +72,7 @@ const _sfc_main = {
         url: "/wanzai/api/smartVisitor/parentsAppointment",
         method: "post",
         data: {
-          userId: common_vendor.index.getStorageSync("userId"),
+          userId: common_vendor.index.getStorageSync("userInfo").id,
           visitorTime: visStartTime.value,
           visitReason: visReason.value,
           carNum: visCarNumber.value,
@@ -86,7 +86,10 @@ const _sfc_main = {
         duration: 2e3
       });
       setTimeout(() => {
-        common_vendor.index.navigateBack(1);
+        common_vendor.index.setStorageSync("Tab-activeIndex", 1);
+        common_vendor.index.redirectTo({
+          url: "/pagesReservation/record/record"
+        });
       }, 2e3);
     };
     const otherAppointment = async () => {
@@ -94,7 +97,7 @@ const _sfc_main = {
         url: "/wanzai/api/smartVisitor/otherAppointment",
         method: "post",
         data: {
-          userId: common_vendor.index.getStorageSync("userId"),
+          userId: common_vendor.index.getStorageSync("userInfo").id,
           visitorTime: visStartTime.value,
           visitReason: visReason.value,
           carNum: visCarNumber.value,
@@ -103,14 +106,16 @@ const _sfc_main = {
           respondentPhone: passivePhone.value
         }
       });
-      console.log(res);
       common_vendor.index.showToast({
         title: res.message,
         icon: "none",
         duration: 2e3
       });
       setTimeout(() => {
-        common_vendor.index.navigateBack(1);
+        common_vendor.index.setStorageSync("Tab-activeIndex", 2);
+        common_vendor.index.redirectTo({
+          url: "/pagesReservation/record/record"
+        });
       }, 2e3);
     };
     const changeStart = (e) => {

+ 6 - 7
unpackage/dist/dev/mp-weixin/pagesReservation/reservation/reservation.js

@@ -7,10 +7,9 @@ const tabber = () => "../../components/tabber.js";
 const _sfc_main = {
   __name: "reservation",
   setup(__props) {
-    const userType = common_vendor.ref("");
+    const userInfo = common_vendor.ref("");
     common_vendor.onLoad(() => {
-      userType.value = common_vendor.index.getStorageSync("userType");
-      console.log(userType.value);
+      userInfo.value = common_vendor.index.getStorageSync("userInfo");
     });
     const goPage = (url) => {
       common_vendor.index.navigateTo({
@@ -19,12 +18,12 @@ const _sfc_main = {
     };
     return (_ctx, _cache) => {
       return common_vendor.e({
-        a: userType.value == 0
-      }, userType.value == 0 ? {
+        a: userInfo.value.identityId == 1
+      }, userInfo.value.identityId == 1 ? {
         b: common_vendor.o(($event) => goPage("/pagesReservation/register/register?type=1"))
       } : {}, {
-        c: userType.value == 1
-      }, userType.value == 1 ? {
+        c: userInfo.value.identityId == 3
+      }, userInfo.value.identityId == 3 ? {
         d: common_vendor.o(($event) => goPage("/pagesReservation/register/register?type=2"))
       } : {});
     };

+ 1 - 1
unpackage/dist/dev/mp-weixin/pagesReservation/reservation/reservation.wxss

@@ -7,7 +7,7 @@
 .container .img_bg.data-v-9b609cd1 {
   position: absolute;
   top: -70rpx;
-  right: -32rpx;
+  right: 0;
   width: 589rpx;
   height: 320rpx;
   pointer-events: none;

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

@@ -9,12 +9,13 @@
       "list": [
         {
           "name": "",
-          "pathName": "pagesReservation/backlog/backlog",
+          "pathName": "pages/login/login",
           "query": "",
           "launchMode": "default",
           "scene": null
         }
       ]
     }
-  }
+  },
+  "libVersion": "3.3.2"
 }

BIN
unpackage/dist/dev/mp-weixin/static/images/icon.png


+ 3 - 8
unpackage/dist/dev/mp-weixin/uni_modules/uv-steps/components/uv-steps-item/uv-steps-item.js

@@ -33,7 +33,7 @@ const _sfc_main = {
     };
   },
   watch: {
-    "parentData"(newValue, oldValue) {
+    parentData(newValue, oldValue) {
     }
   },
   created() {
@@ -53,13 +53,8 @@ const _sfc_main = {
       return style;
     },
     statusClass() {
-      const {
-        index,
-        error
-      } = this;
-      const {
-        current
-      } = this.parentData;
+      const { index, error } = this;
+      const { current } = this.parentData;
       if (current == index) {
         return error === true ? "error" : "process";
       } else if (error) {

+ 1 - 1
unpackage/dist/dev/mp-weixin/uni_modules/uv-steps/components/uv-steps-item/uv-steps-item.wxss

@@ -31,7 +31,7 @@ view.data-v-87a44040, scroll-view.data-v-87a44040, swiper-item.data-v-87a44040 {
   justify-content: center;
   align-items: center;
   position: relative;
-  background-color: #fff;
+  background-color: #f1f6fe;
 }
 .uv-steps-item__wrapper--column.data-v-87a44040 {
   width: 20px;

+ 3 - 3
utils/api.js

@@ -1,4 +1,4 @@
-// 民宿接口前缀
+// 接口前缀
 const BASE_URL = "https://www.campussmartlife.com/smartApi"
 
 export const myRequest = (options) => {
@@ -16,7 +16,7 @@ export const myRequest = (options) => {
 			data: options.data || {},
 			timeout: 10000,
 			success: (res) => {
-				if (res.data.code == 200) {
+				if (res.data.code == 200 || res.data.code == 500) {
 					resolve(res.data)
 				} else {
 
@@ -33,7 +33,7 @@ export const myRequest = (options) => {
 			complete: (res) => {
 				uni.hideLoading({
 					complete: (hide) => {
-						if (res.data.code == 200) {
+						if (res.data.code == 200 || res.data.code == 500) {
 
 						} else {
 							uni.showToast({

+ 5 - 0
utils/previewImage.js

@@ -0,0 +1,5 @@
+export const previewImage = (imgUrl) => {
+	uni.previewImage({
+		urls: [imgUrl]
+	})
+}