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