pxb 1 месяц назад
Родитель
Сommit
5f37c2c291

Разница между файлами не показана из-за своего большого размера
+ 0 - 0
dist/assets/index-B3bZxtdW.css


Разница между файлами не показана из-за своего большого размера
+ 0 - 0
dist/assets/index-Dv-Sogwl.css


+ 1 - 1
dist/index.html

@@ -12,7 +12,7 @@
       </script>
     <script src="https://cdn.jsdelivr.net/npm/pako@2.1.0/dist/pako.min.js"></script>
     <title>Vite App</title>
-    <script type="module" crossorigin src="/assets/index-CZD8uthP.js"></script>
+    <script type="module" crossorigin src="/assets/index-CYDlgYEO.js"></script>
     <link rel="modulepreload" crossorigin href="/assets/vue-vendor-ByaAFEoM.js">
     <link rel="modulepreload" crossorigin href="/assets/element-plus-CX7swo72.js">
     <link rel="stylesheet" crossorigin href="/assets/index-B94DN3b4.css">

+ 224 - 98
src/views/Login/index.vue

@@ -22,61 +22,33 @@
       </el-tabs>
 
       <div v-show="activeLoginType === 'account'" class="form-wrapper">
-        <el-input
-            v-model="accountForm.account"
-            :placeholder="t('请输入账号')"
-            clearable
-            size="large"
-            class="custom-input"
-            @keyup.enter="onLoginClick"
-        >
+        <el-input v-model="accountForm.account" :placeholder="t('请输入账号')" clearable size="large" class="custom-input"
+          @keyup.enter="onLoginClick">
           <template #prefix>
-            <img src="@/assets/image/login/user.png" class="input-icon" alt="icon"/>
+            <img src="@/assets/image/login/user.png" class="input-icon" alt="icon" />
           </template>
         </el-input>
 
-        <el-input
-            v-model="accountForm.password"
-            :placeholder="t('请输入登录密码')"
-            type="password"
-            show-password
-            clearable
-            size="large"
-            class="custom-input"
-            @keyup.enter="onLoginClick"
-        >
+        <el-input v-model="accountForm.password" :placeholder="t('请输入登录密码')" type="password" show-password clearable
+          size="large" class="custom-input" @keyup.enter="onLoginClick">
           <template #prefix>
-            <img src="@/assets/image/login/lock.png" class="input-icon" alt="icon"/>
+            <img src="@/assets/image/login/lock.png" class="input-icon" alt="icon" />
           </template>
         </el-input>
       </div>
 
       <div v-show="activeLoginType === 'email'" class="form-wrapper">
-        <el-input
-            v-model="emailForm.account"
-            :placeholder="t('请输入登录邮箱')"
-            clearable
-            size="large"
-            class="custom-input"
-            @keyup.enter="onLoginClick"
-        >
+        <el-input v-model="emailForm.account" :placeholder="t('请输入登录邮箱')" clearable size="large" class="custom-input"
+          @keyup.enter="onLoginClick">
           <template #prefix>
-            <img src="@/assets/image/login/account.png" class="input-icon" alt="icon"/>
+            <img src="@/assets/image/login/account.png" class="input-icon" alt="icon" />
           </template>
         </el-input>
 
-        <el-input
-            v-model="emailForm.password"
-            :placeholder="t('请输入登录密码')"
-            type="password"
-            show-password
-            clearable
-            size="large"
-            class="custom-input"
-            @keyup.enter="onLoginClick"
-        >
+        <el-input v-model="emailForm.password" :placeholder="t('请输入登录密码')" type="password" show-password clearable
+          size="large" class="custom-input" @keyup.enter="onLoginClick">
           <template #prefix>
-            <img src="@/assets/image/login/lock.png" class="input-icon" alt="icon"/>
+            <img src="@/assets/image/login/lock.png" class="input-icon" alt="icon" />
           </template>
         </el-input>
       </div>
@@ -115,16 +87,17 @@
 
 <script setup>
 import { ref, reactive, onMounted } from 'vue';
-import { useRouter } from 'vue-router';
+import { useRoute, useRouter } from 'vue-router';
 import { useI18n } from 'vue-i18n';
 import { ElMessage, ElMessageBox } from 'element-plus';
 import { Message, Lock, Iphone, Key } from '@element-plus/icons-vue';
 import socket from '@/utils/websocket.js'
 import { appDescription, appName } from '@/settings/index.mjs';
 import selectLang from '@/components/selectLang/index.vue';
