|
@@ -14,6 +14,7 @@ import (
|
|
|
|
|
|
func (f *Front) RemarkList() {
|
|
|
qu.Catch()
|
|
|
+ pid := qu.ObjToString(f.GetString("pid"))
|
|
|
tid := qu.ObjToString(f.GetString("tid"))
|
|
|
sourceinfo := qu.ObjToString(f.GetString("s_sourceinfo"))
|
|
|
if f.Method() == "POST" {
|
|
@@ -41,6 +42,7 @@ func (f *Front) RemarkList() {
|
|
|
})
|
|
|
|
|
|
} else {
|
|
|
+ f.T["pid"] = pid
|
|
|
f.T["tid"] = tid
|
|
|
f.T["s_sourceinfo"] = sourceinfo
|
|
|
_ = f.Render("project/remark_list.html", &f.T)
|
|
@@ -48,10 +50,19 @@ func (f *Front) RemarkList() {
|
|
|
}
|
|
|
|
|
|
func (f *Front) RemarkDetail() {
|
|
|
- id := f.GetString("gid")
|
|
|
+ pid := f.GetString("pid")
|
|
|
+ project, _ := util.Mgo.FindById(util.PROJECTCOLLNAME, pid, `{"v_fields": 1}`)
|
|
|
+ if len(*project) > 0 {
|
|
|
+ field := make(map[string]bool)
|
|
|
+ vf := (*project)["v_fields"].(map[string]interface{})
|
|
|
+ for k := range vf {
|
|
|
+ field[k] = true
|
|
|
+ }
|
|
|
+ f.T["fields"] = field
|
|
|
+ }
|
|
|
+ did := f.GetString("did")
|
|
|
coll := f.GetString("s_sourceinfo")
|
|
|
- qu.Debug("------------", id, coll)
|
|
|
- rep := getDetail(id, coll) //获取本条公告的信息
|
|
|
+ rep := getDetail(did, coll) //获取本条公告的信息
|
|
|
f.T["otherInfo"] = rep["otherInfo"] //展示关联公告信息
|
|
|
f.T["moreInfo"] = rep["moreInfo"] //更多关联公告信息
|
|
|
f.T["info"] = rep["info"]
|
|
@@ -73,8 +84,7 @@ func (f *Front) RemarkDetail() {
|
|
|
f.T["worder_new"] = rep["worder_new"]
|
|
|
f.T["pcl_new"] = rep["pcl_new"]
|
|
|
f.T["pkg_new"] = rep["pkg_new"]
|
|
|
- f.T["nextid"] = GetNextDataId(id, coll) //下一条id
|
|
|
- f.T["fields"] = map[string]bool{"projectname": true}
|
|
|
+ f.T["nextid"] = GetNextDataId(did, coll) //下一条id
|
|
|
_ = f.Render("project/remark_detail.html", &f.T)
|
|
|
}
|
|
|
|