|
@@ -1,19 +1,16 @@ |
|
|
package hdl |
|
|
package hdl |
|
|
|
|
|
|
|
|
import ( |
|
|
import ( |
|
|
offical "applet/app/db/official" |
|
|
|
|
|
|
|
|
"applet/app/db" |
|
|
"github.com/gin-gonic/gin" |
|
|
"github.com/gin-gonic/gin" |
|
|
) |
|
|
) |
|
|
|
|
|
|
|
|
func KuaishouAuth(c *gin.Context) { |
|
|
func KuaishouAuth(c *gin.Context) { |
|
|
kuaishouOfficialAccessToken := offical.MasterListCfgGetOneData("0", "kuaishou_official_access_token") |
|
|
|
|
|
kuaishouOfficialAccessToken = c.PostForm("access_token") |
|
|
|
|
|
offical.MasterListCfgSave("0", "kuaishou_official_access_token", kuaishouOfficialAccessToken) |
|
|
|
|
|
kuaishouOfficialExpiresIn := offical.MasterListCfgGetOneData("0", "kuaishou_official_expires_in") |
|
|
|
|
|
kuaishouOfficialExpiresIn = c.PostForm("expires_in") |
|
|
|
|
|
offical.MasterListCfgSave("0", "kuaishou_official_expires_in", kuaishouOfficialExpiresIn) |
|
|
|
|
|
kuaishouOfficialRefreshToken := offical.MasterListCfgGetOneData("0", "kuaishou_official_refresh_token") |
|
|
|
|
|
kuaishouOfficialRefreshToken = c.PostForm("refresh_token") |
|
|
|
|
|
offical.MasterListCfgSave("0", "kuaishou_official_refresh_token", kuaishouOfficialRefreshToken) |
|
|
|
|
|
|
|
|
kuaishouOfficialAccessToken := c.PostForm("access_token") |
|
|
|
|
|
db.MasterListCfgSave("0", "kuaishou_official_access_token", kuaishouOfficialAccessToken) |
|
|
|
|
|
kuaishouOfficialExpiresIn := c.PostForm("expires_in") |
|
|
|
|
|
db.MasterListCfgSave("0", "kuaishou_official_expires_in", kuaishouOfficialExpiresIn) |
|
|
|
|
|
kuaishouOfficialRefreshToken := c.PostForm("refresh_token") |
|
|
|
|
|
db.MasterListCfgSave("0", "kuaishou_official_refresh_token", kuaishouOfficialRefreshToken) |
|
|
return |
|
|
return |
|
|
} |
|
|
} |