-import {postUserLogin, userGuestRegister} from "@/request/api";
+import { postUserLogin, userGuestRegister } from "@/request/api";
 
 const router = useRouter();
+const route = useRoute();
 const { t } = useI18n();
 
 const agreed = ref(false);
@@ -164,13 +137,13 @@ function updateRememberPwdStatus() {
 
 function onAgreementClick() {
   ElMessageBox.alert(
-      `<div style="line-height: 1.6; color: #333; text-align: left;">
+    `<div style="line-height: 1.6; color: #333; text-align: left;">
       <h3 style="margin-bottom: 16px;">平台服务协议</h3>
       <p>1. 本平台提供相关的体育与彩票服务...</p>
       <p>2. 请确保您已达到法定年龄...</p>
     </div>`,
-      t('产品服务协议'),
-      { dangerouslyUseHTMLString: true, confirmButtonText: t('确定'), customClass: 'agreement-msgbox' }
+    t('产品服务协议'),
+    { dangerouslyUseHTMLString: true, confirmButtonText: t('确定'), customClass: 'agreement-msgbox' }
   );
 }
 
@@ -197,13 +170,13 @@ function validateAccountForm() {
 function checkAgreement(callback) {
   if (!agreed.value) {
     ElMessageBox.confirm(
-        t('为了保障您的权益,请先阅读并同意') + '《' + t('产品服务协议') + '》',
-        t('温馨提示'),
-        { confirmButtonText: t('同意并继续'), cancelButtonText: t('取消'), type: 'warning' }
+      t('为了保障您的权益,请先阅读并同意') + '《' + t('产品服务协议') + '》',
+      t('温馨提示'),
+      { confirmButtonText: t('同意并继续'), cancelButtonText: t('取消'), type: 'warning' }
     ).then(() => {
       agreed.value = true;
       callback();
-    }).catch(() => {});
+    }).catch(() => { });
     return;
   }
   callback();
@@ -214,7 +187,7 @@ function onGuestClick() {
 }
 
 function onLineService() {
-  if(!localStorage.getItem('youke_token')){
+  if (!localStorage.getItem('youke_token')) {
     userGuestRegister().then((res) => {
       localStorage.setItem('youke_token', res.data.token);
       router.push({
@@ -282,13 +255,18 @@ function onLoginClick() {
       }, 2000)
 
       setTimeout(() => {
-        // 判断当前是不是第一页 (基于 history 路由模式)
-        if (window.history.state && window.history.state.back) {
-          // 不是第一页,返回上一页
-          router.back();
+        console.log(route.query.from);
+        // 判断来源是否为注册页
+        if (route.query.from === 'register') {
+          // 从注册页来,直接跳转首页并替换登录页,避免回退到注册页
+          router.replace('/');
         } else {
-          // 是第一页,按原来的方式跳转
-          router.push('/');
+          // 其他来源:保持原有逻辑(尝试返回上一页,否则跳转首页)
+          if (window.history.state && window.history.state.back) {
+            router.back();
+          } else {
+            router.push('/');
+          }
         }
       }, 1000);
     });
@@ -300,27 +278,67 @@ onMounted(() => { initRecall(); });
 
 <style scoped lang="scss">
 $mclaren-orange: #f8b932; // 迈凯伦主背景橙色
-$btn-orange: #f8b932;     // 登录按钮橙色
+$btn-orange: #f8b932; // 登录按钮橙色
 $text-light: rgba(255, 255, 255, 0.8);
 
 .pc-login-container {
-  position: relative; min-height: 100vh; width: 100vw;
+  position: relative;
+  min-height: 100vh;
+  width: 100vw;
   background-image: url('@/assets/image/login/bg-login-pc.png');
   background-size: cover;
   background-position: center;
-  display: flex; justify-content: center; align-items: center; overflow: hidden;
+  display: flex;
+  justify-content: center;
+  align-items: center;
+  overflow: hidden;
+
+  .top-left-logo {
+    position: absolute;
+    top: 30px;
+    left: 40px;
+    height: 32px;
+    z-index: 10;
+  }
 
-  .top-left-logo { position: absolute; top: 30px; left: 40px; height: 32px; z-index: 10; }
-  .lang-selector-wrapper { position: absolute; top: 24px; right: 32px; z-index: 10; }
+  .lang-selector-wrapper {
+    position: absolute;
+    top: 24px;
+    right: 32px;
+    z-index: 10;
+  }
 
   /* 装饰光晕 */
-  .bg-glow { position: absolute; border-radius: 50%; filter: blur(120px); opacity: 0.1; z-index: 1; }
-  .glow-top-right { top: -10%; right: 10%; width: 400px; height: 400px; background-color: $mclaren-orange; }
-  .glow-bottom-left { bottom: -10%; left: 10%; width: 300px; height: 300px; background-color: #fff; }
+  .bg-glow {
+    position: absolute;
+    border-radius: 50%;
+    filter: blur(120px);
+    opacity: 0.1;
+    z-index: 1;
+  }
+
+  .glow-top-right {
+    top: -10%;
+    right: 10%;
+    width: 400px;
+    height: 400px;
+    background-color: $mclaren-orange;
+  }
+
+  .glow-bottom-left {
+    bottom: -10%;
+    left: 10%;
+    width: 300px;
+    height: 300px;
+    background-color: #fff;
+  }
 
   .login-card {
-    min-width: 480px; width: 30%;
-    position: relative; z-index: 2; padding: 30px;
+    min-width: 480px;
+    width: 30%;
+    position: relative;
+    z-index: 2;
+    padding: 30px;
     background-color: rgba(255, 255, 255, 0.1);
     backdrop-filter: blur(20px);
     border-radius: 24px;
@@ -336,46 +354,100 @@ $text-light: rgba(255, 255, 255, 0.8);
       flex-direction: column;
       align-items: center;
 
-      .mclaren-img-logo { height: 34px; margin-bottom: 2px; }
+      .mclaren-img-logo {
+        height: 34px;
+        margin-bottom: 2px;
+      }
 
       .main-title {
-        color: #fff; font-size: 20px; font-weight: 800;
-        letter-spacing: 5px; line-height: 1;
+        color: #fff;
+        font-size: 20px;
+        font-weight: 800;
+        letter-spacing: 5px;
+        line-height: 1;
         margin-top: 15px;
       }
 
       .sub-partner {
-        color: rgba(255, 255, 255, 0.85); font-size: 12px;
-        letter-spacing: 1px; margin-top: 4px;
+        color: rgba(255, 255, 255, 0.85);
+        font-size: 12px;
+        letter-spacing: 1px;
+        margin-top: 4px;
       }
     }
 
     /* 选项卡样式 */
     .custom-tabs {
       margin-bottom: 20px;
-      :deep(.el-tabs__nav-wrap::after) { display: none; }
-      :deep(.el-tabs__active-bar) { display: none; }
-      :deep(.el-tabs__nav) { width: 100%; display: flex; gap: 12px; }
+
+      :deep(.el-tabs__nav-wrap::after) {
+        display: none;
+      }
+
+      :deep(.el-tabs__active-bar) {
+        display: none;
+      }
+
+      :deep(.el-tabs__nav) {
+        width: 100%;
+        display: flex;
+        gap: 12px;
+      }
+
       :deep(.el-tabs__item) {
-        flex: 1; height: 46px; line-height: 46px; padding: 0 !important;
-        color: #ccc; font-size: 15px; text-align: center;
-        background: rgba(255, 255, 255, 0.12); border-radius: 8px;
+        flex: 1;
+        height: 46px;
+        line-height: 46px;
+        padding: 0 !important;
+        color: #ccc;
+        font-size: 15px;
+        text-align: center;
+        background: rgba(255, 255, 255, 0.12);
+        border-radius: 8px;
         transition: all 0.3s;
-        &.is-active { background: rgba(255, 255, 255, 0.25); color: #fff; font-weight: bold; }
+
+        &.is-active {
+          background: rgba(255, 255, 255, 0.25);
+          color: #fff;
+          font-weight: bold;
+        }
       }
     }
 
-    .form-wrapper { display: flex; flex-direction: column; gap: 15px; }
+    .form-wrapper {
+      display: flex;
+      flex-direction: column;
+      gap: 15px;
+    }
 
     /* 输入框玻璃样式 */
     .custom-input {
       :deep(.el-input__wrapper) {
         background-color: rgba(255, 255, 255, 0.2);
-        box-shadow: none; height: 50px; border-radius: 10px;
-        &:hover, &.is-focus { box-shadow: 0 0 0 1px $mclaren-orange inset; }
+        box-shadow: none;
+        height: 50px;
+        border-radius: 10px;
+
+        &:hover,
+        &.is-focus {
+          box-shadow: 0 0 0 1px $mclaren-orange inset;
+        }
+      }
+
+      :deep(.el-input__inner) {
+        color: #fff;
+
+        &::placeholder {
+          color: #bbb;
+        }
+      }
+
+      .input-icon {
+        width: 20px;
+        height: 20px;
+        opacity: 0.8;
+        margin-right: 5px;
       }
-      :deep(.el-input__inner) { color: #fff; &::placeholder { color: #bbb; } }
-      .input-icon { width: 20px; height: 20px; opacity: 0.8; margin-right: 5px; }
     }
 
     /* 选项与协议区域:一左一右 */
@@ -401,29 +473,74 @@ $text-light: rgba(255, 255, 255, 0.8);
     }
 
     .custom-checkbox {
-      :deep(.el-checkbox__label) { color: #bbb; font-size: 13px; }
-      :deep(.el-checkbox__input.is-checked .el-checkbox__inner) { background-color: $btn-orange; border-color: $btn-orange; }
-      :deep(.el-checkbox__inner) { background-color: rgba(255, 255, 255, 0.1); border-color: rgba(255,255,255,0.4); }
+      :deep(.el-checkbox__label) {
+        color: #bbb;
+        font-size: 13px;
+      }
+
+      :deep(.el-checkbox__input.is-checked .el-checkbox__inner) {
+        background-color: $btn-orange;
+        border-color: $btn-orange;
+      }
+
+      :deep(.el-checkbox__inner) {
+        background-color: rgba(255, 255, 255, 0.1);
+        border-color: rgba(255, 255, 255, 0.4);
+      }
     }
 
     /* 登录按钮 */
     .submit-btn {
-      width: 100%; height: 52px; font-size: 18px; font-weight: bold; color: #fff;
-      background-color: $btn-orange; border-color: $btn-orange; border-radius: 10px;
-      letter-spacing: 4px; margin-bottom: 20px;
-      &:hover { opacity: 0.9; transform: translateY(-1px); }
+      width: 100%;
+      height: 52px;
+      font-size: 18px;
+      font-weight: bold;
+      color: #fff;
+      background-color: $btn-orange;
+      border-color: $btn-orange;
+      border-radius: 10px;
+      letter-spacing: 4px;
+      margin-bottom: 20px;
+
+      &:hover {
+        opacity: 0.9;
+        transform: translateY(-1px);
+      }
     }
 
     /* 底部按钮组 */
     .bottom-action-group {
-      display: flex; justify-content: space-between; gap: 12px; margin-top: 10px;
+      display: flex;
+      justify-content: space-between;
+      gap: 12px;
+      margin-top: 10px;
+
       .action-item {
-        flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: center;
-        background: rgba(255, 255, 255, 0.15); border-radius: 10px; padding: 12px 0; cursor: pointer;
+        flex: 1;
+        display: flex;
+        flex-direction: column;
+        align-items: center;
+        justify-content: center;
+        background: rgba(255, 255, 255, 0.15);
+        border-radius: 10px;
+        padding: 12px 0;
+        cursor: pointer;
         transition: all 0.3s ease;
-        &:hover { background: rgba(255, 255, 255, 0.25); }
-        .action-icon { width: 24px; height: 24px; margin-bottom: 6px; }
-        span { font-size: 13px; color: #ddd; }
+
+        &:hover {
+          background: rgba(255, 255, 255, 0.25);
+        }
+
+        .action-icon {
+          width: 24px;
+          height: 24px;
+          margin-bottom: 6px;
+        }
+
+        span {
+          font-size: 13px;
+          color: #ddd;
+        }
       }
     }
   }
@@ -433,10 +550,19 @@ $text-light: rgba(255, 255, 255, 0.8);
     background-color: rgba(40, 40, 40, 0.95) !important;
     backdrop-filter: blur(10px);
     border: 1px solid rgba(255, 255, 255, 0.1) !important;
+
     .el-select-dropdown__item {
       color: #eee;
-      &.is-hovering, &:hover { background-color: rgba(255, 255, 255, 0.1); }
-      &.is-selected { color: $mclaren-orange; font-weight: bold; }
+
+      &.is-hovering,
+      &:hover {
+        background-color: rgba(255, 255, 255, 0.1);
+      }
+
+      &.is-selected {
+        color: $mclaren-orange;
+        font-weight: bold;
+      }
     }
   }
 }

+ 1 - 1
src/views/Register/index.vue

@@ -67,7 +67,7 @@
       </el-button>
 
       <div class="bottom-action-group">
-        <div class="action-item" @click="router.replace('/login')">
+        <div class="action-item" @click="router.push({ path: '/login', query: { from: 'register' } })">
           <img src="@/assets/image/login/user.png" class="action-icon" alt="login" />
           <span>{{ t('去登录') }}</span>
         </div>

Некоторые файлы не были показаны из-за большого количества измененных файлов