mirror of
https://github.com/QingdaoU/OnlineJudge.git
synced 2025-11-04 14:49:58 +08:00
[前台js]添加小组申请的非空验证方法[CI SKIP]
This commit is contained in:
parent
a16198b861
commit
b1c5cf72ec
@ -1,9 +1,14 @@
|
||||
require(["jquery", "csrfToken", "bsAlert"], function ($, csrfTokenHeader, bsAlert) {
|
||||
$("#sendApplication").click(function (){
|
||||
var message = $("#applyMessage").val();
|
||||
console.log(message);
|
||||
var message;
|
||||
if ($("#applyMessage").length) {
|
||||
message = $("#applyMessage").val();
|
||||
if (!message)
|
||||
bsAlert("提交失败,请填写申请信息!");
|
||||
return false;
|
||||
}
|
||||
|
||||
var groupId = window.location.pathname.split("/")[2];
|
||||
console.log(groupId);
|
||||
data = {group_id: groupId,message:message}
|
||||
$.ajax({
|
||||
url: "/api/group_join/",
|
||||
|
||||
Loading…
Reference in New Issue
Block a user