43 lines
855 B
JavaScript
43 lines
855 B
JavaScript
![]() |
let urlPrefix = getUrlPrefix()
|
||
|
let browser = checkVersion()
|
||
|
let env = EnvCheck();
|
||
|
if (env == 'test') {
|
||
|
new VConsole();
|
||
|
}
|
||
|
// 封装layer消息提醒框
|
||
|
let layerIndex
|
||
|
const showLoading = (content = '加載中...') => {
|
||
|
layer.open({
|
||
|
type: 2,
|
||
|
shadeClose: false,
|
||
|
content,
|
||
|
success (e) {
|
||
|
layerIndex = $(e).attr('index')
|
||
|
}
|
||
|
})
|
||
|
}
|
||
|
const hideLoading = (index) => {
|
||
|
layer.close(index)
|
||
|
}
|
||
|
const toastMsg = (content = '操作完成', time = 2) => {
|
||
|
layer.open({
|
||
|
content,
|
||
|
time,
|
||
|
skin: 'msg'
|
||
|
})
|
||
|
}
|
||
|
|
||
|
$(function () {
|
||
|
setTimeout(function () {
|
||
|
getInfoFromClient()
|
||
|
if (browser.app) {
|
||
|
$('.back').hide();
|
||
|
}
|
||
|
setTimeout(function () {
|
||
|
}, 100)
|
||
|
})
|
||
|
})
|
||
|
// 返回按钮
|
||
|
$('.back').click(function () {
|
||
|
window.history.go(-1)
|
||
|
})
|