浏览代码

yigoutupian-gerenzhongxin-shangchuan

0235698 2 天之前
父节点
当前提交
8b6153fe90

+ 6 - 0
package-lock.json

@@ -0,0 +1,6 @@
+{
+  "name": "food-picture",
+  "lockfileVersion": 3,
+  "requires": true,
+  "packages": {}
+}

+ 407 - 1
picture-web/src/modules/picture/ser-tab/ser-tab.html

@@ -1 +1,407 @@
-<p>我的(个人中心)</p>
+<!DOCTYPE html>
+<html lang="zh-CN">
+<head>
+    <meta charset="UTF-8">
+    <meta name="viewport" content="width=device-width, initial-scale=1.0">
+    <title>图片购买App - 个人中心</title>
+    <link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/bootstrap-icons@1.10.0/font/bootstrap-icons.css">
+    <style>
+        * {
+            margin: 0;
+            padding: 0;
+            box-sizing: border-box;
+            font-family: 'PingFang SC', 'Helvetica Neue', Arial, sans-serif;
+        }
+        
+        body {
+            background-color: #f8f8f8;
+            color: #333;
+            line-height: 1.6;
+        }
+        
+        .container {
+            max-width: 100%;
+            padding: 20px;
+        }
+        
+        .profile-header {
+            text-align: center;
+            margin-bottom: 30px;
+            padding: 20px 0;
+        }
+        
+        .avatar {
+            width: 80px;
+            height: 80px;
+            border-radius: 50%;
+            background-color: #FF7B25;
+            margin: 0 auto 15px;
+            display: flex;
+            align-items: center;
+            justify-content: center;
+            color: white;
+            font-size: 36px;
+            box-shadow: 0 4px 12px rgba(255, 123, 37, 0.3);
+        }
+        
+        .username {
+            font-size: 18px;
+            font-weight: 600;
+            margin-bottom: 5px;
+        }
+        
+        .user-status {
+            color: #888;
+            font-size: 14px;
+        }
+        
+        .action-buttons {
+            display: flex;
+            flex-direction: column;
+            gap: 15px;
+            margin-top: 30px;
+        }
+        
+        .btn {
+            padding: 15px;
+            border-radius: 12px;
+            border: none;
+            font-size: 16px;
+            font-weight: 500;
+            display: flex;
+            align-items: center;
+            justify-content: center;
+            gap: 10px;
+            cursor: pointer;
+            transition: all 0.3s ease;
+            box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
+            width: 100%;
+        }
+        
+        .btn-primary {
+            background-color: #FF7B25;
+            color: white;
+        }
+        
+        .btn-primary:hover {
+            background-color: #e66a1a;
+            transform: translateY(-2px);
+            box-shadow: 0 6px 12px rgba(255, 123, 37, 0.3);
+        }
+        
+        .btn-secondary {
+            background-color: white;
+            color: #FF7B25;
+            border: 1px solid #FF7B25;
+        }
+        
+        .btn-secondary:hover {
+            background-color: #fff5ef;
+            transform: translateY(-2px);
+        }
+        
+        .btn-tertiary {
+            background-color: #f0f0f0;
+            color: #555;
+        }
+        
+        .btn-tertiary:hover {
+            background-color: #e6e6e6;
+            transform: translateY(-2px);
+        }
+        
+        .icon {
+            font-size: 20px;
+        }
+        
+        .stats {
+            display: flex;
+            justify-content: space-around;
+            margin: 30px 0;
+            padding: 15px;
+            background-color: white;
+            border-radius: 12px;
+            box-shadow: 0 4px 12px rgba(0, 0, 0, 0.05);
+        }
+        
+        .stat-item {
+            text-align: center;
+        }
+        
+        .stat-number {
+            font-size: 20px;
+            font-weight: 700;
+            color: #FF7B25;
+        }
+        
+        .stat-label {
+            font-size: 12px;
+            color: #888;
+            margin-top: 5px;
+        }
+        
+        .recent-activity {
+            background-color: white;
+            border-radius: 12px;
+            padding: 20px;
+            margin-top: 20px;
+            box-shadow: 0 4px 12px rgba(0, 0, 0, 0.05);
+        }
+        
+        .section-title {
+            font-size: 16px;
+            font-weight: 600;
+            margin-bottom: 15px;
+            display: flex;
+            align-items: center;
+            gap: 8px;
+        }
+        
+        .activity-item {
+            display: flex;
+            align-items: center;
+            padding: 10px 0;
+            border-bottom: 1px solid #eee;
+        }
+        
+        .activity-item:last-child {
+            border-bottom: none;
+        }
+        
+        .activity-icon {
+            width: 40px;
+            height: 40px;
+            background-color: #fff5ef;
+            border-radius: 8px;
+            display: flex;
+            align-items: center;
+            justify-content: center;
+            margin-right: 12px;
+            color: #FF7B25;
+        }
+        
+        .activity-content {
+            flex: 1;
+        }
+        
+        .activity-title {
+            font-weight: 500;
+            margin-bottom: 3px;
+        }
+        
+        .activity-time {
+            font-size: 12px;
+            color: #999;
+        }
+        
+        .login-prompt {
+            text-align: center;
+            margin: 40px 0;
+        }
+        
+        .login-title {
+            font-size: 18px;
+            margin-bottom: 15px;
+            color: #555;
+        }
+        
+        .login-desc {
+            color: #888;
+            margin-bottom: 25px;
+            font-size: 14px;
+        }
+        
+        .login-btn-container {
+            width: 100%;
+            max-width: 400px;
+            margin: 0 auto;
+        }
+        
+        @media (max-width: 480px) {
+            .container {
+                padding: 15px;
+            }
+            
+            .btn {
+                padding: 14px;
+            }
+        }
+    </style>
+</head>
+<body>
+    <div class="container">
+        <!-- 已登录状态 -->
+        <div class="profile-header" id="loggedInView" style="display: none;">
+            <div class="avatar">
+                <i class="bi bi-person-fill"></i>
+            </div>
+            <h2 class="username">用户名</h2>
+            <p class="user-status">会员有效期至: 2024-12-31</p>
+            
+            <div class="stats">
+                <div class="stat-item">
+                    <div class="stat-number">128</div>
+                    <div class="stat-label">收藏图片</div>
+                </div>
+                <div class="stat-item">
+                    <div class="stat-number">42</div>
+                    <div class="stat-label">已购图片</div>
+                </div>
+                <div class="stat-item">
+                    <div class="stat-number">15</div>
+                    <div class="stat-label">上传图片</div>
+                </div>
+            </div>
+        </div>
+        
+        <!-- 未登录状态 -->
+        <div class="login-prompt" id="loggedOutView">
+            <div class="avatar">
+                <i class="bi bi-person"></i>
+            </div>
+            <h2 class="login-title">登录您的账户</h2>
+            <p class="login-desc">登录后可以上传、购买和管理您的图片</p>
+            <div class="login-btn-container">
+                <button class="btn btn-primary" id="loginBtn">
+                    <i class="bi bi-box-arrow-in-right icon"></i> 立即登录
+                </button>
+            </div>
+        </div>
+        
+        <div class="action-buttons">
+            <button class="btn btn-primary" id="uploadBtn">
+                <i class="bi bi-cloud-arrow-up icon"></i> 上传图片
+            </button>
+            <button class="btn btn-secondary" id="purchasedBtn">
+                <i class="bi bi-image-alt icon"></i> 查看已购图片
+            </button>
+        </div>
+        
+        <!-- 最近活动 - 仅登录后显示 -->
+        <div class="recent-activity" id="activitySection" style="display: none;">
+            <h3 class="section-title">
+                <i class="bi bi-clock-history"></i> 最近活动
+            </h3>
+            <div class="activity-item">
+                <div class="activity-icon">
+                    <i class="bi bi-cart-check"></i>
+                </div>
+                <div class="activity-content">
+                    <div class="activity-title">购买了"自然风景合集"</div>
+                    <div class="activity-time">2小时前</div>
+                </div>
+            </div>
+            <div class="activity-item">
+                <div class="activity-icon">
+                    <i class="bi bi-cloud-arrow-up"></i>
+                </div>
+                <div class="activity-content">
+                    <div class="activity-title">上传了"城市夜景"系列</div>
+                    <div class="activity-time">1天前</div>
+                </div>
+            </div>
+            <div class="activity-item">
+                <div class="activity-icon">
+                    <i class="bi bi-heart"></i>
+                </div>
+                <div class="activity-content">
+                    <div class="activity-title">收藏了"抽象艺术"图片</div>
+                    <div class="activity-time">3天前</div>
+                </div>
+            </div>
+        </div>
+    </div>
+
+    <script src="https://cdn.jsdelivr.net/npm/sweetalert2@11"></script>
+    <script>
+        // 模拟登录状态切换
+        let isLoggedIn = false;
+        
+        document.getElementById('loginBtn').addEventListener('click', function() {
+            isLoggedIn = !isLoggedIn;
+            updateUI();
+            
+            if(isLoggedIn) {
+                Swal.fire({
+                    title: '登录成功!',
+                    text: '欢迎回来!',
+                    icon: 'success',
+                    confirmButtonColor: '#FF7B25'
+                });
+            }
+        });
+        
+        document.getElementById('uploadBtn').addEventListener('click', function() {
+            if(!isLoggedIn) {
+                Swal.fire({
+                    title: '请先登录',
+                    text: '登录后才能上传图片',
+                    icon: 'warning',
+                    confirmButtonColor: '#FF7B25'
+                });
+                return;
+            }
+            Swal.fire({
+                title: '上传图片',
+                html: '<input type="file" class="swal2-file" accept="image/*" multiple>',
+                showCancelButton: true,
+                confirmButtonText: '上传',
+                confirmButtonColor: '#FF7B25',
+                showLoaderOnConfirm: true,
+                preConfirm: () => {
+                    return new Promise((resolve) => {
+                        setTimeout(() => {
+                            resolve();
+                        }, 1500);
+                    });
+                },
+                allowOutsideClick: () => !Swal.isLoading()
+            }).then((result) => {
+                if (result.isConfirmed) {
+                    Swal.fire({
+                        title: '上传成功!',
+                        text: '您的图片已成功上传',
+                        icon: 'success',
+                        confirmButtonColor: '#FF7B25'
+                    });
+                }
+            });
+        });
+        
+        document.getElementById('purchasedBtn').addEventListener('click', function() {
+            if(!isLoggedIn) {
+                Swal.fire({
+                    title: '请先登录',
+                    text: '登录后才能查看已购图片',
+                    icon: 'warning',
+                    confirmButtonColor: '#FF7B25'
+                });
+                return;
+            }
+            Swal.fire({
+                title: '已购图片',
+                text: '这里将显示您购买的所有图片',
+                icon: 'info',
+                confirmButtonColor: '#FF7B25'
+            });
+        });
+        
+        function updateUI() {
+            if(isLoggedIn) {
+                document.getElementById('loggedInView').style.display = 'block';
+                document.getElementById('loggedOutView').style.display = 'none';
+                document.getElementById('activitySection').style.display = 'block';
+                document.getElementById('loginBtn').innerHTML = '<i class="bi bi-box-arrow-right icon"></i> 退出登录';
+            } else {
+                document.getElementById('loggedInView').style.display = 'none';
+                document.getElementById('loggedOutView').style.display = 'block';
+                document.getElementById('activitySection').style.display = 'none';
+                document.getElementById('loginBtn').innerHTML = '<i class="bi bi-box-arrow-in-right icon"></i> 立即登录';
+            }
+        }
+        
+        // 初始化UI
+        updateUI();
+    </script>
+</body>
+</html>

