{"id":800,"date":"2026-07-15T14:50:16","date_gmt":"2026-07-15T06:50:16","guid":{"rendered":"http:\/\/www.yanhuyw.com\/?p=800"},"modified":"2026-07-15T23:32:57","modified_gmt":"2026-07-15T15:32:57","slug":"%e4%bd%9c%e4%b8%9a%e6%8f%90%e4%ba%a4-%e5%88%98%e9%93%ad%e6%b4%8b%e4%bd%9c","status":"publish","type":"post","link":"https:\/\/www.yanhuyw.com\/index.php\/2026\/07\/15\/%e4%bd%9c%e4%b8%9a%e6%8f%90%e4%ba%a4-%e5%88%98%e9%93%ad%e6%b4%8b%e4%bd%9c\/","title":{"rendered":"\u4f5c\u4e1a\u63d0\u4ea4&#8211;\u5218\u94ed\u6d0b\u4f5c"},"content":{"rendered":"\n<!DOCTYPE html>\n<html lang=\"zh-CN\">\n<head>\n    <meta charset=\"UTF-8\" \/>\n    <meta name=\"viewport\" content=\"width=device-width, initial-scale=1.0\" \/>\n    <title>\u71d5\u6e56 YW \u6691\u5047\u4f5c\u4e1a\u6253\u5361\u7cfb\u7edf<\/title>\n    <link href=\"https:\/\/fonts.googleapis.com\/css?family=Inter:opsz@14..32&#038;display=swap\" rel=\"stylesheet\" \/>\n    <link rel=\"stylesheet\" href=\"https:\/\/cdnjs.cloudflare.com\/ajax\/libs\/font-awesome\/6.0.0-beta3\/css\/all.min.css\" \/>\n    <style>\n        * { margin: 0; padding: 0; box-sizing: border-box; }\n        body { font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif; background: #f6f9fc; min-height: 100vh; display: flex; align-items: center; justify-content: center; padding: 24px; }\n        .app-wrapper { max-width: 1320px; width: 100%; background: #ffffff; border-radius: 40px; box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.15); overflow: hidden; border: 1px solid rgba(255, 255, 255, 0.3); }\n        .platform-header { background: linear-gradient(135deg, #0b2a4a 0%, #1a4b6d 100%); padding: 20px 32px; display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 12px; border-bottom: 3px solid #fbbf24; }\n        .platform-brand { display: flex; align-items: center; gap: 12px; }\n        .platform-brand i { font-size: 28px; color: #fbbf24; background: rgba(255, 255, 255, 0.08); padding: 10px; border-radius: 16px; }\n        .platform-brand h1 { font-size: 22px; font-weight: 600; color: white; letter-spacing: 0.5px; }\n        .platform-brand span { font-weight: 300; color: #94b8d4; font-size: 14px; margin-left: 8px; }\n        .header-actions { display: flex; gap: 12px; align-items: center; flex-wrap: wrap; }\n        .role-badge { background: rgba(255, 255, 255, 0.12); padding: 8px 18px; border-radius: 100px; color: #e2edf7; font-size: 14px; font-weight: 500; display: flex; align-items: center; gap: 8px; border: 1px solid rgba(255, 255, 255, 0.06); }\n        .role-badge i { color: #fbbf24; }\n        .role-tabs { display: flex; background: #f1f5f9; margin: 0 32px; margin-top: -18px; border-radius: 60px; padding: 6px; position: relative; z-index: 2; box-shadow: 0 8px 20px -8px rgba(0, 20, 40, 0.12); border: 1px solid rgba(255, 255, 255, 0.6); }\n        .role-tab { flex: 1; padding: 14px 10px; border: none; background: transparent; border-radius: 40px; font-weight: 600; font-size: 16px; color: #3a546d; cursor: pointer; transition: all 0.25s ease; display: flex; align-items: center; justify-content: center; gap: 10px; }\n        .role-tab i { font-size: 18px; }\n        .role-tab.active { background: white; color: #0b2a4a; box-shadow: 0 6px 14px rgba(0, 20, 40, 0.08); }\n        .role-tab:hover:not(.active) { background: rgba(255, 255, 255, 0.5); color: #1a3f5c; }\n        .content-panel { padding: 32px 32px 40px; }\n        .teacher-panel, .student-panel { display: none; animation: fadeUp 0.35s ease; }\n        .teacher-panel.active, .student-panel.active { display: block; }\n        @keyframes fadeUp { 0% { opacity: 0; transform: translateY(12px); } 100% { opacity: 1; transform: translateY(0); } }\n        .teacher-toolbar { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 16px; margin-bottom: 28px; background: #f8fafc; padding: 16px; border-radius: 20px;}\n        .btn { padding: 10px 22px; border-radius: 40px; font-weight: 600; font-size: 14px; border: none; background: white; color: #1f3a57; box-shadow: 0 2px 6px rgba(0, 0, 0, 0.02); border: 1px solid #dce3ec; cursor: pointer; transition: all 0.2s ease; font-family: inherit; display: inline-flex; align-items: center; gap: 8px; }\n        .btn i { font-size: 16px; }\n        .btn-primary { background: #0b2a4a; color: white; border: 1px solid #0b2a4a; }\n        .btn-primary:hover { background: #1a3f5c; transform: scale(1.02); box-shadow: 0 8px 16px rgba(11, 42, 74, 0.3); }\n        .btn-outline { background: transparent; border: 1px solid #cbd5e1; }\n        .btn-outline:hover { background: #f1f5f9; }\n        .btn-success { background: #0b6e4f; color: white; border: 1px solid #0b6e4f; }\n        .btn-success:hover { background: #0a5a40; }\n        .btn-danger { background: #b91c1c; color: white; border: 1px solid #b91c1c; }\n        .btn-danger:hover { background: #991b1b; }\n        .btn-warning { background: #d97706; color: white; border: 1px solid #d97706; }\n        .btn-warning:hover { background: #b45309; }\n        .btn-sm { padding: 6px 16px; font-size: 13px; }\n        .btn-xs { padding: 4px 12px; font-size: 12px; border-radius: 30px; }\n        .assignment-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 24px; margin-top: 8px; }\n        .assignment-card { background: white; border-radius: 28px; padding: 24px; border: 1px solid #eef2f6; transition: all 0.25s ease; box-shadow: 0 4px 10px rgba(0, 0, 0, 0.02); display: flex; flex-direction: column; }\n        .assignment-card:hover { border-color: #cbdae9; box-shadow: 0 12px 28px -12px rgba(11, 42, 74, 0.10); transform: translateY(-3px); }\n        .card-header { display: flex; justify-content: space-between; align-items: flex-start; margin-bottom: 8px; }\n        .card-header h3 { font-size: 18px; font-weight: 600; color: #0b2a4a; }\n        .meta { font-size: 13px; color: #5f7d9c; display: flex; flex-wrap: wrap; gap: 6px 14px; margin: 6px 0 10px; }\n        .meta i { width: 18px; color: #708aa8; }\n        .file-badge { background: #eef4ff; padding: 4px 12px; border-radius: 40px; font-size: 12px; font-weight: 500; color: #1f4a7a; display: inline-flex; align-items: center; gap: 6px; }\n        .card-actions { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 16px; border-top: 1px solid #edf2f7; padding-top: 16px; }\n        .card-actions .btn { flex: 1 0 auto; justify-content: center; padding: 8px 14px; font-size: 13px; }\n        .status-badge { font-size: 12px; padding: 4px 14px; border-radius: 40px; background: #e6f7ec; color: #0b6e4f; font-weight: 500; }\n        .status-badge.closed { background: #f1f3f4; color: #5f6b7a; }\n        .student-header { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; margin-bottom: 24px; background: #f8fafc; padding: 16px 24px; border-radius: 28px; border: 1px solid #e9edf2; }\n        .greeting { font-size: 18px; font-weight: 500; color: #0b2a4a; }\n        .greeting i { color: #fbbf24; margin-right: 8px; }\n        .upload-area { background: #fafcff; border: 2px dashed #d0dfee; border-radius: 28px; padding: 32px 24px; text-align: center; margin-bottom: 32px; transition: all 0.2s; cursor: pointer; }\n        .upload-area:hover { border-color: #8aadcf; background: #f5f9ff; }\n        .upload-area i { font-size: 40px; color: #3a6a94; margin-bottom: 10px; }\n        .upload-area p { color: #2b4b6e; font-weight: 500; }\n        .hint { font-size: 14px; color: #6f8aa8; margin-top: 6px; }\n        .student-list .assignment-item { background: white; border-radius: 24px; padding: 20px 24px; border: 1px solid #eef2f6; margin-bottom: 16px; transition: 0.2s; }\n        .student-list .assignment-item:hover { border-color: #cbdae9; background: #fafdff; }\n        .assignment-item .info { display: flex; flex-wrap: wrap; align-items: center; gap: 10px 20px; }\n        .assignment-item .info .title { font-weight: 600; color: #0b2a4a; font-size: 16px; }\n        .assignment-item .info .file-tag { background: #ecf3fa; padding: 4px 14px; border-radius: 30px; font-size: 13px; color: #1f4a7a; }\n        .action-btns { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 8px; }\n        .action-btns .btn { padding: 6px 16px; font-size: 13px; }\n        .pen-icon { display: inline-flex; align-items: center; justify-content: center; background: #fbbf24; color: #0b2a4a; width: 32px; height: 32px; border-radius: 40px; font-size: 16px; margin-left: 4px; box-shadow: 0 4px 8px rgba(251, 191, 36, 0.25); }\n        .empty-state { text-align: center; padding: 48px 20px; color: #5f7d9c; }\n        .empty-state i { font-size: 48px; color: #cbdae9; margin-bottom: 16px; }\n        .modal-overlay { display: none; position: fixed; top: 0; left: 0; width: 100%; height: 100%; background: rgba(0, 0, 0, 0.5); backdrop-filter: blur(4px); z-index: 1000; justify-content: center; align-items: center; }\n        .modal-overlay.show { display: flex; }\n        .modal-card { background: white; border-radius: 40px; padding: 32px 36px; max-width: 600px; width: 90%; box-shadow: 0 30px 60px rgba(0, 0, 0, 0.3); animation: fadeUp 0.3s ease; max-height: 80vh; overflow-y: auto; }\n        .modal-card h2 { font-size: 22px; font-weight: 600; color: #0b2a4a; margin-bottom: 8px; display: flex; align-items: center; gap: 12px; }\n        .subtitle { color: #5f7d9c; font-size: 14px; margin-bottom: 16px; border-bottom: 1px solid #edf2f7; padding-bottom: 12px; }\n        .submission-item { display: flex; justify-content: space-between; align-items: center; padding: 12px 0; border-bottom: 1px solid #f1f5f9; font-size: 14px; gap: 12px; flex-wrap: wrap; }\n        .submission-item:last-child { border-bottom: none; }\n        .submission-item .fname { font-weight: 500; color: #1f3a57; display: flex; align-items: center; gap: 8px; }\n        .submission-item .time { color: #6f8aa8; font-size: 13px; }\n        .preview-btn { background: #eef4ff; border: none; padding: 6px 16px; border-radius: 30px; color: #1f4a7a; font-size: 12px; cursor: pointer; transition: 0.2s; font-weight: 600;}\n        .preview-btn:hover { background: #d4e2f5; }\n        .no-sub { color: #8aa0b8; text-align: center; padding: 20px 0; }\n        .modal-actions { display: flex; gap: 12px; margin-top: 20px; justify-content: flex-end; }\n        .modal-actions .btn { padding: 8px 24px; }\n        .lock-icon { font-size: 48px; color: #0b2a4a; background: #eef4ff; width: 80px; height: 80px; border-radius: 50%; display: inline-flex; align-items: center; justify-content: center; margin-bottom: 16px; }\n        .modal-card input, .modal-card textarea { width: 100%; padding: 14px 20px; border: 2px solid #e2e8f0; border-radius: 60px; font-size: 16px; outline: none; transition: 0.2s; margin-bottom: 14px; font-family: inherit; }\n        .modal-card input:focus, .modal-card textarea:focus { border-color: #0b2a4a; box-shadow: 0 0 0 4px rgba(11, 42, 74, 0.1); }\n        .error-msg { color: #b91c1c; font-size: 14px; margin-top: -10px; margin-bottom: 14px; display: none; }\n        .error-msg.show { display: block; }\n        .lock-badge { background: rgba(251, 191, 36, 0.15); color: #fbbf24; padding: 4px 14px; border-radius: 40px; font-size: 13px; display: inline-flex; align-items: center; gap: 6px; border: 1px solid rgba(251, 191, 36, 0.2); }\n        .hidden-input { display: none; }\n        .toast-message { position: fixed; bottom: 30px; left: 50%; transform: translateX(-50%); background: #0b2a4a; color: white; padding: 14px 32px; border-radius: 60px; font-weight: 500; box-shadow: 0 12px 30px rgba(0, 0, 0, 0.2); z-index: 999; display: none; align-items: center; gap: 12px; border: 1px solid rgba(255, 255, 255, 0.1); }\n        .toast-message.show { display: flex; }\n        .checklist-section { margin: 12px 0 8px; padding: 12px 16px; background: #f8fafc; border-radius: 16px; border: 1px solid #eef2f6; }\n        .checklist-title { font-size: 13px; font-weight: 600; color: #3a546d; margin-bottom: 8px; display: flex; align-items: center; gap: 8px; }\n        .checklist-title i { color: #fbbf24; }\n        .checklist-item { display: flex; align-items: center; gap: 10px; padding: 4px 0; font-size: 14px; color: #1f3a57; cursor: pointer; transition: 0.15s; }\n        .checklist-item:hover { background: rgba(11, 42, 74, 0.04); border-radius: 8px; padding-left: 6px; }\n        .checklist-item input[type=\"checkbox\"] { width: 18px; height: 18px; accent-color: #0b2a4a; cursor: pointer; flex-shrink: 0; }\n        .check-label { flex: 1; cursor: pointer; }\n        .checklist-item.done .check-label { text-decoration: line-through; color: #8aa0b8; }\n        .checklist-progress { font-size: 12px; color: #5f7d9c; margin-left: auto; white-space: nowrap; }\n        .done-count { color: #0b6e4f; font-weight: 600; }\n        .checklist-stats { font-size: 13px; color: #3a546d; background: #eef4ff; padding: 4px 14px; border-radius: 30px; display: inline-flex; align-items: center; gap: 6px; }\n        .checklist-stats i { color: #fbbf24; }\n        .subject-tag { font-size: 11px; padding: 2px 12px; border-radius: 30px; font-weight: 600; background: #eef4ff; color: #1f4a7a; }\n        .subject-tag.\u8bed\u6587 { background: #fef3c7; color: #92400e; }\n        .subject-tag.\u6570\u5b66 { background: #dbeafe; color: #1e40af; }\n        .subject-tag.\u82f1\u8bed { background: #d1fae5; color: #065f46; }\n        .subject-tag.\u79d1\u5b66 { background: #ede9fe; color: #5b21b6; }\n        .subject-tag.\u7269\u7406 { background: #fce4ec; color: #9a1f3c; }\n        .teacher-checklist-view { margin: 8px 0; padding: 8px 12px; background: #f8fafc; border-radius: 12px; border: 1px solid #eef2f6; }\n        .tc-item { display: flex; align-items: center; gap: 8px; font-size: 13px; padding: 2px 0; }\n        .tc-status { font-size: 14px; }\n        .tc-label { color: #1f3a57; }\n        @media (max-width: 700px) {\n            .platform-header { flex-direction: column; align-items: flex-start; }\n            .role-tabs { margin: 0 16px; margin-top: -12px; flex-direction: column; border-radius: 32px; gap: 4px; }\n            .role-tab { padding: 12px; }\n            .content-panel { padding: 20px 16px 28px; }\n            .teacher-toolbar, .student-header { flex-direction: column; align-items: stretch; }\n            .assignment-grid { grid-template-columns: 1fr; }\n            .modal-card { padding: 24px 20px; }\n            .submission-item { flex-wrap: wrap; gap: 8px; }\n        }\n        .checklist-editor { border: 1px solid #e2e8f0; border-radius: 16px; padding: 12px 16px; margin-bottom: 14px; background: #fafcff; }\n        .ce-title { font-size: 14px; font-weight: 600; color: #0b2a4a; margin-bottom: 8px; display: flex; align-items: center; gap: 8px; }\n        .ce-item { display: flex; align-items: center; gap: 10px; padding: 4px 0; font-size: 14px; }\n        .ce-item input[type=\"text\"] { flex: 1; padding: 8px 14px; border: 1px solid #dce3ec; border-radius: 30px; font-size: 14px; outline: none; transition: 0.2s; margin-bottom: 0; }\n        .ce-item input[type=\"text\"]:focus { border-color: #0b2a4a; box-shadow: 0 0 0 3px rgba(11, 42, 74, 0.08); }\n        .ce-item .btn { padding: 6px 14px; font-size: 13px; }\n        .ce-add { display: flex; gap: 8px; margin-top: 8px; }\n        .ce-add input { flex: 1; padding: 8px 14px; border: 1px solid #dce3ec; border-radius: 30px; font-size: 14px; outline: none; margin-bottom: 0; }\n        .ce-add input:focus { border-color: #0b2a4a; box-shadow: 0 0 0 3px rgba(11, 42, 74, 0.08); }\n        .ce-add .btn { padding: 8px 18px; font-size: 13px; }\n        \n        \/* \u8eab\u4efd\u7ed1\u5b9a\u533a\u57df\u6837\u5f0f *\/\n        .identity-bar { background: white; padding: 16px 24px; border-radius: 20px; margin-bottom: 24px; display: flex; gap: 16px; align-items: center; flex-wrap: wrap; border: 1px solid #eef2f6; box-shadow: 0 4px 10px rgba(0,0,0,0.02); }\n        .identity-bar .title { font-weight: 600; color: #0b2a4a; display: flex; align-items: center; gap: 8px; }\n        .identity-bar input { padding: 10px 16px; border: 1px solid #dce3ec; border-radius: 30px; outline: none; font-family: inherit; font-size: 14px; transition: 0.2s; }\n        .identity-bar input:focus { border-color: #3b82f6; box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1); }\n        .sync-badge { font-size: 13px; background: rgba(59, 130, 246, 0.1); color: #3b82f6; padding: 4px 12px; border-radius: 30px; margin-left: 8px; display: inline-flex; align-items: center; gap: 6px;}\n    <\/style>\n<\/head>\n<body>\n<div class=\"app-wrapper\">\n    <header class=\"platform-header\">\n        <div class=\"platform-brand\">\n            <i class=\"fas fa-feather-alt\"><\/i>\n            <h1>\u71d5\u6e56 YW <span> \u5bb6\u6821\u5171\u80b2<\/span><span class=\"sync-badge\"><i class=\"fas fa-cloud\"><\/i> \u4e91\u7aef\u540c\u6b65\u4e2d<\/span><\/h1>\n        <\/div>\n        <div class=\"header-actions\">\n            <div class=\"role-badge\"><i class=\"fas fa-user-graduate\"><\/i> \u6691\u5047\u4e13\u9879\u76ee<\/div>\n            <div class=\"role-badge\" style=\"background: rgba(251,191,36,0.15); border-color: rgba(251,191,36,0.2);\">\n                <i class=\"fas fa-calendar-alt\"><\/i> 2026.07\n            <\/div>\n        <\/div>\n    <\/header>\n    \n    <div class=\"role-tabs\">\n        <button class=\"role-tab\" data-role=\"teacher\">\n            <i class=\"fas fa-chalkboard-teacher\"><\/i> \u6559\u5e08\u7aef <span class=\"lock-badge\" style=\"margin-left:4px;\"><i class=\"fas fa-lock\"><\/i><\/span>\n        <\/button>\n        <button class=\"role-tab active\" data-role=\"student\">\n            <i class=\"fas fa-user-graduate\"><\/i> \u5b66\u751f\u7aef\n        <\/button>\n    <\/div>\n\n    <div class=\"content-panel\">\n        <!-- \u6559\u5e08\u7aef -->\n        <div id=\"teacherPanel\" class=\"teacher-panel\">\n            <div class=\"teacher-toolbar\">\n                <div style=\"display:flex; flex-wrap:wrap;gap:8px;align-items:center;\">\n                    <button class=\"btn btn-primary\" id=\"newAssignmentBtn\"><i class=\"fas fa-plus-circle\"><\/i> \u65b0\u5efa\u4f5c\u4e1a<\/button>\n                    <button class=\"btn btn-outline\" id=\"refreshTeacherBtn\"><i class=\"fas fa-sync-alt\"><\/i> \u540c\u6b65\u4e91\u7aef\u6570\u636e<\/button>\n                    <span style=\"font-size:14px; color:#3a5f7a; background:#e9f0f8; padding:4px 16px; border-radius:40px;\">\n                        <i class=\"fas fa-database\" style=\"margin-right:6px;\"><\/i> \u5b9e\u65f6\u638c\u63a7\u5168\u73ed\u8fdb\u5ea6\n                    <\/span>\n                <\/div>\n                <div style=\"display: flex; gap:8px; align-items:center; flex-wrap:wrap;\">\n                    <button class=\"btn btn-outline\" id=\"changePasswordBtn\" style=\"padding:6px 14px; font-size:13px;\">\n                        <i class=\"fas fa-key\"><\/i> \u4fee\u6539\u5bc6\u7801\n                    <\/button>\n                    <button class=\"btn btn-outline\" id=\"lockTeacherBtn\" style=\"padding:6px 14px; font-size:13px;\">\n                        <i class=\"fas fa-sign-out-alt\"><\/i> \u9501\u5b9a\n                    <\/button>\n                <\/div>\n            <\/div>\n            <div id=\"teacherAssignmentList\" class=\"assignment-grid\"><\/div>\n        <\/div>\n\n        <!-- \u5b66\u751f\u7aef -->\n        <div id=\"studentPanel\" class=\"student-panel active\">\n            <!-- \u8eab\u4efd\u7ed1\u5b9a\u533a\u57df -->\n            <div class=\"identity-bar\">\n                <div class=\"title\"><i class=\"fas fa-id-badge\" style=\"color: #3b82f6; font-size: 20px;\"><\/i> \u6211\u7684\u8eab\u4efd<\/div>\n                <input type=\"text\" id=\"stuIdInput\" placeholder=\"\u5b66\u53f7 (\u5982: 01)\" style=\"width: 120px;\">\n                <input type=\"text\" id=\"stuNameInput\" placeholder=\"\u771f\u5b9e\u59d3\u540d\" style=\"width: 140px;\">\n                <button class=\"btn btn-primary\" id=\"saveIdentityBtn\" style=\"padding: 8px 20px;\"><i class=\"fas fa-save\"><\/i> \u786e\u8ba4\u8eab\u4efd<\/button>\n                <span id=\"identityStatus\" style=\"font-size: 13px; color: #0b6e4f; display: none;\"><i class=\"fas fa-check-circle\"><\/i> \u5df2\u7ed1\u5b9a\u8bbe\u5907<\/span>\n            <\/div>\n\n            <div class=\"student-header\">\n                <div class=\"greeting\"><i class=\"fas fa-smile\"><\/i>\u540c\u5b66,\u4f60\u597d! \u8bf7\u5b8c\u6210\u6691\u5047\u4f5c\u4e1a\u6253\u5361<\/div>\n                <div style=\"display: flex; gap:10px; align-items:center; flex-wrap:wrap;\">\n                    <span class=\"file-badge\"><i class=\"fas fa-check-circle\"><\/i> \u6253\u5361\u8868 \u5bb6\u957f\u68c0\u67e5<\/span>\n                    <span class=\"file-badge\"><i class=\"fas fa-upload\"><\/i> \u652f\u6301\u56fe\u7247\/PDF\/Word<\/span>\n                    <span class=\"pen-icon\"><i class=\"fas fa-pen\"><\/i><\/span>\n                <\/div>\n            <\/div>\n            <div class=\"upload-area\" id=\"studentUploadArea\">\n                <i class=\"fas fa-cloud-upload-alt\"><\/i>\n                <p>\u70b9\u51fb\u6216\u62d6\u62fd\u4e0a\u4f20\u4f5c\u4e1a\u9644\u4ef6<\/p>\n                <div class=\"hint\">\u652f\u6301.pdf.doc.docx.jpg.png \u7b49\u683c\u5f0f(\u53ef\u9009)<\/div>\n            <\/div>\n            <input type=\"file\" id=\"studentFileInput\" class=\"hidden-input\" accept=\".pdf,.doc,.docx,.png,.jpg,.jpeg,.gif,.bmp,.txt\" multiple \/>\n            <div class=\"student-list\" id=\"studentAssignmentList\"><\/div>\n        <\/div>\n    <\/div>\n<\/div>\n\n<!-- \u6a21\u6001\u6846\u7ec4 (\u4fdd\u6301\u539f\u6837) -->\n<div class=\"modal-overlay\" id=\"passwordModal\">\n    <div class=\"modal-card\">\n        <div class=\"lock-icon\"><i class=\"fas fa-lock\"><\/i><\/div>\n        <h2>\u6559\u5e08\u7aef\u9a8c\u8bc1<\/h2>\n        <p style=\"color:#5f7d9c;margin-bottom:16px;\">\u8bf7\u8f93\u5165\u6559\u5e08\u5bc6\u7801\u4ee5\u8bbf\u95ee\u7ba1\u7406\u529f\u80fd<\/p>\n        <input type=\"password\" id=\"passwordInput\" placeholder=\"\u8bf7\u8f93\u5165\u5bc6\u7801\" autocomplete=\"off\" \/>\n        <div class=\"error-msg\" id=\"passwordError\"><i class=\"fas fa-exclamation-circle\"><\/i> \u5bc6\u7801\u9519\u8bef,\u8bf7\u91cd\u8bd5<\/div>\n        <div class=\"modal-actions\">\n            <button class=\"btn btn-outline\" id=\"modalCancelBtn\">\u53d6\u6d88<\/button>\n            <button class=\"btn btn-primary\" id=\"modalConfirmBtn\">\u786e\u8ba4<\/button>\n        <\/div>\n    <\/div>\n<\/div>\n\n<div class=\"modal-overlay\" id=\"submissionModal\">\n    <div class=\"modal-card\" style=\"max-width: 650px;\">\n        <h2 id=\"submissionTitle\"><i class=\"fas fa-file-alt\"><\/i> \u4f5c\u4e1a\u63d0\u4ea4\u8be6\u60c5<\/h2>\n        <div class=\"subtitle\" id=\"submissionSubtitle\">\u67e5\u770b\u6240\u6709\u5b66\u751f\u7684\u63d0\u4ea4\u8bb0\u5f55<\/div>\n        <div id=\"submissionList\"><\/div>\n        <div class=\"modal-actions\">\n            <button class=\"btn btn-primary\" id=\"closeSubmissionModal\">\u5173\u95ed<\/button>\n        <\/div>\n    <\/div>\n<\/div>\n\n<!-- \u65b0\u5efa\u4f5c\u4e1a\u6a21\u6001\u6846 -->\n<div class=\"modal-overlay\" id=\"newAssignmentModal\">\n    <div class=\"modal-card\" style=\"max-width:600px;\">\n        <h2><i class=\"fas fa-plus-circle\"><\/i> \u65b0\u5efa\u4f5c\u4e1a<\/h2>\n        <div class=\"subtitle\">\u586b\u5199\u4f5c\u4e1a\u4fe1\u606f\u5e76\u8bbe\u7f6e\u6253\u5361\u8868<\/div>\n        <input type=\"text\" id=\"newTitleInput\" placeholder=\"\u4f5c\u4e1a\u6807\u9898(\u5982:\u8bed\u6587\u9605\u8bfb\u7b14\u8bb0)\"\/>\n        <input type=\"text\" id=\"newDescInput\" placeholder=\"\u4f5c\u4e1a\u63cf\u8ff0(\u5982:\u5b8c\u6210\u300a\u671d\u82b1\u5915\u62fe\u300b\u8bfb\u540e\u611f)\"\/>\n        <div style=\"display: flex; gap:12px;margin-bottom:14px;\">\n            <select id=\"newSubjectInput\" style=\"flex:1;padding: 14px 20px;border:2px solid #e2e8f0;border-radius:60px;font-size:16px; outline: none; font-family:inherit;background:white;\">\n                <option value=\"\u8bed\u6587\">\u8bed\u6587<\/option>\n                <option value=\"\u6570\u5b66\">\u6570\u5b66<\/option>\n                <option value=\"\u82f1\u8bed\">\u82f1\u8bed<\/option>\n                <option value=\"\u79d1\u5b66\" selected>\u79d1\u5b66<\/option>\n                <option value=\"\u7269\u7406\">\u7269\u7406<\/option>\n            <\/select>\n            <select id=\"newTypeInput\" style=\"flex:1;padding:14px 20px;border:2px solid #e2e8f0;border-radius:60px;font-size:16px; outline:none;font-family:inherit; background:white;\">\n                <option value=\"pdf\">PDF<\/option>\n                <option value=\"doc\">Word<\/option>\n                <option value=\"image\">\u56fe\u7247<\/option>\n                <option value=\"file\">\u5176\u4ed6<\/option>\n            <\/select>\n        <\/div>\n        <div class=\"checklist-editor\">\n            <div class=\"ce-title\"><i class=\"fas fa-list-check\"><\/i> \u6253\u5361\u8868(\u5bb6\u957f\u68c0\u67e5\u9879)<\/div>\n            <div id=\"checklistEditorItems\"><\/div>\n            <div class=\"ce-add\">\n                <input type=\"text\" id=\"newChecklistItemInput\" placeholder=\"\u8f93\u5165\u6253\u5361\u9879,\u5982:\u9605\u8bfb\u5b8c\u6210\" \/>\n                <button class=\"btn btn-primary btn-sm\" id=\"addChecklistItemBtn\"><i class=\"fas fa-plus\"><\/i> \u6dfb\u52a0<\/button>\n            <\/div>\n        <\/div>\n        <div class=\"error-msg\" id=\"newAssignmentError\"><i class=\"fas fa-exclamation-circle\"><\/i> \u8bf7\u586b\u5199\u6807\u9898\u5e76\u81f3\u5c11\u6dfb\u52a0\u4e00\u4e2a\u6253\u5361\u9879<\/div>\n        <div class=\"modal-actions\">\n            <button class=\"btn btn-outline\" id=\"newAssignmentCancel\">\u53d6\u6d88<\/button>\n            <button class=\"btn btn-primary\" id=\"newAssignmentConfirm\">\u53d1\u5e03\u4f5c\u4e1a<\/button>\n        <\/div>\n    <\/div>\n<\/div>\n\n<!-- Toast -->\n<div id=\"toastMessage\" class=\"toast-message\">\n    <i class=\"fas fa-check-circle\" style=\"color:#4ade80;\"><\/i>\n    <span id=\"toastText\">\u64cd\u4f5c\u6210\u529f<\/span>\n<\/div>\n\n<script>\n(function() {\n    'use strict';\n\n    const PWD_KEY = 'yanhu_yw_password';\n    let teacherPassword = localStorage.getItem(PWD_KEY) || 'teacher123';\n    let assignments = [];\n    let studentSubmissions = [];\n    let nextId = 1;\n    let teacherAuthenticated = false;\n    let tempChecklistItems = []; \n    \n    let currentStuId = localStorage.getItem('yanhu_yw_stu_id') || '';\n    let currentStuName = localStorage.getItem('yanhu_yw_stu_name') || '';\n\n    \/\/ ===================== \u4e91\u7aef\u6570\u636e\u4ea4\u4e92 =====================\n    function loadDataFromServer() {\n        showToast('\u6b63\u5728\u540c\u6b65\u4e91\u7aef\u6570\u636e...', 'fa-spinner fa-spin', '#3b82f6');\n        fetch(window.location.origin + '\/student-apps\/api_data.php')\n            .then(res => res.json())\n            .then(data => {\n                assignments = data.assignments || [];\n                studentSubmissions = data.submissions || [];\n                nextId = data.nextId || (assignments.length > 0 ? Math.max(...assignments.map(a => a.id)) + 1 : 1);\n                \n                if (document.getElementById('teacherPanel').classList.contains('active')) {\n                    renderTeacher();\n                } else {\n                    renderStudent();\n                }\n                showToast('\u4e91\u7aef\u6570\u636e\u540c\u6b65\u5b8c\u6210', 'fa-cloud-download-alt', '#0b6e4f');\n            })\n            .catch(e => {\n                console.error(e);\n                showToast('\u65e0\u6cd5\u8fde\u63a5\u5230\u670d\u52a1\u5668\u8bfb\u53d6\u6570\u636e', 'fa-times-circle', '#b91c1c');\n            });\n    }\n\n    function saveDataToServer(actionMsg) {\n        const payload = {\n            assignments: assignments,\n            submissions: studentSubmissions,\n            nextId: nextId\n        };\n        fetch(window.location.origin + '\/student-apps\/api_data.php', {\n            method: 'POST',\n            headers: { 'Content-Type': 'application\/json' },\n            body: JSON.stringify(payload)\n        })\n        .then(res => res.json())\n        .then(data => {\n            if(data.code === 200) {\n                if (actionMsg) showToast(actionMsg, 'fa-check-circle', '#0b6e4f');\n            } else {\n                showToast(data.msg, 'fa-times-circle', '#b91c1c');\n            }\n        })\n        .catch(e => showToast('\u7f51\u7edc\u5f02\u5e38\uff0c\u4fdd\u5b58\u5931\u8d25', 'fa-times-circle', '#b91c1c'));\n    }\n\n    \/\/ ===================== \u5de5\u5177\u51fd\u6570 =====================\n    function showToast(msg, icon = 'fa-check-circle', color = '#4ade80') {\n        const toast = document.getElementById('toastMessage');\n        const text = document.getElementById('toastText');\n        const iconEl = toast.querySelector('i');\n        text.textContent = msg;\n        iconEl.className = `fas ${icon}`;\n        iconEl.style.color = color;\n        toast.classList.add('show');\n        clearTimeout(toast._timer);\n        toast._timer = setTimeout(() => toast.classList.remove('show'), 2800);\n    }\n\n    function getFileIcon(type) {\n        if (type === 'pdf') return 'fa-file-pdf';\n        if (type === 'doc' || type === 'docx') return 'fa-file-word';\n        if (type === 'image') return 'fa-file-image';\n        return 'fa-file-alt';\n    }\n\n    function getFileBadge(type) {\n        const map = { pdf: 'PDF', doc: 'DOC', image: '\u56fe\u7247', docx: 'DOCX' };\n        return map[type] || type;\n    }\n\n    function getSubjectTag(subject) {\n        const cls = { '\u8bed\u6587': '\u8bed\u6587', '\u6570\u5b66': '\u6570\u5b66', '\u82f1\u8bed': '\u82f1\u8bed', '\u79d1\u5b66': '\u79d1\u5b66', '\u7269\u7406': '\u7269\u7406' }[subject] || \"\";\n        return `<span class=\"subject-tag ${cls}\">${subject || '\u5176\u4ed6'}<\/span>`;\n    }\n\n    function getChecklistProgress(checklist, statusMap) {\n        if (!checklist || !checklist.length) return { done: 0, total: 0, pct: 0 };\n        const total = checklist.length;\n        const done = checklist.filter(item => statusMap && statusMap[item.id] === true).length;\n        return { done, total, pct: total > 0 ? Math.round(done \/ total * 100) : 0 };\n    }\n\n    function getSubmissionForAssignment(assignmentId, stuId) {\n        if (!stuId) return null;\n        return studentSubmissions.find(s => s.assignmentId === assignmentId && s.studentId === stuId);\n    }\n\n    \/\/ ===================== \u6e32\u67d3 =====================\n    function renderTeacher() {\n        const container = document.getElementById('teacherAssignmentList');\n        if (!teacherAuthenticated) {\n            container.innerHTML = `<div class=\"empty-state\" style=\"grid-column:1\/-1;\"><i class=\"fas fa-lock\" style=\"color:#fbbf24;\"><\/i><p style=\"font-size:18px; font-weight:500;\">\u6559\u5e08\u7aef\u5df2\u9501\u5b9a<\/p><p style=\"font-size:14px;\">\u8bf7\u70b9\u51fb\u300c\u6559\u5e08\u7aef\u300d\u6807\u7b7e\u8fdb\u884c\u8eab\u4efd\u9a8c\u8bc1<\/p><\/div>`;\n            return;\n        }\n        if (!assignments.length) {\n            container.innerHTML = `<div class=\"empty-state\" style=\"grid-column:1\/-1;\"><i class=\"fas fa-folder-open\"><\/i><p style=\"font-size:18px; font-weight:500;\">\u8fd8\u6ca1\u6709\u4f5c\u4e1a<\/p><p style=\"font-size:14px;\">\u70b9\u51fb\u300c\u65b0\u5efa\u4f5c\u4e1a\u300d\u53d1\u5e03<\/p><\/div>`;\n            return;\n        }\n\n        let html = \"\";\n        assignments.forEach(a => {\n            const isClosed = a.status === 'closed';\n            const allSubs = studentSubmissions.filter(s => s.assignmentId === a.id);\n            let totalCheckDone = 0, totalCheckTotal = 0;\n            \n            allSubs.forEach(sub => {\n                const prog = getChecklistProgress(a.checklist, sub.checklistStatus);\n                totalCheckDone += prog.done;\n                totalCheckTotal += prog.total;\n            });\n            \n            const avgPct = totalCheckTotal > 0 ? Math.round(totalCheckDone \/ totalCheckTotal * 100) : 0;\n            const subCount = allSubs.length;\n\n            html += `\n            <div class=\"assignment-card\" data-id=\"${a.id}\">\n                <div class=\"card-header\">\n                    <h3><i class=\"fas ${getFileIcon(a.type)}\" style=\"color:#2b6a9e; margin-right:8px;\"><\/i>${a.title}<\/h3>\n                    <span class=\"status-badge ${isClosed ? 'closed' : ''}\">${isClosed ? '\u5df2\u5173\u95ed' : '\u8fdb\u884c\u4e2d'}<\/span>\n                <\/div>\n                <div style=\"display: flex; flex-wrap:wrap;gap:6px;margin-bottom:4px;\">\n                    ${getSubjectTag(a.subject)}\n                    <span class=\"file-badge\"><i class=\"far fa-file\"><\/i> ${getFileBadge(a.type)}<\/span>\n                <\/div>\n                <div class=\"meta\">\n                    <span><i class=\"far fa-calendar-alt\"><\/i> ${a.createdAt}<\/span>\n                <\/div>\n                <div class=\"checklist-stats\" style=\"margin:4px 0 8px;\">\n                    <i class=\"fas fa-users\"><\/i> \u5df2\u6253\u5361\/\u63d0\u4ea4: ${subCount} \u4eba\n                <\/div>\n                <div class=\"card-actions\">\n                    <button class=\"btn btn-outline view-btn\" data-id=\"${a.id}\"><i class=\"fas fa-eye\"><\/i> \u6279\u9605\u8bb0\u5f55<\/button>\n                    <button class=\"btn btn-danger delete-btn\" data-id=\"${a.id}\"><i class=\"fas fa-trash-alt\"><\/i> \u5220\u9664<\/button>\n                <\/div>\n            <\/div>`;\n        });\n        container.innerHTML = html;\n\n        container.querySelectorAll('.view-btn').forEach(btn => {\n            btn.addEventListener('click', function() { openSubmissionModal(parseInt(this.dataset.id)); });\n        });\n        container.querySelectorAll('.delete-btn').forEach(btn => {\n            btn.addEventListener('click', function() {\n                const id = parseInt(this.dataset.id);\n                if (confirm(`\u786e\u5b9a\u8981\u5f7b\u5e95\u5220\u9664\u6b64\u4f5c\u4e1a\u5417?\\n\u6b64\u64cd\u4f5c\u4e0d\u53ef\u6062\u590d!`)) {\n                    assignments = assignments.filter(a => a.id !== id);\n                    studentSubmissions = studentSubmissions.filter(s => s.assignmentId !== id);\n                    saveDataToServer('\u5df2\u6210\u529f\u5220\u9664\u4f5c\u4e1a');\n                    renderTeacher();\n                }\n            });\n        });\n    }\n\n    function openSubmissionModal(assignmentId) {\n        const assignment = assignments.find(a => a.id === assignmentId);\n        if (!assignment) return;\n        const subs = studentSubmissions.filter(s => s.assignmentId === assignmentId);\n        \n        document.getElementById('submissionTitle').innerHTML = `<i class=\"fas fa-file-alt\"><\/i> ${assignment.title}`;\n        document.getElementById('submissionSubtitle').textContent = `\u5171${subs.length}\u6761\u63d0\u4ea4\u8bb0\u5f55 | \u6253\u5361\u9879: ${assignment.checklist ? assignment.checklist.length : 0}\u9879`;\n        \n        let listHtml = \"\";\n        if (subs.length === 0) {\n            listHtml = '<div class=\"no-sub\">\u6682\u65e0\u5b66\u751f\u63d0\u4ea4<\/div>';\n        } else {\n            subs.forEach((s) => {\n                const prog = getChecklistProgress(assignment.checklist, s.checklistStatus);\n                const doneStr = assignment.checklist && assignment.checklist.length > 0 ? `${prog.done}\/${prog.total}` : '\u65e0\u6253\u5361';\n                const stuDisplay = s.studentId ? `[${s.studentId}] ${s.studentName}` : '\u672a\u77e5\u5b66\u751f';\n\n                listHtml += `\n                <div class=\"submission-item\" style=\"align-items: flex-start;\">\n                    <div style=\"display:flex; flex-direction:column; gap:6px; flex:1;\">\n                        <span style=\"font-weight:600; color:#0b2a4a;\"><i class=\"fas fa-user-graduate\" style=\"color:#fbbf24; margin-right:4px;\"><\/i>${stuDisplay}<\/span>\n                        <span class=\"fname\" style=\"font-size:13px; color:#5f7d9c;\"><i class=\"far fa-file\"><\/i> ${s.fileName || '\u672a\u4e0a\u4f20\u9644\u4ef6'}<\/span>\n                    <\/div>\n                    <div style=\"display:flex; flex-direction:column; align-items:flex-end; gap:6px;\">\n                        <span style=\"font-size:12px;color:#0b6e4f;background:#e6f7ec;padding:2px 10px;border-radius:30px;\">\u6253\u5361 ${doneStr}<\/span>\n                        <span class=\"time\"><i class=\"far fa-clock\"><\/i> ${s.uploadTime || '\u672a\u77e5\u65f6\u95f4'}<\/span>\n                    <\/div>\n                <\/div>`;\n            });\n        }\n        document.getElementById('submissionList').innerHTML = listHtml;\n        document.getElementById('submissionModal').classList.add('show');\n    }\n\n    function renderStudent() {\n        const container = document.getElementById('studentAssignmentList');\n        const openAssignments = assignments.filter(a => a.status === 'open');\n        if (!openAssignments.length) {\n            container.innerHTML = `<div class=\"empty-state\"><i class=\"fas fa-inbox\"><\/i><p style=\"font-size:18px; font-weight:500;\">\u6682\u65e0\u4f5c\u4e1a<\/p><\/div>`;\n            return;\n        }\n\n        let html = \"\";\n        openAssignments.forEach(a => {\n            const sub = getSubmissionForAssignment(a.id, currentStuId);\n            const checklistStatus = sub ? sub.checklistStatus || {} : {};\n            const prog = getChecklistProgress(a.checklist, checklistStatus);\n\n            html += `\n            <div class=\"assignment-item\" data-id=\"${a.id}\">\n                <div class=\"info\" style=\"width:100%;\">\n                    <span class=\"title\"><i class=\"fas ${getFileIcon(a.type)}\" style=\"color:#2b6a9e;width:20px;\"><\/i> ${a.title}<\/span>\n                    ${getSubjectTag(a.subject)}\n                    <span style=\"font-size:13px; color:#5f7d9c;flex:1;\">${a.desc || \"\"}<\/span>\n                <\/div>\n                <div class=\"checklist-section\" style=\"margin-top:8px;\">\n                    <div class=\"checklist-title\">\n                        <i class=\"fas fa-list-check\"><\/i> \u5bb6\u957f\u68c0\u67e5\u8868\n                        <span class=\"checklist-progress\"><span class=\"done-count\">${prog.done}<\/span> \/ ${prog.total}<\/span>\n                    <\/div>\n                    ${a.checklist && a.checklist.length ? a.checklist.map(item => {\n                        const checked = checklistStatus[item.id] === true;\n                        return `<label class=\"checklist-item ${checked ? 'done' : ''}\" data-aid=\"${a.id}\" data-cid=\"${item.id}\"><input type=\"checkbox\" ${checked ? 'checked' : ''} \/><span class=\"check-label\">${item.label}<\/span><\/label>`;\n                    }).join(\"\") : '<div style=\"font-size:13px;color:#8aa0b8;\">\u6682\u65e0\u6253\u5361\u9879<\/div>'}\n                <\/div>\n                <div class=\"action-btns\" style=\"margin-top:8px;\">\n                    <button class=\"btn btn-outline student-upload-btn\" data-id=\"${a.id}\"><i class=\"fas fa-upload\"><\/i> ${sub && sub.fileName ? '\u91cd\u65b0\u4e0a\u4f20' : '\u4e0a\u4f20\u9644\u4ef6'}<\/button>\n                    ${sub && sub.fileName ? `<span style=\"font-size:13px;color:#0b6e4f;margin-left:8px;\"><i class=\"fas fa-check\"><\/i> \u5df2\u4f20: ${sub.fileName}<\/span>` : ''}\n                <\/div>\n            <\/div>`;\n        });\n        container.innerHTML = html;\n\n        container.querySelectorAll('.checklist-item input[type=\"checkbox\"]').forEach(cb => {\n            cb.addEventListener('change', function(e) {\n                if (!currentStuId || !currentStuName) {\n                    this.checked = !this.checked;\n                    showToast('\u8bf7\u5148\u5728\u4e0a\u65b9\u7ed1\u5b9a\u5b66\u53f7\u548c\u59d3\u540d', 'fa-exclamation-circle', '#f59e0b');\n                    return;\n                }\n                const label = this.closest('.checklist-item');\n                const aid = parseInt(label.dataset.aid);\n                const cid = label.dataset.cid;\n                \n                let sub = getSubmissionForAssignment(aid, currentStuId);\n                if (!sub) {\n                    sub = { assignmentId: aid, studentId: currentStuId, studentName: currentStuName, fileName: \"\", uploadTime: new Date().toLocaleString(), checklistStatus: {} };\n                    studentSubmissions.push(sub);\n                }\n                sub.checklistStatus[cid] = this.checked;\n                sub.uploadTime = new Date().toLocaleString();\n                \n                saveDataToServer(this.checked ? '\u4e91\u7aef\u6253\u5361\u6210\u529f' : '\u5df2\u53d6\u6d88\u6253\u5361');\n                renderStudent();\n            });\n        });\n\n        container.querySelectorAll('.student-upload-btn').forEach(btn => {\n            btn.addEventListener('click', function() {\n                if (!currentStuId || !currentStuName) {\n                    showToast('\u8bf7\u5148\u7ed1\u5b9a\u5b66\u53f7\u548c\u59d3\u540d', 'fa-exclamation-circle', '#f59e0b');\n                    return;\n                }\n                const fileInput = document.getElementById('studentFileInput');\n                fileInput.dataset.targetId = parseInt(this.dataset.id);\n                fileInput.click();\n            });\n        });\n    }\n\n    \/\/ ===================== \u8868\u5355\u4e0e\u4e0a\u4f20\u6838\u5fc3 =====================\n    function initIdentity() {\n        const idInput = document.getElementById('stuIdInput');\n        const nameInput = document.getElementById('stuNameInput');\n        const status = document.getElementById('identityStatus');\n\n        if (currentStuId && currentStuName) {\n            idInput.value = currentStuId;\n            nameInput.value = currentStuName;\n            status.style.display = 'inline-block';\n        }\n\n        document.getElementById('saveIdentityBtn').addEventListener('click', () => {\n            let rawId = idInput.value.trim();\n            let rawName = nameInput.value.trim();\n            \n            if (!rawId || !rawName) {\n                showToast('\u8bf7\u5b8c\u6574\u586b\u5199\u5b66\u53f7\u548c\u771f\u5b9e\u59d3\u540d', 'fa-exclamation-circle', '#f59e0b');\n                return;\n            }\n            \n            currentStuId = rawId;\n            currentStuName = rawName;\n            \n            localStorage.setItem('yanhu_yw_stu_id', currentStuId);\n            localStorage.setItem('yanhu_yw_stu_name', currentStuName);\n            \n            status.style.display = 'inline-block';\n            showToast('\u8eab\u4efd\u7ed1\u5b9a\u6210\u529f\uff0c\u5df2\u540c\u6b65\u5f53\u524d\u72b6\u6001', 'fa-user-check', '#0b6e4f');\n            renderStudent();\n        });\n    }\n\n    function handleStudentUpload(files, targetId) {\n        if (!files || !files.length) return;\n        const file = files[0];\n        \n        const formData = new FormData();\n        formData.append('file', file);\n        formData.append('assignment_id', targetId);\n        formData.append('student_id', currentStuId);\n        formData.append('student_name', currentStuName);\n\n        showToast('\u6b63\u5728\u4e0a\u4f20...', 'fa-spinner fa-spin', '#3b82f6');\n\n        fetch(window.location.origin + '\/student-apps\/api_homework.php', { method: 'POST', body: formData })\n        .then(res => res.json())\n        .then(data => {\n            if (data.code === 200) {\n                let sub = getSubmissionForAssignment(targetId, currentStuId);\n                if (!sub) {\n                    sub = { assignmentId: targetId, studentId: currentStuId, studentName: currentStuName, fileName: file.name, uploadTime: new Date().toLocaleString(), checklistStatus: {} };\n                    studentSubmissions.push(sub);\n                } else {\n                    sub.fileName = file.name;\n                    sub.uploadTime = new Date().toLocaleString();\n                    sub.studentName = currentStuName;\n                }\n                saveDataToServer(`\u6587\u4ef6 ${file.name} \u5df2\u5b58\u6863\u81f3\u4e91\u7aef`);\n                renderStudent();\n            } else {\n                showToast(`\u4e0a\u4f20\u5931\u8d25: ${data.msg}`, 'fa-times-circle', '#b91c1c');\n            }\n        }).catch(err => showToast('\u4e0a\u4f20\u9047\u5230\u7f51\u7edc\u9519\u8bef', 'fa-times-circle', '#b91c1c'));\n    }\n\n    \/\/ ===================== \u521d\u59cb\u5316\u4e0e\u7ed1\u5b9a =====================\n    function init() {\n        initIdentity();\n        loadDataFromServer(); \n\n        document.querySelectorAll('.role-tab').forEach(tab => {\n            tab.addEventListener('click', function() {\n                document.querySelectorAll('.role-tab').forEach(t => t.classList.remove('active'));\n                this.classList.add('active');\n                if (this.dataset.role === 'teacher') {\n                    if(!teacherAuthenticated) { document.getElementById('passwordModal').classList.add('show'); return; }\n                    document.getElementById('studentPanel').classList.remove('active');\n                    document.getElementById('teacherPanel').classList.add('active');\n                    loadDataFromServer();\n                } else {\n                    document.getElementById('teacherPanel').classList.remove('active');\n                    document.getElementById('studentPanel').classList.add('active');\n                    loadDataFromServer();\n                }\n            });\n        });\n\n        \/\/ \u6559\u5e08\u5bc6\u7801\n        document.getElementById('modalConfirmBtn').addEventListener('click', () => {\n            if (document.getElementById('passwordInput').value === teacherPassword) {\n                teacherAuthenticated = true;\n                document.getElementById('passwordModal').classList.remove('show');\n                document.getElementById('studentPanel').classList.remove('active');\n                document.getElementById('teacherPanel').classList.add('active');\n                loadDataFromServer();\n            } else {\n                document.getElementById('passwordError').classList.add('show');\n            }\n        });\n        \n        document.getElementById('modalCancelBtn').addEventListener('click', () => {\n            document.getElementById('passwordModal').classList.remove('show');\n            document.querySelector('.role-tab[data-role=\"student\"]').click();\n        });\n        \n        document.getElementById('refreshTeacherBtn').addEventListener('click', loadDataFromServer);\n\n        \/\/ \u53d1\u5e03\u4f5c\u4e1a\n        document.getElementById('newAssignmentBtn').addEventListener('click', () => {\n            tempChecklistItems = [];\n            document.getElementById('checklistEditorItems').innerHTML = '';\n            document.getElementById('newAssignmentModal').classList.add('show');\n        });\n        \n        document.getElementById('newAssignmentCancel').addEventListener('click', () => {\n            document.getElementById('newAssignmentModal').classList.remove('show');\n        });\n        \n        document.getElementById('addChecklistItemBtn').addEventListener('click', () => {\n            const val = document.getElementById('newChecklistItemInput').value.trim();\n            if(val) {\n                tempChecklistItems.push({ id: 'c_' + Date.now(), label: val });\n                document.getElementById('checklistEditorItems').innerHTML += `<div style=\"font-size:14px;padding:4px 0;\">\u2705 ${val}<\/div>`;\n                document.getElementById('newChecklistItemInput').value = '';\n            }\n        });\n        \n        document.getElementById('newAssignmentConfirm').addEventListener('click', () => {\n            const title = document.getElementById('newTitleInput').value.trim();\n            if (!title) return;\n            assignments.push({\n                id: nextId++,\n                title: title,\n                desc: document.getElementById('newDescInput').value,\n                type: document.getElementById('newTypeInput').value,\n                status: 'open',\n                createdAt: new Date().toISOString().slice(0, 10),\n                subject: document.getElementById('newSubjectInput').value,\n                checklist: tempChecklistItems\n            });\n            saveDataToServer('\u65b0\u4f5c\u4e1a\u5df2\u53d1\u5e03');\n            document.getElementById('newAssignmentModal').classList.remove('show');\n            renderTeacher();\n        });\n\n        \/\/ \u4e0a\u4f20\u6587\u4ef6\u4e8b\u4ef6\u7ed1\u5b9a\n        const studentFileInput = document.getElementById('studentFileInput');\n        document.getElementById('studentUploadArea').addEventListener('click', () => {\n            if (!currentStuId) { showToast('\u8bf7\u5148\u7ed1\u5b9a\u8eab\u4efd', 'fa-exclamation', '#f59e0b'); return; }\n            if (assignments.length) { studentFileInput.dataset.targetId = assignments[0].id; studentFileInput.click(); }\n        });\n        \n        studentFileInput.addEventListener('change', function() {\n            handleStudentUpload(this.files, parseInt(this.dataset.targetId));\n        });\n\n        document.getElementById('closeSubmissionModal').addEventListener('click', () => {\n            document.getElementById('submissionModal').classList.remove('show');\n        });\n    }\n\n    if (document.readyState === 'loading') document.addEventListener('DOMContentLoaded', init); else init();\n})();\n<\/script>\n<\/body>\n<\/html>\n\n\n\n<p class=\"wp-block-paragraph\"><\/p>\n","protected":false},"excerpt":{"rendered":"<p>\u71d5\u6e56 YW \u6691\u5047\u4f5c\u4e1a\u6253\u5361\u7cfb\u7edf \u71d5\u6e56 YW [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":809,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"site-sidebar-layout":"default","site-content-layout":"","ast-site-content-layout":"default","site-content-style":"default","site-sidebar-style":"default","ast-global-header-display":"","ast-banner-title-visibility":"","ast-main-header-display":"","ast-hfb-above-header-display":"","ast-hfb-below-header-display":"","ast-hfb-mobile-header-display":"","site-post-title":"","ast-breadcrumbs-content":"","ast-featured-img":"","footer-sml-layout":"","ast-disable-related-posts":"","theme-transparent-header-meta":"","adv-header-id-meta":"","stick-header-meta":"","header-above-stick-meta":"","header-main-stick-meta":"","header-below-stick-meta":"","astra-migrate-meta-layouts":"default","ast-page-background-enabled":"default","ast-page-background-meta":{"desktop":{"background-color":"var(--ast-global-color-5)","background-image":"","background-repeat":"repeat","background-position":"center center","background-size":"auto","background-attachment":"scroll","background-type":"","background-media":"","overlay-type":"","overlay-color":"","overlay-opacity":"","overlay-gradient":""},"tablet":{"background-color":"","background-image":"","background-repeat":"repeat","background-position":"center center","background-size":"auto","background-attachment":"scroll","background-type":"","background-media":"","overlay-type":"","overlay-color":"","overlay-opacity":"","overlay-gradient":""},"mobile":{"background-color":"","background-image":"","background-repeat":"repeat","background-position":"center center","background-size":"auto","background-attachment":"scroll","background-type":"","background-media":"","overlay-type":"","overlay-color":"","overlay-opacity":"","overlay-gradient":""}},"ast-content-background-meta":{"desktop":{"background-color":"var(--ast-global-color-4)","background-image":"","background-repeat":"repeat","background-position":"center center","background-size":"auto","background-attachment":"scroll","background-type":"","background-media":"","overlay-type":"","overlay-color":"","overlay-opacity":"","overlay-gradient":""},"tablet":{"background-color":"var(--ast-global-color-4)","background-image":"","background-repeat":"repeat","background-position":"center center","background-size":"auto","background-attachment":"scroll","background-type":"","background-media":"","overlay-type":"","overlay-color":"","overlay-opacity":"","overlay-gradient":""},"mobile":{"background-color":"var(--ast-global-color-4)","background-image":"","background-repeat":"repeat","background-position":"center center","background-size":"auto","background-attachment":"scroll","background-type":"","background-media":"","overlay-type":"","overlay-color":"","overlay-opacity":"","overlay-gradient":""}},"footnotes":""},"categories":[12],"tags":[],"class_list":["post-800","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-ai"],"_links":{"self":[{"href":"https:\/\/www.yanhuyw.com\/index.php\/wp-json\/wp\/v2\/posts\/800","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.yanhuyw.com\/index.php\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.yanhuyw.com\/index.php\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.yanhuyw.com\/index.php\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.yanhuyw.com\/index.php\/wp-json\/wp\/v2\/comments?post=800"}],"version-history":[{"count":5,"href":"https:\/\/www.yanhuyw.com\/index.php\/wp-json\/wp\/v2\/posts\/800\/revisions"}],"predecessor-version":[{"id":816,"href":"https:\/\/www.yanhuyw.com\/index.php\/wp-json\/wp\/v2\/posts\/800\/revisions\/816"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/www.yanhuyw.com\/index.php\/wp-json\/wp\/v2\/media\/809"}],"wp:attachment":[{"href":"https:\/\/www.yanhuyw.com\/index.php\/wp-json\/wp\/v2\/media?parent=800"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.yanhuyw.com\/index.php\/wp-json\/wp\/v2\/categories?post=800"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.yanhuyw.com\/index.php\/wp-json\/wp\/v2\/tags?post=800"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}