diff --git a/controllers/UserController.go b/controllers/UserController.go index dcdaa93..7b00f5a 100644 --- a/controllers/UserController.go +++ b/controllers/UserController.go @@ -123,19 +123,9 @@ func (this *UserController) Edit() { this.ServeJSON() return } - birthday := this.GetString("birthday") - if birthday != "" { - birthday += " 00:00:00" - if localTime, errt := time.ParseInLocation("2006-01-02 15:04:05", birthday, time.Local); errt == nil { - user.Birthday = localTime - } - } user.NickName = this.GetString("nickName") user.Email = this.GetString("email") user.Mobile = this.GetString("mobile") - user.QQ = this.GetString("qqnum") - user.Sex, _ = this.GetInt("catory") - user.DescInfo = this.GetString("mdesc") if _, err := userService.EditUser(user); err != nil { this.Data["json"] = models.ReurnError(500, "") } else { diff --git a/views/T.header.tpl b/views/T.header.tpl index 1f8545b..25b03eb 100644 --- a/views/T.header.tpl +++ b/views/T.header.tpl @@ -10,12 +10,12 @@ {{end}} + + - + - + - - {{end}} \ No newline at end of file diff --git a/views/T.nav.tpl b/views/T.nav.tpl index 6105611..95e9842 100644 --- a/views/T.nav.tpl +++ b/views/T.nav.tpl @@ -21,7 +21,7 @@ {{if .IsLogin }}
  • -
    +
    个人中心
    我的笔记
    退出登录
    @@ -36,11 +36,11 @@ {{end}} \ No newline at end of file diff --git a/views/blogs.html b/views/blogs.html index 919abd3..10c3121 100644 --- a/views/blogs.html +++ b/views/blogs.html @@ -9,8 +9,7 @@
    - - 选择分类 + @@ -95,11 +94,14 @@ el: ".root-container", delimiters: ['${', '}'], data: { - cateId: -1, + cateId: '', cats: [] }, created () { this.cateId = {{.Cat}} + if(this.cateId == -1){ + this.cateId = '' + } this.cats = {{.Cats}} }, methods: { diff --git a/views/index.html b/views/index.html index a2e964c..86ff467 100644 --- a/views/index.html +++ b/views/index.html @@ -53,7 +53,6 @@ delimiters: ['${', '}'], el: '#vue-app', data: { - msg: "vue test" } }) diff --git a/views/uinfo.html b/views/uinfo.html index bd7c872..1003462 100644 --- a/views/uinfo.html +++ b/views/uinfo.html @@ -63,28 +63,35 @@
    -

    昵称 :{{.User.NickName}}

    -

    修改资料

    +

    昵称 :${form.nickName}

    +

    修改资料

    -

    邮箱 :{{.User.Email}}

    -

    手机 :{{.User.Mobile}}

    -

    简介 :{{.User.DescInfo}}

    +

    邮箱 :${form.email}

    +

    手机 :${form.mobile}

    - - - - - - - - - - - + +
    + + + + + + + + + + + +
    + +
    \ No newline at end of file