c6206787da
项目结构: - backend/ Python FastAPI 后端 - uni-app/ uni-app跨端前端 - docs/ 设计文档 - docker-compose.yml Docker编排 - nginx/scripts/systemd 运维配置 已完成功能: - 用户认证 (JWT) - 智能翻译 + 回复建议 - 营销素材生成 - 客户管理 + 沉默检测 - 报价单管理 - 产品库管理 - 汇率换算 - 推送通知 (uni-push) - WhatsApp Webhook框架 - Celery定时任务
52 lines
2.3 KiB
Plaintext
52 lines
2.3 KiB
Plaintext
<view class="container">
|
|
<view class="tabs">
|
|
<view class="tab {{tab === 'translate' ? 'active' : ''}}" data-tab="translate" bindtap="switchTab">翻译</view>
|
|
<view class="tab {{tab === 'reply' ? 'active' : ''}}" data-tab="reply" bindtap="switchTab">回复建议</view>
|
|
</view>
|
|
|
|
<view class="content">
|
|
<view wx:if="{{tab === 'translate'}}">
|
|
<view class="input-area">
|
|
<text class="input-label">输入要翻译的内容</text>
|
|
<textarea class="textarea" placeholder="请输入中文或英文..." value="{{sourceText}}" bindinput="onSourceInput" auto-height />
|
|
</view>
|
|
|
|
<view class="lang-select">
|
|
<text>目标语言</text>
|
|
<picker value="{{targetLang}}" range="{{langOptions}}" range-key="label" bindchange="onLangChange">
|
|
<text class="picker">{{langOptions[langOptions.findIndex(function(item) { return item.value === targetLang })].label}}</text>
|
|
</picker>
|
|
</view>
|
|
|
|
<button class="btn-primary btn-translate" bindtap="doTranslate" loading="{{loading}}">翻译</button>
|
|
|
|
<view class="result-area" wx:if="{{translatedText}}">
|
|
<view class="result-header">
|
|
<text class="input-label">翻译结果</text>
|
|
<text class="copy-btn" bindtap="copyText" data-text="{{translatedText}}">复制</text>
|
|
</view>
|
|
<text class="result-text">{{translatedText}}</text>
|
|
</view>
|
|
</view>
|
|
|
|
<view wx:if="{{tab === 'reply'}}">
|
|
<view class="input-area">
|
|
<text class="input-label">输入客户询盘内容</text>
|
|
<textarea class="textarea" placeholder="粘贴客户的英文询盘..." value="{{replyInquiry}}" bindinput="onReplyInput" auto-height />
|
|
</view>
|
|
|
|
<button class="btn-primary btn-translate" bindtap="doGetReply" loading="{{loading}}">生成回复建议</button>
|
|
|
|
<view class="suggestions" wx:if="{{replySuggestions.length > 0}}">
|
|
<view class="section-title">回复建议</view>
|
|
<view class="suggestion-item" wx:for="{{replySuggestions}}" wx:key="tone">
|
|
<text class="suggestion-tone">{{item.tone}}</text>
|
|
<text class="suggestion-content">{{item.reply}}</text>
|
|
<view style="margin-top: 10rpx;">
|
|
<text class="copy-btn" bindtap="copyText" data-text="{{item.reply}}">复制</text>
|
|
</view>
|
|
</view>
|
|
</view>
|
|
</view>
|
|
</view>
|
|
</view> |