Browse Source

Merge branch 'bzq/mini' of eta_server/eta_chart_lib into debug

鲍自强 9 months ago
parent
commit
14fc68a28b
2 changed files with 10 additions and 8 deletions
  1. 1 1
      controllers/chart.go
  2. 9 7
      services/dw_mini/dw_mini.go

+ 1 - 1
controllers/chart.go

@@ -321,7 +321,7 @@ func (this *ChartController) Collect() {
 		return
 	}
 
-	result, err := dwmini.MyChartCollect(req.Token, req.UniqueCode, chartInfo.ChartName, chartInfo.ChartImage)
+	result, err := dwmini.MyChartCollect(req.Token, req.UniqueCode, chartInfo.ChartName, chartInfo.ChartImage, chartInfo.ChartInfoId)
 	if err != nil {
 		br.Msg = "收藏失败"
 		br.ErrMsg = "收藏失败,Err:" + err.Error()

+ 9 - 7
services/dw_mini/dw_mini.go

@@ -40,17 +40,19 @@ func GetMyChartIsCollect(token string, uniqueCode string) (isCollect bool, err e
 	return
 }
 
-func MyChartCollect(token, uniqueCode, chartName, ChartImage string) (resp *models.BaseResponse, err error) {
+func MyChartCollect(token, uniqueCode, chartName, chartImage string, chartInfoId int) (resp *models.BaseResponse, err error) {
 	url := utils.ETA_MINI_URL + "mychart/collect"
 	type MyChartCollectReq struct {
-		UniqueCode string
-		ChartName  string
-		ChartImage string
+		UniqueCode  string
+		ChartName   string
+		ChartImage  string
+		ChartInfoId int
 	}
 	req := MyChartCollectReq{
-		UniqueCode: uniqueCode,
-		ChartName:  chartName,
-		ChartImage: ChartImage,
+		UniqueCode:  uniqueCode,
+		ChartName:   chartName,
+		ChartImage:  chartImage,
+		ChartInfoId: chartInfoId,
 	}
 	reqBody, _ := json.Marshal(req)
 	result, err := HttpPost(url, string(reqBody), token)