回 1楼识器的帖子
$.ajax({
type : 'get',
url : 'servlet/configServlet',
success : function(data) {
console.log(data);
data = JSON.parse(data);
dd.config.agentId = data.agentId;
dd.config.corpId = data.corpId;
dd.config.nonceStr = data.noncestr;
dd.config.timeStamp = data.timestamp;
dd.config.signature = data.signature;
},
error : function(XMLHttpRequest, textStatus, errorThrown) {
alert(errorThrown);
},
});
dd.config({
agentId : '', // 必填,微应用ID
corpId : '',
timeStamp : '', // 必填,生成签名的时间戳
nonceStr : '', // 必填,生成签名的随机串
signature : '', // 必填,签名
jsApiList : [ 'device.notification.alert',
'device.notification.confirm','biz.chat.chooseConversationByCorpId','biz.chat.pickConversation',
'runtime.info','runtime.permission.requestAuthCode','device.base.getUUID',
'device.base.getInterface',
'device.nfc.nfcRead',
'device.launcher.checkInstalledApps',
'device.connection.getNetworkType',
'biz.cspace.saveFile',
'device.notification.prompt',
'device.notification.vibrate',
'device.notification.showPreloader',
'device.notification.hidePreloader'
]