微信小程序接口,调用成功统一处理返回

This commit is contained in:
lifenlong 2021-06-25 17:34:00 +08:00
parent 7dfbb164ae
commit 4b3c2cbea5

View File

@ -201,7 +201,7 @@ public class WechatLivePlayerUtil {
log.info("微信小程序请求结果:" + content);
//获取请求内容如果token过期则重新获取如果出错则抛出错误
JSONObject jsonObject = new JSONObject(content);
if (jsonObject.get("media_id") != null) {
if (jsonObject.get("errcode").equals("0")) {
return jsonObject;
} else if (jsonObject.get("errcode").equals("40001")) {
wechatAccessTokenUtil.removeAccessToken(ClientTypeEnum.WECHAT_MP);