105 lines
2.3 KiB
Vue
105 lines
2.3 KiB
Vue
<template>
|
|
<view class="information">
|
|
<view class="info-avatar">
|
|
<image src="../static/mine/23.png"></image>
|
|
</view>
|
|
<view class="info-item">
|
|
<view class="title">昵称</view>
|
|
<view class="value">{{ userInfo.member_nickname }}</view>
|
|
</view>
|
|
<view class="info-item">
|
|
<view class="title">性别</view>
|
|
<view class="value">{{ userInfo.member_sex == 1 ? '男' : '女' }}</view>
|
|
</view>
|
|
<view class="info-item">
|
|
<view class="title">生日</view>
|
|
<view class="value">{{ userInfo.member_birthday | dateFormat }}</view>
|
|
</view>
|
|
<view class="info-item">
|
|
<view class="title">手机号</view>
|
|
<view class="value">{{ userInfo.member_mobile }}</view>
|
|
</view>
|
|
<view class="info-item">
|
|
<view class="title">等级</view>
|
|
<view class="value">{{ userInfo.level }}</view>
|
|
</view>
|
|
<view class="info-item">
|
|
<view class="title">积分数</view>
|
|
<view class="value">{{ userInfo.member_points }}</view>
|
|
</view>
|
|
<view class="info-item">
|
|
<view class="title">经验值</view>
|
|
<view class="value">{{ userInfo.member_exppoints }}</view>
|
|
</view>
|
|
</view>
|
|
</template>
|
|
<script>
|
|
import common from '@/static/js/common.js'
|
|
export default {
|
|
data() {
|
|
return {
|
|
userInfo: {}
|
|
}
|
|
},
|
|
onLoad() {
|
|
this.getUserInfo();
|
|
},
|
|
onNavigationBarButtonTap() {
|
|
this.toEditPage();
|
|
},
|
|
filters: {
|
|
dateFormat(value) {
|
|
return common.timestampToDate({ timestamp: value });
|
|
}
|
|
},
|
|
methods: {
|
|
getUserInfo() {
|
|
this.$u.api.getMemberInfo().then(res => {
|
|
if (res.errCode == 0) {
|
|
this.userInfo = res.data.MemberArray;
|
|
}
|
|
})
|
|
},
|
|
toEditPage() {
|
|
uni.navigateTo({
|
|
url: '/pageE/mine/EditUserInfo'
|
|
});
|
|
}
|
|
},
|
|
};
|
|
</script>
|
|
<style lang="scss" scoped>
|
|
.information {
|
|
min-height: calc(100vh - var(--window-top));
|
|
background-color: #ECECEC;
|
|
padding-top: 1rpx;
|
|
.info-avatar {
|
|
text-align: center;
|
|
height: 160rpx;
|
|
background: rgba(255,255,255,1);
|
|
> image {
|
|
flex-shrink: 0;
|
|
width: 120rpx;
|
|
height: 120rpx;
|
|
border-radius: 50%;
|
|
margin-top: 20rpx;
|
|
}
|
|
}
|
|
.info-item {
|
|
display: flex;
|
|
align-items: center;
|
|
padding: 35rpx 30rpx;
|
|
border-top: 2rpx solid #ECECEC;
|
|
font-size: 30rpx;
|
|
height: 98rpx;
|
|
background: rgba(255,255,255,1);
|
|
.title {
|
|
width: 240rpx;
|
|
color: rgba(51,51,51,1);
|
|
}
|
|
.value {
|
|
color: rgba(102,102,102,1);
|
|
}
|
|
}
|
|
}
|
|
</style> |