...
|
...
|
@@ -264,6 +264,40 @@ $overlay.on('touchstart', function() { |
|
|
return false;
|
|
|
});
|
|
|
|
|
|
function setCookie(name, value, options) {
|
|
|
var expires = '',
|
|
|
path,
|
|
|
domain,
|
|
|
secure,
|
|
|
date;
|
|
|
|
|
|
|
|
|
if (typeof value !== 'undefined') {
|
|
|
options = options || {};
|
|
|
if (value === null) {
|
|
|
value = '';
|
|
|
options.expires = -1;
|
|
|
}
|
|
|
|
|
|
if (options.expires &&
|
|
|
(typeof options.expires === 'number' || options.expires.toUTCString)) {
|
|
|
if (typeof options.expires === 'number') {
|
|
|
date = new Date();
|
|
|
|
|
|
date.setTime(Date.parse((new Date()).toLocaleDateString()) + 86400 * 1000);
|
|
|
|
|
|
} else {
|
|
|
date = options.expires;
|
|
|
}
|
|
|
expires = '; expires=' + date.toGMTString();
|
|
|
}
|
|
|
path = options.path ? '; path=' + options.path : '';
|
|
|
domain = options.domain ? '; domain=' + options.domain : '';
|
|
|
secure = options.secure ? '; secure' : '';
|
|
|
document.cookie = [name, '=', encodeURIComponent(value), expires, path, domain, secure].join('');
|
|
|
}
|
|
|
}
|
|
|
|
|
|
// 初始化页面,包括是否使用iscorll初始化页面
|
|
|
// 接口暴露在HTML中,使用压缩名
|
|
|
(function() {
|
...
|
...
|
@@ -369,9 +403,10 @@ $overlay.on('touchstart', function() { |
|
|
// window.setCookie('_float-layer-app-close', 1);
|
|
|
|
|
|
if (parseInt(appClose) === 0) {
|
|
|
window.setCookie('_float-layer-app-close', 1);
|
|
|
setCookie('_float-layer-app-close', 1, {expires: -1});
|
|
|
|
|
|
} else if (parseInt(appClose) === 1) {
|
|
|
window.setCookie('_float-layer-app-close', 2);
|
|
|
setCookie('_float-layer-app-close', 2, {expires: -1});
|
|
|
}
|
|
|
|
|
|
$('#float-layer-app').hide();
|
...
|
...
|
|