123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196 |
- <template>
- <view class="content">
- <view class="user-info">
- <view class="user-data">
- <view class="user-name">{{userData.nickName}}</view>
- <view class="user-phone">{{userData.phone}}</view>
- </view>
- <view class="user-img">
- <u-avatar :src="userData.headImage" size="160"></u-avatar>
- </view>
- </view>
- <view class="user-handle" v-for="(item, index) in handleList" :key="index" @click="goToHandle(item)">
- <view class="handle-icon">
- <u-image :src="item.icon" mode="aspectFit" width="28px" height="28px"></u-image>
- </view>
- <view class="handle-label">{{item.label}}</view>
- <view class="handle-arrow">
- <u-icon name="arrow-right" color="#cccccc" size="32"></u-icon>
- </view>
- </view>
- </view>
- </template>
- <script>
- const NET = require('@/utils/request')
- const API = require('@/config/api')
- export default {
- onShow() {
- if (uni.getStorageSync('userData')) {
- this.userData = uni.getStorageSync('userData')
- }
- },
- data() {
- return {
- userData: {
- headImage: '',
- userId: '',
- nickName: '',
- userName: '',
- phone: '',
- },
- handleList: [{
- label: '全部客户',
- path: 'customerList',
- icon: API.getServerImg + 'kehu.png'
- },
- {
- label: '营销业绩排行',
- path: 'marketRankList',
- icon: API.getServerImg + 'paihang.png'
- },
- {
- label: '续费提醒',
- path: 'renewList',
- icon: API.getServerImg + 'xufeitixing.png'
- },
- {
- label: '消息通知',
- path: 'messageList',
- icon: API.getServerImg + 'xiaoxi.png'
- },
- {
- label: '数据统计',
- path: 'dataCensus',
- icon: API.getServerImg + 'shujutongji.png'
- },
- {
- label: '我的二维码',
- path: 'shareInfo',
- icon: API.getServerImg + 'erweima.png'
- },
- {
- label: '赠品申请',
- path: 'giftApply',
- icon: API.getServerImg + 'paihang.png'
- },
- {
- label: '退出登录',
- path: 'logout',
- icon: API.getServerImg + 'kehu.png'
- },
- ],
- }
- },
- methods: {
- // 跳转我的各列表界面
- goToHandle(site) {
- if(site.path == 'logout'){
- uni.removeStorageSync('token')
- uni.navigateTo({
- url: '/pages/login/index'
- });
- }else{
- uni.navigateTo({
- url: '/pagesMain/' + site.path
- });
- }
- }
- }
- }
- </script>
- <style lang="scss" scoped>
- @import "@/static/css/themes.scss";
-
- .content {
- width: 100%;
- min-height: 100vh;
- float: left;
- background-color: #f5f6f8;
-
- // .swiper-item {
- // width: 100%;
- // height: calc(100vh - 50px);
- // position: relative;
- // }
-
- .user-info {
- width: 100%;
- height: 110px;
- margin-bottom: 10px;
- float: left;
- background-color: $mainColor;
-
- .user-data {
- width: calc(100% - 110px);
- height: 110px;
- padding: 15px 0 15px 15px;
- float: left;
-
- .user-name {
- width: 100%;
- float: left;
- font-size: 24px;
- color: #FFFFFF;
- line-height: 30px;
- margin: 10px 0;
- white-space: nowrap;
- overflow: hidden;
- text-overflow: ellipsis;
- }
-
- .user-phone {
- width: 100%;
- color: #FFFFFF;
- line-height: 20px;
- float: left;
- white-space: nowrap;
- overflow: hidden;
- text-overflow: ellipsis;
- }
- }
-
- .user-img {
- width: 110px;
- height: 110px;
- padding: 15px;
- float: left;
- display: flex;
- align-items: center;
- justify-content: center;
- }
- }
-
- .user-handle {
- width: 100vw;
- height: 40px;
- float: left;
- padding: 0 15px;
- margin-bottom: 10px;
- display: flex;
- align-items: center;
-
- .handle-icon {
- width: 40px;
- height: 40px;
- text-align: center;
- line-height: 40px;
- display: flex;
- align-items: center;
- }
-
- .handle-label {
- height: 40px;
- flex: 1;
- margin-left: 10px;
- line-height: 40px;
- font-size: 15px;
- }
-
- .handle-arrow {
- line-height: 40px;
- }
- }
- }
- </style>
|