|
@@ -0,0 +1,68 @@
|
|
|
+<% include ./sub_menu.ejs %>
|
|
|
+<div class="panel-content" id="app">
|
|
|
+ <div class="panel-title">
|
|
|
+ <div class="title-main">
|
|
|
+ <h2>微信通知</h2>
|
|
|
+ </div>
|
|
|
+ </div>
|
|
|
+ <div class="content-wrap">
|
|
|
+ <div class="c-body">
|
|
|
+ <div class="sjs-height-0">
|
|
|
+ <div class="row m-0">
|
|
|
+ <div class="col-5 my-3">
|
|
|
+ <% if (accountData.wx_openid !== null && accountData.wx_openid !== '') { %>
|
|
|
+ <!--已绑定手机-->
|
|
|
+ <div class="form-group">
|
|
|
+ <label>微信账号</label>
|
|
|
+ <input class="form-control-plaintext" readonly="" value="<%= accountData.wx_name %>">
|
|
|
+ <a href="#remove-wechat" class="btn btn-sm btn-outline-primary" data-toggle="modal" data-target="#remove-wechat">解绑</a>
|
|
|
+ </div>
|
|
|
+ <% } else { %>
|
|
|
+ <div class="form-group">
|
|
|
+ <label>微信账号</label>
|
|
|
+ <input class="form-control-plaintext" readonly="" value="未绑定">
|
|
|
+ </div>
|
|
|
+ <% } %>
|
|
|
+ <!--二维码-->
|
|
|
+ <div class="form-group">
|
|
|
+ <label>扫码或搜索 关注服务号</label>
|
|
|
+ <div><img class="w-50" src="/public/images/wechat.png"></div>
|
|
|
+ </div>
|
|
|
+ <% if (accountData.wx_openid !== null && accountData.wx_openid !== '') { %>
|
|
|
+ <!--短信通知开关(已有认证手机后显示)-->
|
|
|
+ <div class="mt-5">
|
|
|
+ <h4>通知类型</h4>
|
|
|
+ <p class="text-muted">勾选您需要接收的微信类型。</p>
|
|
|
+ <form id="sms-form" method="post" action="/profile/sms/type">
|
|
|
+ <input type="hidden" name="_csrf" value="<%= ctx.csrf %>">
|
|
|
+ <% const user_wxType = accountData.wx_type !== '' ? JSON.parse(accountData.wx_type) : null; %>
|
|
|
+ <% for (const s in smsType) { %>
|
|
|
+ <div class="form-group row">
|
|
|
+ <label class="col-auto col-form-label"><%= smsType[s].name %>
|
|
|
+ <!--<a href="#sms-view" data-toggle="modal" data-target="#sms-view" class="ml-2"><i class="fa fa-info-circle"></i></a>-->
|
|
|
+ </label>
|
|
|
+ <div class="col-5">
|
|
|
+ <% for (const c of smsType[s].children) { %>
|
|
|
+ <div class="form-check ">
|
|
|
+ <input class="form-check-input" id="<%= s %>_<%- c.value %>" type="checkbox" name="<%= s %>[]" value="<%= c.value %>" <% if (user_wxType !== null && user_wxType[s] !== undefined && user_wxType[s].indexOf(c.value.toString()) !== -1) { %>checked<% } %>>
|
|
|
+ <label class="form-check-label" for="<%= s %>_<%- c.value %>"><%= c.title %></label>
|
|
|
+ </div>
|
|
|
+ <% } %>
|
|
|
+ </div>
|
|
|
+ </div>
|
|
|
+ <% } %>
|
|
|
+ <input name="type" value="0" type="hidden">
|
|
|
+ <button type="submit" class="btn btn-primary btn-sm">确认修改</button>
|
|
|
+ </form>
|
|
|
+ </div>
|
|
|
+ <% } %>
|
|
|
+ </div>
|
|
|
+ </div>
|
|
|
+ </div>
|
|
|
+ </div>
|
|
|
+ </div>
|
|
|
+</div>
|
|
|
+<script type="text/javascript">
|
|
|
+ const csrf = '<%= ctx.csrf %>';
|
|
|
+</script>
|
|
|
+<script type="text/javascript" src="/public/js/profile.js"></script>
|