|
|
@ -12,7 +12,7 @@ |
|
|
|
<!--头像--> |
|
|
|
<view |
|
|
|
style="position: absolute;z-index:2;width:33%;height:100%;border-radius: 50%;overflow: hidden;top: -32%;left: 0%;"> |
|
|
|
<image :src="userInfo.headImage" style="width: 100%;height: 100%;"></image> |
|
|
|
<image :src="userInfo.headImage || '微信用户'" style="width: 100%;height: 100%;"></image> |
|
|
|
</view> |
|
|
|
<!--福利中心--> |
|
|
|
<view style="position: absolute;z-index:2;width:33%;height:30%;top: 13%;right: 2%;"> |
|
|
@ -30,7 +30,7 @@ |
|
|
|
<!-- 用户信息 --> |
|
|
|
<view style="position: absolute;z-index:2;width:55%;height:20%;top: 60%;left: 7%;"> |
|
|
|
<view> |
|
|
|
<span style="font-size: 35rpx;margin-right: 5rpx">{{ userInfo.nickName }}</span> |
|
|
|
<span style="font-size: 35rpx;margin-right: 5rpx">{{ userInfo.nickName || '微信用户' }}</span> |
|
|
|
<span style="font-size: 18rpx">{{ userInfo.phone }}</span> |
|
|
|
</view> |
|
|
|
</view> |
|
|
@ -76,18 +76,23 @@ |
|
|
|
</view> |
|
|
|
</view> |
|
|
|
</view> |
|
|
|
|
|
|
|
|
|
|
|
<showLogin ref="showLogin"/> |
|
|
|
</view> |
|
|
|
</template> |
|
|
|
|
|
|
|
<script> |
|
|
|
import tabber from '@/components/base/tabbar.vue' |
|
|
|
import showLogin from '@/components/config/showLogin.vue' |
|
|
|
import { |
|
|
|
mapState |
|
|
|
} from 'vuex' |
|
|
|
|
|
|
|
export default { |
|
|
|
components: { |
|
|
|
tabber |
|
|
|
tabber, |
|
|
|
showLogin |
|
|
|
}, |
|
|
|
computed: { |
|
|
|
...mapState(['userInfo']), |
|
|
@ -135,6 +140,8 @@ |
|
|
|
} |
|
|
|
}, |
|
|
|
onShow() { |
|
|
|
// 检查是否登录 |
|
|
|
this.$refs.showLogin.checkLogin() |
|
|
|
// 获取用户个人信息 |
|
|
|
this.$store.commit('getUserInfo') |
|
|
|
}, |
|
|
|