diff --git a/FrontEnd/assignment.html b/FrontEnd/assignment.html
index be9a314..749d439 100644
--- a/FrontEnd/assignment.html
+++ b/FrontEnd/assignment.html
@@ -1,11 +1,11 @@
-
-
-
+
diff --git a/FrontEnd/index.html b/FrontEnd/index.html
index 213f4dd..b257685 100644
--- a/FrontEnd/index.html
+++ b/FrontEnd/index.html
@@ -2,17 +2,17 @@
diff --git a/Makefile b/Makefile
new file mode 100644
index 0000000..2030b60
--- /dev/null
+++ b/Makefile
@@ -0,0 +1,9 @@
+build:
+ go build
+
+deploy:
+ go build -o scheduler
+ cp scheduler /opt/zscww_scheduler/scheduler
+ cp -r FrontEnd /opt/zscww_scheduler/FrontEnd
+ chmod +x /opt/zscww_scheduler/scheduler
+
diff --git a/handler/assignments.go b/handler/assignments.go
index 1591f19..c48bae6 100644
--- a/handler/assignments.go
+++ b/handler/assignments.go
@@ -86,6 +86,9 @@ func generateTable() (*[7][]string, error) {
}
fmt.Printf("today:%v\n", today)
fmt.Printf("table:%v\n", table)
+
+ //测试的时候先注释掉这里
+ //signals.Table.LastUpdated = carbon.Now()
return &table, nil
}
func readTableData(m *[]*model.Member) error {
diff --git a/main.go b/main.go
index f1c662c..b60eb44 100644
--- a/main.go
+++ b/main.go
@@ -7,7 +7,7 @@ import (
"zsxyww.com/scheduler/config"
"zsxyww.com/scheduler/database"
"zsxyww.com/scheduler/route"
- "zsxyww.com/scheduler/tl"
+ "zsxyww.com/scheduler/templates"
)
func main() {
@@ -25,7 +25,7 @@ func main() {
func register(app *echo.Echo) {
route.Route(app)
route.Middleware(app)
- renderer := tl.tlw{
+ renderer := tl.Tlw{
Tl: template.Must(template.ParseGlob("templates/*.html")),
}
app.Renderer = renderer
diff --git a/route/route.go b/route/route.go
index 4ba4a27..e79c51a 100644
--- a/route/route.go
+++ b/route/route.go
@@ -8,7 +8,7 @@ import (
func Route(app *echo.Echo) {
// here is the route for our site
- staticFiles := app.Group("/")
+ staticFiles := app.Group("/*")
staticFiles.Use(middleware.Static("./FrontEnd"))
api := app.Group("/api/")
diff --git a/templates/renderer.go b/templates/renderer.go
index 200723d..c949b3f 100644
--- a/templates/renderer.go
+++ b/templates/renderer.go
@@ -7,10 +7,10 @@ import (
)
// template wrapper
-type tlw struct {
+type Tlw struct {
Tl *template.Template
}
-func (t tlw) Render(w io.Writer, name string, data interface{}, c echo.Context) error {
+func (t Tlw) Render(w io.Writer, name string, data interface{}, c echo.Context) error {
return t.Tl.ExecuteTemplate(w, name, data)
}
diff --git a/templates/table.html b/templates/table.html
index e1d39f0..cf066fe 100644
--- a/templates/table.html
+++ b/templates/table.html
@@ -1,12 +1,9 @@
-
-
-
-
-
-
-
-
-
-
-
-
+
+ {{range .}}
+
+ {{range .}}
+ | {{.}} |
+ {{end}}
+
+ {{end}}
+