Parcourir la source

feature: anous live

able99 il y a 4 ans
Parent
commit
bde37f8057
1 fichiers modifiés avec 3 ajouts et 2 suppressions
  1. 3 2
      pages/index/index.vue

+ 3 - 2
pages/index/index.vue

@@ -116,12 +116,13 @@
 				// uni.reLaunch({
 				// 	url: '/pages/index/login'
 				// });
+				let random = String((new Date()).getTime() * Math.random());
 				uni.setStorage({
 					key: 'userData',
 					data: {
 						headImage: '',
-						userName: '游客',
-						userId: String((new Date()).getTime() * Math.random()),
+						userName: '游客'+random.slice(-4),
+						userId: random,
 					}
 				})
 			}