You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
69 lines
2.3 KiB
69 lines
2.3 KiB
|
1 month ago
|
<view>
|
||
|
|
<view class="header">
|
||
|
|
<text class="title">发布动态</text>
|
||
|
|
</view>
|
||
|
|
|
||
|
|
<view class="form">
|
||
|
|
<view class="form-item">
|
||
|
|
<textarea
|
||
|
|
class="textarea"
|
||
|
|
placeholder="分享你的想法..."
|
||
|
|
placeholder-class="placeholder"
|
||
|
|
value="{{content}}"
|
||
|
|
bindinput="onContentChange"
|
||
|
|
maxlength="500"
|
||
|
|
></textarea>
|
||
|
|
<text class="counter">{{content.length}}/500</text>
|
||
|
|
</view>
|
||
|
|
|
||
|
|
<view class="form-item">
|
||
|
|
<view class="label">添加图片</view>
|
||
|
|
<view class="image-uploader">
|
||
|
|
<view class="upload-area" bindtap="chooseImage">
|
||
|
|
<text class="upload-icon">+</text>
|
||
|
|
<text class="upload-text">选择图片</text>
|
||
|
|
</view>
|
||
|
|
<view class="image-list">
|
||
|
|
<view class="image-item" wx:for="{{images}}" wx:key="index">
|
||
|
|
<image class="image" src="{{item}}" mode="aspectFill"></image>
|
||
|
|
<view class="image-delete" bindtap="deleteImage" data-index="{{index}}">
|
||
|
|
<text>×</text>
|
||
|
|
</view>
|
||
|
|
</view>
|
||
|
|
</view>
|
||
|
|
</view>
|
||
|
|
</view>
|
||
|
|
|
||
|
|
<view class="form-item">
|
||
|
|
<view class="label">选择话题</view>
|
||
|
|
<view class="topic-picker" bindtap="showTopicPicker">
|
||
|
|
<text class="topic-text">{{selectedTopic ? '#' + selectedTopic : '选择话题'}}</text>
|
||
|
|
<text class="topic-arrow">▼</text>
|
||
|
|
</view>
|
||
|
|
</view>
|
||
|
|
</view>
|
||
|
|
|
||
|
|
<view class="footer">
|
||
|
|
<button class="cancel-btn" bindtap="cancel">取消</button>
|
||
|
|
<button class="submit-btn" bindtap="submit" disabled="{{!content.trim()}}">
|
||
|
|
发布
|
||
|
|
</button>
|
||
|
|
</view>
|
||
|
|
|
||
|
|
<!-- 话题选择器弹窗 -->
|
||
|
|
<view wx:if="{{showTopicModal}}" class="modal-overlay" bindtap="hideTopicPicker">
|
||
|
|
<view class="modal-container" catchtap="stopPropagation">
|
||
|
|
<view class="modal-header">
|
||
|
|
<text class="modal-title">选择话题</text>
|
||
|
|
<text class="modal-close" bindtap="hideTopicPicker">×</text>
|
||
|
|
</view>
|
||
|
|
<view class="modal-content">
|
||
|
|
<view class="topic-item" wx:for="{{hotTopics}}" wx:key="id" bindtap="selectTopic" data-topic="{{item.name}}">
|
||
|
|
<text class="topic-name">#{{item.name}}</text>
|
||
|
|
<text class="topic-count">{{item.count}}人讨论</text>
|
||
|
|
</view>
|
||
|
|
</view>
|
||
|
|
</view>
|
||
|
|
</view>
|
||
|
|
</view>
|