Skip to content

Commit

Permalink
be: uc
Browse files Browse the repository at this point in the history
  • Loading branch information
devezhao committed Nov 29, 2023
1 parent 4c12e30 commit be28c7a
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 6 deletions.
6 changes: 3 additions & 3 deletions src/main/resources/web/admin/system-cfg.html
Original file line number Diff line number Diff line change
Expand Up @@ -338,11 +338,11 @@ <h5>[[${bundle.L('其他')}]]</h5>
<div class="card mt-3 J_cloudAccount hide">
<div class="card-header card-header-divider">REBUILD [[${bundle.L('云账号')}]]</div>
<div class="card-body">
<div class="J_not-bind">
<div class="J_not-bind hide">
<p>[[${bundle.L('绑定 REBUILD 云账号,获取更多专享服务与资源,还有免费系统安全与健康检测。')}]]</p>
<button class="btn btn-primary btn-sm pl-3 pr-3" type="button">[[${bundle.L('点击绑定')}]]</button>
</div>
<div class="J_has-bind">
<div class="J_has-bind hide">
<p class="mb-1 mt-1 text-bold">
<i class="mdi mdi-shield-check icon up-3"></i>
[[${bundle.L('当前已绑定云账号')}]] <a href="https://getrebuild.com/ucenter/account" target="_blank" class="text-uppercase"></a>
Expand All @@ -362,7 +362,7 @@ <h5>[[${bundle.L('其他')}]]</h5>
}
</script>
<script th:src="@{/assets/js/admin/syscfg.js}" type="text/babel"></script>
<script th:src="@{/assets/js/admin/syscfg-g.js}" type="text/babel"></script>
<script th:src="@{/assets/js/admin/system-cfg.js}" type="text/babel"></script>
<script th:src="@{/assets/js/rebuild-ucenter.js}" type="text/babel"></script>
</body>
</html>
Original file line number Diff line number Diff line change
Expand Up @@ -27,12 +27,13 @@ $(document).ready(() => {
// UC
UCenter.query((res) => {
const bindAccount = res.bindAccount
$('.J_cloudAccount').removeClass('hide')
if (bindAccount) {
$('.J_not-bind').addClass('hide')
$('.J_cloudAccount').removeClass('hide')
$('.J_has-bind').removeClass('hide')
$('.J_has-bind a').text(bindAccount)
} else if (rb.commercial === 10 || rb.commercial === 20) {
$('.J_has-bind').addClass('hide')
$('.J_cloudAccount').removeClass('hide')
$('.J_not-bind').removeClass('hide')
$('.J_not-bind .btn').on('click', () => {
if (res.canBind) UCenter.bind()
else RbHighbar.create($L('仅超级管理员可操作'))
Expand Down

0 comments on commit be28c7a

Please sign in to comment.