31 lines
1.1 KiB
JavaScript
31 lines
1.1 KiB
JavaScript
$(".include").each(function() {
|
|
if (!!$(this).attr("src")) {
|
|
var $includeObj = $(this);
|
|
$(this).load($(this).attr("src"), function(html) {
|
|
$includeObj.after(html).remove(); //加载的文件内容写入到当前标签后面并移除当前标签
|
|
})
|
|
}
|
|
});
|
|
|
|
function alertMessage(alertPosId = '#alert-pos', title = 'alert', msg = 'msg', color = 'info') {
|
|
const alertCard = `
|
|
<div id="alert-message" class="alert alert-${color} alert-dismissible fade show" role="alert">
|
|
<strong>${title}</strong> ${msg}
|
|
<button type="button" class="close" data-dismiss="alert" aria-label="Close">
|
|
<span aria-hidden="true">×</span>
|
|
</button>
|
|
</div>`;
|
|
$(`${alertPosId}`).append(alertCard);
|
|
}
|
|
|
|
// FIX ME
|
|
setTimeout(function() {
|
|
const $_zzy_base_modal_ = $('#_zzy_base_modal_');
|
|
$_zzy_base_modal_.modal('show');
|
|
$_zzy_base_modal_.on('click', '.confirm-action', function() {
|
|
$_zzy_base_modal_.modal('hide');
|
|
console.log('用户已同意条款,页面开始加载...');
|
|
// 在这里执行其他初始化操作
|
|
});
|
|
|
|
}, 1000); |