kuaiying_wx/pages/index/index.wxml
2025-03-04 15:25:38 +08:00

115 lines
4.1 KiB
Plaintext
Raw Permalink 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="container">
<!-- 提取视频卡片 -->
<view class="card video-extract">
<view class="card-title">提取视频</view>
<view class="input-section">
<image src="../../images/link_icon.png" class="input-icon"></image>
<input placeholder="请输入视频链接,支持多平台" class="input-field" bindinput="bindVideoInput"></input>
</view>
<button class="action-button" bindtap="parseVideo">提取视频</button>
<view class="bottom-actions">
<view class="bottom-button" bindtap="extractVideoFromVideoAccount">->视频号提取</view>
<view class="bottom-button" bindtap="openDownloadRobot">->下载机器人</view>
</view>
</view>
<!-- 视频转文案卡片 -->
<view class="card text-extract">
<view class="card-title">视频转文案</view>
<!-- 单选切换 -->
<view class="radio-buttons">
<!-- 粘贴链接提取 -->
<view class="radio-option" bindtap="switchMode" data-value="link">
<view class="radio-circle {{mode === 'link' ? 'selected' : ''}}"></view>
<text>粘贴链接提取</text>
</view>
<!-- 上传本地文件 -->
<view class="radio-option" bindtap="switchMode" data-value="upload">
<view class="radio-circle {{mode === 'upload' ? 'selected' : ''}}"></view>
<text>上传本地文件</text>
</view>
</view>
<!-- 链接输入框 -->
<view wx:if="{{mode === 'link'}}" class="input-section">
<image src="../../images/link_icon.png" class="input-icon"></image>
<input placeholder="请输入视频链接,支持多平台" class="input-field" bindinput="bindVideoInput"></input>
</view>
<!-- 文件上传框 -->
<view wx:if="{{mode === 'upload'}}" class="input-section">
<view class="upload-button" bindtap="uploadFile">
<image src="../../images/upload_icon.png" class="input-icon"></image>
</view>
</view>
<button class="action-button" bindtap="extractText">提取文案</button>
</view>
</view>
<!-- 文案提取记录按钮 放在最后的</view>标签前 -->
<!-- 记录按钮 -->
<view class="record-button-container">
<view class="record-button" bindtap="showRecordMask">
<text class="record-text">文案提取记录</text>
</view>
</view>
<!-- 记录蒙版 -->
<view class="record-mask {{showMask ? 'show' : ''}}" bindtap="hideMask">
<view class="record-content" catchtap="preventDefault">
<!-- 标题栏 -->
<view class="record-header">
<text>提取记录</text>
<view class="close-btn" bindtap="hideMask">×</view>
</view>
<!-- 记录列表 -->
<scroll-view
scroll-y="true"
class="record-list"
bindscrolltolower="loadMore"
lower-threshold="50">
<view wx:for="{{records}}"
wx:key="id"
class="record-item"
bindtap="goToExtract"
data-text="{{index}}">
<view class="record-item-left">
<view class="record-num">{{index + 1}}</view>
<view class="record-info">
<text class="record-text" style="color:rgb(61, 61, 61)">{{item.preview}}</text>
<text class="record-time">{{item.created_at}}</text>
</view>
</view>
<view class="record-status {{item.status === 'completed' ? 'completed' : 'False'}}">
{{item.status === 'completed' ? '完成' : '失败'}}
</view>
</view>
<!-- 加载更多 -->
<view class="loading" wx:if="{{isLoading}}">
<view class="loading-dots">
<view class="dot"></view>
<view class="dot"></view>
<view class="dot"></view>
</view>
<text>加载中...</text>
</view>
</scroll-view>
</view>
</view>
<popup
wx:if="{{showPopup}}"
popupType="{{popupType}}"
popupContent="{{popupContent}}"
buttonText="查看详情"
targetUrl="/pages/details/details"
/>