2 İşlemeler 49553e3e27 ... 6cbfa7a77b

Yazar SHA1 Mesaj Tarih
  Shu 6cbfa7a77b opt:用户退出登录后会将身份证信息置为空数组 3 ay önce
  Shu 97cff67960 bugfix:修复input组件无输入事件的问题 3 ay önce

+ 7 - 4
pages/my/my.vue

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

+ 2 - 2
subpkg/updateNameAndIdNumber/updateNameAndIdNumber.vue

@@ -18,7 +18,7 @@
 			<view class="tip">
 				<u-text text="身份证:"></u-text>
 			</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 class="btn">
 			<u-button text="确定" color="#a09cc4" @click="updateNameAndIdNumber"></u-button>
@@ -85,7 +85,7 @@
 		onLoad() {
 			var pages = getCurrentPages(); // 当前页面
 			var beforePage = pages[pages.length - 2]; // 前一个页面
-			console.log(beforePage)
+			// console.log(beforePage)
 			this.name = this.userInfo.name
 			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-form-item>
 				<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 label="身份证" prop="idNumber">
 					<u-input v-model="idNumber" border="none" clearable fontSize="36rpx"></u-input>