Bladeren bron

添加多重身份,修改绑定手机号码功能

xiaoxin 2 jaren geleden
bovenliggende
commit
13b343586d
34 gewijzigde bestanden met toevoegingen van 930 en 146 verwijderingen
  1. 22 1
      pages.json
  2. 20 20
      pages/bind/bind.vue
  3. 248 0
      pages/editPhone/editPhone.vue
  4. 12 6
      pages/grade/grade.vue
  5. 2 1
      pages/home/home.vue
  6. 53 21
      pages/index/index.vue
  7. 22 10
      pages/login/login.vue
  8. 144 0
      pages/login2/login2.vue
  9. 2 2
      pages/main/main.vue
  10. 80 1
      pages/myCenter/myCenter.vue
  11. 19 5
      pages/myMsg/myMsg.vue
  12. 152 0
      pages/switch/switch.vue
  13. 1 0
      pages/track/track.vue
  14. 1 1
      pagesReservation/backlog/backlog.vue
  15. 4 3
      pagesReservation/record/record.vue
  16. 6 0
      pagesReservation/reservation/reservation.vue
  17. BIN
      static/images/1.png
  18. BIN
      static/images/2.png
  19. 3 0
      unpackage/dist/dev/mp-weixin/app.js
  20. 4 1
      unpackage/dist/dev/mp-weixin/app.json
  21. 3 21
      unpackage/dist/dev/mp-weixin/pages/bind/bind.js
  22. 1 1
      unpackage/dist/dev/mp-weixin/pages/bind/bind.wxml
  23. 6 6
      unpackage/dist/dev/mp-weixin/pages/grade/grade.js
  24. 1 1
      unpackage/dist/dev/mp-weixin/pages/grade/grade.json
  25. 3 19
      unpackage/dist/dev/mp-weixin/pages/index/index.js
  26. 37 4
      unpackage/dist/dev/mp-weixin/pages/myCenter/myCenter.js
  27. 1 1
      unpackage/dist/dev/mp-weixin/pages/myCenter/myCenter.wxml
  28. 33 1
      unpackage/dist/dev/mp-weixin/pages/myCenter/myCenter.wxss
  29. 20 9
      unpackage/dist/dev/mp-weixin/pages/myMsg/myMsg.js
  30. 1 1
      unpackage/dist/dev/mp-weixin/pages/myMsg/myMsg.wxml
  31. 1 1
      unpackage/dist/dev/mp-weixin/pagesReservation/backlog/backlog.js
  32. 3 3
      unpackage/dist/dev/mp-weixin/pagesReservation/record/record.js
  33. 5 0
      unpackage/dist/dev/mp-weixin/pagesReservation/reservation/reservation.js
  34. 20 6
      unpackage/dist/dev/mp-weixin/project.private.config.json

+ 22 - 1
pages.json

@@ -71,7 +71,7 @@
 		{
 			"path": "pages/grade/grade",
 			"style": {
-				"navigationBarTitleText": "",
+				"navigationBarTitleText": "通讯录",
 				"enablePullDownRefresh": false
 			}
 		},
@@ -117,6 +117,27 @@
 				"navigationBarTitleText": "关联时间组",
 				"enablePullDownRefresh": false
 			}
