diff --git a/src/api/account.js b/src/api/account.js index d1a0926..1466588 100644 --- a/src/api/account.js +++ b/src/api/account.js @@ -76,3 +76,7 @@ export function accountName(str) { export function liveHostDetail(data) { return postAxios({ url: 'api/save_data/live_host_detail', data }) } + +export function revenueStats(hostId) { + return getAxios({ url: 'api/save_data/revenue_stats?displayId=' + hostId }) +} diff --git a/src/assets/logo2.png b/src/assets/logo2.png new file mode 100644 index 0000000..7214e8b Binary files /dev/null and b/src/assets/logo2.png differ diff --git a/src/assets/logoBg2.png b/src/assets/logoBg2.png new file mode 100644 index 0000000..239b88c Binary files /dev/null and b/src/assets/logoBg2.png differ diff --git a/src/locales/en.js b/src/locales/en.js index 469a8ce..f13119e 100644 --- a/src/locales/en.js +++ b/src/locales/en.js @@ -79,5 +79,19 @@ export default { invitationType: 'invitationType', invitationType1: 'Regular', invitationType2: 'Golden', + liveSessions: 'Live Sessions', + viewSessions: 'View Sessions', + liveRevenue: 'Live Revenue', + viewRevenue: 'View Revenue', + revenueHost: 'Host', + todayRevenueUsd: 'Today Revenue (USD)', + totalRevenueUsd: 'Total Revenue (USD)', + liveDays: 'Live Days', + historyRevenueUsd: 'History Revenue (USD)', + revenueHigh: 'High', + revenueLow: 'Low', + revenueTime: 'Time', + close: 'Close', + selectPlaceholder: 'Please select', } -} \ No newline at end of file +} diff --git a/src/locales/zh.js b/src/locales/zh.js index 5586c1a..bf7986f 100644 --- a/src/locales/zh.js +++ b/src/locales/zh.js @@ -1,10 +1,10 @@ -export default { +export default { login: { - title: '账号登陆', + title: '账号登录', version: '版本号', login: '登录', tenantName: '租户名称', - account: '账户', + account: '账号', password: '密码', Language: '语言设置', network: '网络设置', @@ -27,6 +27,7 @@ export default { guildPassPlace: '请输入登录密码', queriedNum: '今日已查询次数', loginBackend: '登录后台', + workbenches: '工作台', }, workbenchesSetup: { workbenches: '工作台', @@ -34,7 +35,7 @@ export default { setCoinsNum: '设置金币数量', setFansNum: '设置粉丝数量', setQuery: '后台查询频率', - setNum: ' 期望可邀请主播数量', + setNum: '期望可邀请主播数量', minCoinsNum: '最小金币数量', maxCoinsNum: '最大金币数量', minFansNum: '最小粉丝数量', @@ -44,11 +45,9 @@ export default { num: '个', start: '开始获取数据', stop: '停止', - prompt: '到达数量后停止爬取', + prompt: '达到数量后停止爬取', setHostNum: '设置爬取数量', unlimitedQuantity: '不限爬取数量', - - }, hostList: { placeCountry: '选择国家', @@ -80,5 +79,19 @@ export default { invitationType: '邀请类型', invitationType1: '普票', invitationType2: '金票', + liveSessions: '直播场次', + viewSessions: '查看场次', + liveRevenue: '直播收益', + viewRevenue: '查看收益', + revenueHost: '主播', + todayRevenueUsd: '今日收益(美元)', + totalRevenueUsd: '总收益(美元)', + liveDays: '直播天数', + historyRevenueUsd: '历史收益(美元)', + revenueHigh: '高', + revenueLow: '低', + revenueTime: '时间', + close: '关闭', + selectPlaceholder: '请选择', } -} \ No newline at end of file +} diff --git a/src/views/HomeView.vue b/src/views/HomeView.vue index e3f1641..c600e04 100644 --- a/src/views/HomeView.vue +++ b/src/views/HomeView.vue @@ -1,80 +1,55 @@ @@ -103,7 +79,6 @@ import { ref, reactive, onMounted } from 'vue'; import { useRouter } from 'vue-router'; import { login, getIdByName } from '@/api/account'; import { getToken, setToken, setUser, setUserPass, getUserPass } from '@/utils/storage'; -import { ElLoading } from 'element-plus'; import { usePythonBridge } from '@/utils/pythonBridge' import { useI18n } from 'vue-i18n' @@ -117,7 +92,7 @@ function switchLanguage(lang) { } const { getVersion, stopScript } = usePythonBridge(); -let version = ref('5.1.0'); +let version = ref('5.9.0'); onMounted(() => { stopScript(); @@ -132,6 +107,7 @@ onMounted(() => { const router = useRouter(); +const isSubmitting = ref(false); const formData = ref({ tenantName: getUserPass() == null ? '' : getUserPass().tenantName, @@ -142,11 +118,10 @@ const formData = ref({ const onSubmit = () => { - const loading = ElLoading.service({ - lock: true, - text: 'Loading', - background: 'rgba(0, 0, 0, 0.7)', - }); + if (isSubmitting.value) { + return; + } + isSubmitting.value = true; setUserPass(formData.value); getIdByName(formData.value.tenantName).then((tenantId) => { console.log(tenantId) @@ -155,14 +130,16 @@ const onSubmit = () => { username: formData.value.userId, password: formData.value.password, }).then((res) => { - loading.close(); + isSubmitting.value = false; // console.log(res) setToken(res.tokenValue); setUser(res); router.push('/nav'); }).catch((err) => { - loading.close(); + isSubmitting.value = false; }); + }).catch(() => { + isSubmitting.value = false; }) @@ -175,153 +152,23 @@ const onSubmit = () => { height: 900px; overflow: hidden; box-sizing: border-box; + background: linear-gradient(180deg, #f3f5f9 0%, #eef1f5 100%); + display: flex; + align-items: center; + justify-content: center; + font-family: "Source Han Sans SC", "PingFang SC", "Microsoft YaHei", sans-serif; - /* 页面无法选中 */ -webkit-user-select: none; -moz-user-select: none; -ms-user-select: none; user-select: none; - - .container { - display: flex; - box-sizing: border-box; - width: 1600px; - height: 900px; - - .right { - box-sizing: border-box; - position: relative; - width: 1600px; - height: 900px; - padding: 20px 40px 20px 50px; - border-left: 3px solid #23516e; - position: relative; - /* 添加 position: relative */ - overflow: hidden; - /* 防止内容溢出 */ - - .version { - color: #fff; - position: absolute; - font-size: 20px; - bottom: 20px; - left: calc(50% - 50px); - // box-sizing: border-box; - // width: 1600px; - - } - - - .background-video { - position: absolute; - top: 0; - left: 0; - width: 100%; - height: 100%; - z-index: -1; - /* 确保视频在内容之下 */ - } - - .setup { - display: flex; - color: #fff; - - .setup-item { - padding: 10px 6px; - display: flex; - - &>div:nth-child(1) { - width: 20px; - height: 20px; - border-radius: 50%; - background-color: rgb(255, 255, 255); - margin-right: 5px; - } - } - } - - .logo { - padding: 20px 0; - } - - .from { - width: 420px; - // height: 320px; - color: @bg-color; - background-color: #ffffff44; - border-radius: 20px; - border: 1px solid #fff; - padding: 32px; - box-sizing: border-box; - - .from-title { - font-family: Source Han Sans SC; - font-weight: 500; - font-size: 24px; - color: @bg-color; - line-height: 37px; - - - div { - font-size: 20px; - font-weight: 600; - // border-bottom: 4px solid #1db97d; - } - } - - .from-input { - width: 100%; - padding: 15px 0; - - .from-input-item { - display: flex; - padding: 8px 0; - - .from-input-item-title { - color: @bg-color; - font-size: 18px; - font-weight: 500; - width: 80px; - height: 50px; - } - - .loginButton { - width: 359px; - height: 50px; - background: #FFFFFF; - border-radius: 24px; - border: 1px solid #FFFFFF; - - - font-family: Source Han Sans SC; - font-weight: 500; - font-size: 18px; - color: @bg-color; - line-height: 37px; - } - } - - .from-input-item1 { - display: flex; - width: 359px; - height: 50px; - background: @bg-color-light-light; - border-radius: 24px; - border: 1px solid #FFFFFF; - padding: 12px 25px 13px 25px; - box-sizing: border-box; - margin-bottom: 16px; - } - } - } - } - } } .center-line { display: flex; flex-direction: column; align-items: center; + // justify-content: center; } .center-justify { @@ -330,37 +177,247 @@ const onSubmit = () => { align-items: center; } -.center-align { +.auth-shell { + width: 1320px; + height: 760px; + position: relative; display: flex; - justify-content: space-between; + align-items: center; + justify-content: center; } -.center-flex { +.auth-shell::before, +.auth-shell::after { + content: ""; + position: absolute; + border-radius: 50%; + filter: blur(0); +} + +.auth-shell::before { + width: 420px; + height: 420px; + background: radial-gradient(circle, rgba(214, 226, 255, 0.7), rgba(214, 226, 255, 0)); + left: -80px; + top: -40px; +} + +.auth-shell::after { + width: 360px; + height: 360px; + background: radial-gradient(circle, rgba(255, 236, 214, 0.6), rgba(255, 236, 214, 0)); + right: -40px; + bottom: -60px; +} + +.top-actions { + position: absolute; + top: 50px; + right: 80px; display: flex; - justify-content: center; + gap: 16px; + z-index: 2; +} + +.setup-item { + background: rgba(255, 255, 255, 0.95); + border: 1px solid #e1e6f2; + border-radius: 16px; + padding: 8px 12px 8px 14px; + box-shadow: 0 8px 18px rgba(40, 57, 108, 0.12); + cursor: pointer; + transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease; + display: inline-flex; align-items: center; + gap: 6px; +} + +.setup-text { + font-size: 13px; + font-weight: 600; + color: #2b3347; + letter-spacing: 0.2px; +} + +.setup-item::after { + content: ""; + width: 6px; + height: 6px; + border-right: 2px solid #9aa1b3; + border-bottom: 2px solid #9aa1b3; + transform: rotate(45deg); + margin-top: -2px; +} + +.setup-item:hover { + transform: translateY(-1px); + border-color: #c9d2f4; + box-shadow: 0 12px 24px rgba(40, 57, 108, 0.16); +} + +.setup-item:active { + transform: translateY(0); +} + +.auth-card { + width: 1200px; + height: 680px; + display: flex; + background: #ffffff; + border-radius: 28px; + overflow: hidden; + box-shadow: 0 24px 60px rgba(40, 57, 108, 0.16); + position: relative; + z-index: 1; +} + +.auth-left { + width: 42%; + padding: 48px 56px; + display: flex; + flex-direction: column; + justify-content: center; +} + +.logo { + // margin-bottom: 24px; + display: flex; + align-items: center; + gap: 16px; +} + +.logo-image { + height: 200px; + margin-bottom: -20px; +} + +.logo-title { + font-size: 22px; + font-weight: 600; + color: #2b3347; + letter-spacing: 2px; + position: relative; + padding-left: 14px; + margin-top: 30px; +} + +.logo-title::before { + content: ""; + position: absolute; + left: 0; + top: 4px; + bottom: 4px; + width: 4px; + border-radius: 2px; + background: linear-gradient(180deg, #4f6ef7, #5b7bff); +} + +.welcome { + font-size: 24px; + font-weight: 600; + color: #2b3347; + margin-bottom: 8px; +} + +.from { + width: 100%; + color: #2b3347; + background-color: transparent; + border-radius: 0; + border: none; + padding: 0; + box-sizing: border-box; +} + +.from-input { + width: 100%; + padding: 8px 0 0 0; +} + +.field-label { + font-size: 13px; + color: #6b7280; + margin: 12px 0 6px; +} + +.from-input-item { + display: flex; + padding: 16px 0 0 0; +} + +.loginButton { + width: 100%; + height: 48px; + background: linear-gradient(135deg, #4f6ef7, #5b7bff); + border-radius: 14px; + border: none; + font-size: 16px; + font-weight: 600; + color: #ffffff; + box-shadow: 0 12px 24px rgba(79, 110, 247, 0.28); +} + +.from-input-item1 { + display: flex; + align-items: center; + width: 100%; + height: 48px; + background: #f6f8fc; + border-radius: 12px; + border: 1px solid #e6eaf2; + padding: 10px 14px; + box-sizing: border-box; + margin-bottom: 4px; + gap: 10px; +} + +.from-input-item1 img { + width: 18px; + height: 18px; + opacity: 0.6; +} + +.version { + margin-top: 24px; + font-size: 12px; + color: #9aa1b3; +} + +.auth-right { + width: 58%; + background: linear-gradient(160deg, #f8f9fc 0%, #f0f3f9 100%); + position: relative; + display: flex; + align-items: center; + justify-content: center; + overflow: hidden; +} + +.illustration { + width: 90%; + height: auto; + max-height: 88%; + object-fit: contain; + filter: drop-shadow(0 30px 60px rgba(40, 57, 108, 0.25)); } .el-input__wrapper { --el-input-focus-border-color: rgba(255, 255, 0, 0); --el-menu-hover-bg-color: rgba(255, 255, 0, 0); - } \ No newline at end of file + diff --git a/src/views/hometest.html b/src/views/hometest.html new file mode 100644 index 0000000..3f31175 --- /dev/null +++ b/src/views/hometest.html @@ -0,0 +1,347 @@ + + + + + + + Yolo Assistant - Elite Workstation + + + + + + + + +
+ +
+
+
+
+ 总数量 + analytics +
+
0
+
+
+
+ 新建主播 + person_add +
+
0
+
+
+
+ 查询 / 邀请 + compare_arrows +
+
0 / 0
+
+
+
+
+ 运行时间 +
00:00:00
+
+ +
+
+
+
+
+
+
+ +

公会账号 A

+
+ 今日查询: 0 +
+
+
+
+ + +
+
+ +
+ + visibility_off +
+
+
+ +
+
+
+
+
+ +

公会账号 B

+
+ 今日查询: 0 +
+
+
+
+ + +
+
+ + +
+
+ +
+
+
+
+
+
+
+ settings +
+

任务工作台配置

+
+
+
当前网络: 日本
+
+ 指定国家: + +
+
+
+
+
+
+

+ + 设置金币数量 +

+
+
+ 最小金币 + +
+
+ 最大金币 + +
+
+
+
+

+ + 设置粉丝数量 +

+
+
+ 最小粉丝 + +
+
+ 最大粉丝 + +
+
+
+
+

+ + 后台查询频率 +

+
+
+ + 次/小时 +
+
+ + 次/24小时 +
+
+
+
+
+
+ + + +
+
+ 期望邀请上限: +
+ + +
+
+
+
+ +

+ 到期时间: 2036-08-01 00:00:00 +

+
+
+
+
+
+
+
+
+
+ + + + \ No newline at end of file diff --git a/src/views/hosts/hostsList.vue b/src/views/hosts/hostsList.vue index 2629bb9..31485d4 100644 --- a/src/views/hosts/hostsList.vue +++ b/src/views/hosts/hostsList.vue @@ -1,4 +1,4 @@ -