فهرست منبع

登录注册绑定

he2802 4 سال پیش
والد
کامیت
d90fefea2f
3فایلهای تغییر یافته به همراه7 افزوده شده و 7 حذف شده
  1. 1 1
      common/httpList/login.js
  2. 5 5
      pages/wd/index.vue
  3. 1 1
      store/index.js

+ 1 - 1
common/httpList/login.js

@@ -16,7 +16,7 @@ export default {
 	//登录用户信息
 	getInfo() {
 		return myRequest({
-			url: '/getInfo',
+			url: '/app/user/getInfo',
 			method: 'get',
 		})
 	},

+ 5 - 5
pages/wd/index.vue

@@ -13,10 +13,10 @@
 		<view  v-if="isLogin" class="loginBox">
 			<view style="width: 100%;height: 40px;background-color: #F0F1F5;position: fixed;top: 150px;z-index: 100;"></view>
 			<view style="display: flex;height: 160rpx;align-items: center; position: fixed;z-index: 999;top: 110px;" v-if="isLogin">
-				<image  src="https://file-dev.xyyxt.net/oss/images/avatar/20210623/1624414559368_44562477.png" class="avatar"></image>
+				<image  :src="$method.splitImgHost(userInfo.avatar, true)" class="avatar"></image>
 				<view style="margin-left: 20rpx;z-index: 999;">
-					<view style="color: #FFFFFF;font-size: 36rpx;padding: 10rpx;">倪虹洁</view>
-					<view style="color: #333333;font-size: 36rpx;padding: 10rpx;">13800138000</view>
+					<view style="color: #FFFFFF;font-size: 36rpx;padding: 10rpx;">{{userInfo.realname}}</view>
+					<view style="color: #333333;font-size: 36rpx;padding: 10rpx;">{{userInfo.telphone}}</view>
 				</view>
 				<view style="background-color: #F0F1F5;height:80rpx;"></view>
 			</view>
@@ -101,7 +101,7 @@
 
 <script>
 
-	import {mapState,mapMutations} from 'vuex';
+	import {mapGetters} from 'vuex';
 	export default {
 		components: {
 			
@@ -136,7 +136,7 @@
 			}
 			
 		},
-		computed: {...mapState(['avatarUrl', 'login', 'userName'])}
+		computed: {...mapGetters(['userInfo'])}
 	}
 </script>
 <style>

+ 1 - 1
store/index.js

@@ -15,7 +15,7 @@ const store = new Vuex.Store({
 	 getters: {
 		userInfo: state => {
 			if(state.userInfo==null){
-				if(uni.getStorageSync('union_id')){
+				if(uni.getStorageSync('user_account')){
 					getUserInfo(state)
 				}
 			}