diff --git a/class/Api.php b/class/Api.php
index a02ee04..200d3a5 100755
--- a/class/Api.php
+++ b/class/Api.php
@@ -1598,7 +1598,7 @@ class Api {
if ( $file_size != $lentgh ) {
if ( $this->down_updater() ) {
//更新完毕后提示
- $this->return_json(200,"","更新程序准备就绪!");
+ $this->return_json(200,"","更新程序更新完毕!");
}
else{
$this->return_json(-2000,"","更新程序下载失败,请检查目录权限!");
@@ -1606,14 +1606,14 @@ class Api {
}
else {
- $this->return_json(200,"","更新程序准备就绪!");
+ $this->return_json(200,"","更新程序(压缩包)准备就绪!");
}
}
else if( is_file("update.php") ) {
- $this->return_json(200,"","更新程序准备就绪!");
+ $this->return_json(200,"","更新程序(PHP)准备就绪!");
}
else{
- $this->return_json(200,"","更新程序准备就绪!");
+ $this->return_json(200,"","更新程序(其它)准备就绪!");
}
}
/**
diff --git a/data/update.log b/data/update.log
index 3fbab83..8a2da68 100755
--- a/data/update.log
+++ b/data/update.log
@@ -128,4 +128,5 @@ CREATE INDEX on_options_key_IDX ON on_options ("key");
20220601
1. 过渡页面完善
-2. 新增分类字体图标选择
\ No newline at end of file
+2. 新增分类字体图标选择
+3. 修复360 LJ浏览器登录自动切换内核问题
\ No newline at end of file
diff --git a/templates/admin/setting/subscribe.php b/templates/admin/setting/subscribe.php
index d1c0f3b..e1367e9 100644
--- a/templates/admin/setting/subscribe.php
+++ b/templates/admin/setting/subscribe.php
@@ -73,7 +73,7 @@
-
+
@@ -93,6 +93,18 @@
+
+
+
@@ -104,29 +116,39 @@
//获取可更新版本
function available_version() {
var current_version = $("#current_version").val();
- $.get("http://down.onenav.top/v1/get_version.php",{version:current_version},function(data,status){
+ $.get("https://onenav.xiaoz.top/v1/get_version.php",{version:current_version},function(data,status){
$("#new_version").val(data);
});
}
available_version();
//立即更新按钮
function update_main() {
+ //清空日志面板
+ var update_log = $("#update_log").html();
var current_version = $("#current_version").val();
var new_version = $("#new_version").val();
//如果当前版本和最新版本相同,则不能更新
- if (current_version == new_version) {
+ if (current_version >= new_version) {
layer.msg("已经是最新版本,无需更新!",{icon:5});
}
+ //如果可用版本为空
+ if ( new_version == '' ) {
+ layer.msg("无可用版本,无需更新!",{icon:5});
+ }
+
//否则可以更新
else {
$("#btn_update").hide();
$("#btn_updating").show();
update_status("1%","准备更新...");
+ $("#update_log").append("准备更新...\n");
//第一步检查更新信息
$.get("/index.php?c=api&method=check_subscribe",function(data,status){
update_status("10%","正在验证订阅信息...");
+ $("#update_log").append("正在验证订阅信息...
");
if( data.code == 200 ) {
update_status("30%","订阅信息验证通过...");
+ $("#update_log").append("订阅信息验证通过...
");
//取得必要的变量
var email = data.data.email;
var domain = data.data.domain;
@@ -135,18 +157,23 @@
//下载更新程序
$.get("/index.php?c=api&method=up_updater",function(data,status) {
update_status("50%","正在检查更新程序...");
+ $("#update_log").append("正在检查更新程序...
");
if( data.code == 200 ) {
//继续往下执行
update_status("70%","更新程序准备完成...");
+ $("#update_log").append("更新程序准备完成...
");
//准备下载升级包
update_status("80%","准备下载升级包...");
+ $("#update_log").append("准备下载升级包...
");
$.get("/update.php",{version:new_version,key:key,value:value,type:'main'},function(data,stauts){
update_status("90%","升级包下载完毕,正在校验版本...");
+ $("#update_log").append("升级包下载完毕,正在校验版本...
");
if( data.code == 200 ) {
//校验新版本
$.get("/index.php?c=api&method=check_version",{version:new_version},function(data,status){
if(data.code == 200) {
update_status("100%","更新完成,请前往后台检查更新数据库!");
+ $("#update_log").append("更新完成,请前往后台检查更新数据库!
");
$("#btn_update").show();
$("#btn_updating").hide();
}