feat: 首页发布增加发布类型选择(公开/私有/私信)

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
This commit is contained in:
刘正航
2026-05-14 21:20:57 +08:00
parent b8acc8be43
commit a0f7a758eb
2 changed files with 49 additions and 4 deletions

View File

@@ -10,10 +10,24 @@
<view class="field">
<text class="field-label">内容文本</text>
<textarea class="textarea" placeholder="请输入要发布的文本信息" value="{{text}}" bindinput="onInput" />
<textarea class="textarea" placeholder="请输入要发布的文本信息" value="{{text}}" data-field="text" bindinput="onInput" />
<view class="field-help">当前字数:{{text.length}},建议不少于 2 个字符。</view>
</view>
<view class="field">
<view class="row">
<text class="field-label">发布类型</text>
<picker mode="selector" range="{{visibilityOptions}}" range-key="label" value="{{visibilityIndex}}" bindchange="onVisibilityChange">
<view class="picker-value">{{visibilityOptions[visibilityIndex].label}}</view>
</picker>
</view>
</view>
<view class="field" wx:if="{{visibility === 'direct'}}">
<text class="field-label">接收人用户名</text>
<input class="input" placeholder="私信发送时必填" value="{{recipientUsername}}" data-field="recipientUsername" bindinput="onInput" />
</view>
<view class="field" wx:if="{{result}}">
<text class="field-label">识别反馈</text>
<view class="row">