// 导入成功后执行的函数 function afterImportSuccess() { // 开发方提供的接收通知的URL var notifyUrl = "http://192.168.5.177:9900/";
// 需要发送的通知信息(可根据实际需求调整参数) var postData = { status: "success", importTime: new Date().toLocaleString(), // 可添加其他需要的参数,如导入的文件名、条数等 fileName: this.fileName || "未知文件名", importCount: this.successCount || 0 };
// 使用帆软的fr.ajax发送POST请求 fr.ajax({ url: "http://192.168.5.177:9900/", type: "POST", contentType: "application/json;charset=utf-8", // 指定JSON格式 dataType: "json", success: function(response) { console.log("通知发送成功", response); // 可选:这里可以添加通知发送成功后的额外逻辑 }, error: function(xhr, status, error) { console.error("通知发送失败", error); // 可选:这里可以添加通知发送失败后的处理(如重试) } }); } // 执行函数 afterImportSuccess(); |