|
@@ -8,36 +8,46 @@ import (
|
|
|
)
|
|
|
|
|
|
func (this *FERData) Name() string {
|
|
|
- if this.Wrap.CurrModule == "index" {
|
|
|
- return this.DataRow.(*utils.MySql_page).A_name
|
|
|
+ if this.DataRow != nil {
|
|
|
+ if this.Wrap.CurrModule == "index" {
|
|
|
+ return this.DataRow.(*utils.MySql_page).A_name
|
|
|
+ }
|
|
|
}
|
|
|
return ""
|
|
|
}
|
|
|
|
|
|
func (this *FERData) Alias() string {
|
|
|
- if this.Wrap.CurrModule == "index" {
|
|
|
- return this.DataRow.(*utils.MySql_page).A_alias
|
|
|
+ if this.DataRow != nil {
|
|
|
+ if this.Wrap.CurrModule == "index" {
|
|
|
+ return this.DataRow.(*utils.MySql_page).A_alias
|
|
|
+ }
|
|
|
}
|
|
|
return ""
|
|
|
}
|
|
|
|
|
|
func (this *FERData) Content() template.HTML {
|
|
|
- if this.Wrap.CurrModule == "index" {
|
|
|
- return template.HTML(this.DataRow.(*utils.MySql_page).A_content)
|
|
|
+ if this.DataRow != nil {
|
|
|
+ if this.Wrap.CurrModule == "index" {
|
|
|
+ return template.HTML(this.DataRow.(*utils.MySql_page).A_content)
|
|
|
+ }
|
|
|
}
|
|
|
return template.HTML("")
|
|
|
}
|
|
|
|
|
|
func (this *FERData) DateTime() int {
|
|
|
- if this.Wrap.CurrModule == "index" {
|
|
|
- return this.DataRow.(*utils.MySql_page).A_datetime
|
|
|
+ if this.DataRow != nil {
|
|
|
+ if this.Wrap.CurrModule == "index" {
|
|
|
+ return this.DataRow.(*utils.MySql_page).A_datetime
|
|
|
+ }
|
|
|
}
|
|
|
return 0
|
|
|
}
|
|
|
|
|
|
func (this *FERData) DateTimeFormat(format string) string {
|
|
|
- if this.Wrap.CurrModule == "index" {
|
|
|
- return time.Unix(int64(this.DataRow.(*utils.MySql_page).A_datetime), 0).Format(format)
|
|
|
+ if this.DataRow != nil {
|
|
|
+ if this.Wrap.CurrModule == "index" {
|
|
|
+ return time.Unix(int64(this.DataRow.(*utils.MySql_page).A_datetime), 0).Format(format)
|
|
|
+ }
|
|
|
}
|
|
|
return ""
|
|
|
}
|