diff --git a/templates/admin/setting/subscribe.php b/templates/admin/setting/subscribe.php
index c779428..d1c0f3b 100644
--- a/templates/admin/setting/subscribe.php
+++ b/templates/admin/setting/subscribe.php
@@ -12,7 +12,7 @@
diff --git a/templates/admin/setting/theme.php b/templates/admin/setting/theme.php
index 600cb95..5c64e46 100644
--- a/templates/admin/setting/theme.php
+++ b/templates/admin/setting/theme.php
@@ -17,7 +17,7 @@
//var_dump($theme['info']->name);
?>
-
+
- version ?>
diff --git a/templates/admin/setting/transition_page.php b/templates/admin/setting/transition_page.php
index 5aeb2cd..47b4b42 100644
--- a/templates/admin/setting/transition_page.php
+++ b/templates/admin/setting/transition_page.php
@@ -8,7 +8,7 @@
@@ -39,6 +39,34 @@
管理员停留时间,单位秒
+
+
+
+
自定义footer,支持HTML(订阅可用)
+
+
+
+
+
+
+
+
+
保存设置
diff --git a/templates/admin/static/embed.js b/templates/admin/static/embed.js
index 6d18e83..58c79c4 100755
--- a/templates/admin/static/embed.js
+++ b/templates/admin/static/embed.js
@@ -1,5 +1,12 @@
+layui.config({
+ base: './static/module/'
+}).extend({
+ iconHhysFa: 'iconHhys/iconHhysFa'
+});
+
+
// 2022014
-layui.use(['element','table','layer','form','upload'], function(){
+layui.use(['element','table','layer','form','upload','iconHhysFa'], function(){
var element = layui.element;
var table = layui.table;
var form = layui.form;
@@ -377,15 +384,18 @@ layui.use(['element','table','layer','form','upload'], function(){
//保存站点设置
form.on('submit(set_site)', function(data){
+ var index = layer.load(1);
$.post('/index.php?c=api&method=set_site',data.field,function(data,status){
if(data.code == 0) {
+ layer.closeAll('loading');
layer.msg(data.data, {icon: 1});
}
else{
+ layer.closeAll('loading');
layer.msg(data.err_msg, {icon: 5});
}
});
- console.log(data.field) //当前容器的全部表单字段,名值对形式:{name: value}
+ //console.log(data.field) //当前容器的全部表单字段,名值对形式:{name: value}
return false; //阻止表单跳转。如果需要表单跳转,去掉这段即可。
});
@@ -393,7 +403,7 @@ layui.use(['element','table','layer','form','upload'], function(){
form.on('submit(set_subscribe)', function(data){
var order_id = data.field.order_id;
var index = layer.load(1);
- $.get('http://down.onenav.top/v1/check_subscribe.php',data.field,function(data,status){
+ $.get('https://onenav.xiaoz.top/v1/check_subscribe.php',data.field,function(data,status){
if(data.code == 200) {
//order_id = data.data.order_id;
@@ -420,6 +430,25 @@ layui.use(['element','table','layer','form','upload'], function(){
console.log(data.field) //当前容器的全部表单字段,名值对形式:{name: value}
return false; //阻止表单跳转。如果需要表单跳转,去掉这段即可。
});
+ //清空订阅信息
+ form.on('submit(reset_subscribe)', function(data){
+ //存储到数据库中
+ $.post("index.php?c=api&method=set_subscribe",{order_id:'',email:'',end_time:null},function(data,status){
+ if(data.code == 0) {
+ //清空表单
+ $("#order_id").val('');
+ $("#email").val('');
+ //$("#domain").val('');
+ $("#end_time").val('');
+ layer.msg(data.data, {icon: 1});
+ }
+ else{
+ layer.closeAll('loading');
+ layer.msg(data.err_msg, {icon: 5});
+ }
+ });
+ return false; //阻止表单跳转。如果需要表单跳转,去掉这段即可。
+ });
//保存站点设置
form.on('submit(set_transition_page)', function(data){
@@ -857,4 +886,17 @@ function delete_theme(name) {
}
});
});
+}
+
+//验证是否订阅
+function check_subscribe(msg) {
+ $.get("/index.php?c=api&method=check_subscribe",function(data,status){
+ if( data.code == 200 ) {
+ return true;
+ }
+ else{
+ layer.msg(msg, {icon: 5});
+ return false;
+ }
+ });
}
\ No newline at end of file
diff --git a/templates/admin/static/style.css b/templates/admin/static/style.css
index 4462f9e..fce4ccc 100755
--- a/templates/admin/static/style.css
+++ b/templates/admin/static/style.css
@@ -118,4 +118,4 @@
#progress{
display:none;
margin-top:1em;
-}
\ No newline at end of file
+}