CodeBuddy IDE實戰:用AI全棧能力快速搭建課程表網頁

聲明:本文僅是實踐測評,并非廣告

1.前言

在數字化開發的浪潮中,工具的革新往往是效率躍遷的起點。騰訊云 CodeBuddy IDE 是 “全球首個產設研一體 AI 全棧開發平臺” ,它不僅打破了產品、設計與研發的職能壁壘,更重新定義了 “從想法到落地” 的開發節奏 —— 無需繁瑣的工具切換,無需復雜的技術儲備,僅通過自然語言交互與 AI 協同,就能讓創意快速轉化為可落地的產品。而我有幸成為產品的內測體驗者,我將從介紹codebuddy核心優勢到利用產品打造一個網頁深度體驗測評 CodeBuddy IDE。

2.codebuddy核心優勢

CodeBuddy 的核心競爭力,在于它以 AI 為紐帶,重構了 “產品 - 設計 - 研發” 的全流程,將傳統開發中的 “割裂環節” 轉化為 “協同閉環”。其優勢可概括為以下五點:

2.1. 產設研一體化,打破工具壁壘

傳統開發中,產品經理用文檔描述需求、設計師用 Figma 繪制原型、開發者用 IDE 編寫代碼,三者之間的信息傳遞常因工具差異出現偏差。而 CodeBuddy內置 Figma 通過 “自然語言轉 PRD - 設計稿轉代碼 - 代碼實時預覽” 的全鏈路打通,讓需求從抽象想法到具體落地無需切換工具。
在這里插入圖片描述
功能鍵從左到右依次是Select from Figma 、Select Component 、lmages 、Preview 以及Deploy。

2.2. AI 全流程驅動,降低技術門檻

CodeBuddy 內置 Claude 3.7、GPT-4、Gemini 2.5 Pro 等頂級大模型,將 “技術實現” 轉化為 “自然語言對話”。支持文本、圖片上傳,AI 能自動生成結構化代碼,并兼容主流技術規范。在這里插入圖片描述

2.3. 組件化與實時優化,提升開發效率

依托內置的 TDesign、MUI 等組件庫,CodeBuddy 能快速拼裝符合設計規范的界面,避免重復開發。

2.4. 一鍵部署與全鏈路協作,縮短落地周期

傳統開發中,“部署上線” 是新手的痛點 —— 需配置服務器、調試環境、處理權限問題。而 CodeBuddy 通過內置 BaaS 服務與一鍵部署功能,將這一過程簡化為 “點擊按鈕”,無需手動配置數據庫或服務器,AI 自動處理部署流程并生成可訪問鏈接。此外,支持實時預覽。

2.5 Config MCP:打通內外壁壘

對接管理團隊級資源協作平臺(MCP),打通外部資源與 CodeBuddy 的連接。適配企業協作場景,打破工具與私有資源隔離,助力融入團隊研發體系,保障資源合規高效流轉。在這里插入圖片描述

3.項目實戰:課程表網頁制作

3.1需求分析

課程表核心用戶為學生和老師,需滿足日常查閱、動態管理、輔助規劃及便捷分享需求。基礎功能要完整展示課程信息、提供多維度查看及管理操作;體驗上需視覺區分、簡化交互并智能提醒;還可支持個性化定制、數據統計與跨平臺分享。
項目整體架構
在這里插入圖片描述

3.2網頁制作

上傳圖片,這個圖片是一張大學課程表信息,有上課節次和每節課上課時間在這里插入圖片描述
把課程表制作需求告訴我們的codebuddy

