123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252 |
- <template>
- <view class="container">
- <view class="head" :style="{height: `${headHeight}rpx`}">
- <u-navbar :is-fixed="false" :border-bottom="false" :is-back="false" title="个人中心" :background="{ background: 'transprent' }" title-color="#FFFFFF">
- <view @click="$u.func.route('/pages/system/setting')" slot="right">
- <image src="/static/images/user/setting.png" class="set-icon" mode="widthFix"></image>
- </view>
- </u-navbar>
- <image src="/static/images/user/bg.png" class="head-bg" :style="{height: `${headHeight}rpx`}" />
- <!-- 用户信息 -->
- <view class="user-box">
- <view class="left">
- <image :src="userInfo.avatar" class="avatar" mode=""></image>
- <view class="user-name">{{ userInfo.nick_name }}</view>
- <view class="tag">{{ userInfo.tenant_id }}</view>
- </view>
- <view @click="$u.func.route('/pages/user/profile')" class="edit-btn">编辑资料</view>
- </view>
- <!-- 操作按钮 -->
- <view class="nav">
- <navigator url="" hover-class="none" class="nav-item">
- <image src="/static/images/user/n1.png" class="icon" mode=""></image>
- <view class="name">我的消息</view>
- </navigator>
- <navigator url="" hover-class="none" class="nav-item">
- <image src="/static/images/user/n2.png" class="icon" mode=""></image>
- <view class="name">我的待办</view>
- </navigator>
- <navigator url="" hover-class="none" class="nav-item">
- <image src="/static/images/user/n3.png" class="icon" mode=""></image>
- <view class="name">我的地址</view>
- </navigator>
- <navigator url="" hover-class="none" class="nav-item">
- <image src="/static/images/user/n4.png" class="icon" mode=""></image>
- <view class="name">我的收藏</view>
- </navigator>
- </view>
- </view>
- <!-- 功能列表 -->
- <view class="cell-box">
- <u-cell-group :border="false">
- <u-cell-item title="我的评价">
- <image slot="icon" src="/static/images/user/c1.png" class="icon" mode=""></image>
- </u-cell-item>
- <u-cell-item title="常见问题">
- <image slot="icon" src="/static/images/user/c2.png" class="icon" mode=""></image>
- </u-cell-item>
- <u-cell-item title="客服中心" :border-bottom="false">
- <image slot="icon" src="/static/images/user/c3.png" class="icon" mode=""></image>
- </u-cell-item>
- </u-cell-group>
- </view>
- <view class="cell-box">
- <u-cell-group :border="false">
- <u-cell-item title="推荐">
- <image slot="icon" src="/static/images/user/c4.png" class="icon" mode=""></image>
- </u-cell-item>
- <u-cell-item title="评分">
- <image slot="icon" src="/static/images/user/c5.png" class="icon" mode=""></image>
- </u-cell-item>
- <u-cell-item title="反馈">
- <image slot="icon" src="/static/images/user/c6.png" class="icon" mode=""></image>
- </u-cell-item>
- <u-cell-item title="关于" :border-bottom="false">
- <image slot="icon" src="/static/images/user/c7.png" class="icon" mode=""></image>
- </u-cell-item>
- </u-cell-group>
- </view>
- <view class="cell-box">
- <u-cell-group :border="false">
- <u-cell-item title="设置" :border-bottom="false" @click="$u.func.route('/pages/system/setting')">
- <image slot="icon" src="/static/images/user/c8.png" class="icon" mode=""></image>
- </u-cell-item>
- </u-cell-group>
- </view>
- </view>
- </template>
- <script>
- export default {
- data() {
- return {
- headHeight: 582
- };
- },
- mounted() {
- this.setHeadHeight()
- },
- methods: {
- setHeadHeight() {
- const that = this
- // #ifndef H5
- uni.getSystemInfo({
- success: function(res) {
- that.headHeight = Number(res.statusBarHeight) + Number(res.platform == 'ios' ? 44 : 48) + 582
- }
- });
- // #endif
- },
- }
- };
- </script>
- <style lang="scss">
- .container {
- background-color: #f7f7f7;
- min-height: 100vh;
- overflow: hidden;
- }
- .head {
- position: relative;
- top: 0;
- left: 0;
- z-index: 1;
- min-height: 582rpx;
- overflow: hidden;
- background: #55A2F9;
- .set-icon {
- vertical-align: middle;
- width: 41rpx;
- height: auto;
- margin-right: 35rpx;
- }
- .head-bg {
- position: absolute;
- left: 0px;
- top: 0px;
- z-index: -1;
- width: 750rpx;
- height: 582rpx;
- background: #55A2F9;
- }
- }
- .user-box {
- display: flex;
- justify-content: space-between;
- padding: 0 20rpx 0 64rpx;
- margin-top: 36rpx;
- .left {
- display: flex;
- flex-direction: column;
- align-items: center;
- .avatar {
- width: 128rpx;
- height: 128rpx;
- background: #ffffff;
- border-radius: 50%;
- }
- .user-name {
- margin-top: 20rpx;
- font-size: 36rpx;
- font-family: Source Han Sans CN;
- font-weight: 500;
- color: #ffffff;
- }
- .tag {
- margin-top: 20rpx;
- display: flex;
- justify-content: center;
- align-items: center;
- padding: 5rpx 16rpx;
- border: 1px solid #f5f5f5;
- border-radius: 7rpx;
- font-size: 19rpx;
- font-family: Source Han Sans CN;
- font-weight: 300;
- color: #ffffff;
- }
- }
- .edit-btn {
- margin-top: 20rpx;
- flex-shrink: 0;
- display: flex;
- justify-content: center;
- align-items: center;
- width: 165rpx;
- height: 54rpx;
- border: 2rpx solid #f5f5f5;
- border-radius: 11rpx;
- font-size: 27rpx;
- font-family: Source Han Sans CN;
- font-weight: 400;
- color: #ffffff;
- }
- }
- .nav {
- display: flex;
- //border-top: 2rpx solid #7dcdd6;
- margin: 36rpx 38rpx 0;
- padding: 36rpx 0 42rpx;
- .nav-item {
- width: calc(100% / 4);
- display: flex;
- flex-direction: column;
- align-items: center;
- justify-content: space-between;
- font-size: 25rpx;
- font-family: Source Han Sans CN;
- font-weight: 400;
- color: #ffffff;
- &:not(:last-of-type) {
- position: relative;
- &::after {
- position: absolute;
- right: 0;
- top: 50%;
- transform: translateY(-50%);
- content: '';
- display: block;
- width: 2rpx;
- background-color: #fff;
- height: 30rpx;
- }
- }
- .icon {
- width: 48rpx;
- height: 48rpx;
- margin-bottom: 6rpx;
- }
- }
- }
- .cell-box {
- background: #ffffff;
- margin: 18rpx;
- .icon {
- width: 32rpx;
- height: 32rpx;
- margin-right: 22rpx;
- }
- }
- </style>
|