diff --git a/js/common.js b/js/common.js index cf6975f..fd54aae 100644 --- a/js/common.js +++ b/js/common.js @@ -41,7 +41,7 @@ function $ajaxget(url, data) { url = url.indexOf("https://") > -1 ? url : projectBaseURL + url url += objectToQueryString(data) - return new Promise(function (resolve, reject) { + return new Promise((resolve, reject) => { axios .get( url, @@ -51,7 +51,7 @@ function $ajaxget(url, data) { withCredentials: true, } ) - .then(function (res) { + .then(res => { var data = typeof res.data == "string" ? JSON.parse(res.data) : res.data if (data.code == 401) {