b49bf0f0f9
- custom-tab-bar 去掉社区入口(页面与 app.json 注册保留,加回一行即可恢复) - profile-head 新增 relationsClickable,别人主页传 false:从关注/粉丝列表进对方 主页后,对方的关注/粉丝数字只展示不可点开,避免无限套娃;「我的」页不受影响 Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
47 lines
2.5 KiB
Plaintext
47 lines
2.5 KiB
Plaintext
<wxs module="im">
|
|
module.exports.isUrl = function (s) { return s && s.indexOf('http') === 0; }
|
|
</wxs>
|
|
<nav-bar title="{{card ? card.nickname : '宠友主页'}}" show-back="{{true}}"></nav-bar>
|
|
|
|
<scroll-view class="page-scroll" scroll-y="{{true}}" enhanced="{{true}}" show-scrollbar="{{false}}"
|
|
bindscrolltolower="loadMore">
|
|
<view class="page-body no-fab">
|
|
<view wx:if="{{loading}}" class="empty lg">加载中…</view>
|
|
|
|
<block wx:elif="{{card}}">
|
|
<!-- 别人主页:关注/粉丝数字只展示、不可点开,避免从列表进主页后又开对方列表无限套娃 -->
|
|
<profile-head card="{{card}}" relations-clickable="{{false}}" bind:follow="toggleFollow"
|
|
bind:relations="goRelations" bind:decorate="goDecorate"
|
|
bind:pet="goPet"></profile-head>
|
|
|
|
<view wx:for="{{posts}}" wx:key="id" class="post-card">
|
|
<view class="post-head">
|
|
<view class="post-avatar">{{item.author_emoji}}</view>
|
|
<view class="post-user">
|
|
<view class="pu-b">{{item.author_name}}</view>
|
|
<view class="pu-s">{{item.timeText}}</view>
|
|
</view>
|
|
<view wx:if="{{item.statusText}}" class="post-status st-{{item.status}}">{{item.statusText}}</view>
|
|
<view wx:if="{{item.tag}}" class="tag {{item.tagClass}}">{{item.tag}}</view>
|
|
</view>
|
|
<view wx:if="{{item.status === 'pending'}}" class="status-note">内容审核中,通过后其他人才能看到</view>
|
|
<view wx:elif="{{item.status === 'rejected'}}" class="status-note st-note-red">未通过内容安全审核,仅你可见</view>
|
|
<view class="post-content">{{item.content}}</view>
|
|
<view wx:if="{{item.images.length}}" class="photo-grid">
|
|
<block wx:for="{{item.images}}" wx:for-item="img" wx:key="*this">
|
|
<image wx:if="{{im.isUrl(img)}}" class="photo-tile" src="{{img}}" mode="aspectFill"
|
|
bindtap="previewImage" data-urls="{{item.images}}" data-cur="{{img}}"></image>
|
|
<view wx:else class="photo-tile">{{img}}</view>
|
|
</block>
|
|
</view>
|
|
<view class="post-actions">
|
|
<view class="pa-btn"><pt-icon name="like" size="{{32}}"></pt-icon><text class="pa-n">{{item.like_count || 0}}</text></view>
|
|
<view class="pa-btn"><pt-icon name="comment" size="{{32}}"></pt-icon><text class="pa-n">{{item.comment_count || 0}}</text></view>
|
|
</view>
|
|
</view>
|
|
|
|
<view wx:if="{{!posts.length}}" class="empty lg">TA 还没有发过帖子</view>
|
|
</block>
|
|
</view>
|
|
</scroll-view>
|