|
3 | 3 | <head-top go-back='true' :head-title="profiletitle"></head-top>
|
4 | 4 | <section class="profile-number">
|
5 | 5 | <router-link to="/profile/info" class="profile-link">
|
6 |
| - <span class="privateImage"> |
| 6 | + <img :src="getImgPath(this.avatar)" class="privateImage" v-if="this.avatar"> |
| 7 | + <span class="privateImage" v-else> |
7 | 8 | <svg class="privateImage-svg">
|
8 | 9 | <use xmlns:xlink="http://www.w3.org/1999/xlink" xlink:href="#avatar-default"></use>
|
9 | 10 | </svg>
|
10 | 11 | </span>
|
11 | 12 | <div class="user-info">
|
12 |
| - <p>3adc5bfcd</p> |
| 13 | + <p>{{username}}</p> |
13 | 14 | <p>
|
14 | 15 | <span class="user-icon">
|
15 | 16 | <svg class="icon-mobile" fill="#fff">
|
16 | 17 | <use xmlns:xlink="http://www.w3.org/1999/xlink" xlink:href="#mobile"></use>
|
17 | 18 | </svg>
|
18 | 19 | </span>
|
19 |
| - <span class="icon-mobile-number">15800319949</span> |
| 20 | + <span class="icon-mobile-number">{{mobile}}</span> |
20 | 21 | </p>
|
21 | 22 | </div>
|
22 | 23 | <span class="arrow">
|
|
29 | 30 | <section class="info-data">
|
30 | 31 | <ul class="clear">
|
31 | 32 | <router-link to="/profile/balance" tag="li" class="info-data-link">
|
32 |
| - <span class="info-data-top"><b>0.00</b>元</span> |
| 33 | + <span class="info-data-top"><b>{{balance}}</b>元</span> |
33 | 34 | <span class="info-data-bottom">我的余额</span>
|
34 | 35 | </router-link>
|
35 | 36 | <router-link to="/profile/benefit" tag="li" class="info-data-link">
|
36 |
| - <span class="info-data-top"><b>1</b>个</span> |
| 37 | + <span class="info-data-top"><b>{{count}}</b>个</span> |
37 | 38 | <span class="info-data-bottom">我的优惠</span>
|
38 | 39 | </router-link>
|
39 | 40 | <router-link to="/profile/points" tag="li" class="info-data-link">
|
40 |
| - <span class="info-data-top"><b>1010</b>分</span> |
| 41 | + <span class="info-data-top"><b>{{pointNumber}}</b>分</span> |
41 | 42 | <span class="info-data-bottom">我的积分</span>
|
42 | 43 | </router-link>
|
43 | 44 | </ul>
|
|
94 | 95 | </section>
|
95 | 96 | <section class="profile-1reTe">
|
96 | 97 | <!-- 服务中心 -->
|
97 |
| - <router-link to='/profile/service' class="myorder"> |
| 98 | + <router-link to='/service' class="myorder"> |
98 | 99 | <aside>
|
99 | 100 | <svg fill="#4aa5f0">
|
100 | 101 | <use xmlns:xlink="http://www.w3.org/1999/xlink" xlink:href="#service"></use>
|
|
135 | 136 | <script>
|
136 | 137 | import headTop from '../../components/header/head'
|
137 | 138 | import {mapState} from 'vuex'
|
| 139 | +import {getImgPath} from '../../components/common/mixin' |
138 | 140 |
|
139 | 141 | export default {
|
140 | 142 | data(){
|
141 | 143 | return{
|
142 | 144 | profiletitle: '我的',
|
143 |
| - count : '', //优惠券个数 |
144 |
| - pontNumber : '', //积分 |
| 145 | + getUserinfo: {}, //得到数据 |
| 146 | + username: '', //用户名 |
| 147 | + mobile: '', //电话号码 |
| 148 | + balance: '', //我的余额 |
| 149 | + count : '', //优惠券个数 |
| 150 | + pointNumber : '', //积分数 |
| 151 | + avatar: '', //头像地址 |
145 | 152 | }
|
146 | 153 | },
|
147 | 154 |
|
148 | 155 | mounted(){
|
149 |
| - console.log(this.userInfo) |
| 156 | + this.getUserinfo = this.userInfo; |
| 157 | + this.avatar = this.getUserinfo.avatar; |
| 158 | + this.username = this.getUserinfo.username; |
| 159 | + this.mobile = this.getUserinfo.mobile; |
| 160 | + this.balance = this.getUserinfo.balance; |
| 161 | + this.count = this.getUserinfo.gift_amount; |
| 162 | + this.pointNumber = this.getUserinfo.point; |
150 | 163 | },
|
151 | 164 |
|
| 165 | + mixins: [getImgPath], |
| 166 | +
|
152 | 167 | components:{
|
153 | 168 | headTop
|
154 | 169 | },
|
|
0 commit comments