+ 424 - 1
picture-web/src/modules/thired-ser/card-image/card-image.html

@@ -1 +1,424 @@
-<p>card-image works!</p>
+<!DOCTYPE html>
+<html lang="zh-CN">
+<head>
+    <meta charset="UTF-8">
+    <meta name="viewport" content="width=device-width, initial-scale=1.0">
+    <title>我的已购美食图片</title>
+    <link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/bootstrap-icons@1.10.0/font/bootstrap-icons.css">
+    <style>
+        * {
+            margin: 0;
+            padding: 0;
+            box-sizing: border-box;
+            font-family: 'PingFang SC', 'Helvetica Neue', Arial, sans-serif;
+        }
+        
+        body {
+            background-color: #f8f8f8;
+            color: #333;
+            line-height: 1.6;
+        }
+        
+        .container {
+            max-width: 100%;
+            padding: 15px;
+        }
+        
+        .header {
+            display: flex;
+            align-items: center;
+            justify-content: space-between;
+            margin-bottom: 20px;
+            padding-bottom: 15px;
+            border-bottom: 1px solid #eee;
+        }
+        
+        .back-btn {
+            background-color: transparent;
+            border: none;
+            color: #FF7B25;
+            font-size: 16px;
+            display: flex;
+            align-items: center;
+            gap: 5px;
+            cursor: pointer;
+            padding: 8px 12px;
+            border-radius: 8px;
+            transition: all 0.3s ease;
+        }
+        
+        .back-btn:hover {
+            background-color: #fff5ef;
+        }
+        
+        .page-title {
+            font-size: 20px;
+            font-weight: 600;
+            color: #333;
+            flex: 1;
+            text-align: center;
+        }
+        
+        .empty-placeholder {
+            display: flex;
+            flex-direction: column;
+            align-items: center;
+            justify-content: center;
+            height: 60vh;
+            text-align: center;
+            padding: 20px;
+        }
+        
+        .empty-icon {
+            font-size: 60px;
+            color: #FF7B25;
+            margin-bottom: 20px;
+        }
+        
+        .empty-title {
+            font-size: 18px;
+            font-weight: 500;
+            margin-bottom: 10px;
+            color: #555;
+        }
+        
+        .empty-desc {
+            color: #888;
+            font-size: 14px;
+            margin-bottom: 20px;
+            max-width: 300px;
+        }
+        
+        .browse-btn {
+            background-color: #FF7B25;
+            color: white;
+            border: none;
+            padding: 12px 24px;
+            border-radius: 8px;
+            font-size: 15px;
+            font-weight: 500;
+            cursor: pointer;
+            transition: all 0.3s ease;
+            box-shadow: 0 4px 8px rgba(255, 123, 37, 0.2);
+        }
+        
+        .browse-btn:hover {
+            background-color: #e66a1a;
+            transform: translateY(-2px);
+            box-shadow: 0 6px 12px rgba(255, 123, 37, 0.3);
+        }
+        
+        .gallery-container {
+            display: none;
+        }
+        
+        .image-grid {
+            display: grid;
+            grid-template-columns: repeat(2, 1fr);
+            gap: 12px;
+            margin-bottom: 20px;
+        }
+        
+        @media (min-width: 768px) {
+            .image-grid {
+                grid-template-columns: repeat(3, 1fr);
+            }
+        }
+        
+        @media (min-width: 1024px) {
+            .image-grid {
+                grid-template-columns: repeat(4, 1fr);
+            }
+        }
+        
+        .image-card {
+            background-color: white;
+            border-radius: 10px;
+            overflow: hidden;
+            box-shadow: 0 4px 8px rgba(0, 0, 0, 0.05);
+            transition: all 0.3s ease;
+            position: relative;
+        }
+        
+        .image-card:hover {
+            transform: translateY(-5px);
+            box-shadow: 0 8px 16px rgba(0, 0, 0, 0.1);
+        }
+        
+        .image-thumbnail {
+            width: 100%;
+            height: 180px;
+            object-fit: cover;
+        }
+        
+        .image-info {
+            padding: 12px;
+        }
+        
+        .image-title {
+            font-size: 14px;
+            font-weight: 500;
+            margin-bottom: 5px;
+            white-space: nowrap;
+            overflow: hidden;
+            text-overflow: ellipsis;
+        }
+        
+        .image-meta {
+            display: flex;
+            justify-content: space-between;
+            font-size: 12px;
+            color: #888;
+        }
+        
+        .image-detail-modal {
+            display: none;
+            position: fixed;
+            top: 0;
+            left: 0;
+            width: 100%;
+            height: 100%;
+            background-color: rgba(0, 0, 0, 0.8);
+            z-index: 1000;
+            align-items: center;
+            justify-content: center;
+            padding: 20px;
+        }
+        
+        .modal-content {
+            background-color: white;
+            border-radius: 12px;
+            max-width: 800px;
+            width: 100%;
+            overflow: hidden;
+            animation: modalFadeIn 0.3s ease;
+        }
+        
+        @keyframes modalFadeIn {
+            from {
+                opacity: 0;
+                transform: translateY(20px);
+            }
+            to {
+                opacity: 1;
+                transform: translateY(0);
+            }
+        }
+        
+        .modal-header {
+            display: flex;
+            justify-content: space-between;
+            align-items: center;
+            padding: 15px;
+            border-bottom: 1px solid #eee;
+        }
+        
+        .modal-title {
+            font-size: 18px;
+            font-weight: 600;
+        }
+        
+        .close-btn {
+            background: none;
+            border: none;
+            font-size: 24px;
+            cursor: pointer;
+            color: #888;
+            transition: all 0.3s ease;
+        }
+        
+        .close-btn:hover {
+            color: #FF7B25;
+        }
+        
+        .modal-body {
+            padding: 20px;
+        }
+        
+        .modal-image {
+            width: 100%;
+            max-height: 500px;
+            object-fit: contain;
+            border-radius: 8px;
+            margin-bottom: 15px;
+        }
+        
+        .modal-actions {
+            display: flex;
+            gap: 10px;
+            justify-content: flex-end;
+        }
+        
+        .action-btn {
+            padding: 8px 16px;
+            border-radius: 6px;
+            font-size: 14px;
+            cursor: pointer;
+            transition: all 0.3s ease;
+        }
+        
+        .download-btn {
+            background-color: #FF7B25;
+            color: white;
+            border: none;
+        }
+        
+        .download-btn:hover {
+            background-color: #e66a1a;
+        }
+        
+        .favorite-btn {
+            background-color: white;
+            border: 1px solid #FF7B25;
+            color: #FF7B25;
+        }
+        
+        .favorite-btn:hover {
+            background-color: #fff5ef;
+        }
+    </style>
+</head>
+<body>
+    <div class="container">
+        <div class="header">
+            <button class="back-btn" id="backBtn">
+                <i class="bi bi-arrow-left"></i> 返回
+            </button>
+            <h1 class="page-title">我的已购美食图片</h1>
+            <div style="width: 60px;"></div> <!-- 用于平衡布局 -->
+        </div>
+        
+        <!-- 空状态 -->
+        <div class="empty-placeholder" id="emptyState">
+            <i class="bi bi-egg-fried empty-icon"></i>
+            <h3 class="empty-title">您还没有购买任何美食图片</h3>
+            <p class="empty-desc">浏览我们的美食图库,发现您喜欢的图片</p>
+            <button class="browse-btn" id="browseBtn">浏览美食图片</button>
+        </div>
+        
+        <!-- 图片画廊 -->
+        <div class="gallery-container" id="galleryContainer">
+            <div class="image-grid" id="imageGrid">
+                <!-- 图片卡片将通过JS动态生成 -->
+            </div>
+        </div>
+    </div>
+    
+    <!-- 图片详情模态框 -->
+    <div class="image-detail-modal" id="imageModal">
+        <div class="modal-content">
+            <div class="modal-header">
+                <h3 class="modal-title" id="modalImageTitle">图片标题</h3>
+                <button class="close-btn" id="closeModalBtn">&times;</button>
+            </div>
+            <div class="modal-body">
+                <img src="" alt="" class="modal-image" id="modalImage">
+                <div class="modal-actions">
+                    <button class="action-btn favorite-btn">
+                        <i class="bi bi-heart"></i> 收藏
+                    </button>
+                    <button class="action-btn download-btn">
+                        <i class="bi bi-download"></i> 下载
+                    </button>
+                </div>
+            </div>
+        </div>
+    </div>
+
+    <script src="https://cdn.jsdelivr.net/npm/sweetalert2@11"></script>
+    <script>
+        // 模拟数据 - 美食图片
+        const purchasedImages = [
+            { id: 1, title: '麻辣火锅特写', date: '2023-05-15', price: '¥89', imageUrl: 'https://images.unsplash.com/photo-1585032226651-759b368d7246?ixlib=rb-4.0.3&ixid=M3wxMjA3fDB8MHxwaG90by1wYWdlfHx8fGVufDB8fHx8fA%3D%3D&auto=format&fit=crop&w=600&q=80' },
+            { id: 2, title: '精致甜点拼盘', date: '2023-05-10', price: '¥129', imageUrl: 'https://images.unsplash.com/photo-1551024506-0bccd828d307?ixlib=rb-4.0.3&ixid=M3wxMjA3fDB8MHxwaG90by1wYWdlfHx8fGVufDB8fHx8fA%3D%3D&auto=format&fit=crop&w=600&q=80' },
+            { id: 3, title: '新鲜寿司组合', date: '2023-04-28', price: '¥75', imageUrl: 'https://images.unsplash.com/photo-1611143669185-af224c5e3252?ixlib=rb-4.0.3&ixid=M3wxMjA3fDB8MHxwaG90by1wYWdlfHx8fGVufDB8fHx8fA%3D%3D&auto=format&fit=crop&w=600&q=80' },
+            { id: 4, title: '意大利面特写', date: '2023-04-15', price: '¥150', imageUrl: 'https://images.unsplash.com/photo-1555949258-eb67b1ef0ceb?ixlib=rb-4.0.3&ixid=M3wxMjA3fDB8MHxwaG90by1wYWdlfHx8fGVufDB8fHx8fA%3D%3D&auto=format&fit=crop&w=600&q=80' },
+            { id: 5, title: '热气腾腾的饺子', date: '2023-03-22', price: '¥110', imageUrl: 'https://images.unsplash.com/photo-1607532941433-304659e8198a?ixlib=rb-4.0.3&ixid=M3wxMjA3fDB8MHxwaG90by1wYWdlfHx8fGVufDB8fHx8fA%3D%3D&auto=format&fit=crop&w=600&q=80' },
+            { id: 6, title: '牛排大餐', date: '2023-03-10', price: '¥95', imageUrl: 'https://images.unsplash.com/photo-1432139555190-58524dae6a55?ixlib=rb-4.0.3&ixid=M3wxMjA3fDB8MHxwaG90by1wYWdlfHx8fGVufDB8fHx8fA%3D%3D&auto=format&fit=crop&w=600&q=80' }
+        ];
+        
+        // DOM元素
+        const backBtn = document.getElementById('backBtn');
+        const browseBtn = document.getElementById('browseBtn');
+        const emptyState = document.getElementById('emptyState');
+        const galleryContainer = document.getElementById('galleryContainer');
+        const imageGrid = document.getElementById('imageGrid');
+        const imageModal = document.getElementById('imageModal');
+        const modalImage = document.getElementById('modalImage');
+        const modalImageTitle = document.getElementById('modalImageTitle');
+        const closeModalBtn = document.getElementById('closeModalBtn');
+        
+        // 返回按钮点击事件
+        backBtn.addEventListener('click', function() {
+            // 实际应用中这里应该是返回上一页
+            alert('返回个人中心');
+        });
+        
+        // 浏览按钮点击事件
+        browseBtn.addEventListener('click', function() {
+            alert('跳转到美食图片浏览页面');
+        });
+        
+        // 关闭模态框
+        closeModalBtn.addEventListener('click', function() {
+            imageModal.style.display = 'none';
+        });
+        
+        // 点击模态框外部关闭
+        imageModal.addEventListener('click', function(e) {
+            if (e.target === imageModal) {
+                imageModal.style.display = 'none';
+            }
+        });
+        
+        // 初始化页面
+        function initPage() {
+            if (purchasedImages.length > 0) {
+                emptyState.style.display = 'none';
+                galleryContainer.style.display = 'block';
+                renderImages();
+            } else {
+                emptyState.style.display = 'flex';
+                galleryContainer.style.display = 'none';
+            }
+        }
+        
+        // 渲染图片
+        function renderImages() {
+            imageGrid.innerHTML = '';
+            
+            purchasedImages.forEach(image => {
+                const imageCard = document.createElement('div');
+                imageCard.className = 'image-card';
+                imageCard.innerHTML = `
+                    <img src="${image.imageUrl}" alt="${image.title}" class="image-thumbnail">
+                    <div class="image-info">
+                        <div class="image-title">${image.title}</div>
+                        <div class="image-meta">
+                            <span>${image.date}</span>
+                            <span>${image.price}</span>
+                        </div>
+                    </div>
+                `;
+                
+                imageCard.addEventListener('click', function() {
+                    openImageModal(image);
+                });
+                
+                imageGrid.appendChild(imageCard);
+            });
+        }
+        
+        // 打开图片详情模态框
+        function openImageModal(image) {
+            modalImage.src = image.imageUrl;
+            modalImage.alt = image.title;
+            modalImageTitle.textContent = image.title;
+            imageModal.style.display = 'flex';
+        }
+        
+        // 初始化
+        initPage();
+    </script>
+</body>
+</html>

