修改前端代码

This commit is contained in:
CGD 2025-03-05 18:05:42 +08:00
parent d181b837f4
commit 9699b3bf2f
4 changed files with 164 additions and 156 deletions

Binary file not shown.

Before

Width:  |  Height:  |  Size: 5.7 MiB

After

Width:  |  Height:  |  Size: 3.8 MiB

View file

@ -3,39 +3,39 @@
<el-container style="height: 100%;">
<el-header class="header">
<div style="display: flex;justify-content: space-between;">
<div style="display: flex;align-items: center;gap: 10px;">
<img src="@/assets/xiaozhi-logo.png" alt="" style="width: 56px;height: 56px;" />
<img src="@/assets/xiaozhi-ai.png" alt="" style="width: 78px;height: 16px;" />
<div style="display: flex;align-items: center;gap: 8px;">
<img src="@/assets/xiaozhi-logo.png" alt="" style="width: 45px;height: 45px;" />
<img src="@/assets/xiaozhi-ai.png" alt="" style="width: 70px;height: 13px;" />
<div class="equipment-management" @click="settingDevice=false">
<img src="@/assets/home/equipment.png" alt="" style="width: 16px;height: 14px;" />
<img src="@/assets/home/equipment.png" alt="" style="width: 12px;height: 11px;" />
设备管理
</div>
<div class="console">
<i class="el-icon-s-grid" style="font-size: 14px;color: #979db1;" />
<i class="el-icon-s-grid" style="font-size: 11px;color: #979db1;" />
控制台
</div>
<div class="equipment-management2">
设备管理
<img src="@/assets/home/close.png" alt="" style="width: 8px;height: 8px;" />
<img src="@/assets/home/close.png" alt="" style="width: 6px;height: 6px;" />
</div>
</div>
<div style="display: flex;align-items: center;gap: 10px;">
<div style="display: flex;align-items: center;gap: 8px;">
<div class="serach-box">
<el-input placeholder="输入名称搜索.." v-model="serach" />
<img src="@/assets/home/search.png" alt=""
style="width: 16px;height: 16px;margin-right: 15px;cursor: pointer;" />
style="width: 12px;height: 12px;margin-right: 11px;cursor: pointer;" />
</div>
<img src="@/assets/home/avatar.png" alt="" style="width: 28px;height: 28px;" />
<img src="@/assets/home/avatar.png" alt="" style="width: 21px;height: 21px;" />
<div class="user-info">
158 3632 4642</div>
</div>
</div>
</el-header>
<el-main style="padding: 20px;display: flex;flex-direction: column;">
<el-main style="padding: 15px;display: flex;flex-direction: column;">
<div v-show="!settingDevice">
<div class="add-device">
<div class="add-device-bg">
<div class="hellow-text" style="margin-top: 30px;">
<div class="hellow-text" style="margin-top: 23px;">
您好,小智</div>
<div class="hellow-text">让我们度过<div style="display: inline-block;color: #5778FF;">
美好的一天!
@ -47,37 +47,37 @@
<div class="left-add">
添加设备
</div>
<div style="width: 23px;height: 13px;background: #5778ff;margin-left: -10px;" />
<div style="width: 17px;height: 10px;background: #5778ff;margin-left: -8px;" />
<div class="right-add">
<i class="el-icon-right" style="font-size: 30px;color: #fff;" />
<i class="el-icon-right" style="font-size: 23px;color: #fff;" />
</div>
</div>
</div>
</div>
<div
style="display: flex;flex-wrap: wrap;margin-top: 20px;gap: 20px;justify-content: space-between;box-sizing: border-box;">
style="display: flex;flex-wrap: wrap;margin-top: 15px;gap: 15px;justify-content: space-between;box-sizing: border-box;">
<div class="device-item" v-for="(item,index) in 10" :key="index">
<div style="display: flex;justify-content: space-between;">
<div style="font-weight: 700;font-size: 24px;text-align: left;color: #3d4566;">
<div style="font-weight: 700;font-size: 18px;text-align: left;color: #3d4566;">
CC:ba:97:11:a6:ac
</div>
<div>
<img src="@/assets/home/delete.png" alt=""
style="width: 24px;height: 24px;margin-right: 10px;" />
<img src="@/assets/home/info.png" alt="" style="width: 24px;height: 24px;" />
style="width: 18px;height: 18px;margin-right: 8px;" />
<img src="@/assets/home/info.png" alt="" style="width: 18px;height: 18px;" />
</div>
</div>
<div class="device-name">
设备型号:esp32-s3-touch-amoled-1.8
</div>
<div style="display: flex;gap: 10px;align-items: center;">
<div style="display: flex;gap: 8px;align-items: center;">
<div class="settings-btn" @click="clickSettingDevice">
配置角色</div>
<div class="settings-btn">
声纹识别</div>
<div class="settings-btn">
历史对话</div>
<el-switch v-model="switchValue" inactive-text="OTA升级:" :width="42"
<el-switch v-model="switchValue" inactive-text="OTA升级:" :width="32"
style="margin-left: auto;" />
</div>
<div class="version-info">
@ -257,8 +257,8 @@ export default {
</script>
<style scoped lang="scss">
.welcome {
min-width: 1200px;
min-height: 675px;
min-width: 900px;
min-height: 506px;
height: 100vh;
background-image: url("@/assets/home/background.png");
background-size: cover;
@ -275,31 +275,30 @@ export default {
cursor: pointer;
}
.equipment-management {
width: 110px;
height: 32px;
border-radius: 16px;
width: 83px;
height: 24px;
border-radius: 12px;
background: #5778ff;
display: flex;
align-items: center;
justify-content: center;
gap: 10px;
gap: 8px;
font-weight: 500;
color: #fff;
font-size: 14px;
font-size: 11px;
}
.equipment-management2 {
width: 116px;
height: 30px;
border-radius: 15px;
width: 87px;
height: 23px;
border-radius: 11px;
background: #fff;
display: flex;
justify-content: center;
font-size: 12px;
color: #979db1;
font-size: 9px;
font-weight: 400;
gap: 10px;
gap: 8px;
color: #3d4566;
margin-left: 20px;
margin-left: 5px;
align-items: center;
}
.header {
@ -307,8 +306,8 @@ export default {
border: 1px solid #fff;
}
.add-device {
height: 260px;
border-radius: 20px;
height: 195px;
border-radius: 15px;
position: relative;
overflow: hidden;
background: linear-gradient(
@ -320,8 +319,8 @@ export default {
}
.audio-box {
flex: 1;
height: 46px;
border-radius: 10px;
height: 35px;
border-radius: 8px;
border: 1px solid #e4e6ef;
}
.add-device-bg {
@ -340,139 +339,138 @@ export default {
box-sizing: border-box;
/* 兼容老版本Opera浏览器 */
.hellow-text {
margin-left: 100px;
margin-left: 75px;
color: #3d4566;
font-size: 44px;
font-size: 33px;
font-weight: 700;
letter-spacing: 0;
}
.hi-hint {
font-weight: 400;
font-size: 12px;
font-size: 9px;
text-align: left;
color: #818cae;
margin-left: 100px;
margin-top: 7px;
margin-left: 75px;
margin-top: 5px;
}
}
.serach-box {
display: flex;
width: 306px;
height: 40px;
border-radius: 20px;
width: 230px;
height: 30px;
border-radius: 15px;
background-color: #e2f5f7;
align-items: center;
}
.user-info {
font-weight: 600;
font-size: 16px;
font-size: 12px;
letter-spacing: -0.02px;
text-align: left;
color: #3d4566;
}
.clear-btn {
width: 60px;
height: 24px;
width: 45px;
height: 18px;
background: #fd8383;
border-radius: 12px;
line-height: 24px;
font-size: 14px;
border-radius: 9px;
line-height: 18px;
font-size: 11px;
color: #fff;
cursor: pointer;
}
.clear-text {
color: #979db1;
font-size: 14px;
font-size: 11px;
display: flex;
align-items: center;
gap: 10px;
margin-left: 20px;
gap: 8px;
margin-left: 15px;
}
.template-item {
height: 46px;
width: 100px;
border-radius: 10px;
height: 35px;
width: 75px;
border-radius: 8px;
background: #e6ebff;
line-height: 46px;
line-height: 35px;
font-weight: 400;
font-size: 14px;
font-size: 11px;
text-align: center;
color: #5778ff;
}
.prompt-bottom {
margin-bottom: 5px;display: flex;justify-content: space-between;padding: 0 20px;align-items: center;
margin-bottom: 4px;display: flex;justify-content: space-between;padding: 0 15px;align-items: center;
}
.input-46 {
.input-35 {
border: 1px solid #e4e6ef;
background: #f6f8fb;
border-radius: 10px;
border-radius: 8px;
}
.console {
width: 120px;
height: 30px;
border-radius: 15px;
width: 90px;
height: 23px;
border-radius: 11px;
background: radial-gradient(50% 50% at 50% 50%, #fff 0%, #e8f0ff 100%);
display: flex;
align-items: center;
justify-content: center;
font-size: 12px;
font-size: 9px;
color: #979db1;
font-weight: 400;
gap: 10px;
color: #979db1;
margin-left: 20px;
gap: 8px;
margin-left: 15px;
}
.dialog-btn {
cursor: pointer;
flex: 1;
border-radius: 23px;
border-radius: 17px;
background: #5778ff;
height: 46px;
height: 34px;
font-weight: 500;
font-size: 14px;
font-size: 11px;
color: #fff;
line-height: 46px;
line-height: 34px;
text-align: center;
}
.add-device-btn {
display: flex;
align-items: center;
margin-left: 100px;
margin-top: 20px;
margin-left: 75px;
margin-top: 15px;
cursor: pointer;
.left-add {
width: 140px;
height: 46px;
border-radius: 23px;
width: 105px;
height: 34px;
border-radius: 17px;
background: #5778ff;
color: #fff;
font-size: 14px;
font-size: 11px;
font-weight: 500;
text-align: center;
line-height: 46px;
line-height: 34px;
}
.right-add {
width: 46px;
height: 46px;
width: 34px;
height: 34px;
border-radius: 50%;
background: #5778ff;
margin-left: -8px;
margin-left: -6px;
display: flex;
justify-content: center;
align-items: center;
}
}
.device-item {
width: 455px;
border-radius: 20px;
width: 341px;
border-radius: 15px;
background: #fafcfe;
padding: 30px;
padding: 22px;
box-sizing: border-box;
}
.device-name {
margin: 10px 0 14px;
margin: 8px 0 10px;
font-weight: 400;
font-size: 14px;
font-size: 11px;
color: #3d4566;
text-align: left;
}
@ -481,29 +479,29 @@ audio::-webkit-media-controls-panel {
}
.settings-btn {
font-weight: 500;
font-size: 14px;
font-size: 11px;
color: #5778ff;
background: #e6ebff;
width: 76px;
height: 28px;
line-height: 28px;
width: 57px;
height: 21px;
line-height: 21px;
cursor: pointer;
border-radius: 14px;
border-radius: 10px;
}
.version-info {
display: flex;
justify-content: space-between;
margin-top: 20px;
font-size: 14px;
margin-top: 15px;
font-size: 11px;
color: #979db1;
font-weight: 400;
}
.save-btn,
.reset-btn {
width: 140px;
height: 46px;
border-radius: 23px;
line-height: 46px;
width: 105px;
height: 34px;
border-radius: 17px;
line-height: 34px;
box-sizing: border-box;
cursor: pointer;
}
@ -519,19 +517,19 @@ audio::-webkit-media-controls-panel {
}
.textarea-box {
border: 1px solid #e4e6ef;
border-radius: 10px;
border-radius: 8px;
background: #f6f8fb;
}
::v-deep {
.textarea-box .el-textarea__inner {
background-color: transparent !important;
border: none !important;
padding: 20px;
padding: 15px;
}
.el-textarea .el-input__count {
color: #979db1;
font-size: 14px;
right: 20px;
font-size: 11px;
right: 15px;
background-color: transparent;
}
.el-input__inner {
@ -545,34 +543,34 @@ audio::-webkit-media-controls-panel {
}
.lh-form-item {
.el-form-item__label {
line-height: 23px;
line-height: 17px;
}
}
.el-form-item__label {
line-height: 46px;
line-height: 34px;
font-weight: 400;
font-size: 14px;
font-size: 11px;
text-align: left;
color: #3d4566;
}
.el-switch__core {
height: 28px;
border-radius: 14px;
height: 21px;
border-radius: 10px;
}
.el-switch {
line-height: 28x;
line-height: 28px;
}
.el-switch.is-checked .el-switch__core::after {
left: calc(100% - 6px);
left: calc(100% - 4px);
}
.el-switch__label {
color: #3d4566;
}
.el-switch__core:after {
left: 4px;
width: 20px;
height: 20px;
top: 3px;
width: 15px;
height: 15px;
top: 2px;
}
.el-dialog__headerbtn .el-dialog__close {
display: none;
@ -594,7 +592,7 @@ audio::-webkit-media-controls-panel {
transform: translate(-50%, -50%) !important;
overflow-y: scroll !important;
max-height: 100vh !important;
border-radius: 20px;
border-radius: 15px;
}
}
</style>

View file

@ -3,9 +3,9 @@
<el-container style="height: 100%;">
<el-header>
<div
style="display: flex;align-items: center;margin-top: 25px;margin-left: 30px;gap: 10px;">
<img src="@/assets/xiaozhi-logo.png" alt="" style="width: 56px;height: 56px;" />
<img src="@/assets/xiaozhi-ai.png" alt="" style="width: 78px;height: 16px;" />
style="display: flex;align-items: center;margin-top: 15px;margin-left: 10px;gap: 10px;">
<img src="@/assets/xiaozhi-logo.png" alt="" style="width: 45px;height: 45px;" />
<img src="@/assets/xiaozhi-ai.png" alt="" style="width: 70px;height: 13px;" />
</div>
</el-header>
<el-main style="position: relative;">
@ -15,7 +15,7 @@
<img src="@/assets/login/hi.png" alt="" style="width: 34px;height: 34px;" />
<div class="login-text">登录</div>
<div class="login-welcome">
Welcome to log in</div>
WELCOME TO LOG IN</div>
</div>
<el-tabs v-model="activeName" @tab-click="handleClick">
<el-tab-pane label="用户名" name="username">
@ -28,7 +28,7 @@
<img src="@/assets/login/password.png" alt="" class="input-icon" />
<el-input v-model="form.password" placeholder="请输入密码" />
</div>
<div style="font-weight: 400;font-size: 16px;text-align: left;color: #5778ff;display: flex;justify-content: space-between;margin-top: 20px;">
<div style="font-weight: 400;font-size: 14px;text-align: left;color: #5778ff;display: flex;justify-content: space-between;margin-top: 20px;">
<div style="cursor: pointer;">新用户注册</div>
<div style="cursor: pointer;">忘记密码?</div>
</div>
@ -61,7 +61,7 @@
</el-tab-pane>
</el-tabs>
<div class="login-btn">登陆</div>
<div style="font-size: 16px;color: #979db1;">
<div style="font-size: 14px;color: #979db1;">
登录即同意<div style="display: inline-block;color: #5778FF;cursor: pointer;">《用户协议》</div>和
<div style="display: inline-block;color: #5778FF;cursor: pointer;">《隐私政策》</div>
</div>
@ -69,7 +69,7 @@
</el-main>
<el-footer>
<div style="font-size: 12px;font-weight: 400;color: #979db1;">
©2025 xiaozhi-esp32-server</div>
©2024 小智Al控制面板2.0粤ICP备2022121736号-2</div>
</el-footer>
</el-container>
</div>
@ -115,13 +115,13 @@ export default {
}
.login-text {
font-weight: 700;
font-size: 48px;
font-size: 32px;
text-align: left;
color: #3d4566;
}
.login-welcome {
font-weight: 400;
font-size: 12px;
font-size: 9px;
text-align: left;
color: #818cae;
align-self: flex-end;
@ -134,13 +134,13 @@ export default {
right: 18%;
background-color: #fff;
border-radius: 20px;
padding: 36px 0;
width: 550px;
padding: 35px 0;
width: 450px;
box-sizing: border-box;
}
.el-dropdown-link {
font-weight: 400;
font-size: 16px;
font-size: 14px;
text-align: left;
color: #979db1;
}
@ -150,24 +150,24 @@ export default {
flex-shrink: 0;
}
.login-btn {
height: 50px;
height: 35px;
background: #5778ff;
border-radius: 10px;
font-weight: 400;
font-size: 18px;
font-size: 14px;
cursor: pointer;
color: #fff;
line-height: 50px;
margin: 82px 30px 20px;
line-height: 35px;
margin: 35px 15px 15px;
}
.code-send {
width: 80px;
height: 38px;
width: 70px;
height: 32px;
border-radius: 10px;
background: #e6ebff;
line-height: 38px;
line-height: 32px;
font-weight: 400;
font-size: 16px;
font-size: 14px;
color: #5778ff;
flex-shrink: 0;
cursor: pointer;
@ -179,8 +179,8 @@ export default {
border-radius: 10px;
background: #f6f8fb;
border: 1px solid #e4e6ef;
height: 56px;
padding: 0 30px;
height: 40px;
padding: 0 15px;
gap: 20px;
}
::v-deep {

View file

@ -3,26 +3,27 @@
<el-container style="height: 100%;">
<el-header>
<div
style="display: flex;align-items: center;margin-top: 25px;margin-left: 30px;gap: 10px;">
<img src="@/assets/xiaozhi-logo.png" alt="" style="width: 56px;height: 56px;" />
<img src="@/assets/xiaozhi-ai.png" alt="" style="width: 78px;height: 16px;" />
style="display: flex;align-items: center;margin-top: 15px;margin-left: 10px;gap: 10px;">
<img src="@/assets/xiaozhi-logo.png" alt="" style="width: 45px;height: 45px;" />
<img src="@/assets/xiaozhi-ai.png" alt="" style="width: 70px;height: 13px;" />
</div>
</el-header>
<el-main style="position: relative;">
<div style="margin-left: 18%;position: absolute;top: 50%;transform: translateY(-50%);">
<div style="margin-left: 18%;position: absolute;top: 50%;transform: translateY(-50%);margin-top: -20px">
<div style="display: flex;align-items: center;margin-bottom: 27px;">
<div class="left-pillar" />
<div class="hi-text-bg" />
<div class="hi-text">Hi,小智</div>
<div class="hi-text">Hi,你好</div>
</div>
<div class="introduction">让我们一起探索</div>
<div class="introduction">人工智能与机器人技术</div>
<div class="introduction">的迷人世界!</div>
<div class="hint"
style="text-align: left;font-weight: 400;font-size: 12px;text-align: left;color: #818cae;">
Let's explore the fascinating world
</div>
<div style="margin-top: 107px;display: flex;gap: 20px;">
<!-- 副标题 -->
<p class="english-subtitle">Let's explore the fascinating world</p>
<!-- 按钮 -->
<div style="margin-top: 60px;display: flex;gap: 20px;">
<div class="btn">
<img src="@/assets/welcome/questions.png" alt="" class="btn-icon" />
DIY教程
@ -36,6 +37,7 @@
控制台
</div>
</div>
</div>
</el-main>
<el-footer>
@ -87,7 +89,7 @@ export default {
.hi-text {
line-height: 36px;
font-weight: 700;
font-size: 18px;
font-size: 14px;
text-align: left;
color: #3d4566;
padding-left: 14px;
@ -95,27 +97,35 @@ export default {
}
.introduction {
font-weight: 700;
font-size: 54px;
font-size: 42px;
text-align: left;
color: #3d4566;
}
.btn {
width: 140px;
height: 56px;
width: 100px;
height: 40px;
align-items: center;
justify-content: center;
border-radius: 28px;
display: flex;
gap: 10px;
font-weight: 400;
font-size: 16px;
font-size: 12px;
text-align: left;
color: #3d4566;
cursor: pointer;
background-color: #fff;
}
.btn-icon {
width: 16px;
height: 16px;
width: 12px;
height: 12px;
}
.english-subtitle {
font-size: 11px;
color: #818cae;
text-align: left;
margin-top: 5px;
position: relative;
top: 8px;
}
</style>