mirror of
https://github.com/mindoc-org/mindoc.git
synced 2025-11-24 16:53:22 +08:00
钉钉初步免登,移动端样式优化
This commit is contained in:
@@ -86,6 +86,28 @@
|
||||
<!-- Include all compiled plugins (below), or include individual files as needed -->
|
||||
<script src="{{cdnjs "/static/bootstrap/js/bootstrap.min.js"}}" type="text/javascript"></script>
|
||||
<script src="{{cdnjs "/static/layer/layer.js"}}" type="text/javascript"></script>
|
||||
<script src="{{cdnjs "/static/js/dingtalk-jsapi.js"}}" type="text/javascript"></script>
|
||||
<!-- <script src="https://g.alicdn.com/dingding/dingtalk-jsapi/2.10.3/dingtalk.open.js"></script> -->
|
||||
<script type="text/javascript">
|
||||
if (dd.env.platform !== "notInDingTalk"){
|
||||
dd.ready(function() {
|
||||
dd.runtime.permission.requestAuthCode({
|
||||
corpId: "dingd55b04400e53d11cbc961a6cb783455b", // 企业id
|
||||
onSuccess: function (info) {
|
||||
$.post("http://192.168.0.51/token?action=AuthCorpUser", {"code": info.code}, function(rdata){
|
||||
if (rdata.status == 0) {
|
||||
$(window).attr('location', rdata.data.url)
|
||||
|
||||
}else{
|
||||
alert(rdata.msg)
|
||||
}
|
||||
})
|
||||
// alert(info.code) // 通过该免登授权码可以获取用户身份
|
||||
}
|
||||
});
|
||||
});
|
||||
}
|
||||
</script>
|
||||
<script type="text/javascript">
|
||||
$(function () {
|
||||
$("#account,#password,#code").on('focus', function () {
|
||||
|
||||
Reference in New Issue
Block a user