feat(subscription): 添加订阅功能并优化过期处理逻辑
- 扩展 trialExpiredType 类型,新增 'subscribe' 状态以支持主动订阅场景 - 新增 openSubscriptionDialog 方法,用于处理 VIP 状态点击事件 - 优化 VIP 状态卡片 UI,添加悬停与点击效果,提升交互体验 - 调整过期状态样式,保持水平布局并移除冗余按钮样式 - 在 Rakuten 组件中引入请求中断机制,提升任务控制灵活性- 更新 TrialExpiredDialog 组件,支持订阅类型提示与微信复制反馈- 修复部分 API 调用未传递 signal 参数的问题,增强请求管理能力 - 切换 Ruoyi 服务地址至生产环境配置,确保接口通信正常 - 移除部分无用代码与样式,精简组件结构
This commit is contained in:
@@ -74,7 +74,7 @@ export default defineComponent({ name: 'AccountManager' })
|
|||||||
<div class="top">
|
<div class="top">
|
||||||
<img src="/icon/image.png" class="hero" alt="logo" />
|
<img src="/icon/image.png" class="hero" alt="logo" />
|
||||||
<div class="head-main">
|
<div class="head-main">
|
||||||
<div class="main-title">在线账号管理</div>
|
<div class="main-title">在线账号管理(3/3)</div>
|
||||||
<div class="main-sub">
|
<div class="main-sub">
|
||||||
您当前订阅可同时托管3家 Shopee 店铺<br>
|
您当前订阅可同时托管3家 Shopee 店铺<br>
|
||||||
如需扩增同时托管店铺数,请 <span class="upgrade">升级订阅</span>。
|
如需扩增同时托管店铺数,请 <span class="upgrade">升级订阅</span>。
|
||||||
|
|||||||
@@ -163,7 +163,6 @@ async function resetAllSettings() {
|
|||||||
// 重置启动配置
|
// 重置启动配置
|
||||||
autoLaunch.value = false
|
autoLaunch.value = false
|
||||||
launchMinimized.value = false
|
launchMinimized.value = false
|
||||||
|
|
||||||
ElMessage.success('所有设置已重置')
|
ElMessage.success('所有设置已重置')
|
||||||
} catch {
|
} catch {
|
||||||
// 用户取消操作
|
// 用户取消操作
|
||||||
@@ -265,35 +264,6 @@ function scrollToSection(sectionKey: string) {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// 监听滚动更新高亮
|
|
||||||
function handleScroll() {
|
|
||||||
if (isScrolling.value) return
|
|
||||||
|
|
||||||
const container = settingsMainRef.value
|
|
||||||
if (!container) return
|
|
||||||
|
|
||||||
const sections = ['export', 'update', 'cache', 'startup', 'feedback', 'general']
|
|
||||||
const scrollTop = container.scrollTop
|
|
||||||
const containerHeight = container.clientHeight
|
|
||||||
const scrollHeight = container.scrollHeight
|
|
||||||
|
|
||||||
// 如果滚动到底部(留10px的误差),高亮最后一项
|
|
||||||
if (scrollTop + containerHeight >= scrollHeight - 10) {
|
|
||||||
activeTab.value = sections[sections.length - 1]
|
|
||||||
return
|
|
||||||
}
|
|
||||||
|
|
||||||
// 否则根据可见区域判断(找到最靠上的可见section)
|
|
||||||
for (const key of sections) {
|
|
||||||
const element = document.getElementById(`section-${key}`)
|
|
||||||
if (element) {
|
|
||||||
const offsetTop = element.offsetTop - 50
|
|
||||||
if (scrollTop >= offsetTop) {
|
|
||||||
activeTab.value = key
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
// 获取可用的日志日期列表
|
// 获取可用的日志日期列表
|
||||||
async function loadLogDates() {
|
async function loadLogDates() {
|
||||||
|
|||||||
Reference in New Issue
Block a user