5 Commits

  1. 5
      .env.development
  2. 5
      package-lock.json
  3. 14
      src/api/API.js
  4. 139
      src/utils/request.js
  5. 645
      src/views/zhongchou/index.vue
  6. 13
      vite.config.js

5
.env.development

@ -5,10 +5,7 @@ VITE_OUTPUT_DIR = 'dev'
VITE_PUBLIC_PATH = /
#新数据接口
# VITE_APP_API_BASE_URL = "http://39.101.133.168:8828/link"
# VITE_APP_API_BASE_URL = "http://47.92.148.30:3003/mock/3267"
VITE_APP_API_BASE_URL = "http://dbqb.nfdxy.net/devLotApi"
VITE_APP_API_BASE_URL = "http://39.101.133.168:8828/link"
# Whether to open mock

5
package-lock.json

@ -716,8 +716,9 @@
},
"node_modules/axios": {
"version": "1.10.0",
"resolved": "https://registry.npmjs.org/axios/-/axios-1.10.0.tgz",
"resolved": "https://mirrors.huaweicloud.com/repository/npm/axios/-/axios-1.10.0.tgz",
"integrity": "sha512-/1xYAC4MP/HEG+3duIhFr4ZQXR4sQXOIe+o6sdqzeykGLx6Upp/1p8MHqhINOvGeP7xyNHe7tsiJByc4SSVUxw==",
"license": "MIT",
"dependencies": {
"follow-redirects": "^1.15.6",
"form-data": "^4.0.0",
@ -1683,7 +1684,7 @@
},
"axios": {
"version": "1.10.0",
"resolved": "https://registry.npmjs.org/axios/-/axios-1.10.0.tgz",
"resolved": "https://mirrors.huaweicloud.com/repository/npm/axios/-/axios-1.10.0.tgz",
"integrity": "sha512-/1xYAC4MP/HEG+3duIhFr4ZQXR4sQXOIe+o6sdqzeykGLx6Upp/1p8MHqhINOvGeP7xyNHe7tsiJByc4SSVUxw==",
"requires": {
"follow-redirects": "^1.15.6",

14
src/api/API.js

@ -2,17 +2,3 @@ import request from "../utils/request";
const APIurl = import.meta.env.VITE_APP_API_BASE_URL;
export function addRecordAPI(data) {
return request({
url: '/Api/api/funding/addRecord',
method: 'post',
data: data
})
}
// 新增:获取活动信息接口
export function getActivity1API() {
return request({
url: '/Api/api/funding/getActivity1',
method: 'post'
})
}

139
src/utils/request.js

@ -1,29 +1,130 @@
import axios from 'axios'
import { ElMessage } from 'element-plus'
import { config } from '@/config'
const ERROR_MESSAGES = {
badRequest: '请求错误(400)',
unauthorized: '未授权,请登录(401)',
forbidden: '拒绝访问(403)',
notFound: `请求地址出错: ${'[具体 URL 将在这里被替换]'}`,
methodNotAllowed: '请求方法未允许(405)',
requestTimeout: '请求超时(408)',
internalServerError: '服务器内部错误(500)',
notImplemented: '服务未实现(501)',
badGateway: '网络错误(502)',
serviceUnavailable: '服务不可用(503)',
gatewayTimeout: '网络超时(504)',
httpVersionNotSupported: 'HTTP 版本不受支持(505)',
defaultConnectionError: '连接错误: [原始错误消息]',
networkError: '网络异常,请检查后重试!',
serverFailure: '连接到服务器失败,请联系管理员'
}
// 创建基础实例
const service = axios.create({
baseURL: import.meta.env.VITE_APP_BASE_API,
timeout: 10000
baseURL: '', // url = base url + request url+
// timeout: 50000,
withCredentials: false // send cookies when cross-domain requests
// headers: {
// // clear cors
// 'Cache-Control': 'no-cache',
// Pragma: 'no-cache'
// }
})
// 请求拦截器(简化版)
service.interceptors.request.use(config => {
// 添加token逻辑(如果存在)
const token = localStorage.getItem('token')
if (token) {
config.headers['Authorization'] = 'Bearer ' + +SsksARQgUHIbIG3rRnnbZi0+fEeMx8pywnIlrmTxo5EOPR/wjWDV7w7+ZUseiBtf9kFa/atmNx6QfSpv5w
}
return config
})
const setErrorMsg = (error) => {
if (error && error.response) {
switch (error.response.status) {
case 400:
error.message = ERROR_MESSAGES.badRequest
break
case 401:
error.message = ERROR_MESSAGES.unauthorized
break
case 403:
error.message = ERROR_MESSAGES.forbidden
break
case 404:
error.message = ERROR_MESSAGES.notFound.replace(
'[具体 URL 将在这里被替换]',
error.response.config.url
)
break
case 405:
error.message = ERROR_MESSAGES.methodNotAllowed
break
case 408:
error.message = ERROR_MESSAGES.requestTimeout
break
case 500:
error.message = ERROR_MESSAGES.internalServerError
break
case 501:
error.message = ERROR_MESSAGES.notImplemented
break
case 502:
error.message = ERROR_MESSAGES.badGateway
break
case 503:
error.message = ERROR_MESSAGES.serviceUnavailable
break
case 504:
error.message = ERROR_MESSAGES.gatewayTimeout
break
case 505:
error.message = ERROR_MESSAGES.httpVersionNotSupported
break
default:
error.message = ERROR_MESSAGES.defaultConnectionError.replace(
'[原始错误消息]',
error.message
)
}
} else {
if (error.message === 'Network Error') {
error.message = ERROR_MESSAGES.networkError
} else {
error.message = ERROR_MESSAGES.serverFailure
}
}
return error.message
}
// Request interceptors
service.interceptors.request.use(
(config) => {
// 在此处添加请求头等,如添加 token
// if (store.state.token) {
// config.headers['Authorization'] = `Bearer ${store.state.token}`
// }
return config
},
(error) => {
return Promise.reject(error)
}
)
// 响应拦截器(简化版)
// Response interceptors
service.interceptors.response.use(
response => response.data,
error => {
ElMessage.error(error.message || '请求错误')
return Promise.reject(error)
}
async (response) => {
// await new Promise(resovle => setTimeout(resovle, 3000));
// if (response.config.loadingInstance) {
// response.config.loadingInstance.close();
// }
const res = response.data
if (res.code !== 200) {
const errorMsg = res.msg || 'Unkonw error'
// ElMessage.error(errorMsg)
// return Promise.reject(new Error(res.msg || 'Error'))
return response.data
} else {
return response.data
}
},
(error) => {
const errorMessage = setErrorMsg(error)
ElMessage.error(errorMessage)
return Promise.reject(error)
}
)
export default service
export default service

645
src/views/zhongchou/index.vue

@ -24,24 +24,28 @@
<div class="stock-card us-card">
<div class="card-content us-content">
<div class="progress-section">
<div class="progress-bar">
<div class="progress-fill"></div>
</div>
<!-- 美股区域刻度 -->
<div class="time-markers">
<div class="marker marker-text" v-for="time in timeMarkers" :key="time" :class="{
'reached': (15 - usUsedTime) <= time,
'gold': (15 - usUsedTime) > time
}">
<div class="marker"
v-for="time in [15, 12, 9, 6, 3, 0]"
:key="time"
:class="{
'marker-orange': time <= 3,
'marker-blue': time >= 6
}">
{{ time }}
</div>
</div>
<div class="progress-bar">
<div class="progress-fill" :style="{ height: (100 - usProgress) + '%' }"></div>
<div class="mini-rocket us-mini-rocket" :style="{ bottom: (100 - usProgress - 20) + '%' }">
<img src="@/assets/img/zhongchou/rocket.gif" alt="小火箭" />
</div>
</div>
</div>
<!-- 美股剩余时间显示 -->
<div class="stock-info">
<h3>距美股实时数据</h3>
<h3>还剩{{ numberToChinese(usDisplayTime) }}分钟</h3>
<h3>还剩6分钟</h3>
</div>
</div>
</div>
@ -71,22 +75,26 @@
<div class="stock-content">
<div class="stock-card hk-card">
<div class="card-content hk-content">
<!-- 港股剩余时间显示 -->
<div class="stock-info">
<h3>距港股实时数据</h3>
<h3>还剩{{ numberToChinese(hkDisplayTime) }}分钟</h3>
<h3>还剩9分钟</h3>
</div>
<div class="progress-section">
<div class="progress-bar">
<div class="progress-fill"></div>
<div class="progress-fill" :style="{ height: (100 - hkProgress) + '%' }"></div>
<div class="mini-rocket hk-mini-rocket" :style="{ bottom: (100 - hkProgress - 20) + '%' }">
<img src="@/assets/img/zhongchou/rocket.gif" alt="小火箭" />
</div>
</div>
<!-- 港股区域刻度 -->
<div class="time-markers">
<div class="marker marker-text" v-for="time in timeMarkers" :key="time" :class="{
'reached': (15 - hkUsedTime) <= time,
'gold': (15 - hkUsedTime) > time
}">
<div class="marker"
v-for="time in [15, 12, 9, 6, 3, 0]"
:key="time"
:class="{
'marker-orange': time <= 3,
'marker-red': time >= 6
}">
{{ time }}
</div>
</div>
@ -113,11 +121,10 @@
<div class="rules-list">
<p>1. 活动时间为2025年7月26日-2025年8月5日</p>
<p>2. 每人每天有3个活动助力参与机会</p>
<p>3. 助力时间为15分钟每一个人参与助力即可时间</p>
<p> 分钟</p>
<p>3. 助力时间为15分钟每一个人参与助力即可时间分钟</p>
<p>4. 助力成功后平台服务市场将获取实时数据</p>
<p>5. 平台对数据众筹上线后您的方案数据将优化成对应</p>
<p> 大数据的实时数据优化参考</p>
<p>5. 平台对数据众筹上线后您的方案数据将优化成对应大数据的实时数据优化</p>
<p>参考</p>
</div>
</div>
<div class="close-btn" @click="hideRules"></div>
@ -126,142 +133,18 @@
</div>
</div>
</template>
<script setup>
import { addRecordAPI ,getActivity1API } from '../../api/API'
import { ref, computed, onMounted, nextTick, watch } from 'vue'
// 使
async function fetchActivity() {
try {
const response = await getActivity1API()
if (response.code === 200) {
console.log('活动数据:', response.data)
//
// response.data marketOne, marketTwo, startTime, endTime
} else {
console.error('获取活动失败:', response.message)
}
} catch (error) {
console.error('请求错误:', error)
}
}
const numberToChinese = (num) => {
const chineseNumbers = ['零', '一', '二', '三', '四', '五', '六', '七', '八', '九', '十', '十一', '十二', '十三', '十四', '十五']
return chineseNumbers[num] || num.toString()
}
//
const progressBarRef = ref(null)
const progressBarHeight = ref(0)
//
const updateProgressBarHeight = () => {
if (progressBarRef.value) {
progressBarHeight.value = progressBarRef.value.offsetHeight
}
}
// - 015
const timeMarkers = computed(() => {
return [0, 3, 6, 9, 12, 15]
})
// -
const getProgressHeight = (remainingMinutes, totalMinutes = 15) => {
//
// remainingMinutes = totalMinutes 0%
// remainingMinutes = 0 100%
const usedMinutes = totalMinutes - remainingMinutes
return Math.max((usedMinutes / totalMinutes) * 100, 0)
}
//
const showRules = ref(false)
<script setup>
import { ref } from 'vue'
//
const activeArea = ref(null)
const usBoostStatus = ref(false)
const hkBoostStatus = ref(false)
const showRulesModal = ref(false)
// -
const usRemainingTime = ref(9) //
const hkRemainingTime = ref(6) //
const usTotalTime = ref(15) // 15
const hkTotalTime = ref(15) // 15
//
const usProgressHeight = computed(() => {
return getProgressHeight(usRemainingTime.value, usTotalTime.value)
})
const hkProgressHeight = computed(() => {
return getProgressHeight(hkRemainingTime.value, hkTotalTime.value)
})
//
const usDisplayTime = computed(() => {
return Math.max(0, usRemainingTime.value)
})
const hkDisplayTime = computed(() => {
return Math.max(0, hkRemainingTime.value)
})
// 使
const usUsedTime = computed(() => {
return usTotalTime.value - usRemainingTime.value
})
const hkUsedTime = computed(() => {
return hkTotalTime.value - hkRemainingTime.value
})
//
watch([usRemainingTime, hkRemainingTime], () => {
nextTick(() => {
updateProgressDisplay()
})
})
//
const updateProgressDisplay = () => {
//
const usFill = document.querySelector('.us-content .progress-fill')
if (usFill) {
usFill.style.height = `${usProgressHeight.value}%`
}
//
const hkFill = document.querySelector('.hk-content .progress-fill')
if (hkFill) {
hkFill.style.height = `${hkProgressHeight.value}%`
}
}
//
onMounted(() => {
nextTick(() => {
updateProgressBarHeight()
updateProgressDisplay()
//
window.addEventListener('resize', () => {
nextTick(() => {
updateProgressBarHeight()
})
})
})
})
//
const simulateTimeDecrease = (area) => {
if (area === 'us' && usRemainingTime.value > 0) {
usRemainingTime.value = Math.max(0, usRemainingTime.value - 1)
} else if (area === 'hk' && hkRemainingTime.value > 0) {
hkRemainingTime.value = Math.max(0, hkRemainingTime.value - 1)
}
}
const usBoostStatus = ref(false) //
const hkBoostStatus = ref(false) //
const showRulesModal = ref(false) //
// -
const usProgress = ref(40) // (40% = 9)
const hkProgress = ref(60) // (60% = 6)
const handleAreaClick = (area) => {
if (activeArea.value === area) {
@ -271,58 +154,33 @@ const handleAreaClick = (area) => {
}
}
const handleBoostClick = async (area) => {
const handleBoostClick = (area) => {
if (area === 'us' && !usBoostStatus.value) {
try {
// API
const response = await addRecordAPI({
"activityId": 1,
"marketSign": "usa"
});
if (response.code === 200) {
usBoostStatus.value = true
// 1
simulateTimeDecrease('us')
console.log('美股助力成功:', response.message)
console.log('美股已助力,剩余时间:', usRemainingTime.value)
} else {
console.error('美股助力失败:', response.message)
}
} catch (error) {
console.error('美股助力请求失败:', error)
}
usBoostStatus.value = true
console.log('美股已助力');
} else if (area === 'hk' && !hkBoostStatus.value) {
try {
// API
const response = await addRecordAPI({
"activityId": 1,
"marketSign": "hk"
});
if (response.code === 200) {
hkBoostStatus.value = true
// 1
simulateTimeDecrease('hk')
console.log('港股助力成功:', response.message)
console.log('港股已助力,剩余时间:', hkRemainingTime.value)
} else {
console.error('港股助力失败:', response.message)
}
} catch (error) {
console.error('港股助力请求失败:', error)
}
hkBoostStatus.value = true
console.log('港股已助力');
}
//
}
const showRulesFunc = () => {
const showRules = () => {
showRulesModal.value = true
}
const hideRules = () => {
showRulesModal.value = false
}
//
const testProgressChange = () => {
//
usProgress.value = Math.min(100, usProgress.value + 10)
hkProgress.value = Math.min(100, hkProgress.value + 10)
}
</script>
<style scoped>
/* 禁用页面滚动 */
:global(html, body) {
@ -370,6 +228,7 @@ const hideRules = () => {
justify-content: center;
flex: 1;
gap: 10px;
margin-left: 70px; /* 往右移动大标题 */
}
/* 主标题图片响应式样式 */
@ -397,8 +256,8 @@ const hideRules = () => {
.rules-text {
color: #fff;
font-size: 12px;
font-weight: 500;
font-size: 16px;
font-weight: 600;
text-shadow: 0 1px 2px rgba(0, 0, 0, 0.5);
white-space: nowrap;
}
@ -423,11 +282,26 @@ const hideRules = () => {
background-repeat: no-repeat;
background-size: contain;
background-position: center;
font-size: 1.2rem;
color: rgba(255, 255, 255, 0.9);
font-size: 1.4rem;
font-weight: 600;
color: #fff;
text-shadow: 0 2px 4px rgba(0, 0, 0, 0.8), 0 0 10px rgba(255, 255, 255, 0.3);
display: inline-block;
padding: 10px 20px;
padding: 12px 25px;
min-width: fit-content;
border-radius: 8px;
box-shadow: 0 4px 15px rgba(0, 0, 0, 0.3);
transition: all 0.3s ease;
animation: glow 2s ease-in-out infinite alternate;
}
@keyframes glow {
from {
text-shadow: 0 2px 4px rgba(0, 0, 0, 0.8), 0 0 10px rgba(255, 255, 255, 0.3);
}
to {
text-shadow: 0 2px 4px rgba(0, 0, 0, 0.8), 0 0 20px rgba(255, 255, 255, 0.6), 0 0 30px rgba(255, 255, 255, 0.4);
}
}
@ -460,15 +334,7 @@ const hideRules = () => {
transform-style: preserve-3d;
transform-origin: center center;
}
/* 为所有图片添加渲染优化 */
/* .stock-card img,
.rocket-body img,
.base-image img {
image-rendering: -webkit-optimize-contrast;
image-rendering: crisp-edges;
-webkit-backface-visibility: hidden;
transform: translateZ(0);
} */
/* 美股卡片默认位置 - 火箭左侧,向内倾斜 */
.left-area {
transform: translateX(-25vw) rotateY(25deg) scale(1.5);
@ -522,10 +388,7 @@ const hideRules = () => {
position: absolute;
z-index: 10;
transform: translateZ(0);
/* 新增位置调整 */
top: 80%; /* 垂直居中,可调整为具体像素值如 100px */
left: 50%; /* 水平居中,可调整为具体像素值如 200px */
transform: translate(-50%, -50%) translateZ(0); /* 居中偏移 */
transition: opacity 0.5s ease;
}
.rocket-area.hidden {
@ -585,7 +448,6 @@ const hideRules = () => {
display: flex;
flex-direction: column;
justify-content: flex-start;
/* 从 flex-start 改为 center */
align-items: center;
min-width: 0;
/* 允许flex项目收缩到内容以下 */
@ -596,7 +458,7 @@ const hideRules = () => {
/* 股票信息标题样式 */
.stock-info h3 {
margin: 5px 0;
font-size: 1.33rem;
font-size: 1rem;
line-height: 1.2;
word-wrap: break-word;
/* 允许长单词换行 */
@ -606,77 +468,96 @@ const hideRules = () => {
/* 自动断字 */
}
/* 通用进度条区域样式 */
/* 进度条区域 */
.progress-section {
display: flex;
align-items: center;
justify-content: center;
gap: 15px;
}
/* 美股内容布局 - 进度条在右边,刻度在左边 */
.us-content {
flex-direction: row;
}
.us-content .progress-section {
display: flex;
align-items: center;
justify-content: center;
gap: 15px;
flex-direction: row-reverse;
/* 刻度在左,进度条在右 */
}
/* 港股内容布局 - 进度条在左边,刻度在右边 */
.hk-content {
flex-direction: row;
}
.hk-content .progress-section {
display: flex;
align-items: center;
justify-content: center;
align-items: flex-start;
gap: 15px;
flex-direction: row;
/* 进度条在左,刻度在右 */
}
/* 默认进度条容器样式 */
.progress-bar {
width: 20px;
height: 350px;
height: 200px;
background: rgba(255, 255, 255, 0.8);
border-radius: 10px;
position: relative;
overflow: visible;
}
/* 美股进度条容器 - 蓝色主题背景 */
/* 美股进度条 - 蓝色发光效果 */
.us-content .progress-bar {
background: linear-gradient(to top,
rgba(79, 195, 247, 0.2),
rgba(41, 182, 246, 0.3),
rgba(2, 136, 209, 0.4)
);
border: 1px solid rgba(41, 182, 246, 0.5);
box-shadow: 0 0 10px rgba(41, 182, 246, 0.3);
}
/* 港股进度条容器 - 红色主题背景 */
box-shadow: 0 0 20px rgba(0, 150, 255, 0.8), 0 0 40px rgba(0, 100, 255, 0.4);
position: relative;
}
/* 美股刻度线容器 */
.us-content .progress-bar::before {
content: '';
position: absolute;
left: -10px;
top: 0;
width: 10px;
height: 200px;
background-image:
linear-gradient(to right, rgba(0, 150, 255, 0.9) 0%, rgba(0, 150, 255, 0.9) 100%),
linear-gradient(to right, rgba(0, 150, 255, 0.9) 0%, rgba(0, 150, 255, 0.9) 100%),
linear-gradient(to right, rgba(0, 150, 255, 0.9) 0%, rgba(0, 150, 255, 0.9) 100%),
linear-gradient(to right, rgba(0, 150, 255, 0.9) 0%, rgba(0, 150, 255, 0.9) 100%),
linear-gradient(to right, rgba(0, 150, 255, 0.9) 0%, rgba(0, 150, 255, 0.9) 100%),
linear-gradient(to right, rgba(0, 150, 255, 0.9) 0%, rgba(0, 150, 255, 0.9) 100%);
background-size:
10px 2px,
10px 2px,
10px 2px,
10px 2px,
10px 2px,
10px 2px;
background-position:
0 5px, /* 15分钟刻度 */
0 40px, /* 12分钟刻度 */
0 80px, /* 9分钟刻度 */
0 120px, /* 6分钟刻度 */
0 160px, /* 3分钟刻度 */
0 195px; /* 0分钟刻度 */
background-repeat: no-repeat;
}
/* 港股进度条 - 红色发光效果 */
.hk-content .progress-bar {
background: linear-gradient(to top,
rgba(255, 138, 128, 0.2),
rgba(255, 87, 34, 0.3),
rgba(211, 47, 47, 0.4)
);
border: 1px solid rgba(255, 87, 34, 0.5);
box-shadow: 0 0 10px rgba(255, 87, 34, 0.3);
box-shadow: 0 0 20px rgba(255, 100, 100, 0.8), 0 0 40px rgba(255, 50, 50, 0.4);
position: relative;
}
.time-markers {
display: flex;
flex-direction: column;
height: 350px;
justify-content: space-between;
align-items: center;
/* 港股刻度线容器 */
.hk-content .progress-bar::before {
content: '';
position: absolute;
right: -10px;
top: 0;
width: 10px;
height: 200px;
background-image:
linear-gradient(to right, rgba(255, 100, 100, 0.9) 0%, rgba(255, 100, 100, 0.9) 100%),
linear-gradient(to right, rgba(255, 100, 100, 0.9) 0%, rgba(255, 100, 100, 0.9) 100%),
linear-gradient(to right, rgba(255, 100, 100, 0.9) 0%, rgba(255, 100, 100, 0.9) 100%),
linear-gradient(to right, rgba(255, 100, 100, 0.9) 0%, rgba(255, 100, 100, 0.9) 100%),
linear-gradient(to right, rgba(255, 100, 100, 0.9) 0%, rgba(255, 100, 100, 0.9) 100%),
linear-gradient(to right, rgba(255, 100, 100, 0.9) 0%, rgba(255, 100, 100, 0.9) 100%);
background-size:
10px 2px,
10px 2px,
10px 2px,
10px 2px,
10px 2px,
10px 2px;
background-position:
0 5px, /* 15分钟刻度 */
0 40px, /* 12分钟刻度 */
0 80px, /* 9分钟刻度 */
0 120px, /* 6分钟刻度 */
0 160px, /* 3分钟刻度 */
0 195px; /* 0分钟刻度 */
background-repeat: no-repeat;
}
/* 股票内容容器 */
@ -706,8 +587,8 @@ const hideRules = () => {
background-size: contain;
background-repeat: no-repeat;
background-position: center;
width: 240px;
height: 80px;
width: 200px;
height: 60px;
}
/* 美股助力按钮 */
@ -732,17 +613,16 @@ const hideRules = () => {
/* 底座样式 */
.base-image {
margin-top: -65px;
margin-top: -10px;
z-index: 1;
}
.base-image img {
width: auto;
height: 130px;
height: 60px;
display: block;
}
/* 默认进度条填充样式 */
.progress-fill {
position: absolute;
bottom: 0;
@ -750,96 +630,140 @@ const hideRules = () => {
border-radius: 10px;
transition: height 0.8s ease;
}
/* 美股进度条填充 - 蓝色系渐变 */
.us-content .progress-fill {
background: linear-gradient(to top, #4FC3F7, #29B6F6, #0288D1);
.us-card .progress-fill {
background: linear-gradient(to top, #00ccff, #0099ff, #0066cc);
box-shadow: 0 0 15px rgba(0, 150, 255, 0.9), 0 0 30px rgba(0, 100, 255, 0.6);
}
/* 港股进度条填充 - 红色系渐变 */
.hk-content .progress-fill {
background: linear-gradient(to top, #FF8A80, #FF5722, #D32F2F);
.hk-card .progress-fill {
background: linear-gradient(to top, #ff9999, #ff6666, #cc3333);
box-shadow: 0 0 15px rgba(255, 100, 100, 0.9), 0 0 30px rgba(255, 50, 50, 0.6);
}
/* 在进度条填充部分顶部添加火箭gif */
.progress-fill::after {
content: '';
/* 小火箭样式 */
.mini-rocket {
position: absolute;
top: -25px;
/* 火箭位置在填充部分顶部上方 */
left: 50%;
transform: translateX(-50%);
width: 100px;
height: 100px;
background-image: url('@/assets/img/zhongchou/rocket.gif');
background-size: contain;
background-repeat: no-repeat;
background-position: center;
z-index: 10;
width: 70px;
height: 70px;
z-index: 20;
transition: bottom 0.8s ease;
pointer-events: none;
}
.marker {
position: relative;
color: #FFD700;
/* 默认金色 */
font-size: 1.4rem;
font-weight: 700;
font-family: 'Microsoft YaHei', 'PingFang SC', 'Helvetica Neue', Arial, sans-serif;
text-shadow: 0 0 8px rgba(255, 215, 0, 0.8), 0 2px 4px rgba(0, 0, 0, 0.3);
transition: all 0.5s ease;
letter-spacing: 0.5px;
text-rendering: optimizeLegibility;
}
/* 为刻度数字添加连接线 */
.marker::before {
content: '';
position: absolute;
top: 50%;
width: 15px;
height: 1px;
background-color: currentColor;
opacity: 0.6;
transition: all 0.5s ease;
.mini-rocket img {
width: 100%;
height: 100%;
object-fit: contain;
filter: drop-shadow(0 0 10px rgba(255, 255, 255, 1));
}
/* 美股刻度连接线 - 从右侧连接到进度条 */
.us-content .marker::before {
right: -20px;
background-color: #00BFFF; /* 蓝色 */
box-shadow: 0 0 4px rgba(0, 191, 255, 0.5);
/* 美股小火箭位置 - 动态定位,在温度计右侧 */
.us-mini-rocket {
right: -25px;
animation: us-rocket-hover 3s ease-in-out infinite;
}
/* 港股刻度连接线 - 从左侧连接到进度条 */
.hk-content .marker::before {
left: -20px;
background-color: #FF4444; /* 红色 */
box-shadow: 0 0 4px rgba(255, 68, 68, 0.5);
/* 港股小火箭位置 - 动态定位,在温度计左侧 */
.hk-mini-rocket {
left: -25px;
animation: hk-rocket-hover 3s ease-in-out infinite;
}
/* 美股激活刻度 */
.us-content .marker.reached {
color: #00BFFF !important;
text-shadow: 0 0 10px rgba(0, 191, 255, 0.8) !important;
/* 美股小火箭悬停动画 */
@keyframes us-rocket-hover {
0%, 100% {
transform: translateY(0px) rotate(0deg);
}
25% {
transform: translateY(-3px) rotate(2deg);
}
50% {
transform: translateY(-6px) rotate(0deg);
}
75% {
transform: translateY(-3px) rotate(-2deg);
}
}
/* 港股激活刻度 */
.hk-content .marker.reached {
color: #FF4444 !important;
text-shadow: 0 0 10px rgba(255, 68, 68, 0.8) !important;
/* 港股小火箭悬停动画 */
@keyframes hk-rocket-hover {
0%, 100% {
transform: translateY(0px) rotate(0deg);
}
25% {
transform: translateY(-3px) rotate(-2deg);
}
50% {
transform: translateY(-6px) rotate(0deg);
}
75% {
transform: translateY(-3px) rotate(2deg);
}
}
.time-markers {
display: flex;
flex-direction: column-reverse;
height: 200px;
justify-content: space-between;
align-items: center;
}
/* 美股数字刻度在左边 */
.us-content .time-markers {
align-items: flex-start;
}
/* 港股数字刻度在右边 */
.hk-content .time-markers {
align-items: flex-end;
}
.marker {
color: #fff;
font-size: 0.9rem;
font-weight: 700;
text-shadow:
0 0 5px rgba(255, 255, 255, 0.8),
0.5px 0.5px 0 #fff,
-0.5px -0.5px 0 #fff,
0.5px -0.5px 0 #fff,
-0.5px 0.5px 0 #fff;
}
/* 数字标记颜色类 */
.marker-orange {
color: #ffff00 !important;
font-size: 1.4rem !important;
text-shadow:
0 0 5px rgba(255, 255, 0, 0.8),
0.5px 0.5px 0 #fff,
-0.5px -0.5px 0 #fff,
0.5px -0.5px 0 #fff,
-0.5px 0.5px 0 #fff !important;
}
.marker-blue {
color: #00aaff !important;
text-shadow:
0 0 5px rgba(0, 170, 255, 0.8),
0.5px 0.5px 0 #fff,
-0.5px -0.5px 0 #fff,
0.5px -0.5px 0 #fff,
-0.5px 0.5px 0 #fff !important;
}
.marker-red {
color: #ff6666 !important;
text-shadow:
0 0 5px rgba(255, 102, 102, 0.8),
0.5px 0.5px 0 #fff,
-0.5px -0.5px 0 #fff,
0.5px -0.5px 0 #fff,
-0.5px 0.5px 0 #fff !important;
}
/* 刻度字体增强样式 */
/* .marker-text {
font-weight: bold;
font-family: 'Arial Black', sans-serif;
color: transparent;
background: linear-gradient(135deg, rgba(255, 255, 255, 0.1), rgba(255, 255, 255, 0.05));
-webkit-background-clip: text;
background-clip: text;
-webkit-text-stroke: 1.5px rgba(255, 255, 255, 0.6);
text-stroke: 1.5px rgba(255, 255, 255, 0.6);
text-shadow: 0 0 10px rgba(255, 255, 255, 0.3), 0 0 20px rgba(255, 255, 255, 0.2);
filter: drop-shadow(0 0 8px rgba(255, 255, 255, 0.2));
isolation: isolate;
z-index: 17;
position: relative;
} */
.us-btn {
background: linear-gradient(45deg, #0066cc, #0099ff);
color: white;
@ -886,10 +810,10 @@ const hideRules = () => {
}
.rocket-body img {
width: 15vw;
width: 12vw;
height: auto;
min-width: 100px;
max-width: 250px;
min-width: 80px;
max-width: 200px;
}
/* 动画效果 */
@ -975,8 +899,8 @@ const hideRules = () => {
.modal-content {
position: relative;
width: 500px;
height: 400px;
width: 600px;
height: 390px;
display: flex;
justify-content: center;
align-items: center;
@ -1012,12 +936,17 @@ const hideRules = () => {
line-height: 1.6;
margin-top: 10%;
margin-left: 10%;
word-wrap: break-word;
overflow-wrap: break-word;
}
.rules-list p {
margin: 8px 0;
font-size: 0.9rem;
color: #fff;
word-wrap: break-word;
overflow-wrap: break-word;
white-space: normal;
}
.close-btn {
@ -1025,8 +954,8 @@ const hideRules = () => {
background-size: 100%;
background-repeat: no-repeat;
background-position: center;
width: 120px;
height: 40px;
width: 150px;
height: 50px;
cursor: pointer;
transition: transform 0.2s ease;
}

13
vite.config.js

@ -9,16 +9,5 @@ export default defineConfig({
alias: {
'@': path.resolve(process.cwd(), 'src')
}
},
server: {
proxy: {
'/Api': {
target: 'https://dbqb.nfdxy.net/devLotApi', // 后端基础地址
changeOrigin: true,
rewrite: (path) => path.replace(/^\/api/, ''), // 移除 /api 前缀
// 或者更精确的重写(根据后端路径调整):
// rewrite: (path) => path.replace(/^\/api\/admin/, '/admin'),
},
},
},
}
})
Loading…
Cancel
Save