From 590aa06529b319508e7ebd07cb189923ad1f5135 Mon Sep 17 00:00:00 2001 From: huangjiajun <582604932@qq.com> Date: Thu, 16 May 2024 18:09:07 +0800 Subject: [PATCH] =?UTF-8?q?=E6=9B=B4=E6=96=B0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/hdl/hdl_kuaishou_auth.go | 12 +++--------- 1 file changed, 3 insertions(+), 9 deletions(-) diff --git a/app/hdl/hdl_kuaishou_auth.go b/app/hdl/hdl_kuaishou_auth.go index 72f3321..be44442 100644 --- a/app/hdl/hdl_kuaishou_auth.go +++ b/app/hdl/hdl_kuaishou_auth.go @@ -2,24 +2,18 @@ package hdl import ( offical "applet/app/db/official" - "applet/app/e" "github.com/gin-gonic/gin" ) func KuaishouAuth(c *gin.Context) { - var args map[string]string - if err := c.ShouldBindJSON(&args); err != nil { - e.OutErr(c, 200, e.ERR_INVALID_ARGS) - return - } kuaishouOfficialAccessToken := offical.MasterListCfgGetOneData("0", "kuaishou_official_access_token") - kuaishouOfficialAccessToken = args["access_token"] + kuaishouOfficialAccessToken = c.PostForm("access_token") offical.MasterListCfgSave("0", "kuaishou_official_access_token", kuaishouOfficialAccessToken) kuaishouOfficialExpiresIn := offical.MasterListCfgGetOneData("0", "kuaishou_official_expires_in") - kuaishouOfficialExpiresIn = args["expires_in"] + kuaishouOfficialExpiresIn = c.PostForm("expires_in") offical.MasterListCfgSave("0", "kuaishou_official_expires_in", kuaishouOfficialExpiresIn) kuaishouOfficialRefreshToken := offical.MasterListCfgGetOneData("0", "kuaishou_official_refresh_token") - kuaishouOfficialRefreshToken = args["refresh_token"] + kuaishouOfficialRefreshToken = c.PostForm("refresh_token") offical.MasterListCfgSave("0", "kuaishou_official_refresh_token", kuaishouOfficialRefreshToken) return }