Browse Source

feature: anous live

able99 4 years ago
parent
commit
bde37f8057
1 changed files with 3 additions and 2 deletions
  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,
 					}
 				})
 			}