|
|
|
@@ -102,6 +102,80 @@ |
|
|
|
</div> |
|
|
|
</form> |
|
|
|
</div> |
|
|
|
<h4 class="ui top attached header"> |
|
|
|
微信绑定<!-- {{.i18n.Tr "settings.avatar"}} --> |
|
|
|
</h4> |
|
|
|
{{if not .SignedUser.IsBindWechat}} |
|
|
|
<div class="ui attached segment"> |
|
|
|
<a href="/authentication/wechat/bind" class="ui green button">绑定微信</a> |
|
|
|
</div> |
|
|
|
{{else}} |
|
|
|
<div> |
|
|
|
<table class="ui celled striped table provider titleless"> |
|
|
|
<thead> |
|
|
|
<th class="center aligned"> |
|
|
|
绑定账号信息 |
|
|
|
</th> |
|
|
|
<th class="center aligned"> |
|
|
|
详情 |
|
|
|
</th> |
|
|
|
<th class="center aligned"> |
|
|
|
绑定时间 |
|
|
|
</th> |
|
|
|
<th class="center aligned"> |
|
|
|
操作 |
|
|
|
</th> |
|
|
|
</thead> |
|
|
|
<tbody> |
|
|
|
<td class="center aligned"> |
|
|
|
微信 |
|
|
|
</td> |
|
|
|
<td class="center aligned"> |
|
|
|
<img class="ui avatar image" width="24" height="24" src="{{.SignedUser.RelAvatarLink}}">{{.SignedUser.Name}} |
|
|
|
</td> |
|
|
|
<td class="center aligned"> |
|
|
|
2022-02-23 14:48 |
|
|
|
</td> |
|
|
|
<td class="center aligned"> |
|
|
|
<div> |
|
|
|
<a class="ui inverted orange button " onclick="showcreate(this)" href="javascript: void(0)">解除绑定</a> |
|
|
|
</div> |
|
|
|
</td> |
|
|
|
</tbody> |
|
|
|
</table> |
|
|
|
</div> |
|
|
|
{{end}} |
|
|
|
</div> |
|
|
|
|
|
|
|
|
|
|
|
<div class="ui mini modal second"> |
|
|
|
<div class="header">确定要解绑微信?</div> |
|
|
|
<div class="content"> |
|
|
|
<p>解绑后将无法使用云脑计算资源</p> |
|
|
|
</div> |
|
|
|
<div class="actions"> |
|
|
|
<div class="ui blank cancel button">取消</div> |
|
|
|
<div class="ui green approve button">确定</div> |
|
|
|
</div> |
|
|
|
</div> |
|
|
|
</div> |
|
|
|
{{template "base/footer" .}} |
|
|
|
<script> |
|
|
|
function showcreate(obj){ |
|
|
|
const {csrf} = window.config |
|
|
|
$('.ui.modal.second') |
|
|
|
.modal({ |
|
|
|
onShow:function(){ |
|
|
|
}, |
|
|
|
onHide:function(){ |
|
|
|
}, |
|
|
|
onApprove:function($element){ |
|
|
|
console.log($element) |
|
|
|
$.post('/authentication/wechat/unbind',{_csrf:csrf},(data)=>{ |
|
|
|
window.location.href = '/user/settings' |
|
|
|
}) |
|
|
|
} |
|
|
|
}) |
|
|
|
.modal('show') |
|
|
|
} |
|
|
|
</script> |