|
@@ -18,11 +18,11 @@
|
|
|
<view class="profile-section">
|
|
<view class="profile-section">
|
|
|
<view class="profile-header" @click="">
|
|
<view class="profile-header" @click="">
|
|
|
<view class="avatar-container">
|
|
<view class="avatar-container">
|
|
|
- <image class="avatar" src="/static/images/default-avatar.png" mode="aspectFill" />
|
|
|
|
|
|
|
+ <image class="avatar" :src="user.smallAvatar" mode="aspectFill" />
|
|
|
</view>
|
|
</view>
|
|
|
<view class="user-info">
|
|
<view class="user-info">
|
|
|
- <text class="username">刘小明</text>
|
|
|
|
|
- <text class="user-id">ID 31548</text>
|
|
|
|
|
|
|
+ <text class="username">{{ user.name }}</text>
|
|
|
|
|
+ <text class="user-id">ID {{ user.id }}</text>
|
|
|
</view>
|
|
</view>
|
|
|
<view class="arrow-container">
|
|
<view class="arrow-container">
|
|
|
<text class="arrow-icon">〉</text>
|
|
<text class="arrow-icon">〉</text>
|
|
@@ -169,7 +169,7 @@ import { getList } from "@/api/hd";
|
|
|
import { share } from "@/mixins";
|
|
import { share } from "@/mixins";
|
|
|
import AppAvatarModule from "@/components/module/app-avatar";
|
|
import AppAvatarModule from "@/components/module/app-avatar";
|
|
|
import { mapGetters } from 'vuex'
|
|
import { mapGetters } from 'vuex'
|
|
|
-import { clearLogin } from "@/api/user";
|
|
|
|
|
|
|
+import { clearLogin,currentInfo } from "@/api/user";
|
|
|
import { list } from "@/mixins";
|
|
import { list } from "@/mixins";
|
|
|
export default {
|
|
export default {
|
|
|
name: "recent",
|
|
name: "recent",
|
|
@@ -180,7 +180,8 @@ export default {
|
|
|
//0没有登录 1有登录
|
|
//0没有登录 1有登录
|
|
|
loginStyle :0,
|
|
loginStyle :0,
|
|
|
activePopupIndex: -1,
|
|
activePopupIndex: -1,
|
|
|
- pageAction:{refresh:0}
|
|
|
|
|
|
|
+ pageAction:{refresh:0},
|
|
|
|
|
+ user:{name:'',smallAvatar:'',id:0}
|
|
|
};
|
|
};
|
|
|
},
|
|
},
|
|
|
computed: {
|
|
computed: {
|
|
@@ -276,8 +277,16 @@ export default {
|
|
|
this.pageTo({ url:'/pages/home/mall?id='+item.id+'&account='+item.shopId})
|
|
this.pageTo({ url:'/pages/home/mall?id='+item.id+'&account='+item.shopId})
|
|
|
},
|
|
},
|
|
|
init () {
|
|
init () {
|
|
|
|
|
+ this.getLoginInfo()
|
|
|
this.getMyHdList()
|
|
this.getMyHdList()
|
|
|
},
|
|
},
|
|
|
|
|
+ getLoginInfo(){
|
|
|
|
|
+ currentInfo().then(res=>{
|
|
|
|
|
+ if(res.code == 1){
|
|
|
|
|
+ this.user = res.data.info?res.data.info:[]
|
|
|
|
|
+ }
|
|
|
|
|
+ })
|
|
|
|
|
+ },
|
|
|
getMyHdList(){
|
|
getMyHdList(){
|
|
|
return getList({page: this.list.page}).then(res=>{
|
|
return getList({page: this.list.page}).then(res=>{
|
|
|
this.completes(res);
|
|
this.completes(res);
|