7.10 增加登录页面,事件详情接口对接,我的点赞,关注收藏页面搭建,接口对接

This commit is contained in:
尚政杰
2025-07-10 18:08:16 +08:00
parent c4267a0e27
commit 58b3414bdd
356 changed files with 7710 additions and 978 deletions

View File

@@ -2,11 +2,11 @@
<view>
<image class="topBg absolute" src="/static/image/mine/myTopBg.png" mode="widthFix"></image>
<view class="navTitle fixed" :style="'top:'+menuTop+'px;line-height:'+menuH+'px;'">个人中心</view>
<view class="personalInfoC relative flex" :style="'margin-top:'+infoTop+'px;'" @click="clickPersonalInfo()">
<image class="avatar" src="" mode="aspectFill"></image>
<view v-if="userInfo" class="personalInfoC relative flex" :style="'margin-top:'+infoTop+'px;'" @click="clickPersonalInfo()">
<image class="avatar" :src="userInfo.basic_info.avatar_url" mode="aspectFill"></image>
<view class="flex1">
<view class="nickname">星河滚烫的理想</view>
<view class="mobile">手机号13654800065</view>
<view class="nickname">{{userInfo.basic_info.username}}</view>
<view class="mobile">手机号{{userInfo.basic_info.phone}}</view>
</view>
<image class="arrow" src="/static/icon/mine/infoArrow.png" mode="widthFix"></image>
</view>
@@ -42,6 +42,7 @@
<script>
import { inject } from 'vue';
import { userInfo } from '@/request/api';
export default {
data() {
@@ -49,6 +50,7 @@
menuTop:inject('menuTop'),
menuH: inject('menuHeight'),
infoTop:'',
userInfo:null,
menuList:[{
icon:'/static/icon/mine/aboutUs.png',
title:'关于我们',
@@ -79,6 +81,9 @@
onLoad() {
this.infoTop = inject('navHeight')+32/750*inject('windowWidth')
},
onShow() {
this.getUserInfoData()
},
methods: {
/**
* 点击查看个人信息
@@ -112,8 +117,15 @@
})
}else if(index==1)
{
}
//关注收藏
uni.navigateTo({
url:'/pages/mine/followCollect/followCollect'
})
}else
//我的点赞
uni.navigateTo({
url:'/pages/mine/myLike/myLike'
})
},
clickMenuItem(url)
{
@@ -123,8 +135,24 @@
url
})
}
}
},
/**
* 获取用户信息数据
*/
getUserInfoData()
{
userInfo().then(res=>{
if(res.code==200)
{
this.userInfo = res.data
}else
wx.showToast({
title:res.message,
})
}).catch(error=>{
})
}
}
}
</script>