update
This commit is contained in:
@@ -31,7 +31,9 @@
|
||||
// 未登录
|
||||
if (!uid || isNaN(uid)) {
|
||||
$('#login_register').show()
|
||||
$('#login_register').click()
|
||||
setTimeout(function () {
|
||||
$('#login_register').click()
|
||||
}, 500)
|
||||
$('#logout_a').hide()
|
||||
$('#newMindModal_btn').hide()
|
||||
} else {
|
||||
@@ -217,7 +219,9 @@
|
||||
});
|
||||
$('#exampleModal').on('hidden.bs.modal', function (event) {
|
||||
// console.log('关闭');
|
||||
me.websocket.close()
|
||||
if (me.websocket) {
|
||||
me.websocket.close()
|
||||
}
|
||||
});
|
||||
|
||||
/**点击 扫码登录 */
|
||||
|
||||
@@ -5,6 +5,7 @@
|
||||
<title>Jsmind</title>
|
||||
<link rel="shortcut icon" href="/static/abl1b-qks1b-001.ico"/>
|
||||
<link rel="stylesheet" type="text/css" href="/static/js/jsmind.css">
|
||||
<link rel="stylesheet" type="text/css" href="/static/bootstrap-4.6.1-dist/css/bootstrap.css">
|
||||
<style>
|
||||
#jsmind_container {
|
||||
width: calc(100rem);
|
||||
@@ -18,6 +19,7 @@
|
||||
<script src="/static/js/jsmind.menu.js"></script>
|
||||
<script src="/static/js/jsmind.coop.js?d="></script>
|
||||
<script src="https://cdn.staticfile.org/jquery-cookie/1.4.1/jquery.cookie.min.js"></script>
|
||||
<script src="/static/js/mind/c_m_m.js"></script>
|
||||
<script>
|
||||
const fetch = function () {
|
||||
this.jm = null
|
||||
@@ -51,6 +53,10 @@
|
||||
const from_share = id.length === 0;
|
||||
const url = from_share ? `4cbcb74630898f41fd0a?u=${u}&h=${h}` : 'list?id=' + id;
|
||||
$.get(url, function (resp) {
|
||||
if (resp.code === -1) {
|
||||
common_alert(resp.msg)
|
||||
return
|
||||
}
|
||||
// reset
|
||||
me.close_coop_timer_if_necessary()
|
||||
|
||||
|
||||
+10
-5
@@ -2,8 +2,11 @@ function common_alert(text, class_str) {
|
||||
if (!class_str) {
|
||||
class_str = 'alert-warning'
|
||||
}
|
||||
// reset
|
||||
$('.alert').alert('close')
|
||||
// reset bootstrap.bundle.js 里的方法
|
||||
const bundle_alert = typeof ($('.alert').alert) === 'function'
|
||||
if (bundle_alert) {
|
||||
$('.alert').alert('close')
|
||||
}
|
||||
// content
|
||||
const content = `
|
||||
<div class="alert ${class_str} fade show" role="alert" style="z-index: 2000;position: absolute;top: 0;width: calc(100%);">
|
||||
@@ -12,9 +15,11 @@ function common_alert(text, class_str) {
|
||||
// append
|
||||
$('body').append(content)
|
||||
// clean
|
||||
setTimeout(function () {
|
||||
$('.alert').alert('close')
|
||||
}, 1500)
|
||||
if (bundle_alert) {
|
||||
setTimeout(function () {
|
||||
$('.alert').alert('close')
|
||||
}, 1500)
|
||||
}
|
||||
}
|
||||
|
||||
function primary_alert(text) {
|
||||
|
||||
Reference in New Issue
Block a user