Browse Source

update tt

master
xhxu 3 years ago
parent
commit
9fa617e3b2
3 changed files with 2 additions and 4 deletions
  1. +0
    -2
      mallinkService/src/main/java/com/iformall/service/toutiao/api/bean/TtOpenGsonBuilder.java
  2. +2
    -1
      mallinkService/src/main/java/com/iformall/service/toutiao/api/impl/TtOpenComponentServiceImpl.java
  3. +0
    -1
      mlToutiaoOpen/src/main/java/com/iformall/controller/TtAuthController.java

+ 0
- 2
mallinkService/src/main/java/com/iformall/service/toutiao/api/bean/TtOpenGsonBuilder.java View File

@@ -2,8 +2,6 @@ package com.iformall.service.toutiao.api.bean;


import com.google.gson.Gson; import com.google.gson.Gson;
import com.google.gson.GsonBuilder; import com.google.gson.GsonBuilder;
import com.iformall.service.toutiao.miniapp.bean.TtMaSubscribeMessage;
import com.iformall.service.toutiao.miniapp.bean.TtMaSubscribeMessageGsonAdapter;


/** /**
* @author * @author


+ 2
- 1
mallinkService/src/main/java/com/iformall/service/toutiao/api/impl/TtOpenComponentServiceImpl.java View File

@@ -198,7 +198,8 @@ public class TtOpenComponentServiceImpl implements TtOpenComponentService {
JsonObject jsonObject = new JsonObject(); JsonObject jsonObject = new JsonObject();
jsonObject.addProperty("component_appid", getWxOpenConfigStorage().getComponentAppId()); jsonObject.addProperty("component_appid", getWxOpenConfigStorage().getComponentAppId());
String responseContent = post(API_CREATE_PREAUTHCODE_URL, jsonObject.toString(),"component_access_token"); String responseContent = post(API_CREATE_PREAUTHCODE_URL, jsonObject.toString(),"component_access_token");
jsonObject = WxGsonBuilder.create().fromJson(responseContent, JsonObject.class);
log.info(responseContent +"----------responseContent");
jsonObject = TtOpenGsonBuilder.create().fromJson(responseContent, JsonObject.class);


StringBuilder preAuthUrl = new StringBuilder(String.format(COMPONENT_LOGIN_PAGE_URL, StringBuilder preAuthUrl = new StringBuilder(String.format(COMPONENT_LOGIN_PAGE_URL,
getWxOpenConfigStorage().getComponentAppId(), getWxOpenConfigStorage().getComponentAppId(),


+ 0
- 1
mlToutiaoOpen/src/main/java/com/iformall/controller/TtAuthController.java View File

@@ -56,7 +56,6 @@ public class TtAuthController {
@GetMapping("/goto_auth_url") @GetMapping("/goto_auth_url")
public void gotoPreAuthUrl(HttpServletRequest request, HttpServletResponse response) { public void gotoPreAuthUrl(HttpServletRequest request, HttpServletResponse response) {
String host = request.getHeader("host"); String host = request.getHeader("host");
logger.info("-----host="+host);
String url = "https://" + host + "/T/wt_auth/jump"; String url = "https://" + host + "/T/wt_auth/jump";
try { try {
url = openService.getTtOpenComponentService().getPreAuthUrl(url); url = openService.getTtOpenComponentService().getPreAuthUrl(url);


Loading…
Cancel
Save