提交修改
This commit is contained in:
parent
95f0f8b769
commit
8d5fcc2c70
@ -21,7 +21,9 @@ public class WeChatUtils {
|
|||||||
* 微信 auth.code2Session 接口
|
* 微信 auth.code2Session 接口
|
||||||
*/
|
*/
|
||||||
public final static String WECHAT_LOGIN_URL = "https://api.weixin.qq.com/sns/jscode2session";
|
public final static String WECHAT_LOGIN_URL = "https://api.weixin.qq.com/sns/jscode2session";
|
||||||
|
|
||||||
public final static String WECHAT_APPID = "wx75fa59c097bd3dfd";
|
public final static String WECHAT_APPID = "wx75fa59c097bd3dfd";
|
||||||
|
|
||||||
public final static String WECHAT_SECRET = "1837c382de696013a2dfc64591e6b854";
|
public final static String WECHAT_SECRET = "1837c382de696013a2dfc64591e6b854";
|
||||||
|
|
||||||
|
|
||||||
@ -33,6 +35,9 @@ public class WeChatUtils {
|
|||||||
private static final String schemeUrl = "https://api.weixin.qq.com/wxa/generatescheme?access_token=";
|
private static final String schemeUrl = "https://api.weixin.qq.com/wxa/generatescheme?access_token=";
|
||||||
|
|
||||||
|
|
||||||
|
public static final String wechatQrcodeUrl = "https://api.weixin.qq.com/wxa/getwxacodeunlimit?access_token=";
|
||||||
|
|
||||||
|
|
||||||
@Autowired
|
@Autowired
|
||||||
private RedisUtils redisUtils;
|
private RedisUtils redisUtils;
|
||||||
|
|
||||||
|
|||||||
@ -11,7 +11,6 @@ import com.heyu.api.oss.OssFileUploadService;
|
|||||||
import com.heyu.api.oss.OssUploadResult;
|
import com.heyu.api.oss.OssUploadResult;
|
||||||
import lombok.extern.slf4j.Slf4j;
|
import lombok.extern.slf4j.Slf4j;
|
||||||
import org.springframework.beans.factory.annotation.Autowired;
|
import org.springframework.beans.factory.annotation.Autowired;
|
||||||
import org.springframework.beans.factory.annotation.Value;
|
|
||||||
import org.springframework.web.bind.annotation.RequestBody;
|
import org.springframework.web.bind.annotation.RequestBody;
|
||||||
import org.springframework.web.bind.annotation.RequestMapping;
|
import org.springframework.web.bind.annotation.RequestMapping;
|
||||||
import org.springframework.web.bind.annotation.RestController;
|
import org.springframework.web.bind.annotation.RestController;
|
||||||
@ -23,8 +22,6 @@ import java.util.Map;
|
|||||||
@RestController
|
@RestController
|
||||||
@RequestMapping("/app/qrcode")
|
@RequestMapping("/app/qrcode")
|
||||||
public class AppQrCodeController {
|
public class AppQrCodeController {
|
||||||
public static final String wechatQrcodeUrl = "https://api.weixin.qq.com/wxa/getwxacodeunlimit?access_token=";
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
// 自行配置:正式版为 "release",体验版为 "trial",开发版为 "develop"。默认是正式版。
|
// 自行配置:正式版为 "release",体验版为 "trial",开发版为 "develop"。默认是正式版。
|
||||||
@ -53,8 +50,7 @@ public class AppQrCodeController {
|
|||||||
// 当前登录账号
|
// 当前登录账号
|
||||||
String accountId = "123456";
|
String accountId = "123456";
|
||||||
|
|
||||||
String url = wechatQrcodeUrl + accessTokenDTO.getAccessToken();
|
String url = WeChatUtils.wechatQrcodeUrl + accessTokenDTO.getAccessToken();
|
||||||
|
|
||||||
|
|
||||||
Map<String, Object> body = new HashMap<>();
|
Map<String, Object> body = new HashMap<>();
|
||||||
|
|
||||||
@ -80,7 +76,6 @@ public class AppQrCodeController {
|
|||||||
}
|
}
|
||||||
|
|
||||||
OssUploadResult ossUploadResult = ossFileUploadService.uploadImageByBytes(bytes);
|
OssUploadResult ossUploadResult = ossFileUploadService.uploadImageByBytes(bytes);
|
||||||
|
|
||||||
return R.ok().setData(ossUploadResult);
|
return R.ok().setData(ossUploadResult);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user