From 1833dd6d7cac01c35840af52fadc1199821e5805 Mon Sep 17 00:00:00 2001 From: Houjie <714924425@qq.com> Date: 星期四, 15 五月 2025 09:28:16 +0800 Subject: [PATCH] 提交优化项 --- pages/user/people.vue | 60 +++++++++++++++++++++++++++++++++--------------------------- 1 files changed, 33 insertions(+), 27 deletions(-) diff --git a/pages/user/people.vue b/pages/user/people.vue index 896a5bd..431a2c4 100644 --- a/pages/user/people.vue +++ b/pages/user/people.vue @@ -2,10 +2,12 @@ <view> <scroll-view scroll-y class="page"> <!-- 澶撮儴logo--> - <view class="UCenter-bg"> - <image :src="personalList.avatar" class="png round animation-slide-right margin-bottom-sm" mode="scaleToFill" :style="[{animationDelay: '0.1s'}]"></image> - <image src="https://static.jeecg.com/upload/test/wave_1595818053612.gif" mode="scaleToFill" class="gif-wave"></image> - </view> + <view class="UCenter-bg"> + <image src="/static/avatar_boy.png" class="png round animation-slide-right margin-bottom-sm" + mode="scaleToFill" :style="[{animationDelay: '0.1s'}]"></image> + <image src="https://static.jeecg.com/upload/test/wave_1595818053612.gif" mode="scaleToFill" + class="gif-wave"></image> + </view> <view class="padding flex text-center text-grey bg-white shadow-warp"> <view class="flex flex-sub flex-direction solid-right animation-slide-top" :style="[{animationDelay: '0.2s'}]"> <view class="text-xl text-orange">{{personalList.username}}</view> @@ -19,7 +21,7 @@ </view> <!-- 鍒楄〃list--> <view class="cu-list menu card-menu margin-top-xl margin-bottom-xl shadow-lg radius"> - <view class="cu-item arrow animation-slide-bottom" :style="[{animationDelay: '0.1s'}]"> + <!-- <view class="cu-item arrow animation-slide-bottom" :style="[{animationDelay: '0.1s'}]"> <view class="content" > <text class="cuIcon-favorfill text-yellow"></text> <text class="text-grey">鏀惰棌</text> @@ -42,7 +44,7 @@ <text class="cuIcon-location text-cyan"></text> <text class="text-grey">瀹氫綅</text> </view> - </navigator> + </navigator> --> <navigator class="cu-item arrow animation-slide-bottom" url="/pages/user/userdetail" :style="[{animationDelay: '0.6s'}]"> <view class="content"> <text class="cuIcon-settingsfill text-cyan"></text> @@ -82,15 +84,21 @@ id:'' }; }, - watch: { - cur: { - immediate: true, - handler() { - console.log('watch',this.cur) - this.userId=this.$store.getters.userid; - this.load() - }, - }, + // watch: { + // cur: { + // immediate: true, + // handler() { + // console.log('watch',this.cur) + // this.userId=this.$store.getters.userid; + // this.load() + // }, + // }, + // }, + + created() { + this.id=uni.getStorageSync("userId"); + console.log(this.id); + this.load(); }, methods: { scan(){ @@ -109,20 +117,18 @@ // #endif }, load(){ - if(!this.userId){ + this.$http.get(this.userUrl,{params:{id:this.id}}).then(res=>{ - return; - } - this.$http.get(this.userUrl,{params:{id:this.userId}}).then(res=>{ - console.log("res",res) if (res.data.success) { - let perArr = res.data.result - let avatar=(perArr.avatar && perArr.avatar.length > 0)? api.getFileAccessHttpUrl(perArr.avatar):'/static/avatar_boy.png' - this.personalList.avatar =avatar - this.personalList.realname = perArr.realname - this.personalList.username = perArr.username - this.personalList.depart = perArr.departIds - this.getpost(perArr.post) + console.log("res",res) + + // let avatar=(perArr.avatar && perArr.avatar.length > 0)? api.getFileAccessHttpUrl(perArr.avatar):'/static/avatar_boy.png' + this.personalList.avatar =res.data.result.avatar + + // this.personalList.realname = perArr.realname + this.personalList.username = res.data.result.realname + // this.personalList.depart = perArr.departIds + this.getpost(res.data.result.post) } }).catch(err => { console.log(err); -- Gitblit v1.9.3