mirror of
https://github.com/stevenjoezhang/live2d-widget.git
synced 2024-10-30 15:57:42 +08:00
Code style update
This commit is contained in:
parent
3b569dfe31
commit
928588368c
@ -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);
|
||||
});
|
||||
}
|
||||
|
||||
|
@ -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);
|
||||
});
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user