Browse Source

修改个人中心

master
前端-胡立永 11 months ago
parent
commit
a9121fd5a9
1 changed files with 10 additions and 3 deletions
  1. +10
    -3
      pages/index/center.vue

+ 10
- 3
pages/index/center.vue View File

@ -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')
},


Loading…
Cancel
Save