132 lines
No EOL
4.6 KiB
Text
132 lines
No EOL
4.6 KiB
Text
<!-- 导航栏 -->
|
||
<view class="custom-nav" style="height: {{totalNavBarHeight}}px; padding-top: {{statusBarHeight}}px;">
|
||
<view class="nav-content">
|
||
<image class="back-btn-img" src="/images/back_arrow.svg" bindtap="onNavBack"></image>
|
||
<view class="nav-title">文字动态</view>
|
||
<view class="nav-placeholder"></view>
|
||
</view>
|
||
</view>
|
||
|
||
<!-- 外部容器框 -->
|
||
<view class="outer-container">
|
||
<!-- 标题区域 -->
|
||
<view class="title-area">
|
||
<text class="page-title">我的动态</text>
|
||
<button
|
||
class="publish-btn {{!canPublish ? 'disabled' : ''}}"
|
||
bindtap="publishDynamic"
|
||
>发布</button>
|
||
</view>
|
||
|
||
<!-- 文字编辑区域 -->
|
||
<view class="text-area">
|
||
<textarea
|
||
class="content-textarea"
|
||
id="contentInput"
|
||
bindinput="onTextInput"
|
||
placeholder="What's happening..."
|
||
placeholder-class="placeholder-gray"
|
||
maxlength="120"
|
||
value="{{inputText}}"
|
||
/>
|
||
<view class="text-count">{{textLength}}/120</view>
|
||
</view>
|
||
|
||
<!-- 已选图片显示 -->
|
||
<view wx:if="{{selectedImage}}" class="image-wrapper">
|
||
<image
|
||
src="{{selectedImage}}"
|
||
mode="widthFix"
|
||
class="selected-image"
|
||
bindtap="previewImage"
|
||
/>
|
||
<view class="delete-icon" bindtap="removeImage">×</view>
|
||
</view>
|
||
|
||
<!-- 底部操作栏 -->
|
||
<view class="bottom-actions">
|
||
<!-- 功能区 -->
|
||
<view class="features-area">
|
||
<view class="visibility-area" bindtap="showVisibilityModal">
|
||
<image src="/images/User.svg" class="visibility-icon"></image>
|
||
<text class="feature-text">{{visibility === '' ? '谁可以看' :
|
||
(visibility === 'public' ? '公开' : '私密')}}</text>
|
||
</view>
|
||
<view wx:if="{{!selectedImage}}" class="upload-btn" bindtap="showImageAction">
|
||
<image src="/images/Image.svg" class="upload-icon"></image>
|
||
<text class="feature-text">上传图片</text>
|
||
</view>
|
||
</view>
|
||
</view>
|
||
<!-- 当前位置 -->
|
||
<view class="location-area" bindtap="chooseLocation">
|
||
<image src="/images/loca.svg" class="location-icon"></image>
|
||
<text class="location-text">{{currentLocation || '未选择位置'}}</text>
|
||
</view>
|
||
</view>
|
||
|
||
<!-- 返回弹窗遮罩 -->
|
||
<view class="quit-mask" wx:if="{{showQuitModal}}">
|
||
<view class="quit-modal">
|
||
<view class="quit-modal-content">退出后此次编辑将不会保留,是否退出?</view>
|
||
<view class="quit-modal-btns">
|
||
<button class="modal-btn" bindtap="quitEdit">退出</button>
|
||
<button class="modal-btn" bindtap="cancelQuit">取消</button>
|
||
</view>
|
||
</view>
|
||
</view>
|
||
|
||
<!-- 图片选择弹窗-->
|
||
<view class="camera-action-sheet {{showImageAction ? 'show' : ''}}">
|
||
<view class="action-sheet-mask" bindtap="hideImageAction"></view>
|
||
<view class="action-sheet-content">
|
||
<view class="action-sheet-item primary" bindtap="takePhoto">
|
||
<text class="action-text">拍摄</text>
|
||
</view>
|
||
<view class="action-sheet-divider-thin"></view>
|
||
<view class="action-sheet-item primary" bindtap="chooseImageFromAlbum">
|
||
<text class="action-text">从相册选择</text>
|
||
</view>
|
||
<view class="action-sheet-divider"></view>
|
||
<view class="action-sheet-item cancel" bindtap="hideImageAction">
|
||
<text class="action-text">取消</text>
|
||
</view>
|
||
</view>
|
||
</view>
|
||
|
||
<!-- 审核失败弹窗 -->
|
||
<view class="audit-modal" wx:if="{{showAuditModal}}">
|
||
<view class="modal-mask" bindtap="hideAuditModal"></view>
|
||
<view class="modal-content">
|
||
<view class="modal-title">发布失败</view>
|
||
<rich-text class="modal-content-text" nodes="{{auditReason}}"></rich-text>
|
||
<view class="modal-btn" bindtap="hideAuditModal">我知道了</view>
|
||
</view>
|
||
</view>
|
||
|
||
<!-- 定位失败弹窗 -->
|
||
<view class="audit-modal" wx:if="{{showLocationErrorModal}}">
|
||
<view class="modal-mask" bindtap="hideLocationErrorModal"></view>
|
||
<view class="modal-content">
|
||
<view class="modal-title">定位失败</view>
|
||
<view class="modal-content-text">未找到你的定位,需要开启定位权限,请重试。</view>
|
||
<view class="modal-btns">
|
||
<view class="modal-btn cancel-btn" bindtap="hideLocationErrorModal">取消</view>
|
||
<view class="modal-btn confirm-btn" bindtap="retryLocation">重试</view>
|
||
</view>
|
||
</view>
|
||
</view>
|
||
|
||
<!-- Loading 动态背景 -->
|
||
<view class="loading-background" wx:if="{{isLoading}}">
|
||
<view class="loading-animated-bg">
|
||
<view class="loading-wave"></view>
|
||
<view class="loading-wave"></view>
|
||
<view class="loading-wave"></view>
|
||
</view>
|
||
<view class="loading-content">
|
||
<view class="loading-spinner"></view>
|
||
<text class="loading-text">{{loadingText}}</text>
|
||
</view>
|
||
</view>
|
||
|