Files
wehub-resource-sync a21fa4e11b
Go / Build (push) Failing after 1s
chore: import upstream snapshot with attribution
2026-07-13 12:30:21 +08:00

59 lines
1.5 KiB
Go
Raw Permalink Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
// email module js
var Email = {
// test send
testSend : function (element, url) {
layer.prompt({title: '请输入收件人邮箱地址多个以 ; 隔开', formType: 2}, function(text, index) {
layer.close(index);
// $(element).attr('action', url);
$(element).find("input[name='emails']").val(text);
Email.ajaxSubmit(element, url);
});
},
ajaxSubmit: function(element, url) {
/**
* 成功信息条
* @param message
* @param data
*/
function successBox(message, data) {
Common.successBox(Form.failedBox, message)
}
/**
* 失败信息条
* @param message
* @param data
*/
function failed(message, data) {
Common.errorBox(Form.failedBox, message)
}
/**
* request success
* @param result
*/
function response(result) {
//console.log(result)
if (result.code == 0) {
failed(result.message, result.data);
}
if (result.code == 1) {
successBox(result.message, result.data);
}
$("body,html").animate({scrollTop:0},300);
}
var options = {
dataType: 'json',
url: url,
success: response
};
$(element).ajaxSubmit(options);
return false;
}
};