From 9327eb673a9dc48b49ee8d33a5ad5b5eb8bde7dc Mon Sep 17 00:00:00 2001 From: yangzhe Date: Tue, 28 Oct 2025 11:49:44 +0800 Subject: [PATCH] =?UTF-8?q?feat(=E5=92=A8=E8=AF=A2=E9=A1=B5=E9=9D=A2):=20?= =?UTF-8?q?=E6=B7=BB=E5=8A=A0=E5=92=A8=E8=AF=A2=E9=A1=B5=E9=9D=A2tab?= =?UTF-8?q?=E5=88=87=E6=8D=A2=E5=8A=9F=E8=83=BD=E5=B9=B6=E4=BC=98=E5=8C=96?= =?UTF-8?q?=E9=A6=96=E9=A1=B5=E5=B8=83=E5=B1=80?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- pages/home/admissions/index.vue | 97 +++++++++++++++++++++-- pages/home/index/index.vue | 90 ++++++++++----------- static/common/images/icon-more.png | Bin 0 -> 310 bytes static/common/images/icon-more1.png | Bin 0 -> 262 bytes static/common/images/icon_admissions.png | Bin 33682 -> 26972 bytes static/common/images/icon_phone.png | Bin 25147 -> 22189 bytes static/common/images/images_logo.png | Bin 8342 -> 22992 bytes 7 files changed, 134 insertions(+), 53 deletions(-) create mode 100644 static/common/images/icon-more.png create mode 100644 static/common/images/icon-more1.png diff --git a/pages/home/admissions/index.vue b/pages/home/admissions/index.vue index 1829c3c..080e8d8 100644 --- a/pages/home/admissions/index.vue +++ b/pages/home/admissions/index.vue @@ -8,16 +8,29 @@ @click="handleLeftClick" > - 招办在线 + 在线咨询
+ + + + {{ tab.name }} + + + + @@ -32,9 +45,9 @@ {{ teacher.department }} - {{ - teacher.online ? "立即提问" : "留言" - }} + + 立即提问 + @@ -58,6 +71,11 @@ export default { }, data() { return { + activeTab: "1", // 当前激活的tab + tabList: [ + { id: "1", name: "招生在线", key: "admissions" }, + { id: "2", name: "迎新在线", key: "welcome" }, + ], showLeaveMessage: false, teacherList: [ { @@ -89,10 +107,41 @@ export default { online: false, }, ], + welcomeList: [ + { + id: 5, + name: "李老师", + department: "学生处", + avatar: "/static/common/images/avatar.png", + online: true, + }, + { + id: 6, + name: "张老师", + department: "宿管中心", + avatar: "/static/common/images/student.png", + online: true, + }, + { + id: 7, + name: "迎新办陈老师", + department: "后勤服务中心", + avatar: "/static/common/images/student.png", + online: false, + }, + ], currentTeacher: null, }; }, + computed: { + currentList() { + return this.activeTab === "1" ? this.teacherList : this.welcomeList; + }, + }, methods: { + switchTab(tab) { + this.activeTab = tab; + }, handleLeftClick() { uni.navigateBack(); }, @@ -159,6 +208,44 @@ export default { } .admissions-content { + .custom-tab { + padding: 0 30rpx; + margin: 24rpx 0; + display: flex; + align-items: center; + + .tab-item { + position: relative; + padding: 12rpx 0; + margin-right: 60rpx; + cursor: pointer; + + .tab-text { + font-size: 32rpx; + font-weight: 500; + color: #505866; + letter-spacing: 0.04rpx; + } + + &.active .tab-text { + color: #4f6aff; + font-weight: 600; + } + + .tab-underline { + position: absolute; + bottom: 0; + left: 50%; + transform: translateX(-50%); + right: 0; + width: 80rpx; + height: 4rpx; + background-color: #4f6aff; + border-radius: 2rpx; + } + } + } + .teacher-list { .teacher-item { display: flex; diff --git a/pages/home/index/index.vue b/pages/home/index/index.vue index 8a15070..f76fdd6 100644 --- a/pages/home/index/index.vue +++ b/pages/home/index/index.vue @@ -19,7 +19,7 @@ > - - -