diff --git a/spug_api/apps/alarm/views.py b/spug_api/apps/alarm/views.py index c96d4df9..249cbc43 100644 --- a/spug_api/apps/alarm/views.py +++ b/spug_api/apps/alarm/views.py @@ -64,7 +64,7 @@ def get(self, request): if error is None: response = [] if form.with_push or form.only_push: - push_key = AppSetting.get('spug_push_key') + push_key = AppSetting.get_default('spug_push_key') if push_key: response = get_contacts(push_key) if form.only_push: diff --git a/spug_web/src/components/Link.js b/spug_web/src/components/Link.js index 86e422b6..dca8e1c3 100644 --- a/spug_web/src/components/Link.js +++ b/spug_web/src/components/Link.js @@ -8,7 +8,12 @@ import React from 'react' function Link(props) { return ( - {props.title} + + {props.title} ) } diff --git a/spug_web/src/pages/system/account/Form.js b/spug_web/src/pages/system/account/Form.js index 214ad1c2..e3cdcd9a 100644 --- a/spug_web/src/pages/system/account/Form.js +++ b/spug_web/src/pages/system/account/Form.js @@ -69,13 +69,14 @@ export default observer(function () { 如果启用了MFA(两步验证)则该项为必填。 - 什么是微信Token? + 如何获取MFA标识? )}> - includes(o.children, i)} + placeholder="请选择绑定推送标识"> {contacts.map(item => ( {item.name} ))} diff --git a/spug_web/src/pages/system/setting/PushSetting.js b/spug_web/src/pages/system/setting/PushSetting.js index bdfb88be..f1a33edf 100644 --- a/spug_web/src/pages/system/setting/PushSetting.js +++ b/spug_web/src/pages/system/setting/PushSetting.js @@ -60,11 +60,11 @@ export default observer(function () { const isVip = balance.is_vip const spugPushKey = store.settings.spug_push_key return ( - +
推送服务设置
请登录 ,至个人中心 / + extra={
请登录 ,至个人中心 / 个人设置查看用户ID,注意保密该ID请勿泄漏给第三方。
}> {spugPushKey ? ( @@ -93,44 +93,45 @@ export default observer(function () {
- {spugPushKey ? ( + {balance.vip_desc ? ( 如需充值请至 ,具体计费规则及说明请查看推送助手官网。 }>
- -
-
-
短信余额
-
{balance.sms_balance}
-
-
-
语音余额
-
{balance.voice_balance}
-
-
-
邮件余额
-
{balance.mail_balance}
- {isVip ? ( -
+ 会员免费20封 / 天
- ) : ( -
会员免费20封 / 天
- )} -
-
-
微信公众号余额
-
{balance.wx_mp_balance}
- {isVip ? ( -
+ 会员免费100条 / 天
- ) : ( -
会员免费20封 / 天
- )} -
+
+
+
短信余额
+
{balance.sms_balance}
- +
+
语音余额
+
{balance.voice_balance}
+
+
+
邮件余额
+
{balance.mail_balance}
+ {isVip ? ( +
+ 会员赠送{balance.mail_free}封 / 天
+ ) : ( + + )} +
+
+
微信公众号余额
+
{balance.wx_mp_balance}
+ {isVip ? ( +
+ 会员赠送{balance.wx_mp_free}条 / 天
+ ) : ( + + )} +
+ +
) : null} - +
) }) \ No newline at end of file diff --git a/spug_web/src/pages/system/setting/SecuritySetting.js b/spug_web/src/pages/system/setting/SecuritySetting.js index ff644011..b1c3bb98 100644 --- a/spug_web/src/pages/system/setting/SecuritySetting.js +++ b/spug_web/src/pages/system/setting/SecuritySetting.js @@ -95,9 +95,9 @@ export default observer(function () { label="登录MFA(两步)认证" style={{marginTop: 24}} extra={visible ? '输入验证码,通过验证后开启。' : - 建议开启,登录时额外使用验证码进行身份验证。开启前至少要确保管理员账户配置了推送标识(账户管理/编辑),开启后未配置的账户将无法登录,建议开启,登录时额外使用验证码进行身份验证。开启前至少要确保管理员账户配置了MFA标识(账户管理/编辑),开启后未配置的账户将无法登录。什么是微信Token?}> + href="https://push.spug.cc/guide/spug">配置手册}> {visible ? (
diff --git a/spug_web/src/pages/system/setting/index.module.css b/spug_web/src/pages/system/setting/index.module.css index 3f5c3132..9bcf44f0 100644 --- a/spug_web/src/pages/system/setting/index.module.css +++ b/spug_web/src/pages/system/setting/index.module.css @@ -37,6 +37,21 @@ .body { display: flex; flex-direction: row; + position: relative; + + .badge { + border-radius: 4px; + line-height: 20px; + height: 20px; + font-size: 12px; + padding: 0 8px; + background: #2563fc; + font-weight: bold; + color: #ffffff; + cursor: pointer; + position: absolute; + right: 0; + } .item { position: relative; @@ -83,13 +98,11 @@ line-height: 20px; text-align: center; padding: 0 8px; - cursor: pointer; } .active { - cursor: initial; - background: #f7af40; - color: #ffffff; + color: #2563fc; + background: #ffffff; } } diff --git a/spug_web/src/pages/welcome/info/Basic.js b/spug_web/src/pages/welcome/info/Basic.js index 8fbfbda2..4c9da111 100644 --- a/spug_web/src/pages/welcome/info/Basic.js +++ b/spug_web/src/pages/welcome/info/Basic.js @@ -45,9 +45,6 @@ export default observer(function Basic(props) { - 什么是微信Token?}> - - diff --git a/spug_web/src/pages/welcome/info/Reset.js b/spug_web/src/pages/welcome/info/Reset.js index fed58152..9db49a8a 100644 --- a/spug_web/src/pages/welcome/info/Reset.js +++ b/spug_web/src/pages/welcome/info/Reset.js @@ -42,10 +42,10 @@ export default function Reset(props) { setOldPassword(e.target.value)}/> - setNewPassword(e.target.value)}/> + setNewPassword(e.target.value)}/> - setNew2Password(e.target.value)}/> + setNew2Password(e.target.value)}/>