diff --git a/apps/sspanel/models.py b/apps/sspanel/models.py index a817fe95e..53157474b 100644 --- a/apps/sspanel/models.py +++ b/apps/sspanel/models.py @@ -1023,7 +1023,7 @@ def send_first_visit_msg(cls, request): if not anno or request.session.get("first_visit"): return request.session["first_visit"] = True - messages.warning(request, anno.plain_text, extra_tags="最新通知!") + messages.warning(request, anno.body, extra_tags="最新通知!") class Ticket(models.Model): diff --git a/templates/base.html b/templates/base.html index cbb73a44c..9b2fa94e1 100644 --- a/templates/base.html +++ b/templates/base.html @@ -175,7 +175,13 @@

{% settings_value "SITE_SUBTITLE" %}

{% if messages %} {% endif %} diff --git a/templates/basehead.html b/templates/basehead.html index 398777cdd..24844d74f 100644 --- a/templates/basehead.html +++ b/templates/basehead.html @@ -24,7 +24,7 @@ {% endif %} - + {% if not simple_extra_static or user.is_authenticated %} diff --git a/templates/web/charge_center.html b/templates/web/charge_center.html index aee227a0f..1d7ad3457 100644 --- a/templates/web/charge_center.html +++ b/templates/web/charge_center.html @@ -173,7 +173,7 @@

捐赠的钱会自动打进你的账号余额....

requestButton.attr("disabled", "disabled") $.post(url, data, function(results) { info = results.info - swal(info.title, info.subtitle, info.status) + Swal.fire(info.title, info.subtitle, info.status) if (info.status == "success") { // 追加二维码图片 codeBox.attr('class', '') @@ -185,7 +185,7 @@

捐赠的钱会自动打进你的账号余额....

} }) } else { - swal('抱歉~', '最少捐赠一元', 'error') + Swal.fire('抱歉~', '最少捐赠一元', 'error') } } requestButton.click(payrequest) @@ -195,18 +195,18 @@

捐赠的钱会自动打进你的账号余额....

$.getJSON(url, function(results) { info = results.info; if (byTicker == false) { - swal(info.title, info.subtitle, info.status); + Swal.fire(info.title, info.subtitle, info.status); } else { repetitionCount++; if (repetitionCount >= maxRepetitions) { clearInterval(queryTimer); - swal("自动查询超时", "请点击按钮手动查询", "error"); + Swal.fire("自动查询超时", "请点击按钮手动查询", "error"); } // only show msg when success if (info.status == "success") { // 停止定时器 clearInterval(queryTimer); - swal(info.title, info.subtitle, info.status); + Swal.fire(info.title, info.subtitle, info.status); } else { console.log("repetitionCount", repetitionCount) console.log("api return", info) diff --git a/templates/web/shop.html b/templates/web/shop.html index a20327901..6b49cdc86 100644 --- a/templates/web/shop.html +++ b/templates/web/shop.html @@ -116,7 +116,7 @@

还没有买过东西呢....

} url = "{% url 'api:purchase' %}" $.post(url, data, function(results) { - swal(results.title, results.subtitle, results.status) + Swal.fire(results.title, results.subtitle, results.status) }) }) diff --git a/templates/web/user_info.html b/templates/web/user_info.html index 379877f00..1c4dce088 100644 --- a/templates/web/user_info.html +++ b/templates/web/user_info.html @@ -301,7 +301,7 @@

根据您的客户端一键选择

} $.post(url, data, function(results) { info = results - swal(info.title, info.subtitle, info.status).then(function() { + Swal.fire(info.title, info.subtitle, info.status).then(function() { location.reload(); }) }) @@ -320,12 +320,12 @@

根据您的客户端一键选择

url = "{% url 'api:change_theme' %}" $.post(url, data, function(results) { info = results - swal(info.title, info.subtitle, info.status).then(function() { + Swal.fire(info.title, info.subtitle, info.status).then(function() { location.reload(); }) }) } else { - swal('错误!', '请选择你要更换的主题', 'error') + Swal.fire('错误!', '请选择你要更换的主题', 'error') } } ThemeButton.click(changeTheme) @@ -341,10 +341,10 @@

根据您的客户端一键选择

url = "{% url 'api:user_settings' %}" $.post(url, data, function(results) { info = results - swal(info.title, info.subtitle, info.status) + Swal.fire(info.title, info.subtitle, info.status) }) } else { - swal('错误!', '请输入密码', 'error') + Swal.fire('错误!', '请输入密码', 'error') } } PasswordButton.click(changePassword) @@ -373,7 +373,7 @@

根据您的客户端一键选择

// 复制订阅地址 var clip = new Clipboard('#id-button-clip'); clip.on('success', function(e) { - swal("复制成功", "订阅地址已复制到剪贴板", "success"); + Swal.fire("复制成功", "订阅地址已复制到剪贴板", "success"); }); // 重置订阅连接 @@ -385,7 +385,7 @@

根据您的客户端一键选择

} $.post(url, data, function(results) { info = results - swal(info.title, info.subtitle, info.status).then(function() { + Swal.fire(info.title, info.subtitle, info.status).then(function() { location.reload(); }) })