mirror of
https://github.com/QingdaoU/OnlineJudge.git
synced 2025-11-04 14:49:58 +08:00
格式化代码
This commit is contained in:
parent
02fb497a94
commit
2993a6d794
@ -1,5 +1,6 @@
|
|||||||
require(["jquery", "bsAlert", "csrfToken"], function ($, bsAlert, csrfTokenHeader) {
|
require(["jquery", "bsAlert", "csrfToken"], function ($, bsAlert, csrfTokenHeader) {
|
||||||
var avatar="";
|
var avatar = "";
|
||||||
|
|
||||||
function changeAvatar(event) {
|
function changeAvatar(event) {
|
||||||
avatar = $(event.target).attr('src');
|
avatar = $(event.target).attr('src');
|
||||||
$('#current_avatar').attr('src', avatar);
|
$('#current_avatar').attr('src', avatar);
|
||||||
@ -7,7 +8,7 @@ require(["jquery", "bsAlert", "csrfToken"], function ($, bsAlert, csrfTokenHeade
|
|||||||
|
|
||||||
$('.avatar-item').click(changeAvatar);
|
$('.avatar-item').click(changeAvatar);
|
||||||
|
|
||||||
$('#save_avatar').click(function(){
|
$('#save_avatar').click(function () {
|
||||||
if (avatar)
|
if (avatar)
|
||||||
$.ajax({
|
$.ajax({
|
||||||
beforeSend: csrfTokenHeader,
|
beforeSend: csrfTokenHeader,
|
||||||
@ -21,7 +22,7 @@ require(["jquery", "bsAlert", "csrfToken"], function ($, bsAlert, csrfTokenHeade
|
|||||||
if (!data.code) {
|
if (!data.code) {
|
||||||
bsAlert("已保存!");
|
bsAlert("已保存!");
|
||||||
}
|
}
|
||||||
else{
|
else {
|
||||||
bsAlert(data.data);
|
bsAlert(data.data);
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user