|
@@ -78,13 +78,18 @@ function App() {
|
|
|
const config = await response.json();
|
|
const config = await response.json();
|
|
|
|
|
|
|
|
console.log('服务器返回配置:', config);
|
|
console.log('服务器返回配置:', config);
|
|
|
|
|
+ console.log('agentId:', config.agentId);
|
|
|
|
|
+ console.log('corpId:', config.corpId);
|
|
|
|
|
+ console.log('timeStamp:', config.timeStamp);
|
|
|
|
|
+ console.log('nonceStr:', config.nonceStr);
|
|
|
|
|
+ console.log('signature:', config.signature);
|
|
|
|
|
|
|
|
if (config.error) {
|
|
if (config.error) {
|
|
|
console.error('服务器返回错误:', config.error);
|
|
console.error('服务器返回错误:', config.error);
|
|
|
return;
|
|
return;
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
- await Dingdocs.base.host.configPermission(
|
|
|
|
|
|
|
+ const permissionResult = await Dingdocs.base.host.configPermission(
|
|
|
config.agentId,
|
|
config.agentId,
|
|
|
config.corpId,
|
|
config.corpId,
|
|
|
config.timeStamp,
|
|
config.timeStamp,
|
|
@@ -92,6 +97,7 @@ function App() {
|
|
|
config.signature,
|
|
config.signature,
|
|
|
['DingdocsScript.base.readWriteAll']
|
|
['DingdocsScript.base.readWriteAll']
|
|
|
);
|
|
);
|
|
|
|
|
+ console.log('权限配置结果:', permissionResult);
|
|
|
console.log('权限配置成功');
|
|
console.log('权限配置成功');
|
|
|
} catch (error: any) {
|
|
} catch (error: any) {
|
|
|
console.error('权限配置失败:', error);
|
|
console.error('权限配置失败:', error);
|