From 78c7c2ce56913392344e0840bfbaed86dddcb517 Mon Sep 17 00:00:00 2001 From: wangjr Date: Thu, 12 May 2022 11:45:05 +0800 Subject: [PATCH] =?UTF-8?q?=E8=A7=A3=E6=B1=BAvue=E9=87=8D=E6=96=B0?= =?UTF-8?q?=E5=88=B7=E6=96=B0=E6=B5=8F=E8=A7=88=E5=99=A8=E6=8A=A5404?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- routers/home.go | 25 +++++++++++++++++++++++++ routers/routes/routes.go | 7 +++++++ templates/explore/data_analysis.tmpl | 7 +++++-- web_src/js/components/DataAnalysis.vue | 22 ++++++++++++++++++++-- web_src/js/router/index.js | 5 ++--- web_src/js/router/main_.js | 17 ----------------- 6 files changed, 59 insertions(+), 24 deletions(-) delete mode 100644 web_src/js/router/main_.js diff --git a/routers/home.go b/routers/home.go index 4fa0e42bb..c36bd6194 100755 --- a/routers/home.go +++ b/routers/home.go @@ -603,7 +603,32 @@ func ExploreImages(ctx *context.Context) { ctx.HTML(200, tplExploreImages) } +func ExploreDataAnalysisUserTrend(ctx *context.Context) { + ctx.Data["url_params"]="UserTrend" + ctx.HTML(200, tplExploreExploreDataAnalysis) +} +func ExploreDataAnalysisUserAnalysis(ctx *context.Context) { + ctx.Data["url_params"]="UserAnalysis" + ctx.HTML(200, tplExploreExploreDataAnalysis) +} +func ExploreDataAnalysisProTrend(ctx *context.Context) { + ctx.Data["url_params"]="ProTrend" + ctx.HTML(200, tplExploreExploreDataAnalysis) +} +func ExploreDataAnalysisProAnalysis(ctx *context.Context) { + ctx.Data["url_params"]="ProAnalysis" + ctx.HTML(200, tplExploreExploreDataAnalysis) +} +func ExploreDataAnalysisOverview(ctx *context.Context) { + ctx.Data["url_params"]="Overview" + ctx.HTML(200, tplExploreExploreDataAnalysis) +} +func ExploreDataAnalysisBrainAnalysis(ctx *context.Context) { + ctx.Data["url_params"]="BrainAnalysis" + ctx.HTML(200, tplExploreExploreDataAnalysis) +} func ExploreDataAnalysis(ctx *context.Context) { + ctx.Data["url_params"]="" ctx.HTML(200, tplExploreExploreDataAnalysis) } diff --git a/routers/routes/routes.go b/routers/routes/routes.go index 2ce32ea90..a695a5a1e 100755 --- a/routers/routes/routes.go +++ b/routers/routes/routes.go @@ -345,6 +345,13 @@ func RegisterRoutes(m *macaron.Macaron) { m.Get("/code", routers.ExploreCode) m.Get("/images", routers.ExploreImages) m.Get("/data_analysis", routers.ExploreDataAnalysis) + m.Get("/data_analysis/UserTrend", routers.ExploreDataAnalysisUserTrend) + m.Get("/data_analysis/UserAnalysis", routers.ExploreDataAnalysisUserAnalysis) + m.Get("/data_analysis/ProAnalysis", routers.ExploreDataAnalysisProAnalysis) + m.Get("/data_analysis/ProTrend", routers.ExploreDataAnalysisProTrend) + m.Get("/data_analysis/Overview", routers.ExploreDataAnalysisOverview) + m.Get("/data_analysis/BrainAnalysis", routers.ExploreDataAnalysisBrainAnalysis) + }, ignSignIn) m.Combo("/install", routers.InstallInit).Get(routers.Install). Post(bindIgnErr(auth.InstallForm{}), routers.InstallPost) diff --git a/templates/explore/data_analysis.tmpl b/templates/explore/data_analysis.tmpl index f041c2914..5c878787d 100755 --- a/templates/explore/data_analysis.tmpl +++ b/templates/explore/data_analysis.tmpl @@ -1,11 +1,14 @@ {{template "base/head_fluid" .}} +
- +
{{template "base/footer_fluid" .}} - +