From 0d49535105ee44b8c5a60f3b06248789fcf292f7 Mon Sep 17 00:00:00 2001 From: zyx0814 Date: Thu, 14 Mar 2024 18:24:13 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E5=A4=8D=E5=B8=B8=E8=A7=81=E9=97=AE?= =?UTF-8?q?=E9=A2=98=E5=88=A0=E9=99=A4=E9=97=AE=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- dzz/alonepage/template/assets/js/question.js | 2 +- dzz/alonepage/template/page/setting.htm | 21 +++++++++++--------- install/index.php | 6 +++--- library/index.htm | 0 4 files changed, 16 insertions(+), 13 deletions(-) create mode 100644 library/index.htm diff --git a/dzz/alonepage/template/assets/js/question.js b/dzz/alonepage/template/assets/js/question.js index 065ba90..3dd3eba 100644 --- a/dzz/alonepage/template/assets/js/question.js +++ b/dzz/alonepage/template/assets/js/question.js @@ -172,7 +172,7 @@ const Tmpquestion_txt = { return id; }; function handledelete(index){//删除 - props.model.data[0].data.splice(index,1); + props.model.data.splice(index,1); }; onMounted(function(){//排序 Sortable.create(DomDiv.value, { diff --git a/dzz/alonepage/template/page/setting.htm b/dzz/alonepage/template/page/setting.htm index 01b7a56..3097f5b 100644 --- a/dzz/alonepage/template/page/setting.htm +++ b/dzz/alonepage/template/page/setting.htm @@ -349,16 +349,19 @@ data:[], name:fitem.tdataname, } - for (let findex = 0; findex < fitem.tdata.length; findex++) { - const ditem = fitem.tdata[findex]; - fstr.data.push( - { - key:0, - title:ditem.title || '', - answer:ditem.answer || '', - }, - ) + if(fitem.tdata && fitem.tdata.length){ + for (let findex = 0; findex < fitem.tdata.length; findex++) { + const ditem = fitem.tdata[findex]; + fstr.data.push( + { + key:0, + title:ditem.title || '', + answer:ditem.answer || '', + }, + ) + } } + str.data.push(fstr); } diff --git a/install/index.php b/install/index.php index caa5208..c1dd512 100644 --- a/install/index.php +++ b/install/index.php @@ -420,9 +420,9 @@ elseif($method == 'admin_init') { $ctype = 1; $data = addslashes(serialize($userstats)); $db->query("REPLACE INTO {$tablepre}syscache (cname, ctype, dateline, data) VALUES ('userstats', '$ctype', '".time()."', '$data')"); - - header("location: index.php?step=5"); - exit(); + exit(""); + //header("location: index.php?step=5"); + //exit(); } show_form($form_admin_init_items, $error_msg); diff --git a/library/index.htm b/library/index.htm new file mode 100644 index 0000000..e69de29