When supplementing features for a class schedule app, it is essential to consider the daily usage scenarios of users (students, teachers, etc.) while balancing practicality, convenience, and personalized needs. Here is a detailed feature supplement plan:### I. Core Course Management Features
1. **Multi-dimensional course information entry**  - Basic information: Course name, instructor, class time (down to specific periods, supporting patterns like single/double weeks or alternate weeks), class location (classroom/online meeting link), credits, and course nature (compulsory/elective/general education).  - Extended information: Course description, assessment method (exam/assessment), homework submission deadline, and a quick entry for class notes (which can be linked to documents or images).  2. **Intelligent scheduling conflict detection**  - Automatically identifies time and location conflicts (e.g., two classes scheduled at the same time), highlights them, and supports manual adjustment or recommends alternative solutions (such as changing classes or applying for online attendance).  ### II. Reminder and Notification Features
1. **Personalized reminder settings**  - Class reminders: Customizable advance time (e.g., 10 minutes, 30 minutes), supporting ringtones, vibrations, pop-ups, or push notifications in the phone's notification bar.  - Special reminders: Exam countdowns, homework deadline alerts, and notifications for temporary class adjustments/cancellations by teachers (which need to be synchronously updated on the teacher's side).  2. **Linked calendar synchronization**  - Supports syncing the class schedule to the phone's system calendar (e.g., iOS Calendar, Huawei Calendar) and third-party tools (e.g., Google Calendar) for cross-platform reminder viewing.  ### III. Personalization and Visualization Features
1. **Customizable interface style**  - Theme switching: Offers preset themes such as minimalist white, eye-protecting green, and dark mode, with support for uploading images as backgrounds.  - Course card design: Allows setting colors based on course nature (e.g., red for compulsory courses, blue for electives) for quick differentiation.  2. **Multi-view display**  - Daily view: Displays courses on a timeline for the day, clearly showing the interval between each class.  - Weekly view: A traditional table format that intuitively presents the weekly course distribution, supporting left-right swiping to switch weeks.  - Monthly view: Marks important nodes such as exams and deadlines, suitable for long-term planning.  ### IV. Social and Interactive Features
1. **Class schedule sharing with classmates**  - Supports sharing personal class schedules with friends (with the option to hide private information like instructor contact details), facilitating group attendance, seat reservation, or post-class discussions.  - Automatically identifies classmates taking the same course, generates a "classmates list," and supports initiating chats or creating course group chats.  2. **Teacher-side linkage**  - Teachers can發布 course notifications (e.g., homework assignments, courseware updates), which students receive in real-time; students can ask questions online, and teachers' replies are synchronized to the course discussion area.  ### V. Tool and Auxiliary Features
1. **Learning auxiliary tools**  - Class countdown: Displays the remaining time during class to avoid missing the end of class or being late.  - Location navigation: Links to map apps (e.g., Gaode, Baidu Maps), allowing direct navigation to the classroom by clicking on the classroom name, which is helpful for new students.  - Homework and note management: Built-in simple to-do lists for recording homework, with links to course notes (supporting mixed text, voice, and image recording).  2. **Data statistics and analysis**  - Course density analysis: Generates a weekly course distribution heat map to intuitively show busy periods.  - Study duration statistics: Calculates the total weekly class hours by course type to assist in time management.  ### VI. Practical Extended Features
1. **Offline mode**  - Supports local caching of the class schedule, enabling access to basic information without an internet connection, with automatic synchronization when online.  2. **Semester switching and archiving**  - Automatically distinguishes class schedules for different semesters, and historical semester courses can be archived for easy review (e.g., checking courses corresponding to previous semester grades).  3. **Exam week mode**  - Automatically switches modes near exam weeks, hides non-exam courses, highlights exam subjects, times, and locations, and is paired with a "review countdown" tool.  

AI給我們制作了一個網頁設計架構圖
在這里插入圖片描述

我只進行了三輪對話,就搞定了一個課程表網頁雛形
在這里插入圖片描述

3.3功能展示

實際運行頁面還是比較精美的,大部分功能都有
在這里插入圖片描述

可以根據需要添加課程在這里插入圖片描述

新添加成功的課程
在這里插入圖片描述

鼠標懸停,顯示課程詳細信息
在這里插入圖片描述

切換周數
在這里插入圖片描述

3.4完善網頁

可以添加卻無法刪除課程,需要完善課程刪除功能
在這里插入圖片描述
這里我沒有進行任何別的操作,已經幫我在原代碼中添加了“刪除課程”的功能,并在左邊把修改后的代碼呈現出來
在這里插入圖片描述
點擊課程,看見多了刪除和編輯的功能。在原命令中只要求了刪除功能,但是它很周全的考慮到了,課程可能還需要編輯功能在這里插入圖片描述
選擇刪除,成功完成
在這里插入圖片描述

編輯課程信息
在這里插入圖片描述在這里插入圖片描述

最終完整代碼

