This commit is contained in:
mzltMpfqGS
2026-04-15 19:45:16 +08:00
commit e4a087e67e
301 changed files with 35048 additions and 0 deletions

View File

@@ -0,0 +1,58 @@
// components/user-card/user-card.js
// 用户卡片组件
Component({
properties: {
user: {
type: Object,
value: {}
},
showFollow: {
type: Boolean,
value: true
}
},
data: {
isFollowing: false
},
lifetimes: {
attached() {
if (this.data.user) {
this.setData({ isFollowing: this.data.user.isFollowing || false })
}
}
},
methods: {
onTap() {
const user = this.data.user
if (user && user.id) {
wx.navigateTo({
url: `/pages/user-profile/user-profile?userId=${user.id}`
})
}
},
onFollow(e) {
e.stopPropagation()
const user = this.data.user
if (!user || !user.id) return
const isFollowing = !this.data.isFollowing
this.setData({ isFollowing })
this.triggerEvent('follow', {
userId: user.id,
isFollowing
})
}
}
})
/**
* @联系作者16768118056
* @描述:(此项目非免费分享)源码百分百可用,搞定毕设不发愁,支持远程调试安装、二次开发、定制、讲解、文档类。
* @访问https://www.notmaker.com/detail/8326a897119d4542896c863a69d7bbe7/gtt20260415查看完整运行演示。
*/