- Introduced a utility function to ensure absolute media URLs for user profile images. - Updated the user cache synchronization method to handle profile data more effectively, including avatar, nickname, phone, and MBTI. - Refactored the avatar upload process to utilize the new URL handling function, improving reliability. - Modified the super article editor to focus on image uploads instead of file uploads, enhancing user experience with clearer labeling and prompts. This update aims to streamline user profile management and improve the image upload experience in the application.
62 lines
3.0 KiB
Plaintext
62 lines
3.0 KiB
Plaintext
<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">发文章</text>
|
||
<view class="nav-placeholder"></view>
|
||
</view>
|
||
<view style="height: {{statusBarHeight + 44}}px;"></view>
|
||
|
||
<!-- AI:参考图片 + 提示词 -->
|
||
<view 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">
|
||
<text class="section-title">编辑与发布</text>
|
||
<text class="label">标题</text>
|
||
<view class="input-wrap">
|
||
<input class="input" maxlength="40" placeholder="写个标题(最多40字)" value="{{title}}" bindinput="onTitleInput" disabled="{{auditMode}}" />
|
||
</view>
|
||
|
||
<text class="label">正文</text>
|
||
<view class="toolbar">
|
||
<view class="tool-btn" bindtap="insertMentionSelf">@自己</view>
|
||
<view class="tool-btn" bindtap="insertHashLink">#超链接</view>
|
||
</view>
|
||
<view class="textarea-wrap">
|
||
<textarea class="textarea" maxlength="5000" placeholder="输入正文内容…" value="{{content}}" bindinput="onContentInput" disabled="{{auditMode}}"></textarea>
|
||
</view>
|
||
<text class="hint">提示:可直接输入 @昵称 或 #链接(https://xxx)</text>
|
||
|
||
<view class="submit-btn" bindtap="submitArticle">{{saving ? '发布中…' : '发布文章'}}</view>
|
||
</view>
|
||
|
||
<view wx:if="{{auditMode}}" class="audit-mode-mask" catchtouchmove="preventMove">
|
||
<text class="audit-mode-text">开发中...</text>
|
||
</view>
|
||
</view>
|