mirror of
https://github.com/lrsjng/h5ai.git
synced 2025-05-24 20:14:37 -04:00
Clean code.
This commit is contained in:
parent
1a47a2aa3b
commit
d5a0dce27a
6 changed files with 12 additions and 12 deletions
|
@ -20,7 +20,7 @@ modulejs.define('boot', ['$'], function ($) {
|
|||
$.ajax({
|
||||
url: url,
|
||||
data: data,
|
||||
type: 'POST',
|
||||
type: 'post',
|
||||
dataType: 'json'
|
||||
}).done(function (config) {
|
||||
|
||||
|
|
|
@ -9,7 +9,7 @@ modulejs.define('core/server', ['_', '$', 'config', 'core/location'], function (
|
|||
$.ajax({
|
||||
url: location.getAbsHref(),
|
||||
data: data,
|
||||
type: 'POST',
|
||||
type: 'post',
|
||||
dataType: 'json'
|
||||
})
|
||||
.done(function (json) {
|
||||
|
|
|
@ -110,8 +110,8 @@ modulejs.define('main/info', ['$', 'config'], function ($, config) {
|
|||
|
||||
$.ajax({
|
||||
url: 'server/php/index.php',
|
||||
type: 'POST',
|
||||
dataType: 'JSON',
|
||||
type: 'post',
|
||||
dataType: 'json',
|
||||
data: data
|
||||
})
|
||||
.always(function () {
|
||||
|
|
|
@ -112,7 +112,7 @@ describe('module \'' + ID + '\'', function () {
|
|||
|
||||
assert.isTrue(this.xAjax.calledOnce);
|
||||
assert.strictEqual(this.xAjax.lastCall.args[0].url, 'server/php/index.php');
|
||||
assert.strictEqual(this.xAjax.lastCall.args[0].type, 'POST');
|
||||
assert.strictEqual(this.xAjax.lastCall.args[0].type, 'post');
|
||||
assert.strictEqual(this.xAjax.lastCall.args[0].dataType, 'json');
|
||||
|
||||
assert.isTrue(this.xAjaxResult.done.calledOnce);
|
||||
|
@ -134,7 +134,7 @@ describe('module \'' + ID + '\'', function () {
|
|||
|
||||
assert.isTrue(this.xAjax.calledOnce);
|
||||
assert.strictEqual(this.xAjax.lastCall.args[0].url, '.');
|
||||
assert.strictEqual(this.xAjax.lastCall.args[0].type, 'POST');
|
||||
assert.strictEqual(this.xAjax.lastCall.args[0].type, 'post');
|
||||
assert.strictEqual(this.xAjax.lastCall.args[0].dataType, 'json');
|
||||
|
||||
assert.isTrue(this.xAjaxResult.done.calledOnce);
|
||||
|
|
|
@ -200,7 +200,7 @@ describe('module \'' + ID + '\'', function () {
|
|||
assert.deepEqual(this.xAjax.lastCall.args, [{
|
||||
url: this.xAbsHref,
|
||||
data: xData,
|
||||
type: 'POST',
|
||||
type: 'post',
|
||||
dataType: 'json'
|
||||
}]);
|
||||
assert.isTrue(this.xAjaxResult.done.calledOnce);
|
||||
|
@ -229,7 +229,7 @@ describe('module \'' + ID + '\'', function () {
|
|||
assert.deepEqual(this.xAjax.lastCall.args, [{
|
||||
url: this.xAbsHref,
|
||||
data: xData,
|
||||
type: 'POST',
|
||||
type: 'post',
|
||||
dataType: 'json'
|
||||
}]);
|
||||
assert.isTrue(this.xAjaxResult.done.calledOnce);
|
||||
|
|
|
@ -139,8 +139,8 @@ describe('module \'' + ID + '\'', function () {
|
|||
assert.isTrue(this.xAjax.calledOnce);
|
||||
assert.deepEqual(this.xAjax.lastCall.args, [{
|
||||
url: 'server/php/index.php',
|
||||
type: 'POST',
|
||||
dataType: 'JSON',
|
||||
type: 'post',
|
||||
dataType: 'json',
|
||||
data: {
|
||||
action: 'login',
|
||||
pass: pass
|
||||
|
@ -194,8 +194,8 @@ describe('module \'' + ID + '\'', function () {
|
|||
assert.isTrue(this.xAjax.calledOnce);
|
||||
assert.deepEqual(this.xAjax.lastCall.args, [{
|
||||
url: 'server/php/index.php',
|
||||
type: 'POST',
|
||||
dataType: 'JSON',
|
||||
type: 'post',
|
||||
dataType: 'json',
|
||||
data: {
|
||||
action: 'logout'
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue