| | |
| | | |
| | | import com.alibaba.fastjson.JSONObject; |
| | | import com.hx.util.HttpMethodUtil; |
| | | import com.hx.util.StringUtils; |
| | | import com.hx.util.corp.entity.AppLetInfo; |
| | | import com.hx.util.corp.entity.OpenIdAUserId; |
| | | import com.hx.util.corp.entity.WeiXinInfo; |
| | | import org.slf4j.Logger; |
| | |
| | | public static final String URL_USERID_TO_OPENID = "https://qyapi.weixin.qq.com/cgi-bin/user/convert_to_openid"; |
| | | |
| | | /**获取小程序链接*/ |
| | | public static final String URL_USERID_TO_APPLET = "https://api.weixin.qq.com/wxa/generate_urllink"; |
| | | public static final String URL_LINK = "https://api.weixin.qq.com/wxa/generate_urllink"; |
| | | |
| | | |
| | | /** |
| | |
| | | return weiXinInfo; |
| | | } |
| | | |
| | | public static AppLetInfo getAppLetUrl(String path, String token, String env_version, String query) { |
| | | Map<String, Object> map = new HashMap(); |
| | | map.put("access_token", token); |
| | | com.alibaba.fastjson.JSONObject data = new com.alibaba.fastjson.JSONObject(); |
| | | data.put("path", path); |
| | | data.put("env_version", env_version); |
| | | if (!StringUtils.isEmpty(query)){ |
| | | data.put("query", query); |
| | | } |
| | | String datas = HttpMethodUtil.HttpURLUtilJson(URL_LINK, data.toString(), map, (Map)null, "POST"); |
| | | AppLetInfo appLetInfo = com.alibaba.fastjson.JSONObject.parseObject(datas, AppLetInfo.class); |
| | | return appLetInfo; |
| | | } |
| | | } |