Browse Source

一些优化

pull/4/merge
xiaoz 4 years ago
parent
commit
d634597362
  1. 4
      index.php
  2. 2
      templates/admin/add_link.php
  3. 1
      templates/admin/static/embed.js

4
index.php

@ -14,6 +14,10 @@ $c = strip_tags($c); @@ -14,6 +14,10 @@ $c = strip_tags($c);
if( !file_exists('./config.php') ) {
exit('<h3>配置文件不存在,请将config.simple.php复制一份并命名为config.php</h3>');
}
//检查数据库是否存在,不存在则复制数据库
if( !file_exists('./db/onenav.db3') ) {
copy('db/onenav.simple.db3','db/onenav.db3');
}
//载入配置文件
require("./config.php");

2
templates/admin/add_link.php

@ -19,7 +19,7 @@ @@ -19,7 +19,7 @@
</div>
</div>
<div class="layui-form-item">
<label class="layui-form-label">选择框</label>
<label class="layui-form-label">所属分类</label>
<div class="layui-input-block">
<select name="fid" lay-verify="required" lay-search>
<option value=""></option>

1
templates/admin/static/embed.js

@ -264,6 +264,7 @@ layui.use(['element','table','layer','form'], function(){ @@ -264,6 +264,7 @@ layui.use(['element','table','layer','form'], function(){
});
//识别链接信息
form.on('submit(get_link_info)', function(data){
//是用ajax异步加载
$.post('/index.php?c=api&method=get_link_info',data.field.url,function(data,status){
//如果添加成功
if(data.code == 0) {

Loading…
Cancel
Save