|
|
@@ -218,16 +218,18 @@ export class MessageDashboardComponent implements OnInit {
|
|
|
|
|
|
// Use forkJoin to run all requests in parallel and wait for all to complete
|
|
|
forkJoin({
|
|
|
- overall: this.http.get('/api/message-records/statistics/overall').pipe(
|
|
|
- map((res: any) => res?.data || null),
|
|
|
- catchError((err) => {
|
|
|
- console.error('Failed to load overall statistics:', err);
|
|
|
- this.message.error('加载整体统计失败');
|
|
|
- return of(null); // Return a default value to prevent forkJoin from failing
|
|
|
- })
|
|
|
- ),
|
|
|
+ overall: this.http
|
|
|
+ .get(`/api/message-records/statistics/overall?t=${new Date()}`)
|
|
|
+ .pipe(
|
|
|
+ map((res: any) => res?.data || null),
|
|
|
+ catchError((err) => {
|
|
|
+ console.error('Failed to load overall statistics:', err);
|
|
|
+ this.message.error('加载整体统计失败');
|
|
|
+ return of(null); // Return a default value to prevent forkJoin from failing
|
|
|
+ })
|
|
|
+ ),
|
|
|
strategies: this.http
|
|
|
- .get('/api/message-records/statistics/by-strategy')
|
|
|
+ .get(`/api/message-records/statistics/by-strategy?t=${new Date()}`)
|
|
|
.pipe(
|
|
|
map((res: any) => res?.data || []),
|
|
|
catchError((err) => {
|
|
|
@@ -237,7 +239,7 @@ export class MessageDashboardComponent implements OnInit {
|
|
|
})
|
|
|
),
|
|
|
templates: this.http
|
|
|
- .get('/api/message-records/statistics/by-template')
|
|
|
+ .get(`/api/message-records/statistics/by-template?t=${new Date()}`)
|
|
|
.pipe(
|
|
|
map((res: any) => res?.data || []),
|
|
|
catchError((err) => {
|
|
|
@@ -247,7 +249,7 @@ export class MessageDashboardComponent implements OnInit {
|
|
|
})
|
|
|
),
|
|
|
dailyTrends: this.http
|
|
|
- .get('/api/message-records/statistics/daily-trends')
|
|
|
+ .get(`/api/message-records/statistics/daily-trends?t=${new Date()}`)
|
|
|
.pipe(
|
|
|
map((res: any) => res?.data || []),
|
|
|
catchError((err) => {
|