|
@@ -2,6 +2,7 @@ package help_doc
|
|
|
|
|
|
import (
|
|
|
"encoding/json"
|
|
|
+ "fmt"
|
|
|
"github.com/rdlucklib/rdluck_tools/paging"
|
|
|
"hongze/hz_crm_api/controllers"
|
|
|
"hongze/hz_crm_api/models"
|
|
@@ -42,6 +43,7 @@ func (this *HelpDocController) Add() {
|
|
|
br.ErrMsg = "参数解析失败,Err:" + err.Error()
|
|
|
return
|
|
|
}
|
|
|
+ fmt.Println("Id:",req.Id)
|
|
|
if req.Content == "" {
|
|
|
br.Msg = "请输入内容"
|
|
|
return
|
|
@@ -81,7 +83,7 @@ func (this *HelpDocController) Add() {
|
|
|
item.PublishTime = time.Now()
|
|
|
}
|
|
|
|
|
|
- if item.Id == 0 {
|
|
|
+ if req.Id == 0 {
|
|
|
_, err = help_doc.AddHelpDoc(item)
|
|
|
if err != nil {
|
|
|
br.Msg = "新增失败"
|
|
@@ -150,7 +152,7 @@ func (this *HelpDocController) Detail() {
|
|
|
|
|
|
var recommend []help_doc.RecommendList
|
|
|
if item.Recommend != "" {
|
|
|
- err = json.Unmarshal([]byte(item.Recommend), &anchor)
|
|
|
+ err = json.Unmarshal([]byte(item.Recommend), &recommend)
|
|
|
if err != nil {
|
|
|
br.Msg = "解析失败"
|
|
|
br.ErrMsg = "解析失败,Err:" + err.Error()
|
|
@@ -255,7 +257,7 @@ func (this *HelpDocController) ListReport() {
|
|
|
|
|
|
var recommend []help_doc.RecommendList
|
|
|
if item.Recommend != "" {
|
|
|
- err = json.Unmarshal([]byte(item.Recommend), &anchor)
|
|
|
+ err = json.Unmarshal([]byte(item.Recommend), &recommend)
|
|
|
if err != nil {
|
|
|
br.Msg = "解析失败"
|
|
|
br.ErrMsg = "解析失败,Err:" + err.Error()
|