function initReviewTipShow() {
// 如果是第一次打开,关闭后不再显示
if (reviewTip && reviewTip > 0) {
var cookies_name = 'ZEROBOOK_ENDED_COURSE_TIP';
var endedCourseCookie = $.cookie(cookies_name);
var show = true;
if (endedCourseCookie && endedCourseCookie != '') {
endedCourseCookie = endedCourseCookie.split('_');
if (endedCourseCookie && endedCourseCookie.length == 2) {
var oldUserId = endedCourseCookie[0];
var hasShow = endedCourseCookie[1];
if (parseInt(oldUserId) == reviewTip && hasShow == 'true') {
show = false;
}
}
}
if (show && validBackPlayTime) {
$(".mui-navigate-right").after(
'<div class="mui-review-tips" id="reviewTip" >' + validBackPlayTime
+ '天内结束课程可回看哦~<i class="icon"></i></div>');
$.cookie(cookies_name, reviewTip + '_true');
}
}
}
向浏览器写入缓存信息:【key : value】形式
最新推荐文章于 2022-11-12 08:44:36 发布