1
0

2 Коммиты 49553e3e27 ... 6cbfa7a77b

Автор SHA1 Сообщение Дата
  Shu 6cbfa7a77b opt:用户退出登录后会将身份证信息置为空数组 3 месяцев назад
  Shu 97cff67960 bugfix:修复input组件无输入事件的问题 3 месяцев назад

+ 7 - 4
pages/my/my.vue

@@ -97,7 +97,7 @@
 		},
 		},
 		methods: {
 		methods: {
 			...mapMutations('m_user', ['updateUserInfo', 'updateToken']),
 			...mapMutations('m_user', ['updateUserInfo', 'updateToken']),
-			...mapMutations('m_business', ['updateCurrentHotel']),
+			...mapMutations('m_business', ['updateCurrentHotel', 'updateIdCardInfo']),
 			navigateTo(url) {
 			navigateTo(url) {
 				if (url !== '' && url !== null && url !== undefined) {
 				if (url !== '' && url !== null && url !== undefined) {
 					if (url === '/pages/order/order') {
 					if (url === '/pages/order/order') {
@@ -117,12 +117,15 @@
 				console.log(this.token)
 				console.log(this.token)
 				let res = await uni.$http.post('/logout')
 				let res = await uni.$http.post('/logout')
 				console.log(res)
 				console.log(res)
-				uni.redirectTo({
-					url: '/pages/login/login'
-				})
 				this.updateUserInfo({name:''})
 				this.updateUserInfo({name:''})
 				this.updateToken('')
 				this.updateToken('')
 				this.updateCurrentHotel({})
 				this.updateCurrentHotel({})
+				this.updateIdCardInfo([])
+
+				uni.redirectTo({
+					url: '/pages/login/login'
+				})
+				
 			},
 			},
 			renderPhoneNumber(str) {
 			renderPhoneNumber(str) {
 				if(!stringHasText(this.userInfo.phone)) return ""
 				if(!stringHasText(this.userInfo.phone)) return ""

+ 2 - 2
subpkg/updateNameAndIdNumber/updateNameAndIdNumber.vue

@@ -18,7 +18,7 @@
 			<view class="tip">
 			<view class="tip">
 				<u-text text="身份证:"></u-text>
 				<u-text text="身份证:"></u-text>
 			</view>
 			</view>
-			<u-input placeholder="请输入身份证号" border="surround" v-model="idNumber" type="idcard" clearable></u-input>
+			<u-input placeholder="请输入身份证号" border="surround" v-model="idNumber" type="idcard" clearable :maxlength="18"></u-input>
 		</view>
 		</view>
 		<view class="btn">
 		<view class="btn">
 			<u-button text="确定" color="#a09cc4" @click="updateNameAndIdNumber"></u-button>
 			<u-button text="确定" color="#a09cc4" @click="updateNameAndIdNumber"></u-button>
@@ -85,7 +85,7 @@
 		onLoad() {
 		onLoad() {
 			var pages = getCurrentPages(); // 当前页面
 			var pages = getCurrentPages(); // 当前页面
 			var beforePage = pages[pages.length - 2]; // 前一个页面
 			var beforePage = pages[pages.length - 2]; // 前一个页面
-			console.log(beforePage)
+			// console.log(beforePage)
 			this.name = this.userInfo.name
 			this.name = this.userInfo.name
 			this.idNumber = this.userInfo.idNumber
 			this.idNumber = this.userInfo.idNumber
 		},
 		},

+ 1 - 1
subpkg_checkin/addGuest/addGuest.vue

@@ -18,7 +18,7 @@
 					<u-input v-model="name" border="none" clearable fontSize="36rpx"></u-input>
 					<u-input v-model="name" border="none" clearable fontSize="36rpx"></u-input>
 				</u-form-item>
 				</u-form-item>
 				<u-form-item label="手机号" prop="phone">
 				<u-form-item label="手机号" prop="phone">
-					<u-input v-model="phone" border="none" clearable fontSize="36rpx" type="number"></u-input>
+					<u-input v-model="phone" border="none" clearable fontSize="36rpx" type="number" maxlength="11"></u-input>
 				</u-form-item>
 				</u-form-item>
 				<u-form-item label="身份证" prop="idNumber">
 				<u-form-item label="身份证" prop="idNumber">
 					<u-input v-model="idNumber" border="none" clearable fontSize="36rpx"></u-input>
 					<u-input v-model="idNumber" border="none" clearable fontSize="36rpx"></u-input>