Files
Mycontent/miniprogram/pages/super-article-editor/super-article-editor.wxml
乘风 0cc8e2b270 feat: enhance member detail page with dynamic tabs and image handling
- Introduced member business tabs for profile and dynamics, improving navigation and user experience.
- Implemented image parsing and normalization functions to handle article images effectively.
- Updated the UI to display article thumbnails and manage loading states, enhancing visual feedback.
- Refactored data synchronization methods to ensure member business tabs reflect current content accurately.

This update aims to streamline member profile interactions and improve the overall presentation of member-related content.
2026-05-09 18:15:45 +08:00

81 lines
3.9 KiB
Plaintext
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

<view class="page">
<view class="nav-bar" style="padding-top: {{statusBarHeight}}px;">
<view class="nav-back" bindtap="goBack">
<icon name="chevron-left" size="44" color="rgba(255,255,255,0.85)"></icon>
</view>
<text class="nav-title">{{editArticleId ? '编辑动态' : '发动态'}}</text>
<view class="nav-placeholder"></view>
</view>
<view style="height: {{statusBarHeight + 44}}px;"></view>
<!-- AI参考图片 + 提示词开关showAiWriteSection -->
<view wx:if="{{showAiWriteSection}}" class="card">
<text class="section-title">AI 帮你写</text>
<text class="label">参考图片(可多选)</text>
<view class="file-actions">
<view class="add-file-btn" bindtap="chooseReferenceImages"> 添加图片</view>
</view>
<view wx:for="{{attachedFiles}}" wx:key="id" class="file-row">
<view class="file-main">
<text class="file-name">{{item.name}}</text>
<text wx:if="{{item.uploading}}" class="file-meta">上传中…</text>
<text wx:elif="{{item.kind === 'text'}}" class="file-meta ok">文本已载入</text>
<text wx:elif="{{item.kind === 'image'}}" class="file-meta ok">图片</text>
<text wx:else class="file-meta ok">附件</text>
</view>
<text class="file-remove" data-id="{{item.id}}" bindtap="removeAttachedFile">移除</text>
</view>
<text class="hint">从相册或相机添加参考图,可多选(单次最多 9 张),上传后参与 AI 生成。单张建议不超 30MB。</text>
<text class="label">提示词</text>
<view class="textarea-wrap">
<textarea class="textarea prompt-textarea" maxlength="2000" placeholder="描述主题、语气、要点…(可与参考图组合)" value="{{aiPrompt}}" bindinput="onAiPromptInput" disabled="{{auditMode}}"></textarea>
</view>
<view class="generate-btn {{generating ? 'generate-btn-loading' : ''}}" bindtap="generateArticle">{{generating ? '生成中…' : '生成'}}</view>
</view>
<!-- 朋友圈式:先文字,再九宫格配图(+ 在最后) -->
<view class="card moment-card">
<view class="toolbar">
<view class="tool-btn" bindtap="insertMentionSelf">@自己</view>
<view class="tool-btn" bindtap="insertHashLink">#链接</view>
</view>
<view class="textarea-wrap moment-textarea-wrap">
<textarea
class="textarea moment-textarea"
maxlength="5000"
placeholder="这一刻的想法…"
value="{{content}}"
bindinput="onContentInput"
disabled="{{auditMode}}"
auto-height
show-confirm-bar="{{false}}"
></textarea>
</view>
<view class="moment-photo-grid">
<view wx:for="{{bodyImages}}" wx:key="id" class="moment-photo-cell">
<image wx:if="{{item.url}}" class="moment-photo-img" mode="aspectFill" src="{{item.url}}" />
<view wx:if="{{item.uploading}}" class="moment-photo-mask">上传中…</view>
<text class="moment-photo-remove" data-id="{{item.id}}" catchtap="removeArticleImage">×</text>
</view>
<view wx:if="{{bodyImages.length < 9}}" class="moment-photo-cell moment-photo-add" bindtap="chooseArticleImages">
<text class="moment-photo-add-plus">+</text>
</view>
</view>
<text class="hint moment-hint">配图 {{bodyImages.length}}/9 · 展示在文字下方 · 单张建议不超 30MB · 可直接输入 @昵称 或 #链接(https://xxx)</text>
</view>
<!-- 底部发布(避让微信胶囊) -->
<view wx:if="{{!auditMode}}" class="bottom-publish-bar">
<view class="bottom-publish-btn {{saving ? 'bottom-publish-btn-disabled' : ''}}" bindtap="submitArticle">
<text>{{saving ? (editArticleId ? '提交中…' : '发布中…') : (editArticleId ? '提交审核' : '发布')}}</text>
</view>
</view>
<view wx:if="{{auditMode}}" class="audit-mode-mask" catchtouchmove="preventMove">
<text class="audit-mode-text">开发中...</text>
</view>
</view>