JavaScript 会员到期提醒功能实现
// If the error code is 0, get the user's ID from sessionStorage and make a request to fetch their information else if (0 === e.code) { var t = sessionStorage.getItem('id') Object(s.c)({ id: t }).then(function (t) { // If the user is a free member, log it if (0) console.log('免费') else { // Otherwise, get the current time and expiry time from the response data var i = e.data, n = i.now_time, r = i.expire_time console.log(e, '用户信息') // If the user's membership has expired and they have activated the speedup feature, // stop the speedup and show a message alerting them that their membership has expired n > r && 'SUCCESS' === o.Speedup.speedup_status && (a('Speedup/speedupStop', {}, { root: !0 }), h.MessageBox.alert('抱歉,当前会员已到期 蒜头王八SVIP1', '提示', { confirmButtonText: '确定', })) } }) }
原文地址: https://www.cveoy.top/t/topic/nc9L 著作权归作者所有。请勿转载和采集!