xingzai 2 жил өмнө
parent
commit
9e45dc6230
1 өөрчлөгдсөн 7 нэмэгдсэн , 6 устгасан
  1. 7 6
      controllers/yidong.go

+ 7 - 6
controllers/yidong.go

@@ -9,7 +9,6 @@ import (
 	"io/ioutil"
 	"net/http"
 	"strings"
-	"time"
 )
 
 type BaseYidongController struct {
@@ -60,11 +59,13 @@ func (this *BaseYidongController) GetToken() {
 		fmt.Println("Getres.PublicGetDate Err:", err.Error())
 	}
 	services.GetYiDongActivity()
-	cacheKey := utils.YD_TOKEN
-	utils.Rc.Put(cacheKey, ydtoklen.AccessToken, time.Second*7000)
-	utils.FileLog.Info(string(body))
-	//fmt.Println(body)
-	fmt.Println(string(body))
+
+	//cacheKey := utils.YD_TOKEN
+	//utils.Rc.Put(cacheKey, ydtoklen.AccessToken, time.Second*7000)
+	//utils.FileLog.Info(string(body))
+	////fmt.Println(body)
+	//fmt.Println(string(body))
+	ydtoklen.AccessToken, _ = services.GetYiDongToken()
 	br.Msg = "获取成功!"
 	br.Ret = 200
 	br.Success = true