+ 731 - 1
picture-web/src/modules/thired-ser/upload-screen/upload-screen.html

@@ -1 +1,731 @@
-<p>upload-screen works!</p>
+<!DOCTYPE html>
+<html lang="zh-CN">
+<head>
+    <meta charset="UTF-8">
+    <meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=no">
+    <title>智能图片上传助手</title>
+    <!-- 使用国内CDN引入Ant Design Mobile -->
+    <link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/antd-mobile@5.32.0/2x/antd-mobile.min.css">
+    <style>
+        :root {
+            --primary-color: #ff7d00;
+            --success-color: #52c41a;
+            --error-color: #f5222d;
+            --warning-color: #faad14;
+            --text-color: rgba(0, 0, 0, 0.85);
+            --border-radius: 8px;
+            --box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
+        }
+        
+        * {
+            margin: 0;
+            padding: 0;
+            box-sizing: border-box;
+        }
+        
+        body {
+            font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
+            color: var(--text-color);
+            background-color: #f5f5f5;
+            line-height: 1.5;
+        }
+        
+        .container {
+            max-width: 100%;
+            padding: 16px;
+            display: flex;
+            flex-direction: column;
+            min-height: 100vh;
+        }
+        
+        .header {
+            text-align: center;
+            margin-bottom: 24px;
+            padding: 16px 0;
+        }
+        
+        .header h1 {
+            font-size: 24px;
+            color: var(--primary-color);
+            margin-bottom: 8px;
+        }
+        
+        .header p {
+            color: #666;
+            font-size: 14px;
+        }
+        
+        .upload-section {
+            background-color: white;
+            border-radius: var(--border-radius);
+            padding: 20px;
+            margin-bottom: 20px;
+            box-shadow: var(--box-shadow);
+            flex: 1;
+            display: flex;
+            flex-direction: column;
+        }
+        
+        .upload-area {
+            border: 2px dashed #d9d9d9;
+            border-radius: var(--border-radius);
+            padding: 32px 16px;
+            text-align: center;
+            cursor: pointer;
+            transition: all 0.3s;
+            margin-bottom: 20px;
+            flex: 1;
+            display: flex;
+            flex-direction: column;
+            justify-content: center;
+            align-items: center;
+        }
+        
+        .upload-area:hover {
+            border-color: var(--primary-color);
+        }
+        
+        .upload-area.active {
+            border-color: var(--primary-color);
+            background-color: #fff7e6;
+        }
+        
+        .upload-icon {
+            font-size: 48px;
+            color: var(--primary-color);
+            margin-bottom: 16px;
+        }
+        
+        .upload-text {
+            margin-bottom: 8px;
+            font-weight: 500;
+        }
+        
+        .upload-hint {
+            color: #999;
+            font-size: 14px;
+        }
+        
+        .preview-section {
+            margin-top: 20px;
+        }
+        
+        .preview-title {
+            font-size: 16px;
+            margin-bottom: 12px;
+            display: flex;
+            align-items: center;
+        }
+        
+        .preview-title .badge {
+            background-color: var(--primary-color);
+            color: white;
+            border-radius: 10px;
+            padding: 2px 8px;
+            font-size: 12px;
+            margin-left: 8px;
+        }
+        
+        .preview-grid {
+            display: flex;
+            flex-wrap: wrap;
+            gap: 8px;
+        }
+        
+        .preview-item {
+            width: calc(33.333% - 6px);
+            aspect-ratio: 1;
+            border-radius: var(--border-radius);
+            overflow: hidden;
+            position: relative;
+        }
+        
+        .preview-item img {
+            width: 100%;
+            height: 100%;
+            object-fit: cover;
+        }
+        
+        .preview-item .remove-btn {
+            position: absolute;
+            top: 4px;
+            right: 4px;
+            background-color: rgba(0, 0, 0, 0.5);
+            color: white;
+            width: 20px;
+            height: 20px;
+            border-radius: 50%;
+            display: flex;
+            align-items: center;
+            justify-content: center;
+            font-size: 12px;
+            cursor: pointer;
+        }
+        
+        .action-buttons {
+            display: flex;
+            gap: 12px;
+            margin-top: 20px;
+        }
+        
+        .action-btn {
+            flex: 1;
+            padding: 12px;
+            border-radius: var(--border-radius);
+            border: none;
+            font-weight: 500;
+            cursor: pointer;
+            transition: all 0.3s;
+            display: flex;
+            align-items: center;
+            justify-content: center;
+            gap: 8px;
+        }
+        
+        .primary-btn {
+            background-color: var(--primary-color);
+            color: white;
+        }
+        
+        .primary-btn:hover {
+            background-color: #ff9c33;
+        }
+        
+        .default-btn {
+            background-color: white;
+            color: var(--text-color);
+            border: 1px solid #d9d9d9;
+        }
+        
+        .default-btn:hover {
+            border-color: var(--primary-color);
+            color: var(--primary-color);
+        }
+        
+        .status-message {
+            padding: 12px;
+            border-radius: var(--border-radius);
+            margin-top: 16px;
+            display: none;
+        }
+        
+        .success-message {
+            background-color: #f6ffed;
+            border: 1px solid #b7eb8f;
+            color: var(--success-color);
+            display: flex;
+            align-items: center;
+            gap: 8px;
+        }
+        
+        .error-message {
+            background-color: #fff2f0;
+            border: 1px solid #ffccc7;
+            color: var(--error-color);
+            display: flex;
+            align-items: center;
+            gap: 8px;
+        }
+        
+        .loading-bar {
+            height: 4px;
+            background-color: #e8e8e8;
+            border-radius: 2px;
+            margin-top: 16px;
+            overflow: hidden;
+            display: none;
+        }
+        
+        .loading-progress {
+            height: 100%;
+            background-color: var(--primary-color);
+            width: 0%;
+            transition: width 0.3s;
+        }
+        
+        .ai-assistant {
+            background-color: white;
+            border-radius: var(--border-radius);
+            padding: 16px;
+            box-shadow: var(--box-shadow);
+            margin-top: 20px;
+        }
+        
+        .ai-header {
+            display: flex;
+            align-items: center;
+            margin-bottom: 12px;
+        }
+        
+        .ai-icon {
+            width: 32px;
+            height: 32px;
+            background-color: #fff7e6;
+            border-radius: 50%;
+            display: flex;
+            align-items: center;
+            justify-content: center;
+            margin-right: 12px;
+            color: var(--primary-color);
+        }
+        
+        .ai-title {
+            font-weight: 500;
+        }
+        
+        .ai-content {
+            font-size: 14px;
+            color: #666;
+        }
+        
+        .ai-tips {
+            margin-top: 12px;
+            padding: 8px 12px;
+            background-color: #f6f6f6;
+            border-radius: var(--border-radius);
+            font-size: 13px;
+        }
+        
+        /* 新增的上传目标选择样式 */
+        .target-selection {
+            display: none;
+            margin-top: 16px;
+            padding: 16px;
+            background-color: #f9f9f9;
+            border-radius: var(--border-radius);
+        }
+        
+        .target-options {
+            display: flex;
+            gap: 12px;
+            margin-top: 12px;
+        }
+        
+        .target-option {
+            flex: 1;
+            padding: 12px;
+            border: 1px solid #d9d9d9;
+            border-radius: var(--border-radius);
+            text-align: center;
+            cursor: pointer;
+            transition: all 0.3s;
+        }
+        
+        .target-option:hover {
+            border-color: var(--primary-color);
+        }
+        
+        .target-option.selected {
+            border-color: var(--primary-color);
+            background-color: #fff7e6;
+        }
+        
+        .target-option-icon {
+            font-size: 24px;
+            margin-bottom: 8px;
+            color: var(--primary-color);
+        }
+        
+        .target-option-title {
+            font-weight: 500;
+            margin-bottom: 4px;
+        }
+        
+        .target-option-desc {
+            font-size: 12px;
+            color: #666;
+        }
+        
+        .confirm-buttons {
+            display: flex;
+            gap: 12px;
+            margin-top: 16px;
+        }
+        
+        @media (max-width: 480px) {
+            .preview-item {
+                width: calc(50% - 4px);
+            }
+            
+            .target-options {
+                flex-direction: column;
+            }
+        }
+    </style>
+</head>
+<body>
+    <div class="container">
+        <div class="header">
+            <h1>智能图片上传助手</h1>
+            <p>轻松上传并管理您的图片,AI助手为您提供智能建议</p>
+        </div>
+        
+        <div class="upload-section">
+            <div class="upload-area" id="uploadArea">
+                <div class="upload-icon">
+                    <svg viewBox="0 0 1024 1024" width="1em" height="1em" fill="currentColor">
+                        <path d="M512 64C264.6 64 64 264.6 64 512s200.6 448 448 448 448-200.6 448-448S759.4 64 512 64zm0 820c-205.4 0-372-166.6-372-372s166.6-372 372-372 372 166.6 372 372-166.6 372-372 372z"></path>
+                        <path d="M464 336a48 48 0 1 0 96 0 48 48 0 1 0-96 0zm72 112h-48c-4.4 0-8 3.6-8 8v272c0 4.4 3.6 8 8 8h48c4.4 0 8-3.6 8-8V456c0-4.4-3.6-8-8-8z"></path>
+                    </svg>
+                </div>
+                <div class="upload-text">点击或拖拽图片到此处上传</div>
+                <div class="upload-hint">支持JPG、PNG格式,单张图片不超过5MB</div>
+            </div>
+            
+            <div class="preview-section">
+                <div class="preview-title">
+                    已选图片
+                    <span class="badge" id="imageCount">0</span>
+                </div>
+                <div class="preview-grid" id="previewGrid"></div>
+            </div>
+            
+            <!-- 新增的上传目标选择区域 -->
+            <div class="target-selection" id="targetSelection">
+                <div style="text-align: center; margin-bottom: 12px; font-weight: 500;">请选择上传目标</div>
+                <div class="target-options">
+                    <div class="target-option" data-target="merchant">
+                        <div class="target-option-icon">
+                            <svg viewBox="0 0 1024 1024" width="1em" height="1em" fill="currentColor">
+                                <path d="M864 248H728l-36.4-72.8c-4.1-8.1-12.3-13.2-21.4-13.2H354c-9.1 0-17.3 5.1-21.4 13.2L296 248H160c-44.2 0-80 35.8-80 80v456c0 44.2 35.8 80 80 80h704c44.2 0 80-35.8 80-80V328c0-44.2-35.8-80-80-80zm8 536c0 4.4-3.6 8-8 8H160c-4.4 0-8-3.6-8-8V328c0-4.4 3.6-8 8-8h186.7l17.1-34.1h214.2l17.1 34.1H864c4.4 0 8 3.6 8 8v456zM512 384c-88.4 0-160 71.6-160 160s71.6 160 160 160 160-71.6 160-160-71.6-160-160-160zm0 256c-53 0-96-43-96-96s43-96 96-96 96 43 96 96-43 96-96 96z"></path>
+                            </svg>
+                        </div>
+                        <div class="target-option-title">上传给商家</div>
+                        <div class="target-option-desc">将图片发送给合作的商家</div>
+                    </div>
+                    <div class="target-option" data-target="company">
+                        <div class="target-option-icon">
+                            <svg viewBox="0 0 1024 1024" width="1em" height="1em" fill="currentColor">
+                                <path d="M858.5 763.6a374 374 0 0 0-80.6-119.5 375.63 375.63 0 0 0-119.5-80.6c-.4-.2-.8-.3-1.2-.5C719.5 518 760 444.7 760 362c0-137-111-248-248-248S264 225 264 362c0 82.7 40.5 156 102.8 201.1-.4.2-.8.3-1.2.5-44.8 18.9-85 46-119.5 80.6a375.63 375.63 0 0 0-80.6 119.5A371.7 371.7 0 0 0 136 901.8a8 8 0 0 0 8 8.2h60c4.4 0 7.9-3.5 8-7.8 2-77.2 33-149.5 87.8-204.3 56.7-56.7 132-87.9 212.2-87.9s155.5 31.2 212.2 87.9C779 752.7 810 825 812 902.2c.1 4.4 3.6 7.8 8 7.8h60a8 8 0 0 0 8-8.2c-1-47.8-10.9-94.3-29.5-138.2zM512 534c-45.9 0-89.1-17.9-121.6-50.4S340 407.9 340 362c0-45.9 17.9-89.1 50.4-121.6S466.1 190 512 190s89.1 17.9 121.6 50.4S684 316.1 684 362c0 45.9-17.9 89.1-50.4 121.6S557.9 534 512 534z"></path>
+                            </svg>
+                        </div>
+                        <div class="target-option-title">上传给图片公司</div>
+                        <div class="target-option-desc">将图片提交给图片库公司</div>
+                    </div>
+                </div>
+                <div class="confirm-buttons">
+                    <button class="action-btn default-btn" id="cancelTargetBtn">
+                        取消
+                    </button>
+                    <button class="action-btn primary-btn" id="confirmTargetBtn" disabled>
+                        确认上传
+                    </button>
+                </div>
+            </div>
+            
+            <div class="loading-bar" id="loadingBar">
+                <div class="loading-progress" id="loadingProgress"></div>
+            </div>
+            
+            <div class="status-message" id="successMessage">
+                <svg viewBox="0 0 1024 1024" width="1em" height="1em" fill="currentColor">
+                    <path d="M512 64C264.6 64 64 264.6 64 512s200.6 448 448 448 448-200.6 448-448S759.4 64 512 64zm193.5 301.7l-210.6 292a31.8 31.8 0 0 1-51.7 0L318.5 484.9c-3.8-5.3 0-12.7 6.5-12.7h46.9c10.2 0 19.9 4.9 25.9 13.3l71.2 98.8 157.2-218c6-8.3 15.6-13.3 25.9-13.3H699c6.5 0 10.3 7.4 6.5 12.7z"></path>
+                </svg>
+                <span id="successText">图片上传成功!</span>
+            </div>
+            
+            <div class="status-message" id="errorMessage">
+                <svg viewBox="0 0 1024 1024" width="1em" height="1em" fill="currentColor">
+                    <path d="M512 64C264.6 64 64 264.6 64 512s200.6 448 448 448 448-200.6 448-448S759.4 64 512 64zm0 820c-205.4 0-372-166.6-372-372s166.6-372 372-372 372 166.6 372 372-166.6 372-372 372z"></path>
+                    <path d="M464 336a48 48 0 1 0 96 0 48 48 0 1 0-96 0zm72 112h-48c-4.4 0-8 3.6-8 8v272c0 4.4 3.6 8 8 8h48c4.4 0 8-3.6 8-8V456c0-4.4-3.6-8-8-8z"></path>
+                </svg>
+                <span id="errorText">上传失败,请重试</span>
+            </div>
+            
+            <div class="action-buttons">
+                <button class="action-btn default-btn" id="cancelBtn">
+                    <svg viewBox="0 0 1024 1024" width="1em" height="1em" fill="currentColor">
+                        <path d="M512 64C264.6 64 64 264.6 64 512s200.6 448 448 448 448-200.6 448-448S759.4 64 512 64zm0 820c-205.4 0-372-166.6-372-372s166.6-372 372-372 372 166.6 372 372-166.6 372-372 372z"></path>
+                        <path d="M685.4 354.8c-4.7-4.7-12.3-4.7-17 0L512 465.6 355.4 309c-4.7-4.7-12.3-4.7-17 0l-34.9 34.9c-4.7 4.7-4.7 12.3 0 17l156.5 156.8-156.5 156.8c-4.7 4.7-4.7 12.3 0 17l34.9 34.9c4.7 4.7 12.3 4.7 17 0l156.6-156.6 156.6 156.6c4.7 4.7 12.3 4.7 17 0l34.9-34.9c4.7-4.7 4.7-12.3 0-17L546.9 512l156.5-156.8c4.7-4.7 4.7-12.3 0-17l-34.9-34.4z"></path>
+                    </svg>
+                    取消
+                </button>
+                <button class="action-btn primary-btn" id="uploadBtn">
+                    <svg viewBox="0 0 1024 1024" width="1em" height="1em" fill="currentColor">
+                        <path d="M512 64C264.6 64 64 264.6 64 512s200.6 448 448 448 448-200.6 448-448S759.4 64 512 64zm0 820c-205.4 0-372-166.6-372-372s166.6-372 372-372 372 166.6 372 372-166.6 372-372 372z"></path>
+                        <path d="M464 336a48 48 0 1 0 96 0 48 48 0 1 0-96 0zm72 112h-48c-4.4 0-8 3.6-8 8v272c0 4.4 3.6 8 8 8h48c4.4 0 8-3.6 8-8V456c0-4.4-3.6-8-8-8z"></path>
+                    </svg>
+                    上传
+                </button>
+            </div>
+        </div>
+        
+        <div class="ai-assistant">
+            <div class="ai-header">
+                <div class="ai-icon">
+                    <svg viewBox="0 0 1024 1024" width="1em" height="1em" fill="currentColor">
+                        <path d="M512 64C264.6 64 64 264.6 64 512s200.6 448 448 448 448-200.6 448-448S759.4 64 512 64zm0 820c-205.4 0-372-166.6-372-372s166.6-372 372-372 372 166.6 372 372-166.6 372-372 372z"></path>
+                        <path d="M512 140c-205.4 0-372 166.6-372 372s166.6 372 372 372 372-166.6 372-372-166.6-372-372-372zm171.8 527.1c1.2 1.5 1.9 3.3 1.9 5.1 0 4.5-3.6 8-8 8l-66-.3-99.3-118.4-99.3 118.5-66.1.3c-4.5 0-8-3.6-8-8 0-1.9.7-3.7 1.9-5.1l130.1-155L340.5 359c-1.2-1.4-1.9-3.2-1.9-5.1 0-4.4 3.6-8 8-8l66.1.3 99.3 118.4 99.3-118.5 66-.3c4.5 0 8 3.6 8 8 0 1.9-.7 3.7-1.9 5.1L553.5 514l130 155z"></path>
+                    </svg>
+                </div>
+                <div class="ai-title">AI助手提示</div>
+            </div>
+            <div class="ai-content">
+                <p>我可以帮助您:</p>
+                <ul style="margin-top: 8px; margin-left: 20px;">
+                    <li>自动检测重复图片</li>
+                    <li>优化图片质量</li>
+                    <li>建议最佳上传目标</li>
+                </ul>
+                <div class="ai-tips" id="aiTip">
+                    请上传图片,我将为您分析并提供建议。
+                </div>
+            </div>
+        </div>
+    </div>
+
+    <!-- 使用国内CDN引入Ant Design Mobile JS -->
+    <script src="https://cdn.jsdelivr.net/npm/antd-mobile@5.32.0/2x/antd-mobile.min.js"></script>
+    <script>
+        document.addEventListener('DOMContentLoaded', function() {
+            // 模拟已存在的图片库(实际应用中应该从服务器获取)
+            const existingImages = [
+                '1a2b3c4d5e', // 模拟图片hash值
+                '6f7g8h9i0j',
+                'k1l2m3n4o5'
+            ];
+            
+            const uploadArea = document.getElementById('uploadArea');
+            const fileInput = document.createElement('input');
+            fileInput.type = 'file';
+            fileInput.multiple = true;
+            fileInput.accept = 'image/jpeg, image/png';
+            fileInput.style.display = 'none';
+            
+            const previewGrid = document.getElementById('previewGrid');
+            const imageCount = document.getElementById('imageCount');
+            const uploadBtn = document.getElementById('uploadBtn');
+            const cancelBtn = document.getElementById('cancelBtn');
+            const loadingBar = document.getElementById('loadingBar');
+            const loadingProgress = document.getElementById('loadingProgress');
+            const successMessage = document.getElementById('successMessage');
+            const errorMessage = document.getElementById('errorMessage');
+            const successText = document.getElementById('successText');
+            const errorText = document.getElementById('errorText');
+            const aiTip = document.getElementById('aiTip');
+            
+            // 新增的上传目标选择相关元素
+            const targetSelection = document.getElementById('targetSelection');
+            const targetOptions = document.querySelectorAll('.target-option');
+            const cancelTargetBtn = document.getElementById('cancelTargetBtn');
+            const confirmTargetBtn = document.getElementById('confirmTargetBtn');
+            
+            let selectedFiles = [];
+            let selectedTarget = null;
+            
+            // 点击上传区域触发文件选择
+            uploadArea.addEventListener('click', function() {
+                fileInput.click();
+            });
+            
+            // 拖拽相关事件
+            uploadArea.addEventListener('dragover', function(e) {
+                e.preventDefault();
+                uploadArea.classList.add('active');
+            });
+            
+            uploadArea.addEventListener('dragleave', function() {
+                uploadArea.classList.remove('active');
+            });
+            
+            uploadArea.addEventListener('drop', function(e) {
+                e.preventDefault();
+                uploadArea.classList.remove('active');
+                
+                if (e.dataTransfer.files.length > 0) {
+                    handleFiles(e.dataTransfer.files);
+                }
+            });
+            
+            // 文件选择处理
+            fileInput.addEventListener('change', function() {
+                if (fileInput.files.length > 0) {
+                    handleFiles(fileInput.files);
+                }
+            });
+            
+            // 处理选择的文件
+            function handleFiles(files) {
+                Array.from(files).forEach(file => {
+                    // 检查文件类型
+                    if (!file.type.match('image.*')) {
+                        showError('只能上传图片文件');
+                        return;
+                    }
+                    
+                    // 检查文件大小
+                    if (file.size > 5 * 1024 * 1024) {
+                        showError('图片大小不能超过5MB');
+                        return;
+                    }
+                    
+                    // 模拟检查图片是否已存在(实际应用中应该计算图片hash并与服务器比对)
+                    const reader = new FileReader();
+                    reader.onload = function(e) {
+                        // 模拟图片hash(实际应用中应该使用更复杂的算法)
+                        const simulatedHash = Math.random().toString(36).substring(2, 12);
+                        
+                        if (existingImages.includes(simulatedHash)) {
+                            showError('图库中已有该图片');
+                        } else {
+                            addImagePreview(file, e.target.result, simulatedHash);
+                        }
+                    };
+                    reader.readAsDataURL(file);
+                });
+            }
+            
+            // 添加图片预览
+            function addImagePreview(file, dataUrl, hash) {
+                if (selectedFiles.some(f => f.hash === hash)) {
+                    showError('已添加过该图片');
+                    return;
+                }
+                
+                selectedFiles.push({ file, dataUrl, hash });
+                updatePreview();
+                
+                // AI提示更新
+                aiTip.textContent = `已选择 ${selectedFiles.length} 张图片,建议您检查后上传。`;
+            }
+            
+            // 更新预览区域
+            function updatePreview() {
+                previewGrid.innerHTML = '';
+                imageCount.textContent = selectedFiles.length;
+                
+                selectedFiles.forEach((item, index) => {
+                    const previewItem = document.createElement('div');
+                    previewItem.className = 'preview-item';
+                    
+                    const img = document.createElement('img');
+                    img.src = item.dataUrl;
+                    
+                    const removeBtn = document.createElement('div');
+                    removeBtn.className = 'remove-btn';
+                    removeBtn.innerHTML = '×';
+                    removeBtn.addEventListener('click', function(e) {
+                        e.stopPropagation();
+                        selectedFiles.splice(index, 1);
+                        updatePreview();
+                    });
+                    
+                    previewItem.appendChild(img);
+                    previewItem.appendChild(removeBtn);
+                    previewGrid.appendChild(previewItem);
+                });
+                
+                uploadBtn.disabled = selectedFiles.length === 0;
+            }
+            
+            // 上传按钮点击事件 - 现在显示目标选择界面
+            uploadBtn.addEventListener('click', function() {
+                if (selectedFiles.length === 0) return;
+                
+                // 显示目标选择界面
+                targetSelection.style.display = 'block';
+                // 滚动到目标选择区域
+                targetSelection.scrollIntoView({ behavior: 'smooth', block: 'nearest' });
+            });
+            
+            // 取消按钮点击事件
+            cancelBtn.addEventListener('click', function() {
+                selectedFiles = [];
+                updatePreview();
+                hideMessages();
+            });
+            
+            // 目标选项点击事件
+            targetOptions.forEach(option => {
+                option.addEventListener('click', function() {
+                    // 移除所有选中状态
+                    targetOptions.forEach(opt => opt.classList.remove('selected'));
+                    // 添加当前选中状态
+                    this.classList.add('selected');
+                    selectedTarget = this.dataset.target;
+                    confirmTargetBtn.disabled = false;
+                });
+            });
+            
+            // 取消目标选择
+            cancelTargetBtn.addEventListener('click', function() {
+                targetSelection.style.display = 'none';
+                selectedTarget = null;
+                targetOptions.forEach(opt => opt.classList.remove('selected'));
+                confirmTargetBtn.disabled = true;
+            });
+            
+            // 确认目标并上传
+            confirmTargetBtn.addEventListener('click', function() {
+                if (!selectedTarget) return;
+                
+                // 隐藏目标选择界面
+                targetSelection.style.display = 'none';
+                
+                // 显示加载条
+                loadingBar.style.display = 'block';
+                loadingProgress.style.width = '0%';
+                
+                // 根据选择的目标更新AI提示
+                const targetName = selectedTarget === 'merchant' ? '商家' : '图片公司';
+                aiTip.textContent = `正在上传${selectedFiles.length}张图片给${targetName}...`;
+                
+                // 模拟上传过程
+                let progress = 0;
+                const interval = setInterval(() => {
+                    progress += Math.random() * 10;
+                    if (progress >= 100) {
+                        progress = 100;
+                        clearInterval(interval);
+                        
+                        // 模拟上传完成
+                        setTimeout(() => {
+                            loadingBar.style.display = 'none';
+                            
+                            // 随机模拟成功或失败
+                            if (Math.random() > 0.2) {
+                                showSuccess(`${selectedFiles.length}张图片已成功上传给${targetName}!`);
+                                selectedFiles = [];
+                                updatePreview();
+                                selectedTarget = null;
+                                targetOptions.forEach(opt => opt.classList.remove('selected'));
+                                confirmTargetBtn.disabled = true;
+                            } else {
+                                showError('上传失败,请检查网络后重试');
+                            }
+                        }, 300);
+                    }
+                    loadingProgress.style.width = `${progress}%`;
+                }, 200);
+            });
+            
+            // 显示成功消息
+            function showSuccess(message) {
+                successText.textContent = message;
+                successMessage.style.display = 'flex';
+                errorMessage.style.display = 'none';
+            }
+            
+            // 显示错误消息
+            function showError(message) {
+                errorText.textContent = message;
+                errorMessage.style.display = 'flex';
+                successMessage.style.display = 'none';
+                
+                // 3秒后自动隐藏
+                setTimeout(hideMessages, 3000);
+            }
+            
+            // 隐藏所有消息
+            function hideMessages() {
+                successMessage.style.display = 'none';
+                errorMessage.style.display = 'none';
+            }
+            
+            // 初始化按钮状态
+            uploadBtn.disabled = true;
+            confirmTargetBtn.disabled = true;
+        });
+    </script>
+</body>
+</html>