mirror of
https://github.com/xinnan-tech/xiaozhi-esp32-server.git
synced 2026-07-31 03:43:57 +08:00
update:格式化代码
This commit is contained in:
@@ -10,4 +10,3 @@ module.exports = {
|
|||||||
'@babel/plugin-transform-runtime'
|
'@babel/plugin-transform-runtime'
|
||||||
]
|
]
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -5,7 +5,6 @@
|
|||||||
</template>
|
</template>
|
||||||
|
|
||||||
<style lang="scss">
|
<style lang="scss">
|
||||||
|
|
||||||
#app {
|
#app {
|
||||||
font-family: Avenir, Helvetica, Arial, sans-serif;
|
font-family: Avenir, Helvetica, Arial, sans-serif;
|
||||||
-webkit-font-smoothing: antialiased;
|
-webkit-font-smoothing: antialiased;
|
||||||
@@ -40,10 +39,10 @@ nav {
|
|||||||
transform: translateX(-50%);
|
transform: translateX(-50%);
|
||||||
width: 100%;
|
width: 100%;
|
||||||
}
|
}
|
||||||
|
|
||||||
.el-message {
|
.el-message {
|
||||||
top: 45px !important;
|
top: 45px !important;
|
||||||
}
|
}
|
||||||
|
|
||||||
</style>
|
</style>
|
||||||
<script>
|
<script>
|
||||||
</script>
|
</script>
|
||||||
@@ -1,7 +1,7 @@
|
|||||||
import {goToPage, showDanger, showWarning, isNotNull} from '../utils/index'
|
|
||||||
import Constant from '../utils/constant'
|
|
||||||
import Fly from 'flyio/dist/npm/fly';
|
import Fly from 'flyio/dist/npm/fly';
|
||||||
import store from '../store/index'
|
import store from '../store/index';
|
||||||
|
import Constant from '../utils/constant';
|
||||||
|
import { goToPage, isNotNull, showDanger, showWarning } from '../utils/index';
|
||||||
|
|
||||||
const fly = new Fly()
|
const fly = new Fly()
|
||||||
// 设置超时
|
// 设置超时
|
||||||
|
|||||||
@@ -1,5 +1,5 @@
|
|||||||
import RequestService from '../httpRequest'
|
import { getServiceUrl } from '../api';
|
||||||
import {getServiceUrl} from '../api'
|
import RequestService from '../httpRequest';
|
||||||
|
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
|
|||||||
@@ -1,5 +1,5 @@
|
|||||||
import RequestService from '../httpRequest'
|
import { getServiceUrl } from '../api';
|
||||||
import {getServiceUrl} from '../api'
|
import RequestService from '../httpRequest';
|
||||||
|
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
|
|||||||
@@ -1,5 +1,5 @@
|
|||||||
import RequestService from '../httpRequest'
|
import { getServiceUrl } from '../api';
|
||||||
import {getServiceUrl} from '../api'
|
import RequestService from '../httpRequest';
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
// 已绑设备
|
// 已绑设备
|
||||||
|
|||||||
@@ -1,5 +1,5 @@
|
|||||||
import RequestService from '../httpRequest'
|
import { getServiceUrl } from '../api';
|
||||||
import {getServiceUrl} from '../api'
|
import RequestService from '../httpRequest';
|
||||||
|
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
|
|||||||
@@ -1,5 +1,5 @@
|
|||||||
import RequestService from '../httpRequest'
|
|
||||||
import { getServiceUrl } from '../api'
|
import { getServiceUrl } from '../api'
|
||||||
|
import RequestService from '../httpRequest'
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
/**
|
/**
|
||||||
|
|||||||
@@ -1,5 +1,5 @@
|
|||||||
import RequestService from '../httpRequest'
|
|
||||||
import { getServiceUrl } from '../api'
|
import { getServiceUrl } from '../api'
|
||||||
|
import RequestService from '../httpRequest'
|
||||||
|
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
|
|||||||
@@ -1,11 +1,11 @@
|
|||||||
import Vue from 'vue'
|
|
||||||
import App from './App.vue'
|
|
||||||
import router from './router'
|
|
||||||
import store from './store'
|
|
||||||
import 'normalize.css/normalize.css' // A modern alternative to CSS resets
|
|
||||||
import ElementUI from 'element-ui';
|
import ElementUI from 'element-ui';
|
||||||
import 'element-ui/lib/theme-chalk/index.css';
|
import 'element-ui/lib/theme-chalk/index.css';
|
||||||
import './styles/global.scss'
|
import 'normalize.css/normalize.css'; // A modern alternative to CSS resets
|
||||||
|
import Vue from 'vue';
|
||||||
|
import App from './App.vue';
|
||||||
|
import router from './router';
|
||||||
|
import store from './store';
|
||||||
|
import './styles/global.scss';
|
||||||
|
|
||||||
Vue.use(ElementUI);
|
Vue.use(ElementUI);
|
||||||
|
|
||||||
|
|||||||
@@ -1,7 +1,7 @@
|
|||||||
import Vue from 'vue'
|
|
||||||
import Vuex from 'vuex'
|
|
||||||
import Constant from '../utils/constant'
|
|
||||||
import { goToPage } from "@/utils";
|
import { goToPage } from "@/utils";
|
||||||
|
import Vue from 'vue';
|
||||||
|
import Vuex from 'vuex';
|
||||||
|
import Constant from '../utils/constant';
|
||||||
|
|
||||||
Vue.use(Vuex)
|
Vue.use(Vuex)
|
||||||
|
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
|
import { Message } from 'element-ui'
|
||||||
import router from '../router'
|
import router from '../router'
|
||||||
import Constant from '../utils/constant'
|
import Constant from '../utils/constant'
|
||||||
import { Message } from 'element-ui'
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 判断用户是否登录
|
* 判断用户是否登录
|
||||||
|
|||||||
@@ -61,7 +61,9 @@
|
|||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<el-table ref="modelTable" style="width: 100%" :header-cell-style="{background: 'transparent'}" :data="modelList" class="data-table" header-row-class-name="table-header" :header-cell-class-name="headerCellClassName" @selection-change="handleSelectionChange">
|
<el-table ref="modelTable" style="width: 100%" :header-cell-style="{ background: 'transparent' }"
|
||||||
|
:data="modelList" class="data-table" header-row-class-name="table-header"
|
||||||
|
:header-cell-class-name="headerCellClassName" @selection-change="handleSelectionChange">
|
||||||
<el-table-column type="selection" width="55" align="center"></el-table-column>
|
<el-table-column type="selection" width="55" align="center"></el-table-column>
|
||||||
<el-table-column label="模型名称" prop="modelName" align="center"></el-table-column>
|
<el-table-column label="模型名称" prop="modelName" align="center"></el-table-column>
|
||||||
<el-table-column label="模型编码" prop="modelCode" align="center"></el-table-column>
|
<el-table-column label="模型编码" prop="modelCode" align="center"></el-table-column>
|
||||||
@@ -72,8 +74,7 @@
|
|||||||
</el-table-column>
|
</el-table-column>
|
||||||
<el-table-column label="是否启用" align="center">
|
<el-table-column label="是否启用" align="center">
|
||||||
<template slot-scope="scope">
|
<template slot-scope="scope">
|
||||||
<el-switch v-model="scope.row.isEnabled" class="custom-switch"
|
<el-switch v-model="scope.row.isEnabled" class="custom-switch" :active-value="1" :inactive-value="0"
|
||||||
:active-value="1" :inactive-value="0"
|
|
||||||
:active-color="null" :inactive-color="null" />
|
:active-color="null" :inactive-color="null" />
|
||||||
</template>
|
</template>
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
@@ -98,7 +99,9 @@
|
|||||||
|
|
||||||
<div class="table-footer">
|
<div class="table-footer">
|
||||||
<div class="batch-actions">
|
<div class="batch-actions">
|
||||||
<el-button size="mini" @click="selectAll" style="width: 75px; background: #606ff3">{{ isAllSelected ? '取消全选' : '全选' }}</el-button>
|
<el-button size="mini" @click="selectAll" style="width: 75px; background: #606ff3">{{ isAllSelected ?
|
||||||
|
'取消全选' : '全选'
|
||||||
|
}}</el-button>
|
||||||
<el-button size="mini" type="danger" icon="el-icon-delete" @click="batchDelete">
|
<el-button size="mini" type="danger" icon="el-icon-delete" @click="batchDelete">
|
||||||
删除
|
删除
|
||||||
</el-button>
|
</el-button>
|
||||||
@@ -107,7 +110,8 @@
|
|||||||
<button class="pagination-btn" :disabled="currentPage === 1" @click="goFirst">首页</button>
|
<button class="pagination-btn" :disabled="currentPage === 1" @click="goFirst">首页</button>
|
||||||
<button class="pagination-btn" :disabled="currentPage === 1" @click="goPrev">上一页</button>
|
<button class="pagination-btn" :disabled="currentPage === 1" @click="goPrev">上一页</button>
|
||||||
|
|
||||||
<button v-for="page in visiblePages" :key="page" class="pagination-btn" :class="{ active: page === currentPage }" @click="goToPage(page)">
|
<button v-for="page in visiblePages" :key="page" class="pagination-btn"
|
||||||
|
:class="{ active: page === currentPage }" @click="goToPage(page)">
|
||||||
{{ page }}
|
{{ page }}
|
||||||
</button>
|
</button>
|
||||||
|
|
||||||
@@ -118,7 +122,8 @@
|
|||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<ModelEditDialog :modelType="activeTab" :visible.sync="editDialogVisible" :modelData="editModelData" @save="handleModelSave"/>
|
<ModelEditDialog :modelType="activeTab" :visible.sync="editDialogVisible" :modelData="editModelData"
|
||||||
|
@save="handleModelSave" />
|
||||||
<TtsModel :visible.sync="ttsDialogVisible" />
|
<TtsModel :visible.sync="ttsDialogVisible" />
|
||||||
<AddModelDialog :modelType="activeTab" :visible.sync="addDialogVisible" @confirm="handleAddConfirm" />
|
<AddModelDialog :modelType="activeTab" :visible.sync="addDialogVisible" @confirm="handleAddConfirm" />
|
||||||
</div>
|
</div>
|
||||||
@@ -130,11 +135,11 @@
|
|||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script>
|
<script>
|
||||||
|
import ModelApi from "@/apis/module/model";
|
||||||
|
import AddModelDialog from "@/components/AddModelDialog.vue";
|
||||||
import HeaderBar from "@/components/HeaderBar.vue";
|
import HeaderBar from "@/components/HeaderBar.vue";
|
||||||
import ModelEditDialog from "@/components/ModelEditDialog.vue";
|
import ModelEditDialog from "@/components/ModelEditDialog.vue";
|
||||||
import TtsModel from "@/components/TtsModel.vue";
|
import TtsModel from "@/components/TtsModel.vue";
|
||||||
import AddModelDialog from "@/components/AddModelDialog.vue";
|
|
||||||
import ModelApi from "@/apis/module/model";
|
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
components: { HeaderBar, ModelEditDialog, TtsModel, AddModelDialog },
|
components: { HeaderBar, ModelEditDialog, TtsModel, AddModelDialog },
|
||||||
@@ -430,12 +435,10 @@ export default {
|
|||||||
height: 100%;
|
height: 100%;
|
||||||
border-right: 1px solid #ebeef5;
|
border-right: 1px solid #ebeef5;
|
||||||
background:
|
background:
|
||||||
linear-gradient(
|
linear-gradient(120deg,
|
||||||
120deg,
|
|
||||||
rgba(107, 140, 255, 0.3) 0%,
|
rgba(107, 140, 255, 0.3) 0%,
|
||||||
rgba(169, 102, 255, 0.3) 25%,
|
rgba(169, 102, 255, 0.3) 25%,
|
||||||
transparent 60%
|
transparent 60%),
|
||||||
),
|
|
||||||
url("../assets/model/model.png") no-repeat center / cover;
|
url("../assets/model/model.png") no-repeat center / cover;
|
||||||
padding: 16px 0;
|
padding: 16px 0;
|
||||||
flex-shrink: 0;
|
flex-shrink: 0;
|
||||||
@@ -620,7 +623,8 @@ export default {
|
|||||||
}
|
}
|
||||||
|
|
||||||
::v-deep .el-table .custom-selection-header .cell .el-checkbox__inner {
|
::v-deep .el-table .custom-selection-header .cell .el-checkbox__inner {
|
||||||
display: none !important; /* 使表头复选框不可见 */
|
display: none !important;
|
||||||
|
/* 使表头复选框不可见 */
|
||||||
}
|
}
|
||||||
|
|
||||||
::v-deep .el-table .custom-selection-header .cell::before {
|
::v-deep .el-table .custom-selection-header .cell::before {
|
||||||
@@ -646,6 +650,7 @@ export default {
|
|||||||
}
|
}
|
||||||
|
|
||||||
::v-deep .data-table {
|
::v-deep .data-table {
|
||||||
|
|
||||||
&.el-table::before,
|
&.el-table::before,
|
||||||
&.el-table::after,
|
&.el-table::after,
|
||||||
&.el-table__inner-wrapper::before {
|
&.el-table__inner-wrapper::before {
|
||||||
@@ -689,7 +694,8 @@ export default {
|
|||||||
}
|
}
|
||||||
|
|
||||||
.voice-management-btn:hover {
|
.voice-management-btn:hover {
|
||||||
background: #8aa2e0; /* 悬停时颜色加深 */
|
background: #8aa2e0;
|
||||||
|
/* 悬停时颜色加深 */
|
||||||
transform: scale(1.05);
|
transform: scale(1.05);
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -701,7 +707,8 @@ export default {
|
|||||||
padding-right: 15px !important;
|
padding-right: 15px !important;
|
||||||
}
|
}
|
||||||
|
|
||||||
.edit-btn, .delete-btn {
|
.edit-btn,
|
||||||
|
.delete-btn {
|
||||||
margin: 0 8px;
|
margin: 0 8px;
|
||||||
color: #7079aa !important;
|
color: #7079aa !important;
|
||||||
}
|
}
|
||||||
@@ -777,6 +784,4 @@ export default {
|
|||||||
margin-left: 10px;
|
margin-left: 10px;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
</style>
|
</style>
|
||||||
|
|
||||||
|
|||||||
@@ -5,7 +5,8 @@
|
|||||||
<div class="operation-bar">
|
<div class="operation-bar">
|
||||||
<h2 class="page-title">用户管理</h2>
|
<h2 class="page-title">用户管理</h2>
|
||||||
<div class="right-operations">
|
<div class="right-operations">
|
||||||
<el-input placeholder="请输入手机号码查询" v-model="searchPhone" class="search-input" @keyup.enter.native="handleSearch"/>
|
<el-input placeholder="请输入手机号码查询" v-model="searchPhone" class="search-input"
|
||||||
|
@keyup.enter.native="handleSearch" />
|
||||||
<el-button class="btn-search" @click="handleSearch">搜索</el-button>
|
<el-button class="btn-search" @click="handleSearch">搜索</el-button>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
@@ -14,7 +15,8 @@
|
|||||||
<div class="content-panel">
|
<div class="content-panel">
|
||||||
<div class="content-area">
|
<div class="content-area">
|
||||||
<el-card class="user-card" shadow="never">
|
<el-card class="user-card" shadow="never">
|
||||||
<el-table ref="userTable" :data="userList" class="transparent-table" :header-cell-class-name="headerCellClassName">
|
<el-table ref="userTable" :data="userList" class="transparent-table"
|
||||||
|
:header-cell-class-name="headerCellClassName">
|
||||||
<el-table-column label="选择" type="selection" align="center" width="120"></el-table-column>
|
<el-table-column label="选择" type="selection" align="center" width="120"></el-table-column>
|
||||||
<el-table-column label="用户Id" prop="userid" align="center"></el-table-column>
|
<el-table-column label="用户Id" prop="userid" align="center"></el-table-column>
|
||||||
<el-table-column label="手机号码" prop="mobile" align="center"></el-table-column>
|
<el-table-column label="手机号码" prop="mobile" align="center"></el-table-column>
|
||||||
@@ -22,14 +24,14 @@
|
|||||||
<el-table-column label="状态" prop="status" align="center"></el-table-column>
|
<el-table-column label="状态" prop="status" align="center"></el-table-column>
|
||||||
<el-table-column label="操作" align="center">
|
<el-table-column label="操作" align="center">
|
||||||
<template slot-scope="scope">
|
<template slot-scope="scope">
|
||||||
<el-button size="mini" type="text" @click="resetPassword(scope.row)" style="color: #989fdd">重置密码</el-button>
|
<el-button size="mini" type="text" @click="resetPassword(scope.row)"
|
||||||
<el-button size="mini" type="text"
|
style="color: #989fdd">重置密码</el-button>
|
||||||
v-if="scope.row.status === '正常'"
|
<el-button size="mini" type="text" v-if="scope.row.status === '正常'"
|
||||||
@click="disableUser(scope.row)">禁用账户</el-button>
|
@click="disableUser(scope.row)">禁用账户</el-button>
|
||||||
<el-button size="mini" type="text"
|
<el-button size="mini" type="text" v-if="scope.row.status === '禁用'"
|
||||||
v-if="scope.row.status === '禁用'"
|
|
||||||
@click="restoreUser(scope.row)">恢复账号</el-button>
|
@click="restoreUser(scope.row)">恢复账号</el-button>
|
||||||
<el-button size="mini" type="text" @click="deleteUser(scope.row)" style="color: #989fdd">删除用户</el-button>
|
<el-button size="mini" type="text" @click="deleteUser(scope.row)"
|
||||||
|
style="color: #989fdd">删除用户</el-button>
|
||||||
</template>
|
</template>
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
</el-table>
|
</el-table>
|
||||||
@@ -38,14 +40,16 @@
|
|||||||
<div class="ctrl_btn">
|
<div class="ctrl_btn">
|
||||||
<el-button size="mini" type="primary" class="select-all-btn" @click="handleSelectAll">全选</el-button>
|
<el-button size="mini" type="primary" class="select-all-btn" @click="handleSelectAll">全选</el-button>
|
||||||
<el-button size="mini" type="success" icon="el-icon-circle-check" @click="batchEnable">启用</el-button>
|
<el-button size="mini" type="success" icon="el-icon-circle-check" @click="batchEnable">启用</el-button>
|
||||||
<el-button size="mini" type="warning" @click="batchDisable"><i class="el-icon-remove-outline rotated-icon"></i>禁用</el-button>
|
<el-button size="mini" type="warning" @click="batchDisable"><i
|
||||||
|
class="el-icon-remove-outline rotated-icon"></i>禁用</el-button>
|
||||||
<el-button size="mini" type="danger" icon="el-icon-delete" @click="batchDelete">删除</el-button>
|
<el-button size="mini" type="danger" icon="el-icon-delete" @click="batchDelete">删除</el-button>
|
||||||
</div>
|
</div>
|
||||||
<div class="custom-pagination">
|
<div class="custom-pagination">
|
||||||
<button class="pagination-btn" :disabled="currentPage === 1" @click="goFirst">首页</button>
|
<button class="pagination-btn" :disabled="currentPage === 1" @click="goFirst">首页</button>
|
||||||
<button class="pagination-btn" :disabled="currentPage === 1" @click="goPrev">上一页</button>
|
<button class="pagination-btn" :disabled="currentPage === 1" @click="goPrev">上一页</button>
|
||||||
|
|
||||||
<button v-for="page in visiblePages" :key="page" class="pagination-btn" :class="{ active: page === currentPage }" @click="goToPage(page)">
|
<button v-for="page in visiblePages" :key="page" class="pagination-btn"
|
||||||
|
:class="{ active: page === currentPage }" @click="goToPage(page)">
|
||||||
{{ page }}
|
{{ page }}
|
||||||
</button>
|
</button>
|
||||||
|
|
||||||
@@ -66,9 +70,9 @@
|
|||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script>
|
<script>
|
||||||
import HeaderBar from "@/components/HeaderBar.vue";
|
|
||||||
import adminApi from '@/apis/module/admin';
|
import adminApi from '@/apis/module/admin';
|
||||||
import ViewPasswordDialog from '@/components/ViewPasswordDialog.vue'
|
import HeaderBar from "@/components/HeaderBar.vue";
|
||||||
|
import ViewPasswordDialog from '@/components/ViewPasswordDialog.vue';
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
components: { HeaderBar, ViewPasswordDialog },
|
components: { HeaderBar, ViewPasswordDialog },
|
||||||
@@ -355,6 +359,7 @@ export default {
|
|||||||
display: flex;
|
display: flex;
|
||||||
gap: 8px;
|
gap: 8px;
|
||||||
padding-left: 26px;
|
padding-left: 26px;
|
||||||
|
|
||||||
.el-button {
|
.el-button {
|
||||||
min-width: 72px;
|
min-width: 72px;
|
||||||
height: 32px;
|
height: 32px;
|
||||||
@@ -481,6 +486,7 @@ export default {
|
|||||||
|
|
||||||
:deep(.transparent-table) {
|
:deep(.transparent-table) {
|
||||||
background: white;
|
background: white;
|
||||||
|
|
||||||
.el-table__header th {
|
.el-table__header th {
|
||||||
background: white !important;
|
background: white !important;
|
||||||
color: black;
|
color: black;
|
||||||
@@ -492,6 +498,7 @@ export default {
|
|||||||
|
|
||||||
.el-table__body tr {
|
.el-table__body tr {
|
||||||
background-color: white;
|
background-color: white;
|
||||||
|
|
||||||
td {
|
td {
|
||||||
border-top: 1px solid rgba(0, 0, 0, 0.04);
|
border-top: 1px solid rgba(0, 0, 0, 0.04);
|
||||||
border-bottom: 1px solid rgba(0, 0, 0, 0.04);
|
border-bottom: 1px solid rgba(0, 0, 0, 0.04);
|
||||||
@@ -534,17 +541,18 @@ export default {
|
|||||||
align-items: center;
|
align-items: center;
|
||||||
margin-top: 40px;
|
margin-top: 40px;
|
||||||
}
|
}
|
||||||
|
|
||||||
:deep(.transparent-table) {
|
:deep(.transparent-table) {
|
||||||
.el-table__body tr {
|
.el-table__body tr {
|
||||||
td {
|
td {
|
||||||
padding-top: 16px;
|
padding-top: 16px;
|
||||||
padding-bottom: 16px;
|
padding-bottom: 16px;
|
||||||
}
|
}
|
||||||
|
|
||||||
&+tr {
|
&+tr {
|
||||||
margin-top: 10px;
|
margin-top: 10px;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
</style>
|
</style>
|
||||||
@@ -2,8 +2,7 @@
|
|||||||
<div class="welcome">
|
<div class="welcome">
|
||||||
<el-container style="height: 100%;">
|
<el-container style="height: 100%;">
|
||||||
<el-header>
|
<el-header>
|
||||||
<div
|
<div style="display: flex;align-items: center;margin-top: 15px;margin-left: 10px;gap: 10px;">
|
||||||
style="display: flex;align-items: center;margin-top: 15px;margin-left: 10px;gap: 10px;">
|
|
||||||
<img loading="lazy" alt="" src="@/assets/xiaozhi-logo.png" style="width: 45px;height: 45px;" />
|
<img loading="lazy" alt="" src="@/assets/xiaozhi-logo.png" style="width: 45px;height: 45px;" />
|
||||||
<img loading="lazy" alt="" src="@/assets/xiaozhi-ai.png" style="height: 18px;" />
|
<img loading="lazy" alt="" src="@/assets/xiaozhi-ai.png" style="height: 18px;" />
|
||||||
</div>
|
</div>
|
||||||
@@ -13,8 +12,7 @@
|
|||||||
</div>
|
</div>
|
||||||
<el-main style="position: relative;">
|
<el-main style="position: relative;">
|
||||||
<div class="login-box" @keyup.enter="login">
|
<div class="login-box" @keyup.enter="login">
|
||||||
<div
|
<div style="display: flex;align-items: center;gap: 20px;margin-bottom: 39px;padding: 0 30px;">
|
||||||
style="display: flex;align-items: center;gap: 20px;margin-bottom: 39px;padding: 0 30px;">
|
|
||||||
<img loading="lazy" alt="" src="@/assets/login/hi.png" style="width: 34px;height: 34px;" />
|
<img loading="lazy" alt="" src="@/assets/login/hi.png" style="width: 34px;height: 34px;" />
|
||||||
<div class="login-text">登录</div>
|
<div class="login-text">登录</div>
|
||||||
<div class="login-welcome">
|
<div class="login-welcome">
|
||||||
@@ -35,12 +33,8 @@
|
|||||||
<img loading="lazy" alt="" class="input-icon" src="@/assets/login/shield.png" />
|
<img loading="lazy" alt="" class="input-icon" src="@/assets/login/shield.png" />
|
||||||
<el-input v-model="form.captcha" placeholder="请输入验证码" style="flex: 1;" />
|
<el-input v-model="form.captcha" placeholder="请输入验证码" style="flex: 1;" />
|
||||||
</div>
|
</div>
|
||||||
<img loading="lazy" v-if="captchaUrl"
|
<img loading="lazy" v-if="captchaUrl" :src="captchaUrl" alt="验证码"
|
||||||
:src="captchaUrl"
|
style="width: 150px; height: 40px; cursor: pointer;" @click="fetchCaptcha" />
|
||||||
alt="验证码"
|
|
||||||
style="width: 150px; height: 40px; cursor: pointer;"
|
|
||||||
@click="fetchCaptcha"
|
|
||||||
/>
|
|
||||||
</div>
|
</div>
|
||||||
<div
|
<div
|
||||||
style="font-weight: 400;font-size: 14px;text-align: left;color: #5778ff;display: flex;justify-content: space-between;margin-top: 20px;">
|
style="font-weight: 400;font-size: 14px;text-align: left;color: #5778ff;display: flex;justify-content: space-between;margin-top: 20px;">
|
||||||
@@ -156,5 +150,4 @@ export default {
|
|||||||
}
|
}
|
||||||
</script>
|
</script>
|
||||||
<style lang="scss" scoped>
|
<style lang="scss" scoped>
|
||||||
@import './auth.scss'; // 添加这行引用
|
@import './auth.scss'; // 添加这行引用</style>
|
||||||
</style>
|
|
||||||
|
|||||||
@@ -45,12 +45,8 @@
|
|||||||
<img loading="lazy" alt="" class="input-icon" src="@/assets/login/shield.png" />
|
<img loading="lazy" alt="" class="input-icon" src="@/assets/login/shield.png" />
|
||||||
<el-input v-model="form.captcha" placeholder="请输入验证码" style="flex: 1;" />
|
<el-input v-model="form.captcha" placeholder="请输入验证码" style="flex: 1;" />
|
||||||
</div>
|
</div>
|
||||||
<img loading="lazy" v-if="captchaUrl"
|
<img loading="lazy" v-if="captchaUrl" :src="captchaUrl" alt="验证码"
|
||||||
:src="captchaUrl"
|
style="width: 150px; height: 40px; cursor: pointer;" @click="fetchCaptcha" />
|
||||||
alt="验证码"
|
|
||||||
style="width: 150px; height: 40px; cursor: pointer;"
|
|
||||||
@click="fetchCaptcha"
|
|
||||||
/>
|
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<!-- 修改底部链接 -->
|
<!-- 修改底部链接 -->
|
||||||
@@ -83,8 +79,8 @@
|
|||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script>
|
<script>
|
||||||
import {getUUID, goToPage, showDanger, showSuccess} from '@/utils'
|
|
||||||
import Api from '@/apis/api';
|
import Api from '@/apis/api';
|
||||||
|
import { getUUID, goToPage, showDanger, showSuccess } from '@/utils';
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
name: 'register',
|
name: 'register',
|
||||||
@@ -169,5 +165,4 @@ export default {
|
|||||||
</script>
|
</script>
|
||||||
|
|
||||||
<style lang="scss" scoped>
|
<style lang="scss" scoped>
|
||||||
@import './auth.scss'; // 修改为导入新建的SCSS文件
|
@import './auth.scss'; // 修改为导入新建的SCSS文件</style>
|
||||||
</style>
|
|
||||||
|
|||||||
@@ -21,7 +21,8 @@
|
|||||||
</el-form-item>
|
</el-form-item>
|
||||||
<el-form-item label="角色模版:">
|
<el-form-item label="角色模版:">
|
||||||
<div style="display: flex;gap: 8px;">
|
<div style="display: flex;gap: 8px;">
|
||||||
<div v-for="template in templates" :key="template" class="template-item" :class="{ 'template-loading': loadingTemplate }" @click="selectTemplate(template)">
|
<div v-for="template in templates" :key="template" class="template-item"
|
||||||
|
:class="{ 'template-loading': loadingTemplate }" @click="selectTemplate(template)">
|
||||||
{{ template }}
|
{{ template }}
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
@@ -30,8 +31,7 @@
|
|||||||
<div style="display: flex;gap: 8px;align-items: center;">
|
<div style="display: flex;gap: 8px;align-items: center;">
|
||||||
<div class="input-46" style="flex:1.4;">
|
<div class="input-46" style="flex:1.4;">
|
||||||
<el-select v-model="form.ttsVoiceId" placeholder="请选择" style="width: 100%;">
|
<el-select v-model="form.ttsVoiceId" placeholder="请选择" style="width: 100%;">
|
||||||
<el-option v-for="item in options" :key="item.value" :label="item.label"
|
<el-option v-for="item in options" :key="item.value" :label="item.label" :value="item.value">
|
||||||
:value="item.value">
|
|
||||||
</el-option>
|
</el-option>
|
||||||
</el-select>
|
</el-select>
|
||||||
</div>
|
</div>
|
||||||
@@ -43,14 +43,14 @@
|
|||||||
</el-form-item>
|
</el-form-item>
|
||||||
<el-form-item label="角色介绍:">
|
<el-form-item label="角色介绍:">
|
||||||
<div class="textarea-box">
|
<div class="textarea-box">
|
||||||
<el-input type="textarea" rows="5" resize="none" placeholder="请输入内容"
|
<el-input type="textarea" rows="5" resize="none" placeholder="请输入内容" v-model="form.systemPrompt"
|
||||||
v-model="form.systemPrompt" maxlength="2000" show-word-limit/>
|
maxlength="2000" show-word-limit />
|
||||||
</div>
|
</div>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
<el-form-item label="记忆体:">
|
<el-form-item label="记忆体:">
|
||||||
<div class="textarea-box">
|
<div class="textarea-box">
|
||||||
<el-input type="textarea" rows="5" resize="none" placeholder="请输入内容"
|
<el-input type="textarea" rows="5" resize="none" placeholder="请输入内容" v-model="form.langCode"
|
||||||
v-model="form.langCode" maxlength="1000"/>
|
maxlength="1000" />
|
||||||
<div class="prompt-bottom" @click="clearMemory">
|
<div class="prompt-bottom" @click="clearMemory">
|
||||||
<div style="display: flex;gap: 8px;align-items: center;">
|
<div style="display: flex;gap: 8px;align-items: center;">
|
||||||
<div style="color: #979db1;font-size: 11px;">当前记忆(每次对话后重新生成)</div>
|
<div style="color: #979db1;font-size: 11px;">当前记忆(每次对话后重新生成)</div>
|
||||||
@@ -397,4 +397,3 @@ export default {
|
|||||||
background: #f6f8fb;
|
background: #f6f8fb;
|
||||||
}
|
}
|
||||||
</style>
|
</style>
|
||||||
|
|
||||||
|
|||||||
@@ -8,8 +8,7 @@
|
|||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="controls">
|
<div class="controls">
|
||||||
<button @click="toggleRecording" :disabled="wsStatus !== 'connected'"
|
<button @click="toggleRecording" :disabled="wsStatus !== 'connected'" :class="{ recording: isRecording }">
|
||||||
:class="{ recording: isRecording }">
|
|
||||||
{{ isRecording ? '停止录音' : '开始录音' }}
|
{{ isRecording ? '停止录音' : '开始录音' }}
|
||||||
</button>
|
</button>
|
||||||
<p>WebSocket: {{ wsStatus }}</p>
|
<p>WebSocket: {{ wsStatus }}</p>
|
||||||
@@ -18,8 +17,8 @@
|
|||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script>
|
<script>
|
||||||
import Recorder from 'opus-recorder';
|
|
||||||
import { OpusDecoder } from 'opus-decoder';
|
import { OpusDecoder } from 'opus-decoder';
|
||||||
|
import Recorder from 'opus-recorder';
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
name: 'TestPage',
|
name: 'TestPage',
|
||||||
|
|||||||
Reference in New Issue
Block a user