|
@@ -39,6 +39,7 @@ func (this *ChartController) ChartInfoDetail() {
|
|
|
uniqueCode := this.GetString("UniqueCode")
|
|
|
token := this.GetString("Token")
|
|
|
source, _ := this.GetInt("Source")
|
|
|
+ miniSource := this.GetString("MiniSource")
|
|
|
if uniqueCode == "" {
|
|
|
br.Msg = "参数错误"
|
|
|
br.ErrMsg = "参数错误,uniqueCode is empty"
|
|
@@ -55,16 +56,24 @@ func (this *ChartController) ChartInfoDetail() {
|
|
|
return
|
|
|
}
|
|
|
var isCollect bool
|
|
|
- if source == utils.CHART_SOURCE_DW && token != "" {
|
|
|
- tmpIsCollect, err := dwmini.GetMyChartIsCollect(token, uniqueCode)
|
|
|
- if err != nil {
|
|
|
- br.Msg = "获取失败"
|
|
|
- br.ErrMsg = "获取收藏状态失败,Err:" + err.Error()
|
|
|
- return
|
|
|
+ if miniSource != "" {
|
|
|
+ auth := this.Ctx.Request.Header.Get("Authorization")
|
|
|
+ param := facade.BaseRequest{
|
|
|
+ Auth: auth,
|
|
|
+ UniqueCode: uniqueCode,
|
|
|
+ }
|
|
|
+ facade.FacadeClient.Deal(param).IsCollect(facade.GetInstance(miniSource))
|
|
|
+ } else {
|
|
|
+ if source == utils.CHART_SOURCE_DW && token != "" {
|
|
|
+ tmpIsCollect, err := dwmini.GetMyChartIsCollect(token, uniqueCode)
|
|
|
+ if err != nil {
|
|
|
+ br.Msg = "获取失败"
|
|
|
+ br.ErrMsg = "获取收藏状态失败,Err:" + err.Error()
|
|
|
+ return
|
|
|
+ }
|
|
|
+ isCollect = tmpIsCollect
|
|
|
}
|
|
|
- isCollect = tmpIsCollect
|
|
|
}
|
|
|
-
|
|
|
//判断是否有缓存
|
|
|
if utils.Re == nil {
|
|
|
if utils.Re == nil && utils.Rc.IsExist(key) {
|