钉钉微应用如何打开本地app (Android)
Re钉钉微应用如何打开本地app (Android)
经测试,免登认证已成功,执行 dd.device.launcher.checkInstalledApps 失败报not authorized
-------------------------
回 2楼识器的帖子
你好,我参考了例子,我用调试工具获取的signature 已自己生成的对比,是一致的,但是就是在执行 dd.device.launcher.checkInstalledApps报未授权not authorized errCode:7
-------------------------
回 4楼识器的帖子
按你所说,我把dd 去掉了,还是不可以
-------------------------
Re钉钉微应用如何打开本地app (Android)
为什么我先访问action 签名后回到页面会认证说权限校验失败
@RequestMapping(value='/dd/openCoreMail.action')
public String openCoreMail(HttpServletRequest request,ModelMap model){
String url=request.getRequestURL().toString();
String querString=request.getQueryString();
if(!StringUtils.isEmpty(querString)&&(!querString.equals('null'))){
try {
querString=URLEncoder.encode(querString, 'UTF-8');
} catch (UnsupportedEncodingException e) {
e.printStackTrace();
}
}else{
querString=null;
}
String result=AuthHelper.getConfig(url,querString);
JSONObject jobj=JSONObject.fromObject(result);
System.out.println(result);
Map map =new HashMap();
map.put('SIGNATURE', jobj.getString('signature'));
map.put('NONCESTR', jobj.getString('nonceStr'));
map.put('TIMESTAMP', jobj.getString('timeStamp'));
map.put('CORPID', Env.CORP_ID);
map.put('APPID', null);
model.addAttribute('ROOT',map);
return 'dingTalk/openCoreMail';
}
下面是页面
pageEncoding='UTF-8'%>
openCoreMail
但是如果我直接不通过action 直接不把页面放在WEB_INF如下却可以,有什么解决办法没
pageEncoding='UTF-8'%>
org.apache.commons.lang.StringUtils,java.net.URLEncoder,
java.io.UnsupportedEncodingException,com.hbglobal.listener.DingDingListener,
net.sf.json.JSONObject,com.hbglobal.ding.po.Env' %>
openCoreMail
String url=request.getRequestURL().toString();
String querString=request.getQueryString();
System.out.println(url+':'+querString);
if(!StringUtils.isEmpty(querString)&&(!querString.equals('null'))){
try {
querString=URLEncoder.encode(querString, 'UTF-8');
} catch (UnsupportedEncodingException e) {
e.printStackTrace();
}
}else{
querString=null;
}
String result=AuthHelper.getConfig(url,querString);
JSONObject jobj=JSONObject.fromObject(result);
System.out.println(result);
String SIGNATURE= jobj.getString('signature');
String NONCESTR=jobj.getString('nonceStr');
String TIMESTAMP= jobj.getString('timeStamp');
String CORPID= Env.CORP_ID;
%>
启动范文
赞0
踩0