diff --git a/templates/admin/setting/subscribe.php b/templates/admin/setting/subscribe.php
index 282d997..c779428 100644
--- a/templates/admin/setting/subscribe.php
+++ b/templates/admin/setting/subscribe.php
@@ -80,7 +80,8 @@
@@ -117,6 +118,8 @@
}
//否则可以更新
else {
+ $("#btn_update").hide();
+ $("#btn_updating").show();
update_status("1%","准备更新...");
//第一步检查更新信息
$.get("/index.php?c=api&method=check_subscribe",function(data,status){
@@ -143,6 +146,8 @@
$.get("/index.php?c=api&method=check_version",{version:new_version},function(data,status){
if(data.code == 200) {
update_status("100%","更新完成,请前往后台检查
更新数据库!");
+ $("#btn_update").show();
+ $("#btn_updating").hide();
}
else {
update_error(data.msg);
@@ -187,5 +192,7 @@
,icon:5
});
$("#progress").hide();
+ $("#btn_update").show();
+ $("#btn_updating").hide();
}
\ No newline at end of file
diff --git a/templates/admin/static/embed.js b/templates/admin/static/embed.js
index ee4d27d..6d18e83 100755
--- a/templates/admin/static/embed.js
+++ b/templates/admin/static/embed.js
@@ -392,6 +392,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){
if(data.code == 200) {
@@ -401,16 +402,20 @@ layui.use(['element','table','layer','form','upload'], function(){
//存储到数据库中
$.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.closeAll('loading');
layer.msg(data.data, {icon: 1});
}
else{
+ layer.closeAll('loading');
layer.msg(data.err_msg, {icon: 5});
}
});
}
else{
+ layer.closeAll('loading');
layer.msg(data.msg, {icon: 5});
}
+
});
console.log(data.field) //当前容器的全部表单字段,名值对形式:{name: value}
return false; //阻止表单跳转。如果需要表单跳转,去掉这段即可。