|
@@ -1,6 +1,8 @@
|
|
|
package com.sxtvs.open.api.odata.controller;
|
|
|
|
|
|
import cn.hutool.core.util.IdUtil;
|
|
|
+import com.sxtvs.open.api.odata.service.OauthService;
|
|
|
+import com.sxtvs.open.api.youmei.service.YoumeiAccountServiceImpl;
|
|
|
import com.sxtvs.open.core.sls.AliyunLogger;
|
|
|
import org.springframework.beans.factory.annotation.Autowired;
|
|
|
import org.springframework.stereotype.Controller;
|
|
@@ -13,6 +15,10 @@ public class OauthController {
|
|
|
public static String kuaishouClientKey = "ks657244072487589897";
|
|
|
public static String kuaishouClientSecret = "d-LL1KyA6QSDzJG3AtzKZQ";
|
|
|
|
|
|
+
|
|
|
+ @Autowired
|
|
|
+ private OauthService oauthService;
|
|
|
+
|
|
|
@Autowired
|
|
|
private AliyunLogger logger;
|
|
|
|
|
@@ -64,14 +70,12 @@ public class OauthController {
|
|
|
return "redirect:https://www.baidu.com";
|
|
|
}
|
|
|
|
|
|
-// @RequestMapping("weibo/code")
|
|
|
-// public String weiboQrCode() {
|
|
|
-// logger.info("key", "toutiaoQrCode");
|
|
|
-// return "redirect:https://open.snssdk.com/oauth/authorize/?" +
|
|
|
-// "client_key=awfrca76s1petwh0&response_type=code&" +
|
|
|
-// "scope=toutiao.video.data,user_info&" +
|
|
|
-// "redirect_uri=http%3A%2F%2Fimport.smcic.net%2Ftoutiao%2Fcallback-open";
|
|
|
-// }
|
|
|
+ @RequestMapping("weibo/code")
|
|
|
+ public String weiboQrCode() {
|
|
|
+ var weiboUrl = oauthService.getWeiboUrl();
|
|
|
+ logger.info("key", "weiboQrCode","url",weiboUrl);
|
|
|
+ return weiboUrl;
|
|
|
+ }
|
|
|
|
|
|
@RequestMapping("weibo/callback")
|
|
|
public String weiboCallback(String code) {
|