guhongwei 2 lat temu
rodzic
commit
93845f00f8
1 zmienionych plików z 3 dodań i 2 usunięć
  1. 3 2
      pages/login/index.vue

+ 3 - 2
pages/login/index.vue

@@ -111,8 +111,8 @@
 		</uni-popup> -->
 	</mobile-frame>
 </template>
-
 <script>
+	import moment from 'moment';
 	export default {
 		data() {
 			return {
@@ -499,12 +499,13 @@
 				uni.getUserProfile({
 					desc: '用于展示',
 					success: async function(res) {
+						console.log(res);
 						let parmas = {
 							openid: that.openid,
 							icon: [{
 								url: res.userInfo.avatarUrl
 							}],
-							name: res.userInfo.nickName,
+							name: res.userInfo.nickName + moment().valueOf(),
 						}
 						const arr = await that.$api(`/user`, 'POST', parmas);
 						if (arr.errcode == '0') {