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 <view
style="position: absolute;z-index:2;width:33%;height:100%;border-radius: 50%;overflow: hidden;top: -32%;left: 0%;"> 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>
<!--福利中心--> <!--福利中心-->
<view style="position: absolute;z-index:2;width:33%;height:30%;top: 13%;right: 2%;"> <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 style="position: absolute;z-index:2;width:55%;height:20%;top: 60%;left: 7%;">
<view> <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> <span style="font-size: 18rpx">{{ userInfo.phone }}</span>
</view> </view>
</view> </view>
@ -76,18 +76,23 @@
</view> </view>
</view> </view>
</view> </view>
<showLogin ref="showLogin"/>
</view> </view>
</template> </template>
<script> <script>
import tabber from '@/components/base/tabbar.vue' import tabber from '@/components/base/tabbar.vue'
import showLogin from '@/components/config/showLogin.vue'
import { import {
mapState mapState
} from 'vuex' } from 'vuex'
export default { export default {
components: { components: {
tabber
tabber,
showLogin
}, },
computed: { computed: {
...mapState(['userInfo']), ...mapState(['userInfo']),
@ -135,6 +140,8 @@
} }
}, },
onShow() { onShow() {
//
this.$refs.showLogin.checkLogin()
// //
this.$store.commit('getUserInfo') this.$store.commit('getUserInfo')
}, },


Loading…
Cancel
Save