mirror of
https://github.com/201206030/novel-plus.git
synced 2025-04-26 17:20:52 +00:00
模版更新
This commit is contained in:
parent
f043ddff42
commit
a06132a4c2
@ -347,8 +347,12 @@
|
|||||||
success: function(res){
|
success: function(res){
|
||||||
layer.close(loading);
|
layer.close(loading);
|
||||||
// 将生成的内容追加到文本末尾
|
// 将生成的内容追加到文本末尾
|
||||||
const newText = "\n\n" + res.data; // 添加换行符分隔
|
if(res.code == '200'){
|
||||||
typeWriter(textarea, newText); // 使用打字机效果
|
const newText = "\n\n【AI生成内容】" + res.data; // 添加换行符分隔
|
||||||
|
typeWriter(textarea, newText); // 使用打字机效果
|
||||||
|
}else{
|
||||||
|
layer.msg('AI内容生成失败,请稍后重试');
|
||||||
|
}
|
||||||
},
|
},
|
||||||
error: function(){
|
error: function(){
|
||||||
layer.msg('请求失败,请稍后重试');
|
layer.msg('请求失败,请稍后重试');
|
||||||
|
@ -51,7 +51,8 @@
|
|||||||
</div>
|
</div>
|
||||||
<div class="my_r">
|
<div class="my_r">
|
||||||
<div id="noContentDiv">
|
<div id="noContentDiv">
|
||||||
<div class="tc" style="margin-top: 200px"><a href="/author/book_add.html" class="btn_red">创建作品</a></div>
|
<div class="tc" style="margin-top: 200px"><a href="/author/book_add.html" class="btn_red">创建作品</a>
|
||||||
|
</div>
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
<div class="my_bookshelf" id="hasContentDiv" style="display: none">
|
<div class="my_bookshelf" id="hasContentDiv" style="display: none">
|
||||||
@ -142,10 +143,13 @@
|
|||||||
<script src="/javascript/common.js" type="text/javascript"></script>
|
<script src="/javascript/common.js" type="text/javascript"></script>
|
||||||
|
|
||||||
<script language="javascript" type="text/javascript">
|
<script language="javascript" type="text/javascript">
|
||||||
|
var searchCount = 0;
|
||||||
|
var timeout;
|
||||||
search(1, 5);
|
search(1, 5);
|
||||||
|
|
||||||
function search(curr, limit) {
|
function search(curr, limit) {
|
||||||
|
searchCount++;
|
||||||
|
clearTimeout(timeout);
|
||||||
$.ajax({
|
$.ajax({
|
||||||
type: "get",
|
type: "get",
|
||||||
url: "/author/listBookByPage",
|
url: "/author/listBookByPage",
|
||||||
@ -155,6 +159,7 @@
|
|||||||
if (data.code == 200) {
|
if (data.code == 200) {
|
||||||
var bookList = data.data.list;
|
var bookList = data.data.list;
|
||||||
if (bookList.length > 0) {
|
if (bookList.length > 0) {
|
||||||
|
var aiPicGenerating = bookList[0].picUrl == '/images/default.gif'
|
||||||
$("#hasContentDiv").css("display", "block");
|
$("#hasContentDiv").css("display", "block");
|
||||||
$("#noContentDiv").css("display", "none");
|
$("#noContentDiv").css("display", "none");
|
||||||
var bookListHtml = "";
|
var bookListHtml = "";
|
||||||
@ -226,6 +231,12 @@
|
|||||||
});
|
});
|
||||||
});
|
});
|
||||||
|
|
||||||
|
if (curr === 1 && aiPicGenerating && searchCount < 10) {
|
||||||
|
timeout = setTimeout(function () {
|
||||||
|
search(curr, limit);
|
||||||
|
}, 3000);
|
||||||
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user