UI/UX优化: CSS变量化 + 错误反馈增强 + 按钮type属性
- CSS: 全部硬编码hex颜色替换为CSS变量(base/scan/pages/responsive/admin) - CSS: 硬编码字体提取为--font-sans/--font-mono变量 - CSS: 新增打印色/渐变色/辅助色等20+变量定义 - CSS: 修复scan.css lint警告(line-clamp标准属性+空规则集) - app.js: 16处用户可感知catch块补充showToast错误反馈 - app.js: 全部console.log降级为console.debug - index.html: 76个button补充type属性 - index.html: 内联hex颜色/SVG stroke/Vue :style替换为CSS变量 - admin.html: 残留hex替换为CSS变量 - 全部CSS版本号更新用于缓存刷新
This commit is contained in:
@@ -843,6 +843,7 @@
|
||||
} catch (err) {
|
||||
console.error('请求错误:', err);
|
||||
this.error = err.response?.data?.error || err.message || '请求失败';
|
||||
this.showToast(this.error, 'error');
|
||||
} finally {
|
||||
this.loading = false;
|
||||
}
|
||||
@@ -1160,6 +1161,7 @@
|
||||
}
|
||||
} catch (e) {
|
||||
console.error('加载关注列表失败', e);
|
||||
this.showToast('加载关注列表失败', 'error');
|
||||
}
|
||||
},
|
||||
|
||||
@@ -1189,6 +1191,7 @@
|
||||
}
|
||||
} catch (e) {
|
||||
console.error('移除关注失败', e);
|
||||
this.showToast('移除关注失败', 'error');
|
||||
}
|
||||
},
|
||||
|
||||
@@ -1432,6 +1435,7 @@
|
||||
}
|
||||
} catch (err) {
|
||||
console.error('增量信号分析失败:', err);
|
||||
this.showToast('信号分析失败,请稍后重试', 'error');
|
||||
}
|
||||
this.alertsLoading = false;
|
||||
this.saveAlertsCache(this.stockAlerts);
|
||||
@@ -1507,6 +1511,7 @@
|
||||
}
|
||||
} catch (e) {
|
||||
console.error('移除关注失败', e);
|
||||
this.showToast('移除关注失败', 'error');
|
||||
}
|
||||
|
||||
// 从提醒列表中移除
|
||||
@@ -1574,6 +1579,7 @@
|
||||
}
|
||||
} catch (err) {
|
||||
console.error('加载可用资金失败:', err);
|
||||
this.showToast('加载可用资金失败', 'error');
|
||||
}
|
||||
},
|
||||
|
||||
@@ -1739,6 +1745,7 @@
|
||||
await this.checkStopLoss();
|
||||
} catch (e) {
|
||||
console.error('刷新持仓价格异常:', e);
|
||||
this.showToast('刷新持仓价格失败,请稍后重试', 'error');
|
||||
} finally {
|
||||
this.priceRefreshing = false;
|
||||
}
|
||||
@@ -1801,6 +1808,7 @@
|
||||
}
|
||||
} catch (error) {
|
||||
console.error('获取数据失败:', error);
|
||||
this.showToast('获取基本面数据失败', 'error');
|
||||
} finally {
|
||||
this.fundamentalLoading = false;
|
||||
// 绘制K线图
|
||||
@@ -1824,6 +1832,7 @@
|
||||
}
|
||||
} catch (error) {
|
||||
console.error('获取K线数据失败:', error);
|
||||
this.showToast('获取K线数据失败', 'error');
|
||||
} finally {
|
||||
this.klineLoading = false;
|
||||
}
|
||||
@@ -2681,6 +2690,7 @@
|
||||
}
|
||||
} catch (e) {
|
||||
console.error('加载模拟交易统计失败', e);
|
||||
this.showToast('加载模拟交易统计失败', 'error');
|
||||
}
|
||||
},
|
||||
|
||||
@@ -2692,6 +2702,7 @@
|
||||
}
|
||||
} catch (e) {
|
||||
console.error('加载模拟持仓失败', e);
|
||||
this.showToast('加载模拟持仓失败', 'error');
|
||||
}
|
||||
},
|
||||
|
||||
@@ -2703,6 +2714,7 @@
|
||||
}
|
||||
} catch (e) {
|
||||
console.error('加载模拟交易记录失败', e);
|
||||
this.showToast('加载交易记录失败', 'error');
|
||||
}
|
||||
},
|
||||
|
||||
@@ -2717,6 +2729,7 @@
|
||||
}
|
||||
} catch (e) {
|
||||
console.error('加载算法配置失败', e);
|
||||
this.showToast('加载算法配置失败', 'error');
|
||||
}
|
||||
},
|
||||
|
||||
@@ -2728,6 +2741,7 @@
|
||||
}
|
||||
} catch (e) {
|
||||
console.error('加载算法模板失败', e);
|
||||
this.showToast('加载算法模板失败', 'error');
|
||||
}
|
||||
},
|
||||
|
||||
@@ -2739,6 +2753,7 @@
|
||||
}
|
||||
} catch (e) {
|
||||
console.error('加载信号日志失败', e);
|
||||
this.showToast('加载信号日志失败', 'error');
|
||||
}
|
||||
},
|
||||
|
||||
@@ -2750,6 +2765,7 @@
|
||||
}
|
||||
} catch (e) {
|
||||
console.error('加载持仓元数据失败', e);
|
||||
this.showToast('加载持仓元数据失败', 'error');
|
||||
}
|
||||
},
|
||||
|
||||
|
||||
Reference in New Issue
Block a user