feat(fe): 评论改小红书式展开输入面板;FAB 统一暖橘;顶部去冗余入口

- 评论:底部平时一条细「说点什么」,点开才展开大写评论面板
  (大输入框+工具栏+发送,浮在键盘上方)。失焦时有草稿保持展开,
  避免点发送因面板收起而丢点击
- FAB 主题色统一:社区发帖 FAB 从深色改成和首页肉垫一致的暖橘圆钮
- 报告页顶部筛选去掉「添加」(报告页不需要建档入口)
- 社区去掉顶部「发布」按钮,发帖统一走右下角悬浮按钮

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
This commit is contained in:
Blizzard
2026-07-30 18:13:41 +08:00
parent 4f52a7d3a1
commit c48e241fe1
6 changed files with 71 additions and 46 deletions
@@ -68,29 +68,34 @@ module.exports.sel = function (map, key, index, def) {
</view>
</scroll-view>
<view class="cmp-dock" style="padding-bottom:{{kbHeight ? kbHeight + 'px' : 'calc(20rpx + env(safe-area-inset-bottom))'}}">
<view wx:if="{{replyTo.name}}" class="cm-replying">
<text>回复 {{replyTo.name}}</text>
<view class="cm-cancel" catchtap="onCancelReply"><pt-icon name="close" size="{{24}}"></pt-icon></view>
<!-- 收起态:一条细条,点了才展开成大写评论面板(小红书那套) -->
<view wx:if="{{!composing}}" class="cm-collapsed" catchtap="onStartCompose">
<view class="cm-collapsed-pill {{commentText ? 'has' : ''}}">{{commentText || '说点什么…'}}</view>
<view class="cm-collapsed-ic"><pt-icon name="photo" size="{{40}}"></pt-icon></view>
</view>
<!-- 展开态:大输入面板,浮在键盘上方 -->
<view wx:else class="cmp-dock" style="padding-bottom:{{kbHeight ? kbHeight + 'px' : 'calc(20rpx + env(safe-area-inset-bottom))'}}">
<view class="cm-dock-head">
<text class="cm-dock-title">{{replyTo.name ? '回复 ' + replyTo.name : '写评论'}}</text>
<view class="cm-dock-close" catchtap="onCloseCompose"><pt-icon name="close" size="{{30}}"></pt-icon></view>
</view>
<view wx:if="{{commentImages.length}}" class="img-picker" style="margin-bottom:12rpx">
<textarea class="cm-ta" placeholder="{{replyTo.name ? '回复 @' + replyTo.name + '…' : '有爱评论,说点好听的~'}}"
placeholder-class="placeholder" value="{{commentText}}" bindinput="onCommentInput"
focus="{{cmFocus}}" bindfocus="onCommentFocus" bindblur="onCommentBlur"
maxlength="500" auto-height="{{true}}" show-confirm-bar="{{false}}"
adjust-position="{{false}}" cursor-spacing="12"></textarea>
<view wx:if="{{commentImages.length}}" class="img-picker" style="margin-top:12rpx">
<view wx:for="{{commentImages}}" wx:key="id" class="img-thumb">
<image src="{{item.url}}" mode="aspectFill"></image>
<view class="img-del" catchtap="onRemoveCommentImage" data-index="{{index}}"><pt-icon name="close" size="{{24}}"></pt-icon></view>
</view>
</view>
<view class="cm-inputrow">
<view class="cm-pic" catchtap="onPickCommentImages">
<pt-icon name="photo" size="{{40}}"></pt-icon>
</view>
<textarea class="cm-ta" placeholder="{{replyTo.name ? '回复 @' + replyTo.name : '有话要说,快来评论'}}"
placeholder-class="placeholder" value="{{commentText}}" bindinput="onCommentInput"
focus="{{cmFocus}}" bindfocus="onCommentFocus" bindblur="onCommentBlur"
maxlength="500" auto-height="{{true}}" show-confirm-bar="{{false}}"
adjust-position="{{false}}" cursor-spacing="12"></textarea>
<view class="cm-toolbar">
<view class="cm-pic" catchtap="onPickCommentImages"><pt-icon name="photo" size="{{44}}"></pt-icon></view>
<text class="cm-count">{{commentText.length}}/500</text>
<view class="cm-send {{commentText ? 'on' : ''}}" catchtap="onSendComment">发送</view>
</view>
<text wx:if="{{commentText.length}}" class="cm-count">{{commentText.length}}/500</text>
</view>
</block>