From 5c39f7976a4284f873402cf3f75fdfb58d1f4a2f Mon Sep 17 00:00:00 2001 From: xiaoz Date: Fri, 27 May 2022 14:44:59 +0800 Subject: [PATCH] 20220527 --- data/update.log | 9 +- templates/admin/left.php | 1 + templates/admin/setting/subscribe.php | 176 ++++++++++++++++++++++++++ templates/admin/setting/theme.php | 15 ++- templates/admin/static/embed.js | 44 +++++++ templates/admin/static/style.css | 12 ++ 6 files changed, 250 insertions(+), 7 deletions(-) create mode 100644 templates/admin/setting/subscribe.php diff --git a/data/update.log b/data/update.log index 756e2ac..33f1354 100755 --- a/data/update.log +++ b/data/update.log @@ -116,4 +116,11 @@ CREATE INDEX on_options_key_IDX ON on_options ("key"); 20220513 1. 主题分类排序优化 -2. 修改分类优化 \ No newline at end of file +2. 修改分类优化 + +20220525 +1. 修复link_list和get_a_link可以查询私有分类下的公有链接问题 +2. 新增查询指定分类下的链接接口:q_category_link + +20220527 +1. 新增订阅于在线更新 \ No newline at end of file diff --git a/templates/admin/left.php b/templates/admin/left.php index 1e5ebc8..3386ced 100755 --- a/templates/admin/left.php +++ b/templates/admin/left.php @@ -27,6 +27,7 @@
  • 系统设置
    +
    订阅 & 更新
    站点设置
    主题设置
    过渡页面
    diff --git a/templates/admin/setting/subscribe.php b/templates/admin/setting/subscribe.php new file mode 100644 index 0000000..43988d5 --- /dev/null +++ b/templates/admin/setting/subscribe.php @@ -0,0 +1,176 @@ + + + + +
    + +
    + +
    +
    +
      +
    1. 您可以前往:https://dwz.ovh/69h9q 购买订阅服务,订阅后可以:
    2. +
    3. 1. 享受一键更新OneNav
    4. +
    5. 2. 可在线更新和下载主题(尚未实现)
    6. +
    7. 3. 可享受一对一售后服务
    8. +
    9. 4. 可帮助OneNav持续发展,让OneNav变得更加美好
    10. +
    +
    +
    + + +
    +
    + +
    + +
    + +
    +
    + +
    + +
    + +
    +
    + + + +
    + +
    + " autocomplete="off" placeholder="订阅到期时间" class="layui-input"> +
    +
    + +
    + +
    + +
    +
    + +
    +
    + +
    + +
    +
    + +
    + +
    + +
    + +
    +
    +
    + + +
    +
    + +
    + +
    +
    +
    +
    +
    +
    + +
    +
    +
    + + + + + \ No newline at end of file diff --git a/templates/admin/setting/theme.php b/templates/admin/setting/theme.php index e7f1780..600cb95 100644 --- a/templates/admin/setting/theme.php +++ b/templates/admin/setting/theme.php @@ -18,20 +18,23 @@ ?>
    -
    - -

    name ?>

    -

    版本:version ?>

    -

    更新时间:update ?>

    -
    +
    + - version ?> + + +

    + +

    + +

    diff --git a/templates/admin/static/embed.js b/templates/admin/static/embed.js index 6eee47c..ee4d27d 100755 --- a/templates/admin/static/embed.js +++ b/templates/admin/static/embed.js @@ -389,6 +389,33 @@ layui.use(['element','table','layer','form','upload'], function(){ return false; //阻止表单跳转。如果需要表单跳转,去掉这段即可。 }); + //保存订阅信息 + form.on('submit(set_subscribe)', function(data){ + var order_id = data.field.order_id; + $.get('http://down.onenav.top/v1/check_subscribe.php',data.field,function(data,status){ + + if(data.code == 200) { + //order_id = data.data.order_id; + email = data.data.email; + end_time = data.data.end_time; + //存储到数据库中 + $.post("index.php?c=api&method=set_subscribe",{order_id:order_id,email:email,end_time:end_time},function(data,status){ + if(data.code == 0) { + layer.msg(data.data, {icon: 1}); + } + else{ + layer.msg(data.err_msg, {icon: 5}); + } + }); + } + else{ + layer.msg(data.msg, {icon: 5}); + } + }); + console.log(data.field) //当前容器的全部表单字段,名值对形式:{name: value} + return false; //阻止表单跳转。如果需要表单跳转,去掉这段即可。 + }); + //保存站点设置 form.on('submit(set_transition_page)', function(data){ $.post('/index.php?c=api&method=set_transition_page',data.field,function(data,status){ @@ -808,4 +835,21 @@ function export_link(url, fileName) { layer.close(index); }); +} + +//删除主题 +function delete_theme(name) { + layer.confirm('确认删除此主题(' + name + ')?', {icon: 3, title:'重要提示'}, function(index){ + $.post("index.php?c=api&method=delete_theme",{name:name},function(data,status){ + if( data.code == 200 ) { + layer.msg(data.msg,{icon:1}); + setTimeout(() => { + window.location.reload(); + }, 2000); + } + else{ + layer.msg(data.msg,{icon:5}); + } + }); + }); } \ No newline at end of file diff --git a/templates/admin/static/style.css b/templates/admin/static/style.css index 89fc126..4462f9e 100755 --- a/templates/admin/static/style.css +++ b/templates/admin/static/style.css @@ -106,4 +106,16 @@ /* 占位用 */ .place-holder{ padding-bottom: 3em; +} +.screenshot { + height:220px; +} +.screenshot img{ + max-width: auto; + max-height: 200px; +} + +#progress{ + display:none; + margin-top:1em; } \ No newline at end of file