<!DOCTYPE html>
<html lang="zh-CN">
<head><meta charset="UTF-8"><meta name="viewport" content="width=device-width, initial-scale=1.0"><title>課程表管理系統</title><style>* {margin: 0;padding: 0;box-sizing: border-box;}body {font-family: 'Microsoft YaHei', Arial, sans-serif;background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);min-height: 100vh;padding: 20px;}.container {max-width: 1200px;margin: 0 auto;background: white;border-radius: 15px;box-shadow: 0 20px 40px rgba(0,0,0,0.1);overflow: hidden;}.header {background: linear-gradient(45deg, #2196F3, #21CBF3);color: white;padding: 20px;text-align: center;}.header h1 {font-size: 2.5em;margin-bottom: 10px;}.controls {padding: 20px;background: #f8f9fa;border-bottom: 1px solid #dee2e6;}.week-nav {display: flex;justify-content: space-between;align-items: center;margin-bottom: 20px;}.week-nav button {background: #2196F3;color: white;border: none;padding: 10px 20px;border-radius: 25px;cursor: pointer;transition: all 0.3s;}.week-nav button:hover {background: #1976D2;transform: translateY(-2px);}.current-week {font-size: 1.2em;font-weight: bold;color: #2196F3;}.add-course-btn {background: #4CAF50;color: white;border: none;padding: 12px 24px;border-radius: 25px;cursor: pointer;font-size: 1em;transition: all 0.3s;}.add-course-btn:hover {background: #45a049;transform: translateY(-2px);}.schedule-grid {display: grid;grid-template-columns: 100px repeat(7, 1fr);gap: 1px;background: #dee2e6;margin: 20px;}.grid-header {background: #343a40;color: white;padding: 15px 10px;text-align: center;font-weight: bold;}.time-slot {background: #f8f9fa;padding: 10px;text-align: center;display: flex;flex-direction: column;justify-content: center;min-height: 80px;}.time-slot .period {font-weight: bold;color: #2196F3;}.time-slot .time {font-size: 0.8em;color: #6c757d;}.course-cell {background: white;min-height: 80px;position: relative;cursor: pointer;transition: all 0.3s;}.course-cell:hover {transform: scale(1.02);box-shadow: 0 5px 15px rgba(0,0,0,0.2);}.course-card {background: linear-gradient(45deg, #FF6B6B, #FF8E53);color: white;padding: 8px;margin: 2px;border-radius: 8px;height: calc(100% - 4px);display: flex;flex-direction: column;justify-content: center;text-align: center;box-shadow: 0 2px 8px rgba(0,0,0,0.2);}.course-card.compulsory {background: linear-gradient(45deg, #FF6B6B, #FF8E53);}.course-card.elective {background: linear-gradient(45deg, #4ECDC4, #44A08D);}.course-card.general {background: linear-gradient(45deg, #A8EDEA, #FED6E3);color: #333;}.course-name {font-weight: bold;font-size: 0.9em;margin-bottom: 4px;}.course-location {font-size: 0.7em;opacity: 0.9;}.modal {display: none;position: fixed;z-index: 1000;left: 0;top: 0;width: 100%;height: 100%;background-color: rgba(0,0,0,0.5);}.modal-content {background-color: white;margin: 5% auto;padding: 30px;border-radius: 15px;width: 90%;max-width: 500px;box-shadow: 0 20px 40px rgba(0,0,0,0.3);}.modal h2 {color: #2196F3;margin-bottom: 20px;text-align: center;}.form-group {margin-bottom: 15px;}.form-group label {display: block;margin-bottom: 5px;font-weight: bold;color: #333;}.form-group input, .form-group select, .form-group textarea {width: 100%;padding: 10px;border: 2px solid #ddd;border-radius: 8px;font-size: 1em;transition: border-color 0.3s;}.form-group input:focus, .form-group select:focus, .form-group textarea:focus {outline: none;border-color: #2196F3;}.form-buttons {display: flex;gap: 10px;justify-content: flex-end;margin-top: 20px;}.btn {padding: 10px 20px;border: none;border-radius: 8px;cursor: pointer;font-size: 1em;transition: all 0.3s;}.btn-primary {background: #2196F3;color: white;}.btn-primary:hover {background: #1976D2;}.btn-secondary {background: #6c757d;color: white;}.btn-secondary:hover {background: #5a6268;}.btn-danger {background: #dc3545;color: white;}.btn-danger:hover {background: #c82333;}.conflict-warning {background: #fff3cd;border: 1px solid #ffeaa7;color: #856404;padding: 10px;border-radius: 8px;margin: 10px 0;}.stats-panel {display: grid;grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));gap: 20px;padding: 20px;background: #f8f9fa;}.stat-card {background: white;padding: 20px;border-radius: 10px;text-align: center;box-shadow: 0 5px 15px rgba(0,0,0,0.1);}.stat-number {font-size: 2em;font-weight: bold;color: #2196F3;}.stat-label {color: #6c757d;margin-top: 5px;}@media (max-width: 768px) {.schedule-grid {font-size: 0.8em;margin: 10px;}.modal-content {margin: 10% auto;width: 95%;}}</style>
</head>
<body><div class="container"><div class="header"><h1>📚 智能課程表管理系統</h1><p>讓學習更有序,讓時間更高效</p></div><div class="controls"><div class="week-nav"><button onclick="changeWeek(-1)">← 上周</button><div class="current-week">第 <span id="currentWeek">1</span> 周</div><button onclick="changeWeek(1)">下周 →</button></div><button class="add-course-btn" onclick="openAddCourseModal()">+ 添加課程</button></div><div class="schedule-grid" id="scheduleGrid"><!-- Grid will be generated by JavaScript --></div><div class="stats-panel"><div class="stat-card"><div class="stat-number" id="totalCourses">0</div><div class="stat-label">總課程數</div></div><div class="stat-card"><div class="stat-number" id="weeklyHours">0</div><div class="stat-label">周課時</div></div><div class="stat-card"><div class="stat-number" id="compulsoryCourses">0</div><div class="stat-label">必修課程</div></div><div class="stat-card"><div class="stat-number" id="electiveCourses">0</div><div class="stat-label">選修課程</div></div></div></div><!-- Add Course Modal --><div id="addCourseModal" class="modal"><div class="modal-content"><h2>添加新課程</h2><form id="courseForm"><div class="form-group"><label for="courseName">課程名稱</label><input type="text" id="courseName" required></div><div class="form-group"><label for="instructor">授課教師</label><input type="text" id="instructor" required></div><div class="form-group"><label for="location">上課地點</label><input type="text" id="location" required></div><div class="form-group"><label for="courseType">課程性質</label><select id="courseType" required><option value="compulsory">必修課</option><option value="elective">選修課</option><option value="general">通識課</option></select></div><div class="form-group"><label for="dayOfWeek">星期</label><select id="dayOfWeek" required><option value="1">周一</option><option value="2">周二</option><option value="3">周三</option><option value="4">周四</option><option value="5">周五</option><option value="6">周六</option><option value="7">周日</option></select></div><div class="form-group"><label for="startPeriod">開始節次</label><select id="startPeriod" required><option value="1">第1節 (8:00-8:45)</option><option value="2">第2節 (8:50-9:35)</option><option value="3">第3節 (9:50-10:35)</option><option value="4">第4節 (10:45-11:30)</option><option value="5">第5節 (11:35-12:20)</option><option value="6">第6節 (14:00-14:45)</option><option value="7">第7節 (14:50-15:35)</option><option value="8">第8節 (15:55-16:40)</option><option value="9">第9節 (16:45-17:30)</option><option value="10">第10節 (18:30-19:15)</option><option value="11">第11節 (19:20-20:05)</option><option value="12">第12節 (20:10-20:55)</option></select></div><div class="form-group"><label for="endPeriod">結束節次</label><select id="endPeriod" required><option value="1">第1節</option><option value="2">第2節</option><option value="3">第3節</option><option value="4">第4節</option><option value="5">第5節</option><option value="6">第6節</option><option value="7">第7節</option><option value="8">第8節</option><option value="9">第9節</option><option value="10">第10節</option><option value="11">第11節</option><option value="12">第12節</option></select></div><div id="conflictWarning" class="conflict-warning" style="display: none;">?? 檢測到時間沖突!請選擇其他時間段。</div><div class="form-buttons"><button type="button" class="btn btn-secondary" onclick="closeAddCourseModal()">取消</button><button type="submit" class="btn btn-primary">添加課程</button></div></form></div></div><!-- Course Details Modal --><div id="courseDetailsModal" class="modal"><div class="modal-content"><h2>課程詳情</h2><div id="courseDetailsContent"><!-- Course details will be populated here --></div><div class="form-buttons"><button type="button" class="btn btn-secondary" onclick="closeCourseDetailsModal()">關閉</button><button type="button" class="btn btn-primary" id="editCourseBtn">編輯</button><button type="button" class="btn btn-danger" id="deleteCourseBtn">刪除</button></div></div></div><!-- Edit Course Modal --><div id="editCourseModal" class="modal"><div class="modal-content"><h2>編輯課程</h2><form id="editCourseForm"><input type="hidden" id="editCourseId"><div class="form-group"><label for="editCourseName">課程名稱</label><input type="text" id="editCourseName" required></div><div class="form-group"><label for="editInstructor">授課教師</label><input type="text" id="editInstructor" required></div><div class="form-group"><label for="editLocation">上課地點</label><input type="text" id="editLocation" required></div><div class="form-group"><label for="editCourseType">課程性質</label><select id="editCourseType" required><option value="compulsory">必修課</option><option value="elective">選修課</option><option value="general">通識課</option></select></div><div class="form-group"><label for="editDayOfWeek">星期</label><select id="editDayOfWeek" required><option value="1">周一</option><option value="2">周二</option><option value="3">周三</option><option value="4">周四</option><option value="5">周五</option><option value="6">周六</option><option value="7">周日</option></select></div><div class="form-group"><label for="editStartPeriod">開始節次</label><select id="editStartPeriod" required><option value="1">第1節 (8:00-8:45)</option><option value="2">第2節 (8:50-9:35)</option><option value="3">第3節 (9:50-10:35)</option><option value="4">第4節 (10:45-11:30)</option><option value="5">第5節 (11:35-12:20)</option><option value="6">第6節 (14:00-14:45)</option><option value="7">第7節 (14:50-15:35)</option><option value="8">第8節 (15:55-16:40)</option><option value="9">第9節 (16:45-17:30)</option><option value="10">第10節 (18:30-19:15)</option><option value="11">第11節 (19:20-20:05)</option><option value="12">第12節 (20:10-20:55)</option></select></div><div class="form-group"><label for="editEndPeriod">結束節次</label><select id="editEndPeriod" required><option value="1">第1節</option><option value="2">第2節</option><option value="3">第3節</option><option value="4">第4節</option><option value="5">第5節</option><option value="6">第6節</option><option value="7">第7節</option><option value="8">第8節</option><option value="9">第9節</option><option value="10">第10節</option><option value="11">第11節</option><option value="12">第12節</option></select></div><div id="editConflictWarning" class="conflict-warning" style="display: none;">?? 檢測到時間沖突!請選擇其他時間段。</div><div class="form-buttons"><button type="button" class="btn btn-secondary" onclick="closeEditCourseModal()">取消</button><button type="submit" class="btn btn-primary">保存修改</button></div></form></div></div><script>// Time slots configurationconst TIME_SLOTS = [{period: 1, startTime: "8:00", endTime: "8:45", session: "上午"},{period: 2, startTime: "8:50", endTime: "9:35", session: "上午"},{period: 3, startTime: "9:50", endTime: "10:35", session: "上午"},{period: 4, startTime: "10:45", endTime: "11:30", session: "上午"},{period: 5, startTime: "11:35", endTime: "12:20", session: "上午"},{period: 6, startTime: "14:00", endTime: "14:45", session: "下午"},{period: 7, startTime: "14:50", endTime: "15:35", session: "下午"},{period: 8, startTime: "15:55", endTime: "16:40", session: "下午"},{period: 9, startTime: "16:45", endTime: "17:30", session: "下午"},{period: 10, startTime: "18:30", endTime: "19:15", session: "晚上"},{period: 11, startTime: "19:20", endTime: "20:05", session: "晚上"},{period: 12, startTime: "20:10", endTime: "20:55", session: "晚上"}];// Global variableslet currentWeek = 1;let courses = [];// Sample dataconst sampleCourses = [{id: 1,name: "高等數學",instructor: "張教授",location: "A101",courseType: "compulsory",dayOfWeek: 1,startPeriod: 1,endPeriod: 2},{id: 2,name: "Python編程",instructor: "李老師",location: "B205",courseType: "elective",dayOfWeek: 3,startPeriod: 3,endPeriod: 4},{id: 3,name: "大學英語",instructor: "王老師",location: "C301",courseType: "compulsory",dayOfWeek: 2,startPeriod: 6,endPeriod: 7},{id: 4,name: "體育",instructor: "劉教練",location: "體育館",courseType: "general",dayOfWeek: 5,startPeriod: 8,endPeriod: 9}];// Initializedocument.addEventListener('DOMContentLoaded', function() {courses = [...sampleCourses];generateScheduleGrid();updateStats();});function generateScheduleGrid() {const grid = document.getElementById('scheduleGrid');grid.innerHTML = '';// Header rowconst headers = ['時間', '周一', '周二', '周三', '周四', '周五', '周六', '周日'];headers.forEach(header => {const headerCell = document.createElement('div');headerCell.className = 'grid-header';headerCell.textContent = header;grid.appendChild(headerCell);});// Time slots and coursesTIME_SLOTS.forEach(timeSlot => {// Time columnconst timeCell = document.createElement('div');timeCell.className = 'time-slot';timeCell.innerHTML = `<div class="period">${timeSlot.period}</div><div class="time">${timeSlot.startTime}-${timeSlot.endTime}</div>`;grid.appendChild(timeCell);// Course cells for each dayfor (let day = 1; day <= 7; day++) {const courseCell = document.createElement('div');courseCell.className = 'course-cell';const course = findCourseForSlot(day, timeSlot.period);if (course) {courseCell.innerHTML = `<div class="course-card ${course.courseType}"><div class="course-name">${course.name}</div><div class="course-location">${course.location}</div></div>`;courseCell.onclick = () => showCourseDetails(course);}grid.appendChild(courseCell);}});}function findCourseForSlot(day, period) {return courses.find(course => course.dayOfWeek === day && period >= course.startPeriod && period <= course.endPeriod);}function changeWeek(direction) {currentWeek += direction;if (currentWeek < 1) currentWeek = 1;if (currentWeek > 20) currentWeek = 20;document.getElementById('currentWeek').textContent = currentWeek;generateScheduleGrid();}function openAddCourseModal() {document.getElementById('addCourseModal').style.display = 'block';}function closeAddCourseModal() {document.getElementById('addCourseModal').style.display = 'none';document.getElementById('courseForm').reset();document.getElementById('conflictWarning').style.display = 'none';}function checkConflicts(dayOfWeek, startPeriod, endPeriod) {return courses.some(course => course.dayOfWeek === parseInt(dayOfWeek) &&!(endPeriod < course.startPeriod || startPeriod > course.endPeriod));}document.getElementById('courseForm').addEventListener('submit', function(e) {e.preventDefault();const formData = new FormData(e.target);const courseData = {id: Date.now(),name: formData.get('courseName') || document.getElementById('courseName').value,instructor: formData.get('instructor') || document.getElementById('instructor').value,location: formData.get('location') || document.getElementById('location').value,courseType: formData.get('courseType') || document.getElementById('courseType').value,dayOfWeek: parseInt(formData.get('dayOfWeek') || document.getElementById('dayOfWeek').value),startPeriod: parseInt(formData.get('startPeriod') || document.getElementById('startPeriod').value),endPeriod: parseInt(formData.get('endPeriod') || document.getElementById('endPeriod').value)};// Check conflictsif (checkConflicts(courseData.dayOfWeek, courseData.startPeriod, courseData.endPeriod)) {document.getElementById('conflictWarning').style.display = 'block';return;}courses.push(courseData);generateScheduleGrid();updateStats();closeAddCourseModal();// Show success messagealert('課程添加成功!');});function showCourseDetails(course) {const timeSlot = TIME_SLOTS.find(slot => slot.period === course.startPeriod);const endTimeSlot = TIME_SLOTS.find(slot => slot.period === course.endPeriod);// Populate course details in the modalconst courseTypeText = course.courseType === 'compulsory' ? '必修' : course.courseType === 'elective' ? '選修' : '通識';document.getElementById('courseDetailsContent').innerHTML = `<div class="form-group"><label>課程名稱</label><div>${course.name}</div></div><div class="form-group"><label>授課教師</label><div>${course.instructor}</div></div><div class="form-group"><label>上課地點</label><div>${course.location}</div></div><div class="form-group"><label>上課時間</label><div>星期${['一', '二', '三', '四', '五', '六', '日'][course.dayOfWeek - 1]} ${timeSlot.startTime}-${endTimeSlot.endTime}</div></div><div class="form-group"><label>課程性質</label><div>${courseTypeText}</div></div>`;// Set up delete button actiondocument.getElementById('deleteCourseBtn').onclick = () => deleteCourse(course.id);// Set up edit button actiondocument.getElementById('editCourseBtn').onclick = () => openEditCourseModal(course);// Show the modaldocument.getElementById('courseDetailsModal').style.display = 'block';}function closeCourseDetailsModal() {document.getElementById('courseDetailsModal').style.display = 'none';}function deleteCourse(courseId) {// Ask for confirmationif (confirm('確定要刪除這門課程嗎?')) {// Remove the course from the arraycourses = courses.filter(course => course.id !== courseId);// Update the UIgenerateScheduleGrid();updateStats();// Close the modalcloseCourseDetailsModal();// Show success messagealert('課程已成功刪除!');}}function updateStats() {const totalCourses = courses.length;const compulsory = courses.filter(c => c.courseType === 'compulsory').length;const elective = courses.filter(c => c.courseType === 'elective').length;const weeklyHours = courses.reduce((total, course) => {return total + (course.endPeriod - course.startPeriod + 1);}, 0);document.getElementById('totalCourses').textContent = totalCourses;document.getElementById('compulsoryCourses').textContent = compulsory;document.getElementById('electiveCourses').textContent = elective;document.getElementById('weeklyHours').textContent = weeklyHours;}function openEditCourseModal(course) {// Populate form with course datadocument.getElementById('editCourseId').value = course.id;document.getElementById('editCourseName').value = course.name;document.getElementById('editInstructor').value = course.instructor;document.getElementById('editLocation').value = course.location;document.getElementById('editCourseType').value = course.courseType;document.getElementById('editDayOfWeek').value = course.dayOfWeek;document.getElementById('editStartPeriod').value = course.startPeriod;document.getElementById('editEndPeriod').value = course.endPeriod;// Close the details modalcloseCourseDetailsModal();// Show the edit modaldocument.getElementById('editCourseModal').style.display = 'block';}function closeEditCourseModal() {document.getElementById('editCourseModal').style.display = 'none';document.getElementById('editConflictWarning').style.display = 'none';}// Handle edit course form submissiondocument.getElementById('editCourseForm').addEventListener('submit', function(e) {e.preventDefault();const courseId = parseInt(document.getElementById('editCourseId').value);const dayOfWeek = parseInt(document.getElementById('editDayOfWeek').value);const startPeriod = parseInt(document.getElementById('editStartPeriod').value);const endPeriod = parseInt(document.getElementById('editEndPeriod').value);// Check for conflicts with other courses (excluding the current course being edited)const hasConflict = courses.some(course => course.id !== courseId &&course.dayOfWeek === dayOfWeek &&!(endPeriod < course.startPeriod || startPeriod > course.endPeriod));if (hasConflict) {document.getElementById('editConflictWarning').style.display = 'block';return;}// Find the course in the arrayconst courseIndex = courses.findIndex(course => course.id === courseId);if (courseIndex !== -1) {// Update the course datacourses[courseIndex] = {id: courseId,name: document.getElementById('editCourseName').value,instructor: document.getElementById('editInstructor').value,location: document.getElementById('editLocation').value,courseType: document.getElementById('editCourseType').value,dayOfWeek: dayOfWeek,startPeriod: startPeriod,endPeriod: endPeriod};// Update the UIgenerateScheduleGrid();updateStats();closeEditCourseModal();// Show success messagealert('課程已成功更新!');}});// Close modals when clicking outsidewindow.onclick = function(event) {const addCourseModal = document.getElementById('addCourseModal');const courseDetailsModal = document.getElementById('courseDetailsModal');const editCourseModal = document.getElementById('editCourseModal');if (event.target === addCourseModal) {closeAddCourseModal();}if (event.target === courseDetailsModal) {closeCourseDetailsModal();}if (event.target === editCourseModal) {closeEditCourseModal();}}// Auto-update end period when start period changesdocument.getElementById('startPeriod').addEventListener('change', function() {const startPeriod = parseInt(this.value);const endPeriodSelect = document.getElementById('endPeriod');endPeriodSelect.value = startPeriod;});// Auto-update end period when edit start period changesdocument.getElementById('editStartPeriod').addEventListener('change', function() {const startPeriod = parseInt(this.value);const endPeriodSelect = document.getElementById('editEndPeriod');endPeriodSelect.value = startPeriod;});</script>
</body>
</html>                                     

原本是本地文件,想要被他人訪問一般需要托管到平臺上,對于小白來說操作十分繁瑣

在這里插入圖片描述

但是codebuddy給我們提供了一鍵部署deploy功能,還能自動糾錯,全自動化實現非常方便。

在這里插入圖片描述
在這里插入圖片描述

塔直接給出的部署成功的網址,點擊即可一鍵訪問https://d67b41b056d548119d5747bf811d12bf.ap-singapore.cloudstudio.run/
在這里插入圖片描述

順利打開,課程表就已經部署好了。
在這里插入圖片描述

3.5組件優化

codebuddy給我們提供組件庫選擇與調用能力,助力開發者快速搭建界面。有TDesign Components、MUI Components、Shadcn Components主流組件庫可以選擇,適配不同技術場景。將我們原本的課程表頁面代碼交給codebuddy。選擇騰訊開源的企業級設計體系TDesign,其與 CodeBuddy 協同工作、深度融合,復用成熟組件庫,減少重復開發。
在這里插入圖片描述
codebuddy對原本代碼界面進行了分析、設計和重新計劃可以說是非常細致。
在這里插入圖片描述
而在交互界面的左邊還有三個顯示頁面優化的md格式文檔、用組件優化后的代碼、還有預覽頁面。
在這里插入圖片描述
預覽效果,這里甚至已經給我部署好了這個網址可以直接訪問。
在這里插入圖片描述
復制網址在瀏覽器打開后的效果,確實更精美了。課程性質、課次選擇和星期選擇都是已下拉框形式呈現的,課程詳情界面也比以前精致不少。下方新增了可直接添加課程的模塊。
在這里插入圖片描述
在這里插入圖片描述

4.總結

從一張課程表圖片到一個可全網訪問、功能完整的網頁,CodeBuddy 用實際體驗證明:AI 驅動的開發工具,正在將 “專業門檻” 轉化為 “效率杠桿”。在傳統開發模式中,完成同樣的課程表網頁需要掌握 PRD 撰寫、UI 設計、前端編碼、部署運維等多重技能,耗時長;而借助 CodeBuddy僅需通過自然語言交互,就能從 “零技術基礎” 實現從需求到上線的全流程。 CodeBuddy 將 “產品、設計、研發” 的專業邏輯封裝為 AI 一體化能力帶來了實實在在的效率提升。

本文來自互聯網用戶投稿,該文觀點僅代表作者本人,不代表本站立場。本站僅提供信息存儲空間服務,不擁有所有權,不承擔相關法律責任。
如若轉載,請注明出處:http://www.pswp.cn/bicheng/90728.shtml
繁體地址,請注明出處:http://hk.pswp.cn/bicheng/90728.shtml
英文地址,請注明出處:http://en.pswp.cn/bicheng/90728.shtml

如若內容造成侵權/違法違規/事實不符,請聯系多彩編程網進行投訴反饋email:809451989@qq.com,一經查實,立即刪除!

相關文章

11. HTML 中 DOCTYPE 的作用

總結H5 的聲明HTML5 的 DOCTYPE 聲明 HTML5 中的 <!DOCTYPE html> 聲明用于告訴瀏覽器當前文檔使用的是 HTML5 的文檔類型。它必須是文檔中的第一行內容&#xff08;在任何 HTML 標簽之前&#xff09;&#xff0c;以確保瀏覽器能夠正確地解析和渲染頁面。DOCTYPE 的作用 …

Linux C 網絡基礎編程

基礎知識在進行網絡編程之前&#xff0c;我們需要簡單回顧一下計算機網絡五層模型的網絡層和傳輸層&#xff0c;這兩層在面向后端編程時用的最多。物理層和鏈路層過于底層&#xff0c;已經完全由內核協議棧實現&#xff0c;不再細述。這里假設讀者已經對計算機網絡有一個大致的…

循環神經網絡--NLP基礎

一、簡單介紹NLP&#xff08;Natural Language Processing&#xff09;&#xff1a;自然語言處理是人工智能和語言領域的一個分支&#xff0c;它涉及計算機和人類語言之間的相互作用。二、NLP基礎概念詞表&#xff08;詞庫&#xff09;&#xff1a;文本數據集出現的所有單詞的集…

【Android】約束布局總結(1)

三三要成為安卓糕手 零&#xff1a;創建布局文件方式 1&#xff1a;創建步驟ctrl alt 空格 設置根元素2&#xff1a;處理老版本約束布局 在一些老的工程中&#xff0c;constrainlayout可能沒有辦法被直接使用&#xff0c;這里需要手動添加依賴implementation androidx.const…

S7-200 SMART 數字量 I/O 組態指南:從參數設置到實戰案例

在工業自動化控制中&#xff0c;PLC 的數字量輸入&#xff08;DI&#xff09;和輸出&#xff08;DO&#xff09;是連接傳感器、執行器與控制系統的 “神經末梢”。西門子 S7-200 SMART 作為一款高性價比的小型 PLC&#xff0c;其數字量 I/O 的靈活組態直接影響系統的穩定性與響…

可調諧激光器原理與設計 【DFB 與 DBR 激光器剖析】

可調諧激光器原理與設計 【DFB 與 DBR 激光器剖析】1. 可調諧激光器的原理與分類簡介2. DFB 與 DBR 激光器結構原理比較2.1 DFB&#xff08;Distributed Feedback Laser&#xff09;激光器2.2 DBR&#xff08;Distributed Bragg Reflector&#xff09;激光器2.3 DFB 激光器與 D…

【前端工程化】前端項目開發過程中如何做好通知管理?

在企業級后臺系統中&#xff0c;通知是保障團隊協作、監控系統狀態和及時響應問題的重要手段。與 C 端產品不同&#xff0c;B 端更關注構建完成、部署狀態、異常報警等關鍵節點的推送機制。 本文主要圍繞通知場景、通知內容、通知渠道、自動化集成等方面展開&#xff0c;適用于…

MySQL 9.4.0創新版發布,AI開始輔助編寫發布說明

2025 年 7 月 22 日&#xff0c;MySQL 9.4.0 正式發布。 作為一個創新版&#xff0c;MySQL 9.4.0 最大的創新應該就是使用 Oracle HeatWave GenAI 作為助手幫助編寫版本發布說明了。難道下一步要開始用 AI 輔助編寫數據庫文檔了&#xff1f; 該版本包含的核心功能更新以及問題修…

基于WebSockets和OpenCV的安卓眼鏡視頻流GPU硬解碼實現

基于WebSockets和OpenCV的安卓眼鏡視頻流GPU硬解碼實現 前些天發現了一個巨牛的人工智能學習網站&#xff0c;通俗易懂&#xff0c;風趣幽默&#xff0c;忍不住分享一下給大家&#xff0c;覺得好請收藏。點擊跳轉到網站。 1. 項目概述 本項目旨在實現一個通過WebSockets接收…

人大金倉 kingbase 連接數太多, 清理數據庫連接數

問題描述 kingbase 連接數太多, 清理數據庫連接數 [rootFCVMDZSZNST25041 ~]# su root [rootFCVMDZSZNST25041 ~]# [rootFCVMDZSZNST25041 ~]# su kingbase [kingbaseFCVMDZSZNST25041 root]$ [kingbaseFCVMDZSZNST25041 root]$ ksql could not change directory to "/r…

SpringMVC相關基礎知識

1. servlet.multipart 大小配置 SpringBoot 文件上傳接口中有 MultipartFile 類型的文件參數,上傳較大文件時報錯: org.springframework.web.multipart.MaxUploadSizeExceededException: Maximum upload size exceeded; nested exception is java.lang.IllegalStateExceptio…

HCIP第一次實驗報告

一.實驗需求及拓撲圖&#xff1a;二.實驗需求分析根據提供的網絡拓撲圖和實驗要求&#xff0c;以下是對實驗需求的詳細分析&#xff1a;R5作為ISP:R5只能進行IP地址配置&#xff0c;其所有接口均配置為公有IP地址。認證方式:R1和R5之間使用PPP的PAP認證&#xff0c;R5為主認證方…

React入門學習——指北指南(第五節)

React 交互性:過濾與條件渲染 在前文我們學習了 React 中事件處理和狀態管理的基礎。本節將聚焦兩個重要的進階技巧 ——條件渲染(根據狀態動態顯示不同 UI)和列表過濾(根據條件篩選數據),這兩者是構建交互式應用的核心能力,能讓界面根據用戶操作呈現更智能的響應。 條…

學習嵌入式的第二十九天-數據結構-(2025.7.16)線程控制:互斥與同步

以下是您提供的文本內容的排版整理版本。我已根據內容主題將其分為幾個主要部分&#xff08;互斥鎖、信號量、死鎖、IPC進程間通信、管道操作&#xff09;&#xff0c;并使用清晰的結構組織信息&#xff1a;代碼片段用代碼塊格式&#xff08;指定語言為C&#xff09;突出顯示。…

COZE官方文檔基礎知識解讀第六期 ——數據庫和知識庫

一&#xff0c;一鍵直連數據上傳&#xff0c;存儲&#xff0c;使用 火山方舟的數據庫和知識庫的核心&#xff0c;都是基于開源的數據庫產品&#xff08;mysql&#xff0c;向量數據庫等&#xff09;&#xff0c;將數據庫交互的邏輯封裝在后端&#xff0c;與前端做耦合&#xff0…

生產環境使用云服務器(centOS)部署和使用MongoDB

部署MongoDB流程1. ?安裝MongoDB?版本選擇建議?CentOS 7?&#xff1a;推薦MongoDB 4.4.x&#xff08;兼容性好&#xff09;?CentOS 8/9?&#xff1a;建議最新穩定版&#xff08;如6.0&#xff09;&#xff0c;需單獨安裝mongodb-database-tools安裝步驟1.添加官方倉庫# 添…

思博倫第二到三層測試儀(打流儀)TestCenter 2U硬件安裝及機箱加電_雙極未來

&#xff08;1&#xff09;安裝板卡&#xff1a;上圖中共 4 個紅色線框&#xff0c;上邊兩個紅色線條框住的是機箱的左右兩側導軌&#xff0c;下邊兩條紅色 線條框住的是板卡拉手條&#xff08;用于承載板卡PCB的金屬板&#xff09;左右兩邊的邊沿。 安裝時將拉手條兩邊的邊沿與…

【華為】筆試真題訓練_20250611

本篇博客旨在記錄自已的筆試刷題的練習&#xff0c;里面注有詳細的代碼注釋以及和個人的思路想法&#xff0c;希望可以給同道之人些許幫助。本人也是小白&#xff0c;水平有限&#xff0c;如果文章中有什么錯誤或遺漏之處&#xff0c;望各位可以在評論區指正出來&#xff0c;各…

新浪微博APP v14.5.0:連接世界的社交媒體平臺

新浪微博APP 是一款廣受歡迎的社交媒體應用程序&#xff0c;憑借其強大的功能和豐富的社交生態&#xff0c;成為用戶獲取信息、表達觀點、互動交流的重要平臺。最新版 v14.5.0 內置了微博助手 v2.3.0&#xff0c;進一步提升了用戶體驗和功能多樣性。 軟件功能 1. 發布微博 用…

靜態枚舉返回(簡單實現字典功能)

枚舉緩存策略的實現與應用 通過靜態Map緩存枚舉類的Class對象&#xff0c;避免每次請求時重復反射加載。核心實現是一個包含枚舉類名與對應Class映射的Registry類&#xff1a; public class EnumRegistry {private static final Map<String, Class<?>> ENUM_MAP …