+		},
+		{
+			"path": "pages/login2/login2",
+			"style": {
+				"navigationBarTitleText": "登录",
+				"enablePullDownRefresh": false
+			}
+		},
+		{
+			"path": "pages/switch/switch",
+			"style": {
+				"navigationBarTitleText": "选择身份",
+				"enablePullDownRefresh": false
+			}
+		},
+		{
+			"path": "pages/editPhone/editPhone",
+			"style": {
+				"navigationBarTitleText": "修改手机号",
+				"enablePullDownRefresh": false
+			}
 		}
 	],
 	"subPackages": [{

+ 20 - 20
pages/bind/bind.vue

@@ -12,10 +12,10 @@
 				<input class="row_input" type="number" placeholder="请输入编号" placeholder-style="color:#CCCCCC" v-model="number" />
 			</view>
 
-			<view class="body_row mt-30">
+			<!-- <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> -->
 
 			<!-- 确定按钮区域 -->
 			<view class="body_btn" @click="handleConfirm">确认</view>
@@ -33,7 +33,7 @@ const name = ref('')
 // 编号
 const number = ref('')
 // 身份证号码
-const identity = ref('')
+// const identity = ref('')
 
 onLoad(() => {})
 
@@ -53,8 +53,8 @@ const bindReq = async () => {
 		data: {
 			userId: uni.getStorageSync('userInfo').id,
 			name: name.value,
-			cardNo: number.value,
-			idCard: identity.value
+			cardNo: number.value
+			// idCard: identity.value
 		}
 	})
 	// console.log(res)
@@ -77,7 +77,7 @@ const verifyValue = () => {
 	// 姓名验证规则
 	const regName = /^[\u4e00-\u9fa5]{2,4}$/
 	// 身份证号码验证规则
-	const regIdentity = /(^\d{15}$)|(^\d{18}$)|(^\d{17}(\d|X|x)$)/
+	// const regIdentity = /(^\d{15}$)|(^\d{18}$)|(^\d{17}(\d|X|x)$)/
 
 	if (!name.value) {
 		uni.showToast({
@@ -100,20 +100,20 @@ const verifyValue = () => {
 		})
 		return false
 	}
-	if (!identity.value) {
-		uni.showToast({
-			title: '请输入身份证',
-			icon: 'none'
-		})
-		return false
-	}
-	if (!regIdentity.test(identity.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>

+ 248 - 0
pages/editPhone/editPhone.vue

@@ -0,0 +1,248 @@
+<template>
+	<view class="container">
+		<view class="body">
+			<!-- 输入框区域 -->
+			<view class="body_row mt-40">
+				<view class="row_text">手机号</view>
+				<input class="row_input input" type="text" placeholder="请输入手机号" placeholder-style="color:#CCCCCC" v-model="phone" />
+				<view class="row_btn" :class="{ active: showBtn }" @click="handleVerify">{{ showBtn ? '获取验证码' : codeTime + 's后重新获取' }}</view>
+			</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="code" />
+			</view>
+
+			<!-- 确定按钮区域 -->
+			<view class="body_btn" @click="handleConfirm">确认</view>
+		</view>
+	</view>
+</template>
+
+<script setup>
+import { ref } from 'vue'
+import { onLoad, onUnload } from '@dcloudio/uni-app'
+import { myRequest } from '@/utils/api.js'
+
+// 手机号
+const phone = ref('')
+// 验证码
+const code = ref('')
+
+// 是否可以点击获取验证码按钮
+const showBtn = ref(true)
+
+// 倒计时时间
+const codeTime = ref(60)
+
+// 计时器实例
+const timer = ref()
+
+onLoad(() => {})
+
+onUnload(() => {
+	// 页面卸载时清除定时器
+	clearInterval(timer.value)
+})
+
+// 获取验证码按钮回调
+const handleVerify = () => {
+	// 手机号码验证规则
+	const regPhone = /^1[3-9]\d{9}$/
+
+	if (showBtn.value) {
+		if (!regPhone.test(phone.value)) {
+			uni.showToast({
+				title: '请输入正确的手机号码',
+				icon: 'none'
+			})
+		} else {
+			showBtn.value = false
+			countDown()
+			// 获取验证码
+			getCode()
+		}
+	} else {
+		uni.showToast({
+			title: '倒计时结束后再获取',
+			icon: 'none'
+		})
+	}
+}
+
+// 获取验证码
+const getCode = async () => {
+	const res = await myRequest({
+		url: '/wanzai/api/wechat/sendChangeMessage',
+		data: {
+			phone: phone.value
+		}
+	})
+	console.log(res)
+	if (res.code == 200) {
+		uni.showToast({
+			title: '验证码已发送',
+			icon: 'none'
+		})
+	}
+}
+
+const countDown = () => {
+	timer.value = setInterval(() => {
+		if (codeTime.value > 0) {
+			codeTime.value -= 1
+		} else {
+			showBtn.value = true
+			codeTime.value = 60
+			clearInterval(timer.value)
+		}
+	}, 1000)
+}
+
+// 点击确认按钮回调
+const handleConfirm = () => {
+	const flag = verifyValue()
+
+	if (flag) {
+		// 修改手机号码请求
+		handleEditPhone()
+	}
+}
+
+// 修改手机号码请求
+const handleEditPhone = async () => {
+	const res = await myRequest({
+		url: '/wanzai/api/wechat/vertifyChangePhone',
+		data: {
+			phone: phone.value,
+			code: code.value
+		}
+	})
+	console.log(res)
+	if (res.code == 200) {
+		uni.showToast({
+			title: '修改成功',
+			icon: 'success'
+		})
+
+		let userInfo = uni.getStorageSync('userInfo')
+
+		userInfo.phone = phone.value
+
+		uni.setStorageSync('userInfo', userInfo)
+		setTimeout(() => {
+			uni.navigateBack(1)
+		}, 1500)
+	}
+}
+
+// 验证表格数据是否符合规范
+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 (!code.value) {
+		uni.showToast({
+			title: '请输入验证码',
+			icon: 'none'
+		})
+		return false
+	}
+
+	return true
+}
+</script>
+
+<style lang="scss" scoped>
+.container {
+	display: flex;
+	flex-direction: column;
+	min-height: 100vh;
+	background-color: #f1f6fe;
+
+	.body {
+		position: relative;
+		padding: 0 20rpx;
+		margin-top: 20rpx;
+		height: calc(100vh - 20rpx);
+		background-color: #fff;
+
+		.body_row {
+			display: flex;
+			justify-content: space-between;
+			align-items: center;
+			height: 90rpx;
+			font-size: 28rpx;
+			border-bottom: 2rpx solid #e5e5e5;
+
+			.row_text {
+				flex: 1;
+				padding-right: 30rpx;
+				text-align-last: justify;
+			}
+
+			.row_input {
+				box-sizing: border-box;
+				padding: 0 30rpx;
+				width: 590rpx;
+				height: 90rpx;
+				border-radius: 15rpx;
+				background-color: #fff;
+			}
+
+			.input {
+				width: 400rpx;
+			}
+
+			.row_btn {
+				width: 190rpx;
+				height: 41rpx;
+				color: #ccc;
+				text-align: center;
+				font-size: 28rpx;
+			}
+
+			.active {
+				color: #0061ff;
+			}
+		}
+
+		.mt-40 {
+			margin-top: 40rpx;
+		}
+
+		.mt-30 {
+			margin-top: 30rpx;
+		}
+
+		.body_btn {
+			position: absolute;
+			bottom: 150rpx;
+			left: 227rpx;
+			display: flex;
+			justify-content: center;
+			align-items: center;
+			width: 297rpx;
+			height: 100rpx;
+			color: #fff;
+			font-size: 32rpx;
+			border-radius: 8rpx;
+			background-color: #1e7dfb;
+		}
+	}
+}
+</style>

+ 12 - 6
pages/grade/grade.vue

@@ -13,7 +13,7 @@
 </template>
 
 <script setup>
-import { ref } from 'vue'
+import { ref, nextTick } from 'vue'
 import { onLoad } from '@dcloudio/uni-app'
 import headerInput from '@/components/headerInput.vue'
 import listView from '@/components/listView.vue'
@@ -36,6 +36,8 @@ onLoad((options) => {
 
 // 输入框组件自定义事件
 const changeInputValue = (value) => {
+	// console.log(value)
+	// console.log(value.trim())
 	if (value.trim()) {
 		let temList = []
 		list.value.forEach((ele) => {
@@ -57,9 +59,9 @@ const getData = async () => {
 		}
 	})
 	// console.log(res)
-	const result = JSON.parse(decryptDes(res.data))
+	// const result = JSON.parse(decryptDes(res.data))
 	// console.log(result)
-	result.forEach((ele) => {
+	res.data.forEach((ele) => {
 		let temlist
 		ele.classBookList.forEach((item, index, arr) => {
 			if (item.bookUserList.length) {
@@ -74,9 +76,13 @@ const getData = async () => {
 			gradeName.value = ele.gradeName
 		}
 	})
-	uni.setNavigationBarTitle({
-		title: gradeName.value + className.value
-	})
+	// console.log(list.vlaue)
+
+	if (className.value) {
+		uni.setNavigationBarTitle({
+			title: gradeName.value + className.value
+		})
+	}
 }
 </script>
 

+ 2 - 1
pages/home/home.vue

@@ -91,6 +91,7 @@ onLoad(() => {
 	userInfo.value = uni.getStorageSync('userInfo')
 
 	if (userInfo.value.identityId == 1) {
+		// 如果是家长身份获取绑定学生信息
 		getChildMsg()
 	}
 
@@ -515,4 +516,4 @@ const updateObj = (data) => {
 		}
 	}
 }
-</style>
+</style>

+ 53 - 21
pages/index/index.vue

@@ -7,27 +7,9 @@ import { onLoad } from '@dcloudio/uni-app'
 import { myRequest } from '@/utils/api.js'
 
 onLoad(() => {
-	uni.login({
-		success: (res) => {
-			// console.log(res.code)
-			vertify(res.code)
-		}
-	})
-})
-
-const vertify = async (code) => {
-	const res = await myRequest({
-		url: '/wanzai/api/wechat/vertify',
-		data: {
-			code
-		}
-	})
-	// console.log(res)
-	if (res.code == 200) {
-		uni.setStorageSync('token', JSON.parse(res.message).token)
-		uni.setStorageSync('userhead', JSON.parse(res.message).userhead)
-		uni.setStorageSync('userInfo', JSON.parse(res.message).user[0])
+	let userInfo = uni.getStorageSync('userInfo')
 
+	if (userInfo) {
 		uni.redirectTo({
 			url: '/pages/home/home'
 		})
@@ -36,7 +18,57 @@ const vertify = async (code) => {
 			url: '/pages/main/main'
 		})
 	}
-}
+
+	// uni.login({
+	// 	success: (res) => {
+	// 		// console.log(res.code)
+	// 		vertify(res.code)
+	// 	}
+	// })
+})
+
+// const vertify = async (code) => {
+// 	const res = await myRequest({
+// 		url: '/wanzai/api/wechat/vertify',
+// 		data: {
+// 			code
+// 		}
+// 	})
+// 	// console.log(res)
+
+// 	if (res.code == 200) {
+// 		let msg = JSON.parse(res.message)
+// 		// console.log(msg)
+
+// 		uni.setStorageSync('allData', msg)
+
+// 		if (msg.user.length > 1) {
+// 			let userInfo = uni.getStorageSync('userInfo')
+// 			if (userInfo) {
+// 				uni.redirectTo({
+// 					url: '/pages/home/home'
+// 				})
+// 			} else {
+// 				let info = encodeURIComponent(JSON.stringify(msg))
+// 				uni.redirectTo({
+// 					url: `/pages/switch/switch?info=${info}`
+// 				})
+// 			}
+// 		} else {
+// 			uni.setStorageSync('token', msg.token)
+// 			uni.setStorageSync('userhead', msg.user[0].userhead)
+// 			uni.setStorageSync('userInfo', msg.user[0])
+
+// 			uni.redirectTo({
+// 				url: '/pages/home/home'
+// 			})
+// 		}
+// 	} else {
+// 		uni.redirectTo({
+// 			url: '/pages/main/main'
+// 		})
+// 	}
+// }
 </script>
 
 <style lang="scss" scoped>

+ 22 - 10
pages/login/login.vue

@@ -110,19 +110,31 @@ const getBind = async (wxcode) => {
 		data: {
 			phone: phone.value,
 			code: codeValue.value,
-			wxcode
+			wxcode,
+			loginType: 1
 		}
 	})
 	// console.log(res)
-	const result = JSON.parse(decryptDes(res.data))
-
-	// 1 代表家长  2 代表学生  3 代表老师
-	uni.setStorageSync('token', result.token)
-	uni.setStorageSync('userInfo', result.user)
-	uni.setStorageSync('userhead', result.userhead)
-	uni.navigateTo({
-		url: '/pages/home/home'
-	})
+	const msg = JSON.parse(decryptDes(res.data))
+	// console.log(msg)
+
+	uni.setStorageSync('allData', msg)
+
+	if (msg.user.length > 1) {
+		let info = encodeURIComponent(JSON.stringify(msg))
+		uni.redirectTo({
+			url: `/pages/switch/switch?info=${info}`
+		})
+	} else {
+		// 1 代表家长  2 代表学生  3 代表老师
+		uni.setStorageSync('token', msg.token)
+		uni.setStorageSync('userhead', msg.user[0].userhead)
+		uni.setStorageSync('userInfo', msg.user[0])
+
+		uni.redirectTo({
+			url: '/pages/home/home'
+		})
+	}
 }
 
 // 验证表格数据是否符合规范

+ 144 - 0
pages/login2/login2.vue

@@ -0,0 +1,144 @@
+<template>
+	<view class="container">
+		<!-- 图片区域 -->
+		<img class="img" src="@/static/images/1.png" />
+		<!-- 文字区域 -->
+		<view class="title">在校生活、高效管理</view>
+		<view class="text">辅助老师进行教务工作,家长全面了解在校活动,保障孩子在校安全</view>
+
+		<!-- 按钮区域 -->
+		<button class="btn fast" open-type="getPhoneNumber" @getphonenumber="getPhoneNumber">快捷登录</button>
+
+		<view class="btn other" @click="handleOther">其他登录</view>
+	</view>
+</template>
+
+<script setup>
+import { myRequest } from '@/utils/api.js'
+import { decryptDes } from '@/utils/des.js'
+
+// 点击快捷登录按钮回调
+const getPhoneNumber = (e) => {
+	// console.log(e.detail.code)
+	getPhone(e.detail.code)
+}
+
+// 获取用户手机号码
+const getPhone = async (code) => {
+	const res = await myRequest({
+		url: '/wanzai/api/wechat/getWechatPhone',
+		data: {
+			code
+		}
+	})
+	// console.log(res)
+	const result = JSON.parse(decryptDes(res.data))
+	// console.log(result)
+	let phone = JSON.parse(result).phone
+	// console.log(phone)
+
+	handleLogin(phone)
+}
+
+// 登录按钮回调
+const handleLogin = (phone) => {
+	uni.login({
+		success: (res) => {
+			// console.log(res)
+			getBind(res.code, phone)
+		}
+	})
+}
+
+const getBind = async (wxcode, phone) => {
+	const res = await myRequest({
+		url: '/wanzai/api/wechat/vertifyMessage',
+		data: {
+			phone,
+			wxcode,
+			loginType: 2
+		}
+	})
+	// console.log(res)
+	const msg = JSON.parse(decryptDes(res.data))
+	// console.log(msg)
+
+	uni.setStorageSync('allData', msg)
+
+	if (msg.user.length > 1) {
+		let info = encodeURIComponent(JSON.stringify(msg))
+		uni.redirectTo({
+			url: `/pages/switch/switch?info=${info}`
+		})
+	} else {
+		// 1 代表家长  2 代表学生  3 代表老师
+		uni.setStorageSync('token', msg.token)
+		uni.setStorageSync('userhead', msg.user[0].userhead)
+		uni.setStorageSync('userInfo', msg.user[0])
+
+		uni.redirectTo({
+			url: '/pages/home/home'
+		})
+	}
+}
+
+// 点击其他登录按钮回调
+const handleOther = () => {
+	uni.navigateTo({
+		url: '/pages/login/login'
+	})
+}
+</script>
+
+<style lang="scss" scoped>
+.container {
+	display: flex;
+	flex-direction: column;
+	align-items: center;
+	min-height: 100vh;
+	background-color: #f8f8fa;
+
+	.img {
+		margin-top: 44rpx;
+		width: 515rpx;
+		height: 515rpx;
+	}
+
+	.title {
+		width: 515rpx;
+		font-size: 32rpx;
+		font-weight: bold;
+		text-align: center;
+	}
+
+	.text {
+		margin-top: 20rpx;
+		width: 515rpx;
+		font-size: 28rpx;
+		color: #808080;
+		text-align: center;
+		line-height: 40rpx;
+	}
+
+	.btn {
+		display: flex;
+		justify-content: center;
+		align-items: center;
+		width: 670rpx;
+		height: 100rpx;
+		font-size: 32rpx;
+		border-radius: 8rpx;
+	}
+
+	.fast {
+		margin-top: 80rpx;
+		color: #fff;
+		background-color: #0061ff;
+	}
+
+	.other {
+		margin-top: 50rpx;
+		border: 2rpx solid #000;
+	}
+}
+</style>

+ 2 - 2
pages/main/main.vue

@@ -108,12 +108,12 @@ const goLogin = (type) => {
 		})
 		setTimeout(() => {
 			uni.navigateTo({
-				url: '/pages/login/login'
+				url: '/pages/login2/login2'
 			})
 		}, 1500)
 	} else {
 		uni.navigateTo({
-			url: '/pages/login/login'
+			url: '/pages/login2/login2'
 		})
 	}
 }

+ 80 - 1
pages/myCenter/myCenter.vue

@@ -3,14 +3,22 @@
 		<!-- 顶部个人信息区域 -->
 		<view class="header">
 			<img class="header_img" src="../../static/images/center-bg.png" />
+			<!-- 头像区域 -->
 			<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 v-if="showChange" class="user_change" @click="handleChange">
+				<img class="img" src="@/static/images/2.png" />
+				切换身份
+			</view>
 		</view>
 
 		<!-- 列表区域 -->
@@ -22,6 +30,9 @@
 				<img class="box_icon" src="../../static/images/right.png" />
 			</view>
 		</view>
+
+		<!-- 退出登录按钮 -->
+		<view class="logout" @click="handleLogout">退出登录</view>
 	</view>
 </template>
 
@@ -33,8 +44,15 @@ import { previewImage } from '@/utils/previewImage.js'
 // 用户信息
 const userInfo = ref({})
 
+// 是否展示切换身份按钮
+const showChange = ref(false)
+
 onLoad(() => {
 	userInfo.value = uni.getStorageSync('userInfo')
+	let length = uni.getStorageSync('allData').user.length
+	if (length > 1) {
+		showChange.value = true
+	}
 })
 
 // 列表信息
@@ -59,6 +77,32 @@ const goPage = (url) => {
 		url
 	})
 }
+
+// 切换身份按钮回调
+const handleChange = () => {
+	let info = encodeURIComponent(JSON.stringify(uni.getStorageSync('allData')))
+	// console.log(info)
+	uni.navigateTo({
+		url: `/pages/switch/switch?info=${info}`
+	})
+}
+
+// 退出登录按钮回调
+const handleLogout = () => {
+	uni.showModal({
+		title: '提示',
+		content: '确定退出登录吗?',
+		success: (res) => {
+			if (res.confirm) {
+				uni.clearStorageSync()
+				uni.reLaunch({
+					url: '/pages/main/main'
+				})
+			} else if (res.cancel) {
+			}
+		}
+	})
+}
 </script>
 
 <style lang="scss" scoped>
@@ -73,7 +117,6 @@ const goPage = (url) => {
 		width: 710rpx;
 		height: 260rpx;
 		text-align: end;
-		overflow: hidden;
 
 		.header_img {
 			margin-top: -24rpx;
@@ -106,11 +149,34 @@ const goPage = (url) => {
 			font-size: 24rpx;
 			color: #666666;
 		}
+
+		.user_change {
+			position: absolute;
+			right: -20rpx;
+			top: 80rpx;
+			display: flex;
+			justify-content: center;
+			align-items: center;
+			width: 171rpx;
+			height: 67rpx;
+			font-size: 24rpx;
+			border-radius: 173rpx 0 0 173rpx;
+			background-color: rgba(0, 97, 255, 0.05);
+
+			.img {
+				margin-right: 10rpx;
+				width: 29rpx;
+				height: 29rpx;
+			}
+		}
 	}
 
 	// 列表区域样式
 	.body {
+		z-index: 1;
+		position: relative;
 		padding: 0 30rpx;
+		border-radius: 8rpx;
 		background-color: #fff;
 
 		.body_box {
@@ -136,5 +202,18 @@ const goPage = (url) => {
 			}
 		}
 	}
+
+	.logout {
+		position: absolute;
+		bottom: 100rpx;
+		display: flex;
+		justify-content: center;
+		align-items: center;
+		width: 710rpx;
+		height: 100rpx;
+		font-size: 32rpx;
+		border-radius: 8rpx;
+		background-color: #fff;
+	}
 }
 </style>

+ 19 - 5
pages/myMsg/myMsg.vue

@@ -4,7 +4,7 @@
 			<!-- 编号区域 -->
 			<view class="box_item">
 				<view class="item_key">编号</view>
-				<view class="item_value">{{ userInfo.cardNo }}</view>
+				<view class="item_value">{{ userInfo.cardNo || '暂无' }}</view>
 			</view>
 
 			<!-- 姓名区域 -->
@@ -32,7 +32,7 @@
 			<!-- 部门区域 -->
 			<view class="box_item">
 				<view class="item_key">部门</view>
-				<view class="item_value">{{ userInfo.departmentName }}</view>
+				<view class="item_value">{{ userInfo.departmentName || '暂无' }}</view>
 			</view>
 			<!-- 角色区域 -->
 			<view class="box_item">
@@ -94,7 +94,10 @@
 			<!--  手机号区域 -->
 			<view class="box_item no_border">
 				<view class="item_key">手机号</view>
-				<view class="item_value">{{ userInfo.phone ? userInfo.phone : '暂无' }}</view>
+				<view class="item_value" @click="handleEditPhone">
+					{{ userInfo.phone ? userInfo.phone : '暂无' }}
+					<img class="value_img" src="@/static/images/right.png" />
+				</view>
 			</view>
 		</view>
 
@@ -148,7 +151,7 @@
 
 <script setup>
 import { ref } from 'vue'
-import { onLoad } from '@dcloudio/uni-app'
+import { onLoad, onShow } from '@dcloudio/uni-app'
 import { previewImage } from '@/utils/previewImage.js'
 import { myRequest } from '@/utils/api.js'
 import { decryptDes } from '@/utils/des.js'
@@ -164,6 +167,10 @@ onLoad((options) => {
 	}
 })
 
+onShow(() => {
+	userInfo.value = uni.getStorageSync('userInfo')
+})
+
 const getUserInfo = async (id) => {
 	const res = await myRequest({
 		url: '/wanzai/api/smartUser/queryInfoData',
@@ -175,6 +182,13 @@ const getUserInfo = async (id) => {
 	const result = JSON.parse(decryptDes(res.data))
 	userInfo.value = result
 }
+
+// 点击手机号码触发的回调
+const handleEditPhone = () => {
+	uni.navigateTo({
+		url: '/pages/editPhone/editPhone'
+	})
+}
 </script>
 
 <style lang="scss" scoped>
@@ -227,4 +241,4 @@ const getUserInfo = async (id) => {
 		}
 	}
 }
-</style>
+</style>

+ 152 - 0
pages/switch/switch.vue

@@ -0,0 +1,152 @@
+<template>
+	<view class="container">
+		<!-- 背景图片区域 -->
+		<img class="img_bg" src="../../static/images/center-bg.png" />
+
+		<!-- 身份列表区域 -->
+		<view class="list">
+			<!-- 每一个身份区域 -->
+			<view class="list_item" v-for="item in listData" :key="item.id" @click="handleChange(item)">
+				<!-- 头像 -->
+				<img class="item_img" mode="aspectFill" :src="item.headImage || '/static/images/header.png'" />
+				<!-- 姓名 -->
+				<view class="item_name">{{ item.name }}</view>
+				<!-- 身份类别 -->
+				<view v-if="item.identityId === 1" class="item_type parents">家长</view>
+				<view v-if="item.identityId === 2" class="item_type student">学生</view>
+				<view v-if="item.identityId === 3" class="item_type teacher">老师</view>
+
+				<!-- 是否设置成默认身份 -->
+				<!-- <view class="item_default" @click="handleClick(item)">
+					<radio style="transform: scale(0.5)" :checked="item.isCheck"></radio>
+					设置默认身份
+				</view> -->
+
+				<!-- 是否选中 -->
+				<!-- <uni-icons v-if="item.id === currentId" class="item_check" type="checkmarkempty" size="30" color="#00BAAD"></uni-icons> -->
+				<div v-if="item.id === currentId" class="item_check">当前身份</div>
+			</view>
+		</view>
+	</view>
+</template>
+
+<script setup>
+import { onLoad } from '@dcloudio/uni-app'
+import { ref } from 'vue'
+
+onLoad((options) => {
+	let info = JSON.parse(decodeURIComponent(options.info))
+	// console.log(info)
+	uni.setStorageSync('token', info.token)
+	currentId.value = uni.getStorageSync('userInfo').id || ''
+	listData.value = info.user
+})
+
+// 用户身份列表
+const listData = ref([])
+
+// 当前展示身份id
+const currentId = ref()
+
+// 点击是否设置默认身份按钮回调
+// const handleClick = (item) => {
+// 	listData.value.forEach((ele) => {
+// 		ele.isCheck = false
+// 	})
+// 	item.isCheck = true
+// }
+
+// 点击每一个身份时的回调
+const handleChange = (item) => {
+	// console.log(item)
+	uni.setStorageSync('userhead', item.userhead)
+	uni.setStorageSync('userInfo', item)
+	uni.redirectTo({
+		url: '/pages/home/home'
+	})
+}
+</script>
+
+<style lang="scss" scoped>
+.container {
+	min-height: 100vh;
+	background-color: #f1f6fe;
+
+	.img_bg {
+		position: absolute;
+		top: -70rpx;
+		right: 0;
+		width: 589rpx;
+		height: 320rpx;
+		pointer-events: none;
+	}
+
+	.list {
+		z-index: 1;
+		position: relative;
+		padding: 58rpx 20rpx;
+
+		.list_item {
+			position: relative;
+			display: flex;
+			box-sizing: border-box;
+			padding: 30rpx 22rpx;
+			margin-bottom: 30rpx;
+			width: 710rpx;
+			height: 177rpx;
+			border-radius: 8rpx;
+			background-color: #fff;
+
+			.item_img {
+				width: 60rpx;
+				height: 60rpx;
+				border-radius: 50%;
+				object-fit: cover;
+			}
+
+			.item_name {
+				margin: 10rpx 16rpx 0 23rpx;
+				height: 30rpx;
+				font-size: 28rpx;
+			}
+
+			.item_type {
+				margin-top: 15rpx;
+				padding: 0 20rpx;
+				height: 30rpx;
+				font-size: 20rpx;
+				color: #fff;
+				border-radius: 28rpx;
+			}
+
+			.teacher {
+				background-color: #00baad;
+			}
+
+			.parents {
+				background-color: #0061ff;
+			}
+
+			.student {
+				background-color: orange;
+			}
+
+			.item_default {
+				position: absolute;
+				top: 118rpx;
+				left: 22rpx;
+				font-size: 16rpx;
+				color: #a6a6a6;
+			}
+
+			.item_check {
+				position: absolute;
+				top: 50%;
+				right: 48rpx;
+				transform: translateY(-50%);
+				color: #00baad;
+			}
+		}
+	}
+}
+</style>

+ 1 - 0
pages/track/track.vue

@@ -94,6 +94,7 @@ const getData = async () => {
 	// console.log(res)
 	if (res.code == 200) {
 		const result = JSON.parse(decryptDes(res.data))
+		// console.log(result)
 		list.value = result
 	}
 }

+ 1 - 1
pagesReservation/backlog/backlog.vue

@@ -179,7 +179,7 @@ const getData = async () => {
 	// console.log(res)
 	const result = res.data
 	total.value = result.totalCount
-	list.value = [...list.value, ...result.list]
+	list.value = [...list.value, ...(result.list || [])]
 }
 
 // 切换分段器时的回调

+ 4 - 3
pagesReservation/record/record.vue

@@ -68,7 +68,7 @@
 
 				<view class="pop_info">
 					<view class="info_key">证件号:</view>
-					<view class="info_value">{{ popObj.userNumber }}</view>
+					<view class="info_value">{{ popObj.userNumber || '暂无' }}</view>
 				</view>
 
 				<view class="pop_info">
@@ -78,12 +78,12 @@
 
 				<view class="pop_info">
 					<view class="info_key">车牌号:</view>
-					<view class="info_value">{{ popObj.carNum ? popObj.carNum : '无' }}</view>
+					<view class="info_value">{{ popObj.carNum ? popObj.carNum : '无' }}</view>
 				</view>
 
 				<view class="pop_info">
 					<view class="info_key">同行人数:</view>
-					<view class="info_value">{{ popObj.peerNum ? popObj.peerNum : '无' }}</view>
+					<view class="info_value">{{ popObj.peerNum ? popObj.peerNum : '无' }}</view>
 				</view>
 
 				<view class="pop_info">
@@ -157,6 +157,7 @@ const getData = async () => {
 	})
 	// console.log(res)
 	const result = JSON.parse(decryptDes(res.data))
+	// console.log(result)
 	total.value = result.totalCount
 	list.value = [...list.value, ...result.list]
 }

+ 6 - 0
pagesReservation/reservation/reservation.vue

@@ -48,6 +48,12 @@ const userInfo = ref('')
 
 onLoad(() => {
 	userInfo.value = uni.getStorageSync('userInfo')
+	// console.log(userInfo.value)
+	if (!userInfo.value) {
+		uni.reLaunch({
+			url: '/pages/index/index'
+		})
+	}
 })
 const goPage = (url) => {
 	uni.navigateTo({

BIN
static/images/1.png


BIN
static/images/2.png


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

@@ -19,6 +19,9 @@ if (!Math) {
   "./pages/main/main.js";
   "./pages/studentManage/studentManage.js";
   "./pages/timeGroup/timeGroup.js";
+  "./pages/login2/login2.js";
+  "./pages/switch/switch.js";
+  "./pages/editPhone/editPhone.js";
   "./pagesReservation/reservation/reservation.js";
   "./pagesReservation/register/register.js";
   "./pagesReservation/record/record.js";

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

@@ -16,7 +16,10 @@
     "pages/web/web",
     "pages/main/main",
     "pages/studentManage/studentManage",
-    "pages/timeGroup/timeGroup"
+    "pages/timeGroup/timeGroup",
+    "pages/login2/login2",
+    "pages/switch/switch",
+    "pages/editPhone/editPhone"
   ],
   "subPackages": [
     {

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

@@ -6,7 +6,6 @@ const _sfc_main = {
   setup(__props) {
     const name = common_vendor.ref("");
     const number = common_vendor.ref("");
-    const identity = common_vendor.ref("");
     common_vendor.onLoad(() => {
     });
     const handleConfirm = () => {
@@ -22,8 +21,8 @@ const _sfc_main = {
         data: {
           userId: common_vendor.index.getStorageSync("userInfo").id,
           name: name.value,
-          cardNo: number.value,
-          idCard: identity.value
+          cardNo: number.value
+          // idCard: identity.value
         }
       });
       common_vendor.index.showToast({
@@ -41,7 +40,6 @@ const _sfc_main = {
     };
     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: "请输入姓名",
@@ -63,20 +61,6 @@ const _sfc_main = {
         });
         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) => {
@@ -85,9 +69,7 @@ const _sfc_main = {
         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)
+        e: common_vendor.o(handleConfirm)
       };
     };
   }

File diff suppressed because it is too large
+ 1 - 1
unpackage/dist/dev/mp-weixin/pages/bind/bind.wxml


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

@@ -1,7 +1,6 @@
 "use strict";
 const common_vendor = require("../../common/vendor.js");
 const utils_api = require("../../utils/api.js");
-const utils_des = require("../../utils/des.js");
 if (!Math) {
   (headerInput + listView)();
 }
@@ -38,8 +37,7 @@ const _sfc_main = {
           id: common_vendor.index.getStorageSync("userInfo").id
         }
       });
-      const result = JSON.parse(utils_des.decryptDes(res.data));
-      result.forEach((ele) => {
+      res.data.forEach((ele) => {
         let temlist;
         ele.classBookList.forEach((item, index, arr) => {
           if (item.bookUserList.length) {
@@ -52,9 +50,11 @@ const _sfc_main = {
           gradeName.value = ele.gradeName;
         }
       });
-      common_vendor.index.setNavigationBarTitle({
-        title: gradeName.value + className.value
-      });
+      if (className.value) {
+        common_vendor.index.setNavigationBarTitle({
+          title: gradeName.value + className.value
+        });
+      }
     };
     return (_ctx, _cache) => {
       return {

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

@@ -1,5 +1,5 @@
 {
-  "navigationBarTitleText": "",
+  "navigationBarTitleText": "通讯录",
   "enablePullDownRefresh": false,
   "usingComponents": {
     "header-input": "../../components/headerInput",

+ 3 - 19
unpackage/dist/dev/mp-weixin/pages/index/index.js

@@ -1,27 +1,11 @@
 "use strict";
 const common_vendor = require("../../common/vendor.js");
-const utils_api = require("../../utils/api.js");
 const _sfc_main = {
   __name: "index",
   setup(__props) {
     common_vendor.onLoad(() => {
-      common_vendor.index.login({
-        success: (res) => {
-          vertify(res.code);
-        }
-      });
-    });
-    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("userhead", JSON.parse(res.message).userhead);
-        common_vendor.index.setStorageSync("userInfo", JSON.parse(res.message).user[0]);
+      let userInfo = common_vendor.index.getStorageSync("userInfo");
+      if (userInfo) {
         common_vendor.index.redirectTo({
           url: "/pages/home/home"
         });
@@ -30,7 +14,7 @@ const _sfc_main = {
           url: "/pages/main/main"
         });
       }
-    };
+    });
     return (_ctx, _cache) => {
       return {};
     };

+ 37 - 4
unpackage/dist/dev/mp-weixin/pages/myCenter/myCenter.js

@@ -1,12 +1,18 @@
 "use strict";
 const common_vendor = require("../../common/vendor.js");
+const common_assets = require("../../common/assets.js");
 const utils_previewImage = require("../../utils/previewImage.js");
 const _sfc_main = {
   __name: "myCenter",
   setup(__props) {
     const userInfo = common_vendor.ref({});
+    const showChange = common_vendor.ref(false);
     common_vendor.onLoad(() => {
       userInfo.value = common_vendor.index.getStorageSync("userInfo");
+      let length = common_vendor.index.getStorageSync("allData").user.length;
+      if (length > 1) {
+        showChange.value = true;
+      }
     });
     const list = common_vendor.ref([
       {
@@ -27,21 +33,48 @@ const _sfc_main = {
         url
       });
     };
+    const handleChange = () => {
+      let info = encodeURIComponent(JSON.stringify(common_vendor.index.getStorageSync("allData")));
+      common_vendor.index.navigateTo({
+        url: `/pages/switch/switch?info=${info}`
+      });
+    };
+    const handleLogout = () => {
+      common_vendor.index.showModal({
+        title: "提示",
+        content: "确定退出登录吗?",
+        success: (res) => {
+          if (res.confirm) {
+            common_vendor.index.clearStorageSync();
+            common_vendor.index.reLaunch({
+              url: "/pages/main/main"
+            });
+          } else if (res.cancel)
+            ;
+        }
+      });
+    };
     return (_ctx, _cache) => {
-      return {
+      return common_vendor.e({
         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) => {
+        e: showChange.value
+      }, showChange.value ? {
+        f: common_assets._imports_0$1,
+        g: common_vendor.o(handleChange)
+      } : {}, {
+        h: common_vendor.f(list.value, (item, k0, i0) => {
           return {
             a: item.url,
             b: common_vendor.t(item.title),
             c: item.id,
             d: common_vendor.o(($event) => goPage(item.page), item.id)
           };
-        })
-      };
+        }),
+        i: common_vendor.o(handleLogout)
+      });
     };
   }
 };

File diff suppressed because it is too large
+ 1 - 1
unpackage/dist/dev/mp-weixin/pages/myCenter/myCenter.wxml


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

@@ -10,7 +10,6 @@
   width: 710rpx;
   height: 260rpx;
   text-align: end;
-  overflow: hidden;
 }
 .container .header .header_img.data-v-eea72321 {
   margin-top: -24rpx;
@@ -40,8 +39,29 @@
   font-size: 24rpx;
   color: #666666;
 }
+.container .header .user_change.data-v-eea72321 {
+  position: absolute;
+  right: -20rpx;
+  top: 80rpx;
+  display: flex;
+  justify-content: center;
+  align-items: center;
+  width: 171rpx;
+  height: 67rpx;
+  font-size: 24rpx;
+  border-radius: 173rpx 0 0 173rpx;
+  background-color: rgba(0, 97, 255, 0.05);
+}
+.container .header .user_change .img.data-v-eea72321 {
+  margin-right: 10rpx;
+  width: 29rpx;
+  height: 29rpx;
+}
 .container .body.data-v-eea72321 {
+  z-index: 1;
+  position: relative;
   padding: 0 30rpx;
+  border-radius: 8rpx;
   background-color: #fff;
 }
 .container .body .body_box.data-v-eea72321 {
@@ -62,4 +82,16 @@
 .container .body .body_box .box_icon.data-v-eea72321 {
   width: 31rpx;
   height: 31rpx;
+}
+.container .logout.data-v-eea72321 {
+  position: absolute;
+  bottom: 100rpx;
+  display: flex;
+  justify-content: center;
+  align-items: center;
+  width: 710rpx;
+  height: 100rpx;
+  font-size: 32rpx;
+  border-radius: 8rpx;
+  background-color: #fff;
 }

+ 20 - 9
unpackage/dist/dev/mp-weixin/pages/myMsg/myMsg.js

@@ -1,5 +1,6 @@
 "use strict";
 const common_vendor = require("../../common/vendor.js");
+const common_assets = require("../../common/assets.js");
 const utils_previewImage = require("../../utils/previewImage.js");
 const utils_api = require("../../utils/api.js");
 const utils_des = require("../../utils/des.js");
@@ -14,6 +15,9 @@ const _sfc_main = {
         userInfo.value = common_vendor.index.getStorageSync("userInfo");
       }
     });
+    common_vendor.onShow(() => {
+      userInfo.value = common_vendor.index.getStorageSync("userInfo");
+    });
     const getUserInfo = async (id) => {
       const res = await utils_api.myRequest({
         url: "/wanzai/api/smartUser/queryInfoData",
@@ -24,9 +28,14 @@ const _sfc_main = {
       const result = JSON.parse(utils_des.decryptDes(res.data));
       userInfo.value = result;
     };
+    const handleEditPhone = () => {
+      common_vendor.index.navigateTo({
+        url: "/pages/editPhone/editPhone"
+      });
+    };
     return (_ctx, _cache) => {
       return common_vendor.e({
-        a: common_vendor.t(userInfo.value.cardNo),
+        a: common_vendor.t(userInfo.value.cardNo || "暂无"),
         b: common_vendor.t(userInfo.value.name),
         c: userInfo.value.identityId == 1
       }, userInfo.value.identityId == 1 ? {} : {}, {
@@ -36,7 +45,7 @@ const _sfc_main = {
       }, 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),
+        h: common_vendor.t(userInfo.value.departmentName || "暂无"),
         i: userInfo.value.headImage
       }, userInfo.value.headImage ? {
         j: userInfo.value.headImage,
@@ -48,13 +57,15 @@ const _sfc_main = {
         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 : "暂无")
+        r: common_assets._imports_0$2,
+        s: common_vendor.o(handleEditPhone),
+        t: common_vendor.t(userInfo.value.affiliateName ? userInfo.value.affiliateName : "暂无"),
+        v: common_vendor.t(userInfo.value.title ? userInfo.value.title : "暂无"),
+        w: common_vendor.t(userInfo.value.address ? userInfo.value.address : "暂无"),
+        x: common_vendor.t(userInfo.value.nation ? userInfo.value.nation : "暂无"),
+        y: common_vendor.t(userInfo.value.ofStudent ? userInfo.value.ofStudent : "暂无"),
+        z: common_vendor.t(userInfo.value.graduate ? userInfo.value.graduate : "暂无"),
+        A: common_vendor.t(userInfo.value.zhiwu ? userInfo.value.zhiwu : "暂无")
       });
     };
   }

File diff suppressed because it is too large
+ 1 - 1
unpackage/dist/dev/mp-weixin/pages/myMsg/myMsg.wxml


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

@@ -49,7 +49,7 @@ const _sfc_main = {
       });
       const result = res.data;
       total.value = result.totalCount;
-      list.value = [...list.value, ...result.list];
+      list.value = [...list.value, ...result.list || []];
     };
     const onClickItem = (e) => {
       if (activeCurrent.value != e.currentIndex) {

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

@@ -153,10 +153,10 @@ const _sfc_main = {
       }, popObj.value.visitorTime ? {
         o: common_vendor.t(common_vendor.unref(utils_formatTime.time_format)(popObj.value.visitorTime))
       } : {}, {
-        p: common_vendor.t(popObj.value.userNumber),
+        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.peerNum : "无"),
+        r: common_vendor.t(popObj.value.carNum ? popObj.value.carNum : "无"),
+        s: common_vendor.t(popObj.value.peerNum ? popObj.value.peerNum : "无"),
         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),

+ 5 - 0
unpackage/dist/dev/mp-weixin/pagesReservation/reservation/reservation.js

@@ -10,6 +10,11 @@ const _sfc_main = {
     const userInfo = common_vendor.ref("");
     common_vendor.onLoad(() => {
       userInfo.value = common_vendor.index.getStorageSync("userInfo");
+      if (!userInfo.value) {
+        common_vendor.index.reLaunch({
+          url: "/pages/index/index"
+        });
+      }
     });
     const goPage = (url) => {
       common_vendor.index.navigateTo({

+ 20 - 6
unpackage/dist/dev/mp-weixin/project.private.config.json

@@ -8,22 +8,36 @@
     "miniprogram": {
       "list": [
         {
-          "name": "pages/timeGroup/timeGroup",
-          "pathName": "pages/timeGroup/timeGroup",
+          "name": "pages/myMsg/myMsg",
+          "pathName": "pages/myMsg/myMsg",
           "query": "",
           "launchMode": "default",
           "scene": null
         },
         {
-          "name": "pages/main/main",
-          "pathName": "pages/main/main",
+          "name": "pages/switch/switch",
+          "pathName": "pages/switch/switch",
+          "query": "",
+          "launchMode": "default",
+          "scene": null
+        },
+        {
+          "name": "pages/login2/login2",
+          "pathName": "pages/login2/login2",
           "query": "",
           "launchMode": "default",
           "scene": null
         },
         {
-          "name": "",
-          "pathName": "pages/login/login",
+          "name": "pages/timeGroup/timeGroup",
+          "pathName": "pages/timeGroup/timeGroup",
+          "query": "",
+          "launchMode": "default",
+          "scene": null
+        },
+        {
+          "name": "pages/main/main",
+          "pathName": "pages/main/main",
           "query": "",
           "launchMode": "default",
           "scene": null