Code style update

This commit is contained in:
Mimi 2019-12-29 14:41:16 +08:00
parent 3b569dfe31
commit 928588368c
2 changed files with 6 additions and 6 deletions

View File

@ -186,7 +186,7 @@ $(function() {
fetch(`${apiPath}/rand_textures/?id=${modelId}-${modelTexturesId}`)
.then(response => response.json())
.then(result => {
loadModel(modelId, result.textures["id"]);
loadModel(modelId, result.textures.id);
setTimeout(function() {
state = 2;
$("#cover").css("bottom", "80%");
@ -200,7 +200,7 @@ $(function() {
fetch(`${apiPath}/switch/?id=${modelId}`)
.then(response => response.json())
.then(result => {
loadModel(result.model["id"]);
loadModel(result.model.id);
});
}

View File

@ -202,9 +202,9 @@ function loadWidget(waifuPath, apiPath) {
fetch(`${apiPath}/rand_textures/?id=${modelId}-${modelTexturesId}`)
.then(response => response.json())
.then(result => {
if (result.textures["id"] == 1 && (modelTexturesId == 1 || modelTexturesId == 0)) showMessage("我还没有其他衣服呢!", 4000, 10);
if (result.textures.id == 1 && (modelTexturesId == 1 || modelTexturesId == 0)) showMessage("我还没有其他衣服呢!", 4000, 10);
else showMessage("我的新衣服好看嘛?", 4000, 10);
loadModel(modelId, result.textures["id"]);
loadModel(modelId, result.textures.id);
});
}
@ -213,8 +213,8 @@ function loadWidget(waifuPath, apiPath) {
fetch(`${apiPath}/switch/?id=${modelId}`)
.then(response => response.json())
.then(result => {
loadModel(result.model["id"]);
showMessage(result.model["message"], 4000, 10);
loadModel(result.model.id);
showMessage(result.model.message, 4000, 10);
});
}
}