<

第3432章(2 / 2)

vartoday_read_chapter_num_key=&#039;t_read_chapter_num_&#039;+cur_date+&#039;_&#039;+cookie_user_id;

varfloat_tip_key=&#039;flot_tip_&#039;+cur_date+&#039;_&#039;+cookie_user_id;

varhasfloatpop=number($.fn.cookie(float_tip_key));//有没有提示过浮窗

if(isfloattips){

if(!popuping){

//当前没有其他弹窗

/**记录用户今日阅读章节数**/

vartodayreadchapternum=number($.fn.cookie(today_read_chapter_num_key));

if(!hasfloatpop&amp;&amp;todayreadchapternum){

$(&#039;.pop-box&#039;).show();

$.fn.cookie(float_tip_key,1,{expires:exp});

}

$(&#039;.pop-box-close&#039;).click(fun(){

$(&#039;.pop-box&#039;).hide();

});

$.fn.cookie(today_read_chapter_num_key,todayreadchapternum+1,{expires:exp});

}

}

&lt;/script

&lt;script

if($(&#039;.float-bottom&#039;).attr(&#039;is-show&#039;)){

cpslog([701,{map:{welfare_bottom:1}}]);

}

//阅读任务悬浮层相关

$(&#039;.float-bottom&#039;).bind(&#039;click&#039;,fun(){

cpslog([701,{map:{welfare_window:1}}]);

if(this.getattribute(&#039;bt&#039;)==&#039;可领取&#039;){

cpslog([702,{map:{welfare_status:&#039;welfare_get_btn_click&#039;}},&#039;welfare_chapter&#039;]);

}else{

cpslog([702,{map:{welfare_status:&#039;welfare_first_btn_click&#039;}},&#039;welfare_chapter&#039;]);

}

$(&#039;.dialog-read&#039;).show()

})

$(&#039;.dialog-panel-close&#039;).bind(&#039;click&#039;,fun(){

$(&#039;.dialog&#039;).hide()

})

varseds=3

varinterval=setinterval(fun(){

seds-=1

if(seds&lt;1){

clearinterval(interval)

$(&#039;.float-bottom&#039;).hide()

}else{

$(&#039;.float-bottom-time&#039;).text(seds+&#039;s&#039;)

}

},1000)

$(&#039;.read-task.go-read&#039;).each(fun(){

$(this).click(fun(){

cpslog([702,{map:{welfare_status:&#039;welfare_go_read_click&#039;}},&#039;welfare_chapter&#039;]);

$(&#039;.dialog&#039;).hide()

});

});

//阅读任务领取奖励

$(&#039;.read-task.enable&#039;).each(fun(){

$(this).click(fun(){

varitem=$(this);

varquerystring=item.attr(&#039;query-string&#039;);

varstage=parseint(querystring.match(/stage=(.*)&amp;/)[1]);

if(stage==1){

cpslog([702,{map:{welfare_status:&#039;welfare_get_read_one_click&#039;}},&#039;welfare_chapter&#039;]);

}elseif(stage==2){

cpslog([702,{map:{welfare_status:&#039;welfare_get_read_two_click&#039;}},&#039;welfare_chapter&#039;]);

}elseif(stage==3){

cpslog([702,{map:{welfare_status:&#039;welfare_get_read_three_click&#039;}},&#039;welfare_chapter&#039;]);

}

$.get(&#039;/api/welfare/taskreward&#039;+querystring+&#039;&amp;timestamp=&#039;+loadtime,{},fun(result){

if(result.code==1){

item.removeclass(&#039;enable&#039;);

item.addclass(&#039;disable&#039;);

item.text(&#039;已领取&#039;);

varrewardtimes=parseint($(&#039;#read-reward-times&#039;).text());

$(&#039;#read-reward-times&#039;).text(rewardtimes+1)

}else{

//暂时先去掉,后期优化

//alert(result.msg);

}

});

});

});

varloadtime=(date.parse(e())/1000);

$(fun(){

if(1){

//神策-自采集属性

varstart=e();

sensors.quick(&#039;autotrack&#039;,{

book_id:string(11010073404),

chapter_id:string(481955469)

})

//神策-readchapterstart(开始章节阅读)

//is_first_time_read 是否首次阅读

//source_position 来源位置

//read_type 阅读类型

//chapter_num 章节数

//chapter_id 章节id

//chapter_name 章节名称

//chapter_pay_type 章节付费类型

//chapter_s 阅读章节所需书币

//update_time 更新时间

//book_id 书籍id

//book_name 书籍名称

//first_type 一级类别

//sed_type 二级类别

//pay_type 付费类型

//author 作者名称

//book_finish_status 书籍完本状态

//max_chapter 小说最大章节数

varbook_read_type=&quot;文字阅读&quot;;

if(window.lisflag==&quot;true&quot;){

book_read_type=&quot;语音阅读&quot;;

}

sensors.track(&#039;readchapterstart&#039;,{

&#039;is_first_time_read&#039;:false,

&#039;source_position&#039;:&quot;cps&quot;,

&#039;read_type&#039;:book_read_type,

&#039;chapter_num&#039;:115,

&#039;chapter_id&#039;:&quot;481955469&quot;,

&#039;chapter_name&#039;:&quot;&quot;,

&#039;chapter_pay_type&#039;:&quot;章&quot;,

&#039;chapter_s&#039;:35,

&#039;update_time&#039;30六十八3723000,

&#039;book_id&#039;:&quot;11010073404&quot;,

&#039;book_name&#039;:&quot;陆总,傻妻不傻&quot;,

&#039;first_type&#039;:&quot;女频&quot;,

&#039;sed_type&#039;:&quot;现代言情&quot;,

&#039;pay_type&#039;:&quot;收费&quot;,

&#039;author&#039;:&quot;三月&quot;,

&#039;book_finish_status&#039;:&quot;完本&quot;,

&#039;max_chapter&#039;:1271});

$(window).scroll(fun(){

varee();

varscrolltop=$(this).scrolltop();

varscrollheight=$(dot).height();

varwindowheight=$(this).height();

if(scrolltop+windowheight==scrollheight){

//神策-readchapterend(结束章节阅读)

//is_finish是否看完章节bool切换或者退出时,如果已经在最后一页则代表看完了,否则为未看完

//duration阅读时长数值本次阅读时长

//is_first_time_read是否首次阅读bool是否首次阅读该小说

//source_position来源位置字符串阅读来源位置:书架,运营位,推广链接…

//read_type阅读类型字符串文字阅读,语音阅读

//chapter_num章节数数值

//chapter_id章节id字符串当前章节

//chapter_name章节名称字符串

//chapter_pay_type章节付费类型字符串免费,付费,按本付费

//chapter_s阅读章节所需书币数值

//update_time更新时间数值

//book_id书籍id字符串

//book_name书籍名称字符串

//first_type一级类别字符串

//sed_type二级类别字符串

//pay_type付费类型字符串付费,限免,免费

//author作者名称字符串

//book_finish_status书籍完本状态字符串完本,连载更新

//max_chapter小说最大章节数数值小说当前一共有多少章

varduration=(eime()-start.gettime())/1000;

sensors.track(&#039;readchapterend&#039;,{

&#039;is_finish&#039;:true,

&#039;duration&#039;:duration,

&#039;is_first_time_read&#039;:false,

&#039;source_position&#039;:&quot;cps&quot;,

&#039;read_type&#039;:book_read_type,

&#039;chapter_num&#039;:115,

&#039;chapter_id&#039;:&quot;481955469&quot;,

&#039;chapter_name&#039;:&quot;&quot;,

&#039;chapter_pay_type&#039;:&quot;章&quot;,

&#039;chapter_s&#039;:35,

&#039;update_time&#039;30六十八3723000,

&#039;book_id&#039;:&quot;11010073404&quot;,

&#039;book_name&#039;:&quot;陆总,傻妻不傻&quot;,

&#039;first_type&#039;:&quot;女频&quot;,

&#039;sed_type&#039;:&quot;现代言情&quot;,

&#039;pay_type&#039;:&quot;收费&quot;,

&#039;author&#039;:&quot;三月&quot;,

&#039;book_finish_status&#039;:&quot;完本&quot;,

&#039;max_chapter&#039;:1271});

//readbookplete阅读小说完成

//book_id书籍id字符串

//book_name书籍名称字符串

//first_type一级类别字符串

//sed_type二级类别字符串

//pay_type付费类型字符串付费,限免,免费

//author作者名称字符串

//book_finish_status书籍完本状态字符串完本,连载更新

//max_chapter小说最大章节数数值小说当前一共有多少章

if(115==1271){

sensors.track(&#039;readbookplete&#039;,{

&#039;book_id&#039;:&quot;11010073404&quot;,

&#039;book_name&#039;:&quot;陆总,傻妻不傻&quot;,

&#039;first_type&#039;:&quot;女频&quot;,

&#039;sed_type&#039;:&quot;现代言情&quot;,

&#039;pay_type&#039;:&quot;收费&quot;,

&#039;author&#039;:&quot;三月&quot;,

&#039;book_finish_status&#039;:&quot;完本&quot;,

&#039;max_chapter&#039;:1271});

}

}

});

}

})

&lt;/script

&lt;script

vararrpaymore=[&quot;,&quot;,&quot;,&quot;]

varispayedman=$(&#039;.op&#039;).data(&#039;ispay&#039;)

varwxchatbgcell=$(&#039;.wxchatbgcell&#039;).val();

varworkwechaturl=$(&#039;.op&#039;).val()

varworkwechaturlbg=$(&#039;.op_bg&#039;).val()

varworkweewuserurl=$(&#039;.op_newuser&#039;).val();

varworkweewuserurlbg=$(&#039;.op_newuser_bg&#039;).val();

varindex=math.floor((math.random()*arrpaymore.length));

varuser_id=$.fn.cookie(&#039;user_id&#039;);

sole.log(arrpaymore[index]);

varlatingtime=15*60*1000;

if(isbuymore==true){//充值加购

$(&#039;.ad_welfare_bannerimg&#039;).attr(&#039;src&#039;,arrpaymore[index]);

$(&#039;.ad_welfareclick&#039;).remove();

varlastclosetime=localste.getitem(&#039;paymore_bottom_banner&#039;)||0;

if($(&#039;.ad_welfare_banner&#039;).css(&#039;display&#039;)==&#039;none&#039;&amp;&amp;e().gettime()-lastclosetime=latingtime){

$(&#039;.ad_welfare_banner&#039;).show();

cpslog([701,{map:{ad_welfare_banner:arrpaymore[index]}}]);

vartimebanner1=settimeout(fun(){

$(&#039;.ad_welfare_banner&#039;).hide();

localste.setitem(&#039;paymore_bottom_banner&#039;,e().gettime());

b_timeshow()

},5000)

}else{

vartimebanner2=settimeout(fun(){

$(&#039;.ad_welfare_banner&#039;).show();

cpslog([701,{map:{ad_welfare_banner:arrpaymore[index]}}]);

settimeout(fun(){

$(&#039;.ad_welfare_banner&#039;).hide();

localste.setitem(&#039;paymore_bottom_banner&#039;,e().gettime());

b_timeshow()

},5000)

},latingtime-(e().gettime()-lastclosetime))

}

//跳转支付页

$(&#039;.ad_welfare_banner&#039;).on(&#039;click&#039;,fun(){

cpslog([702,{map:{ad_welfare_banner_click:arrpaymore[index]}},&#039;ad_welfare_banner_click&#039;]);

windo=&#039;/index/recharge/pay?from=wechat&amp;user_id=&#039;+user_id+&#039;&amp;froms=chapter&#039;;

})

}elseif(workwechaturl){//注册大于30天,企业微信弹框

varshowtime=$.fn.cookie(&#039;showtime&#039;)||0;

if(typeof(showtime)==&#039;string&#039;){

showtime=parseint(showtime);

}

vardayee(e().tolocaledatestring()).gettime()+24*60*60*1000-1;

$(&#039;.footer-margin&#039;).css(&#039;height&#039;,&#039;.38rem&#039;);

//微信导流cell弹窗

if(ispayedman){

$(&#039;.ad_welfare_bannerimg&#039;).attr(&#039;src&#039;,wxchatbgcell);

$(&#039;.ad_welfare_banner&#039;).on(&#039;click&#039;,fun(){

cpslog([702,{map:{work_wechat_click:ispayedman,wxchatbgcell:wxchatbgcell,workwechaturlbg:workwechaturlbg}},&#039;work_wechat_click&#039;]);

dotsellclick();

windo=&#039;/index/recharge/pay?from=wechat&amp;user_id=&#039;+user_id+&#039;&amp;froms=chapter&#039;;

})

}else{

$(&#039;.ad_welfare_bannerimg&#039;).attr(&#039;src&#039;,wxchatbgcell);

$(&#039;.ad_welfare_banner&#039;).on(&#039;click&#039;,fun(){

$(&#039;.shadow_box_bg&#039;).show();

$(&#039;.js_work_pop&#039;).show();

$(&#039;.img_code&#039;).attr(&#039;src&#039;,workwechaturl);

$(&#039;.wxdl_bg&#039;).attr(&#039;src&#039;,workwechaturlbg)

$(&#039;body,html&#039;).addclass(&#039;stopscroll&#039;);

dotsellclick();

cpslog([702,{map:{work_wechat_click:ispayedman,wxchatbgcell:wxchatbgcell,workwechaturlbg:workwechaturlbg}},&#039;work_wechat_click&#039;]);

});

//二维码长按打点

$(&#039;.img_code&#039;).on({

touchstart:fun(e){

cleartimeout(this.loop);

this.loop=settimeout(fun(){

cpslog([703,{map:{workwechaturlbg:workwechaturlbg}},&#039;work_qr_code_long_press_chapter&#039;]);

}.bind(this),500);

},

toud:fun(e){

cleartimeout(this.loop);//清空定时器,防止重复注册定时器

}

}

);

}

$(&#039;.ad_welfareclick&#039;).remove();

varlastclosetime=$.fn.cookie(&#039;last_close_time&#039;)||0;

if(typeof(lastclosetime)==&#039;string&#039;){

lastclosetime=parseint(lastclosetime);

}

if(showtime&lt;2){

if($(&#039;.ad_welfare_banner&#039;).css(&#039;display&#039;)==&#039;none&#039;&amp;&amp;e().gettime()-lastclosetime=latingtime){

$(&#039;.ad_welfare_banner&#039;).show();

cpslog([703,{map:{work_wechat_banner:ispayedman,wxchatbgcell:wxchatbgcell}}]);

showtime+=1;

$.fn.cookie(&#039;showtime&#039;,showtime,{expires:(dayee().gettime())/86400000});

$.fn.cookie(&#039;last_close_time&#039;,parseint((e().gettime())/1000),{expires:(dayee().gettime())/86400000});

localste.setitem(&#039;paymore_bottom_banner&#039;,e().gettime());

vartimebanner1=settimeout(fun(){

$(&#039;.ad_welfare_banner&#039;).hide();

cpslog([702,{map:{t:1}},&#039;work_wechat_sell_auto_close&#039;]);

b_timeshow()

},10000);

}

}

$(&#039;.js_work_wechat_close&#039;).click(fun(){

$(&#039;.shadow_box_bg&#039;).hide();

$(&#039;.js_work_pop&#039;).hide();

$(&#039;body,html&#039;).removeclass(&#039;stopscroll&#039;)

cpslog([702,{map:{work_wechat_click:ispayedman}},&#039;work_wechat_dialog_close&#039;]);

});

}elseif(workweewuserurl){//注册时间小于48小时的企业微信弹框

varshowtime=$.fn.cookie(&#039;showtime&#039;)||0;

if(typeof(showtime)==&#039;string&#039;){

showtime=parseint(showtime);

}

vardayee(e().tolocaledatestring()).gettime()+24*60*60*1000-1;

$(&#039;.footer-margin&#039;).css(&#039;height&#039;,&#039;.38rem&#039;);

$(&#039;.ad_welfare_bannerimg&#039;).attr(&#039;src&#039;,&quot;);

$(&#039;.ad_welfare_banner&#039;).on(&#039;click&#039;,fun(){

$(&#039;.shadow_box_bg&#039;).show();

$(&#039;.js_work_pop_newuser&#039;).show();

$(&#039;.img_code&#039;).attr(&#039;src&#039;,workweewuserurl);

$(&#039;.wxdl_bg&#039;).attr(&#039;src&#039;,workweewuserurlbg)

$(&#039;body,html&#039;).addclass(&#039;stopscroll&#039;);

$.post(&#039;/index/book/worknewuserdotclick&#039;);

cpslog([702,{map:{work_wechat_click:ispayedman}},&#039;work_wechat_click&#039;]);

});

//二维码长按打点

$(&#039;.js_img_code_newuser&#039;).on({

touchstart:fun(e){

cleartimeout(this.loop);

this.loop=settimeout(fun(){

cpslog([703,{},&#039;work_qr_code_long_press_chapter_newuser&#039;]);

}.bind(this),500);

},

toud:fun(e){

cleartimeout(this.loop);//清空定时器,防止重复注册定时器

}

}

);

$(&#039;.ad_welfareclick&#039;).remove();

varlastclosetime=$.fn.cookie(&#039;last_close_time&#039;)||0;

if(typeof(lastclosetime)==&#039;string&#039;){

lastclosetime=parseint(lastclosetime);

}

if(showtime&lt;2){

if($(&#039;.ad_welfare_banner&#039;).css(&#039;display&#039;)==&#039;none&#039;&amp;&amp;e().gettime()-lastclosetime=latingtime){

$(&#039;.ad_welfare_banner&#039;).show();

cpslog([701,{map:{work_wechat_banner:ispayedman}}]);

showtime+=1;

$.fn.cookie(&#039;showtime&#039;,showtime,{expires:(dayee().gettime())/86400000});

$.fn.cookie(&#039;last_close_time&#039;,parseint((e().gettime())/1000),{

expires:(dayee().gettime())/86400000});

localste.setitem(&#039;paymore_bottom_banner&#039;,e().gettime());

vartimebanner1=settimeout(fun(){

$(&#039;.ad_welfare_banner&#039;).hide();

cpslog([702,{map:{t:1}},&#039;work_wechat_sell_newuser_auto_close&#039;]);

b_timeshow()

},10000);

}

}

$(&#039;.js_work_wechat_close&#039;).click(fun(){

$(&#039;.shadow_box_bg&#039;).hide();

$(&#039;.shadow_box&#039;).hide();

$(&#039;.js_work_pop_newuser&#039;).hide();

$(&#039;body,html&#039;).removeclass(&#039;stopscroll&#039;)

cpslog([702,{map:{work_wechat_click:ispayedman}},&#039;work_wechat_newuser_dialog_close&#039;]);

});

}

fundotsellclick(){

$.post(&#039;/index/book/workdotclick&#039;);

}

funb_timeshow(){

settimeout(fun(){

varlastclosetime=localste.getitem(&#039;paymore_bottom_banner&#039;)||0;

if($(&#039;.ad_welfare_banner&#039;).css(&#039;display&#039;)==&#039;none&#039;&amp;&amp;e().gettime()-lastclosetime=latingtime){

$(&#039;.ad_welfare_bannerimg&#039;).attr(&#039;src&#039;,arrpaymore[index]);

$(&#039;.ad_welfare_banner&#039;).show();

settimeout(fun(){

$(&#039;.ad_welfare_banner&#039;).hide();

showtime+=1

$.fn.cookie(&#039;showtime&#039;,showtime,{expires:(dayee().gettime())/86400000});

localste.setitem(&#039;paymore_bottom_banner&#039;,e().gettime());

b_timeshow()

},10000)

}

},latingtime)

}

&lt;/script

&lt;scriptsrc=&quot;?v=2.5.62&quot;&lt;/script

&lt;scriptsrc=&quot;&quot;&lt;/script

&lt;script

$(fun(){

vardayee(e().tolocaledatestring()).gettime()+24*60*60*1000-1;

vargkc_globe=$.fn.cookie(&#039;gkc_globe&#039;)||&#039;&#039;;

if(!gkc_globe){

$(&#039;.gkc_globe&#039;).show();

cpslog([703,{},&#039;show_gkc_globe&#039;]);

$.fn.cookie(&#039;gkc_globe&#039;,1,{path:&#039;/&#039;,expires:(e(dayend))});

}else{

$(&#039;.gkc_globe&#039;).hide();

}

$(&#039;.gkc_close&#039;).click(fun(){

$(&#039;.gkc_mask&#039;).hide();

$(&#039;.gkc_globe&#039;).hide();

})

$(&#039;.gkc_globe,.gkc_i&#039;).click(fun(){

$(&#039;.gkc_mask&#039;).show();

varel_class=$(this).hasclass(&#039;gkc_i&#039;)?&#039;click_gkc_box&#039;:&#039;click_gkc_globe&#039;;

cpslog([702,{},el_class]);

cpslog([703,{},&#039;show_gkc_mask&#039;]);

})

$(&#039;.gkc_copy_btn&#039;).click(fun(event){

vartextcopied=clipboardjs.copy(&#039;8&#039;);

wx.closewindow();

cpslog([702,{},&#039;click_gkc_copy_btn&#039;]);

})

cpslog([703,{},&#039;show_gkc_box&#039;]);

})

&lt;/script

&lt;divclass=&quot;allopblank&quot;&lt;/div

&lt;divclass=&quot;shadow_bg&quot;&lt;/div

&lt;divclass=&quot;windowshow&quot;

&lt;divclass=&quot;w_showbox&quot;

&lt;imgclass=&quot;w_close&quot;src=&quot;

&lt;aclass=&quot;window_href&quot;href=&quot;&quot;

&lt;imgclass=&quot;w_img&quot;src=&quot;&quot;alt=&quot;&quot;

&lt;/a

&lt;wx-open-launch-

id=&quot;launch-w-btn&quot;

username=&quot;&quot;

path=&quot;&quot;

style=&quot;display:block;width:100%;height:3.33rem;position:absolute;bottom:0;z-index:1000;&quot;

&lt;template

&lt;style.btn{width:100%;height:100%;border:none;background:none;position:absolute;bottom:0;left:0;}&lt;/style

&lt;buttonclass=&quot;btn&quot;&lt;/button

&lt;/template

&lt;/wx-open-launch-

&lt;/div

&lt;/div

&lt;divclass=&quot;cellshow&quot;

&lt;imgclass=&quot;c_close&quot;src=&quot;

&lt;aclass=&quot;c_href&quot;href=&quot;&quot;

&lt;imgclass=&quot;c_img&quot;src=&quot;&quot;alt=&quot;&quot;

&lt;/a

&lt;wx-open-launch-

id=&quot;launch-&quot;

username=&quot;&quot;

path=&quot;&quot;

style=&quot;display:block;width:100%;height:100%;position:absolute;bottom:0;z-index:1000;&quot;

&lt;template

&lt;style.btn{width:100%;height:100%;position:absolute;bottom:0;left:0;background:none;border:none;}&lt;/style

&lt;buttonclass=&quot;btn&quot;&lt;/button

&lt;/template

&lt;/wx-open-launch-

&lt;/div

&lt;divclass=&quot;floatshow&quot;

&lt;imgclass=&quot;f_close&quot;src=&quot;

&lt;aclass=&quot;float_href&quot;

&lt;imgclass=&quot;f_img&quot;src=&quot;&quot;alt=&quot;&quot;data-aid=&quot;&quot;

&lt;/a

&lt;wx-open-launch-

id=&quot;launch-f-btn&quot;

username=&quot;&quot;

path=&quot;&quot;

style=&quot;display:block;width:100%;height:100%;position:absolute;bottom:-35px;z-index:1000;&quot;

&lt;template

&lt;style.btn{width:100%;height:100%;position:absolute;bottom:0;left:0;background:none;border:none;}&lt;/style

&lt;buttonclass=&quot;btn&quot;&lt;/button

&lt;/template

&lt;/wx-open-launch-

&lt;/div

&lt;divclass=&quot;page_op&quot;style=&quot;display:none;&quot;1&lt;/div

&lt;scriptsrc=&quot;//res.wx.qq./open/js/jweixin.0.js&quot;&lt;/script

&lt;!--&lt;scriptsrc=&quot;

&lt;script

$(fun(){

//阅读页悬浮球互斥

vardisblockval=$(&#039;.gkc_globe&#039;).length0&amp;&amp;$(&#039;.gkc_globe&#039;).css(&#039;display&#039;)!=&#039;none&#039;;

if(disblockval){return}

varpage=$(&#039;.page_op&#039;).html();

varpoptype=$(&#039;#poptype&#039;).data(&#039;poptype&#039;);

vardisplay=$(&#039;.pop_fixed&#039;).css(&#039;display&#039;);

vardayee(e().tolocaledatestring()).gettime()+24*60*60*1000-1;

varactivity_third_id=&#039;&#039;;

varposition=&#039;&#039;;

varchapter_ad_show=$.fn.cookie(&#039;chapter_ad_show&#039;)||0;

varret_ad_show=$.fn.cookie(&#039;ret_ad_show&#039;)||0;

varuser_ad_show=$.fn.cookie(&#039;user_ad_show&#039;)||0;

if(page==1){

chapter_ad_show++

$.fn.cookie(&#039;chapter_ad_show&#039;,chapter_ad_show,{path:&#039;/&#039;,expires:(dayee().gettime())/86400000})

}elseif(page==2){

ret_ad_show++

$.fn.cookie(&#039;ret_ad_show&#039;,ret_ad_show,{path:&#039;/&#039;,expires:(dayee().gettime())/86400000})

}elseif(page==3){

user_ad_show++

$.fn.cookie(&#039;user_ad_show&#039;,user_ad_show,{path:&#039;/&#039;,expires:(dayee().gettime())/86400000})

}

switch(page){

//页面路径

case1:

position=1;

break;

case2:

position=2;

break;

}

if(page==1&amp;&amp;display==&#039;block&#039;){

sole.log(&#039;阅读页强制弹窗&#039;)

}else{

$.ajax({

type:&#039;post&#039;,

url:&#039;/api/manage/fig&#039;,

timeout:10000,

cache:false,

datatype:&#039;json&#039;,

data:{

page:page,

path:dot.location.pathname,

poptype:poptype

},

sess:fun(data){

if(data.data.popup.length0){

$(&#039;body&#039;).append(data.data.popup);

}else{

//弹窗展示

for(varj=0;j&lt;data.data.manage.length;j++){

//sole.log(data.data[i])

leti=j;

switch(data.data.manage[i].type){

//弹窗

case1:

$(&#039;.shadow_bg&#039;).show();

$(&#039;body&#039;).addclass(&#039;stopscroll&#039;);

$(&#039;.windowshow&#039;).show();

$(&#039;.window_href&#039;).attr(&#039;href&#039;,data.data.manage[i].data.redirect_link);

$(&#039;.w_img&#039;).attr(&#039;src&#039;,data.data.manage[i].data.i);

if(!data.data.manage[i].data.redirect_link){

$(&#039;.window_href&#039;).attr(&quot;href&quot;,&quot;javascript:;&quot;);

}

if(data.data.manage[i].data.mini_program){

$(&#039;#launch-w-btn&#039;).show();

$(&#039;.window_href&#039;).removeattr(&quot;href&quot;);

wx.fig({

debug:false,//开启调试模式,调用的所有api的返回值会在客户端alert出来,若要查看传入的参数,可以在pc端打开,参数信息会通过log打出,仅在pc端时才会打印。

appid:data.data.manage[i].data.mini_program.appid,//必填,公众号的唯一标识

timestamp:data.data.manage[i].data.mini_program.timestamp,//必填,生成签名的时间戳

r:data.data.manage[i].data.mini_program.r,//必填,生成签名的随机串

signature:data.data.manage[i].data.mini_program.signature,//必填,签名

jsapilist:[&#039;onmenusharetimeline&#039;,&#039;onmenushareappmessage&#039;,&#039;onmenushareqq&#039;,&#039;onmenushareqzone&#039;],//必填,需要使用的js接口列表

opentaglist:[&quot;wx-open-launch-&quot;]

});

$(&#039;#launch-w-btn&#039;).attr(&#039;username&#039;,data.data.manage[i].data.mini_program.id);

$(&#039;#launch-w-btn&#039;).attr(&#039;path&#039;,data.data.manage[i].data.mini_program.link);

}else{

$(&#039;#launch-w-btn&#039;).hide();

}

varactivity_id_w=data.data.manage[i].data.feature_id;

vario_w=data.data.manage[i].data.io;

varimg_entry_b=data.data.manage[i].data.i;

varclick_kind=data.data.manage[i].data.redirect_type;

varclick_ki=data.data.manage[i].data.report;

varresource_id_b=data.data.manage[i].data.resource_id;

varmanage_fig_feature_id_b=data.data.manage[i].data.manage_fig_feature_id;

vara_id_b=typeofdata.data.manage[i].data.activity_data.id==&#039;undefined&#039;?

0:data.data.manage[i].data.activity_data.id;

vara_pid_b=typeofdata.data.manage[i].data.activity_data.pid==&#039;undefined&#039;?

0:data.data.manage[i].data.activity_data.pid;

vara_extend_type_b=typeofdata.data.manage[i].data.activity_data.extend_type==&#039;undefined&#039;?

0:data.data.manage[i].data.activity_data.extend_type;

//兼容之前互动广告/小程序曝光打点

if(data.data.manage[i].data.redirect_type==2){

if(page==1){

cpslog([703,{map:{miry:img_entry_b}},&#039;miry_read&#039;]);

}elseif(page==2){

cpslog([703,{map:{miry:img_entry_b}},&#039;miry2_ret&#039;]);

}

}elseif(data.data.manage[i].data.redirect_type==3){

if(page==1){

cpslog([703,{map:{ad_entry:img_entry_b}},&#039;ad_entry_read&#039;]);

}elseif(page==2){

cpslog([703,{map:{ad_entry:img_entry_b}},&#039;ad_entry2_ret&#039;]);

}

}

//打点

cpslog([703,{map:{window_show:page,activity_id:activity_id_w,resource_id:resource_id_b,

io:io_w,a_id:a_id_b,a_pid:a_pid_b,a_extend_type:a_extend_type_b}},&#039;window_show&#039;]);

$(&#039;.windowshowa&#039;).on(&#039;click&#039;,fun(){

//兼容之前互动广告/小程序曝光打点

if(data.data.manage[i].data.redirect_type==2){

if(page==1){

cpslog([702,{map:{miry_click:img_entry_b}},&#039;miry_click2_read&#039;]);

}elseif(page==2){

cpslog([702,{map:{miry_click:img_entry_b}},&#039;miry_click2_ret&#039;]);

}

}elseif(data.data.manage[i].data.redirect_type==3){

if(page==1){

cpslog([702,{map:{ad_entry_click:img_entry_b}},&#039;ad_entry_click2_read&#039;]);

}elseif(page==2){

cpslog([702,{map:{ad_entry_click:img_entry_b}},&#039;ad_entry_click2_ret&#039;]);

}

}

cpslog([702,{map:{window_show:page,activity_id:activity_id_w,resource_id:resource_id_b,

io:io_w,a_id:a_id_b,a_pid:a_pid_b,a_extend_type:a_extend_type_b}},&#039;window_show_click&#039;]);

if(data.data.manage[i].data.report==1){

$.ajax({

url:&#039;/api/manage/joinlta&#039;,

type:&quot;post&quot;,

data:{

resource_id:resource_id_b,

manage_fig_feature_id:manage_fig_feature_id_b

},

sess:fun(data){

sole.log(data);

}

});

}

})

break;

//浮窗挂件

case2:

$(&#039;.float_href&#039;).attr(&#039;href&#039;,&#039;javascript:;&#039;);

$(&#039;.floatshow&#039;).show();

$(&#039;.f_close&#039;).show();

$(&#039;.float_href&#039;).attr(&#039;href&#039;,data.data.manage[i].data.redirect_link);

$(&#039;.f_img&#039;).attr(&#039;src&#039;,data.data.manage[i].data.i);

if(!data.data.manage[i].data.redirect_link){

$(&#039;.float_href&#039;).attr(&quot;href&quot;,&quot;javascript:;&quot;);

}

ready_into(data)//读书挑战赛入口判断函数

//判断是否开启王海所接入的运营位

//if(data.data.manage[i].data.show_type==3){

//$(&#039;.f_close&#039;).show();

//}

//if(data.data.manage[i].data.show_type==4){

//settimeout(fun(){

//$(&#039;.floatshow&#039;).hide();

//},6000)

//}

if(data.data.manage[i].data.mini_program){

$(&#039;#launch-f-btn&#039;).show();

$(&#039;.float_href&#039;).removeattr(&quot;href&quot;);

wx.fig({

debug:false,//开启调试模式,调用的所有api的返回值会在客户端alert出来,若要查看传入的参数,可以在pc端打开,参数信息会通过log打出,仅在pc端时才会打印。

appid:data.data.manage[i].data.mini_program.appid,//必填,公众号的唯一标识

timestamp:data.data.manage[i].data.mini_program.timestamp,//必填,生成签名的时间戳

r:data.data.manage[i].data.mini_program.r,//必填,生成签名的随机串

signature:data.data.manage[i].data.mini_program.signature,//必填,签名

jsapilist:[&#039;onmenusharetimeline&#039;,&#039;onmenushareappmessage&#039;,&#039;onmenushareqq&#039;,&#039;onmenushareqzone&#039;],//必填,需要使用的js接口列表

opentaglist:[&quot;wx-open-launch-&quot;]

});

$(&#039;#launch-f-btn&#039;).attr(&#039;username&#039;,data.data.manage[i].data.mini_program.id);

$(&#039;#launch-f-btn&#039;).attr(&#039;path&#039;,data.data.manage[i].data.mini_program.link);

}else{

$(&#039;#launch-f-btn&#039;).hide();

}

varactivity_id_f=data.data.manage[i].data.feature_id;

vario_f=data.data.manage[i].data.io;

varclick_kind=data.data.manage[i].data.redirect_type;

varclick_ki=data.data.manage[i].data.report;

varimg_entry_f=data.data.manage[i].data.i;

varresource_id_f=data.data.manage[i].data.resource_id;

varmanage_fig_feature_id_f=data.data.manage[i].data.manage_fig_feature_id;

varredirect_link=data.data.manage[i].data.redirect_link;

vara_id_f=typeofdata.data.manage[i].data.activity_data.id==&#039;undefined&#039;?

0:data.data.manage[i].data.activity_data.id;

vara_pid_f=typeofdata.data.manage[i].data.activity_data.pid==&#039;undefined&#039;?

0:data.data.manage[i].data.activity_data.pid;

vara_extend_type_f=typeofdata.data.manage[i].data.activity_data.extend_type==&#039;undefined&#039;?

0:data.data.manage[i].data.activity_data.extend_type;

//兼容之前互动广告/小程序曝光打点

if(data.data.manage[i].data.redirect_type==2){

if(page==1){

cpslog([703,{map:{miry:img_entry_f}},&#039;miry_read&#039;]);

}elseif(page==2){

cpslog([703,{map:{miry:img_entry_f}},&#039;miry2_ret&#039;]);

}

}elseif(data.data.manage[i].data.redirect_type==3){

if(page==1){

cpslog([703,{map:{ad_entry:img_entry_f}},&#039;ad_entry_read&#039;]);

}elseif(page==2){

cpslog([703,{map:{ad_entry:img_entry_f}},&#039;ad_entry2_ret&#039;]);

}

}

varfeature_id_f=data.data.manage[i].data.feature_id;

cpslog([703,{map:{float_show:page,activity_id:activity_id_f,resource_id:resource_id_f,

io:io_f,ia_pany_id:data.data.manage[0].data.ia_pany_id,

a_id:a_id_f,a_pid:a_pid_f,a_extend_type:a_extend_type_f}},&#039;float_show&#039;]);

$(&#039;.floatsho(&#039;click&#039;,fun(){

qywx(feature_id_f,&#039;.float_href&#039;)

//兼容之前互动广告/小程序点击打点

if(data.data.manage[i].data.redirect_type==2){

if(page==1){

cpslog([702,{map:{miry_click:img_entry_f}},&#039;miry_click2_read&#039;]);

}elseif(page==2){

cpslog([702,{map:{miry_click:img_entry_f}},&#039;miry_click2_ret&#039;]);

}

}elseif(data.data.manage[i].data.redirect_link==&#039;&#039;&amp;&amp;data.data.manage[i].data.redirect_type==3){

if(page==1){

cpslog([702,{map:{ad_entry_click:img_entry_f}},&#039;ad_entry_click2_read&#039;]);

}elseif(page==2){

cpslog([702,{map:{ad_entry_click:img_entry_f}},&#039;ad_entry_click2_ret&#039;]);

}

}elseif(data.data.manage[i].data.redirect_link!=&#039;&#039;&amp;&amp;data.data.manage[i].data.redirect_type==3){

if(page==1){

cpslog([702,{map:{ad_entry_click:img_entry_f,redirect_link:redirect_link,ia_pany_id:data.data.manage[0].data.ia_pany_id}},&#039;ad_entry_click2_read&#039;]);

}elseif(page==2){

cpslog([702,{map:{ad_entry_click:img_entry_f,redirect_link:redirect_link,ia_pany_id:data.data.manage[0].data.ia_pany_id}},&#039;ad_entry_click2_ret&#039;]);

}

}

cpslog([702,{map:{float_show:page,activity_id:activity_id_f,resource_id:resource_id_f,

io:io_f,ia_pany_id:data.data.manage[0].data.ia_pany_id,

a_id:a_id_f,a_pid:a_pid_f,a_extend_type:a_extend_type_f}},&#039;float_show_click&#039;]);

if(data.data.manage[i].data.redirect_link!=&#039;&#039;&amp;&amp;data.data.manage[i].data.redirect_type==3){

$.ajax({

url:&#039;/api/iivead/linkclick&#039;,

type:&quot;post&quot;,

data:{

position:page,

ia_pany_id:data.data.manage[i].data.ia_pany_id,

ia_link_id:data.data.manage[i].data.ia_link_id

},

sess:fun(data){

}

});

}elseif(data.data.manage[i].data.redirect_link==&#039;&#039;&amp;&amp;data.data.manage[i].data.redirect_type==3){

$(&#039;.float_href&#039;).attr(&quot;href&quot;,&quot;javascript:;&quot;);

$.ajax({

url:&#039;/index/user/getiiveaddata&#039;,

type:&quot;post&quot;,

data:{

position:page

},

sess:fun(data){

if(!data||!data.landingurl){

$(&#039;.hd_toast&#039;).show();

//return

}else{

location.href=data.landingurl

}

//接口打点

$.ajax({

url:data.clickurl,

type:&quot;get&quot;,

sess:fun(data){

}

})

$.ajax({

url:data.exposureurl,

type:&quot;get&quot;,

sess:fun(data){

}

})

$.ajax({

url:data.winurl,

type:&quot;get&quot;,

sess:fun(data){

}

})

},

error:fun(){

$(&#039;.hd_toast&#039;).show();

}

});

//3秒toast消失

settimeout(fun(){

$(&#039;.hd_toast&#039;).hide();

},3000)

}

if(data.data.manage[i].data.report==1){

$.ajax({

url:&#039;/api/manage/joinlta&#039;,

type:&quot;post&quot;,

data:{

resource_id:resource_id_f,

manage_fig_feature_id:manage_fig_feature_id_f

},

sess:fun(data){

sole.log(data);

}

});

}

})

break;

//底部cell条

case3:

$(&#039;.cellshow&#039;).show();

$(&#039;.allopblank&#039;).show();

$(&#039;.c_close&#039;).show();

$(&#039;.c_href&#039;).attr(&#039;href&#039;,data.data.manage[i].data.redirect_link);

$(&#039;.c_img&#039;).attr(&#039;src&#039;,data.data.manage[i].data.i);

//if(data.data.manage[i].data.show_type==4){

//settimeout(fun(){

//$(&#039;.cellshow&#039;).hide();

//},6000)

//}

if(!data.data.manage[i].data.redirect_link){

$(&#039;.c_href&#039;).attr(&quot;href&quot;,&quot;javascript:;&quot;);

}

if(data.data.manage[i].data.mini_program){

//$(&#039;#launch-&#039;).show();

$(&#039;.c_href&#039;).removeattr(&quot;href&quot;);

wx.fig({

debug:false,//开启调试模式,调用的所有api的返回值会在客户端alert出来,若要查看传入的参数,可以在pc端打开,参数信息会通过log打出,仅在pc端时才会打印。

appid:data.data.manage[i].data.mini_program.appid,//必填,公众号的唯一标识

timestamp:data.data.manage[i].data.mini_program.timestamp,//必填,生成签名的时间戳

r:data.data.manage[i].data.mini_program.r,//必填,生成签名的随机串

signature:data.data.manage[i].data.mini_program.signature,//必填,签名

jsapilist:[&#039;onmenusharetimeline&#039;,&#039;onmenushareappmessage&#039;,&#039;onmenushareqq&#039;,&#039;onmenushareqzone&#039;],//必填,需要使用的js接口列表

opentaglist:[&quot;wx-open-launch-&quot;]

});

$(&#039;#launch-&#039;).attr(&#039;username&#039;,data.data.manage[i].data.mini_program.id);

$(&#039;#launch-&#039;).attr(&#039;path&#039;,data.data.manage[i].data.mini_program.link);

}else{

$(&#039;#launch-&#039;).hide();

}

varactivity_id_c=data.data.manage[i].data.feature_id;

vario_c=data.data.manage[i].data.io;

varimg_entry_c=data.data.manage[i].data.i;

varclick_kind=data.data.manage[i].data.redirect_type;

varclick_ki=data.data.manage[i].data.report;

varresource_id_c=data.data.manage[i].data.resource_id;

varmanage_fig_feature_id_c=data.data.manage[i].data.manage_fig_feature_id;

vara_id_c=typeofdata.data.manage[i].data.activity_data.id==&#039;undefined&#039;?

0:data.data.manage[i].data.activity_data.id;

vara_pid_c=typeofdata.data.manage[i].data.activity_data.pid==&#039;undefined&#039;?

0:data.data.manage[i].data.activity_data.pid;

vara_extend_type_c=typeofdata.data.manage[i].data.activity_data.extend_type==&#039;undefined&#039;?

0:data.data.manage[i].data.activity_data.extend_type;

//兼容之前互动广告/小程序曝光打点

if(data.data.manage[i].data.redirect_type==2){

if(page==1){

cpslog([703,{map:{miry:img_entry_c}},&#039;miry_read&#039;]);

}elseif(page==2){

cpslog([703,{map:{miry:img_entry_c}},&#039;miry2_ret&#039;]);

}

}elseif(data.data.manage[i].data.redirect_type==3){

if(page==1){

cpslog([703,{map:{ad_entry:img_entry_c}},&#039;ad_entry_read&#039;]);

}elseif(page==2){

cpslog([703,{map:{ad_entry:img_entry_c}},&#039;ad_entry2_ret&#039;]);

}

}

varfeature_id_c=data.data.manage[i].data.feature_id;

cpslog([703,{map:{cell_show:page,activity_id:activity_id_c,resource_id:resource_id_c,

io:io_c,a_id:a_id_c,a_pid:a_pid_c,a_extend_type:a_extend_type_c}},&#039;cell_show&#039;]);

$(&#039;.cellshowa&#039;).on(&#039;click&#039;,fun(){

qywx(feature_id_c,&#039;.c_href&#039;)

//兼容之前互动广告/小程序点击打点

if(data.data.manage[i].data.redirect_type==2){

if(page==1){

cpslog([702,{map:{miry_click:img_entry_c}},&#039;miry_click2_read&#039;]);

}elseif(page==2){

cpslog([702,{map:{miry_click:img_entry_c}},&#039;miry_click2_ret&#039;]);

}

}elseif(data.data.manage[i].data.redirect_type==3){

if(page==1){

cpslog([702,{map:{ad_entry_click:img_entry_c}},&#039;ad_entry_click2_read&#039;]);

}elseif(page==2){

cpslog([702,{map:{ad_entry_click:img_entry_c}},&#039;ad_entry_click2_ret&#039;]);

}

}

cpslog([702,{map:{cell_show:page,activity_id:activity_id_c,resource_id:resource_id_c,

io:io_c,a_id:a_id_c,a_pid:a_pid_c,a_extend_type:a_extend_type_c}},&#039;cell_show_click&#039;]);

if(data.data.manage[i].data.report==1){

$.ajax({

url:&#039;/api/manage/joinlta&#039;,

type:&quot;post&quot;,

data:{

resource_id:resource_id_c,

manage_fig_feature_id:manage_fig_feature_id_c

},

sess:fun(data){

sole.log(data);

}

});

}

})

break;

//

case4:

$(&#039;.topbannershow&#039;).show();

$(&#039;.tb_href&#039;).attr(&#039;href&#039;,data.data.manage[i].data[0].redirect_link);

$(&#039;.tb_img&#039;).attr(&#039;src&#039;,data.data.manage[i].data[0].i);

if(!data.data.manage[i].data.redirect_link){

$(&#039;.c_href&#039;).attr(&quot;href&quot;,&quot;javascript:;&quot;);

}

if(data.data.manage[i].data[0].mini_program){

$(&#039;#launch-tb-btn&#039;).show();

$(&#039;.tb_href&#039;).removeattr(&quot;href&quot;);

wx.fig({

debug:false,//开启调试模式,调用的所有api的返回值会在客户端alert出来,若要查看传入的参数,可以在pc端打开,参数信息会通过log打出,仅在pc端时才会打印。

appid:data.data.manage[i].data[0].mini_program.appid,//必填,公众号的唯一标识

timestamp:data.data.manage[i].data[0].mini_program.timestamp,//必填,生成签名的时间戳

r:data.data.manage[i].data[0].mini_program.r,//必填,生成签名的随机串

signature:data.data.manage[i].data[0].mini_program.signature,//必填,签名

jsapilist:[&#039;onmenusharetimeline&#039;,&#039;onmenushareappmessage&#039;,&#039;onmenushareqq&#039;,&#039;onmenushareqzone&#039;],//必填,需要使用的js接口列表

opentaglist:[&quot;wx-open-launch-&quot;]

});

$(&#039;#launch-tb-btn&#039;).attr(&#039;username&#039;,data.data.manage[i].data[0].mini_program.id);

$(&#039;#launch-tb-btn&#039;).attr(&#039;path&#039;,data.data.manage[i].data[0].mini_program.link);

}else{

$(&#039;#launch-tb-btn&#039;).hide();

}

varactivity_id_t=data.data.manage[i].data[0].feature_id;

vario_t=data.data.manage[i].data[0].io;

varclick_kind=data.data.manage[i].data[0].redirect_type;

varclick_ki=data.data.manage[i].data[0].report;

varimg_entry_t=data.data.manage[i].data[0].i;

varresource_id_t=data.data.manage[i].data[0].resource_id;

varmanage_fig_feature_id_t=data.data.manage[i].data[0].manage_fig_feature_id;

vara_id_t=typeofdata.data.manage[i].data[0].activity_data.id==&#039;undefined&#039;?

0:data.data.manage[i].data[0].activity_data.id;

vara_pid_t=typeofdata.data.manage[i].data[0].activity_data.pid==&#039;undefined&#039;?

0:data.data.manage[i].data[0].activity_data.pid;

vara_extend_type_t=typeofdata.data.manage[i].data[0].activity_data.extend_type==&#039;undefined&#039;?

0:data.data.manage[i].data[0].activity_data.extend_type;

//兼容之前互动广告/小程序曝光打点

if(data.data.manage[i].data.redirect_type==2){

if(page==1){

cpslog([703,{map:{miry:img_entry_t}},&#039;miry_read&#039;]);

}elseif(page==2){

cpslog([703,{map:{miry:img_entry_t}},&#039;miry2_ret&#039;]);

}

}elseif(data.data.manage[i].data.redirect_type==3){

if(page==1){

cpslog([703,{map:{ad_entry:img_entry_t}},&#039;ad_entry_read&#039;]);

}elseif(page==2){

cpslog([703,{map:{ad_entry:img_entry_t}},&#039;ad_entry2_ret&#039;]);

}

}

//互动广告、小程序调用次数cookie存储

//if(data.data.manage[i].data.redirect_type==2||data.data.manage[i].data.redirect_type==3){

//if(page=1){

//chapter_ad_show++

//$.fn.cookie(&#039;chapter_ad_show&#039;,chapter_ad_show,{path:&#039;/&#039;,expires:(dayee().gettime())/86400000})

//}elseif(page=2){

//ret_ad_show++

//$.fn.cookie(&#039;ret_ad_show&#039;,ret_ad_show,{path:&#039;/&#039;,expires:(dayee().gettime())/86400000})

//}elseif(page=3){

//user_ad_show++

//$.fn.cookie(&#039;user_ad_show&#039;,user_ad_show,{path:&#039;/&#039;,expires:(dayee().gettime())/86400000})

//}

//}

cpslog([703,{map:{topbanner_show:page,activity_id:activity_id_t,resource_id:resource_id_t,

io:io_t,a_id:a_id_t,a_pid:a_pid_t,a_extend_type:a_extend_type_t}},&#039;topbanner_show&#039;]);

$(&#039;.topbannershowa&#039;).on(&#039;click&#039;,fun(){

//兼容之前互动广告/小程序点击打点

if(data.data.manage[i].data.redirect_type==2){

if(page==1){

cpslog([702,{map:{miry_click:img_entry_t}},&#039;miry_click2_read&#039;]);

}elseif(page==2){

cpslog([702,{map:{miry_click:img_entry_t}},&#039;miry_click2_ret&#039;]);

}

}elseif(data.data.manage[i].data.redirect_type==3){

if(page==1){

cpslog([702,{map:{ad_entry_click:img_entry_t}},&#039;ad_entry_click2_read&#039;]);

}elseif(page==2){

cpslog([702,{map:{ad_entry_click:img_entry_t}},&#039;ad_entry_click2_ret&#039;]);

}

}

cpslog([702,{map:{topbanner_show:page,activity_id:activity_id_t,resource_id:resource_id_t,

io:io_t,a_id:a_id_t,a_pid:a_pid_t,a_extend_type:a_extend_type_t}},&#039;topbanner_show_click&#039;]);

if(data.data.manage[i].data.report==1){

$.ajax({

url:&#039;/api/manage/joinlta&#039;,

type:&quot;post&quot;,

data:{

resource_id:resource_id_t,

manage_fig_feature_id:manage_fig_feature_id_t

},

sess:fun(data){

sole.log(data);

}

});

}

})

break;

}

if(data.data.manage.length){

operate_init(data.data.manage[i])

}

}

}

}

})

}

//弹窗展示

$(&#039;.w_close&#039;).on(&#039;click&#039;,fun(){

$(&#039;.windowshow&#039;).hide();

$(&#039;.shadow_bg&#039;).hide();

$(&#039;body&#039;).removeclass(&#039;stopscroll&#039;);

})

//浮窗展示

$(&#039;.f_close&#039;).on(&#039;click&#039;,fun(){

$(&#039;.floatshow&#039;).hide();

})

//cell条展示

$(&#039;.c_close&#039;).on(&quot;click&quot;,fun(){

$(&#039;.cellshow&#039;).hide();

$(&#039;.allopblank&#039;).hide();

})

//读书挑战赛运营位初始化入口

funready_into(data){

//feature_id判断是否开通读书挑战赛

if(data.data.manage[0]&amp;&amp;data.data.manage[0].data.feature_id===&quot;campaign_new_20210707&quot;){

//cookie判断是否报名读书挑战赛

if($.fn.cookie(&#039;current_read_apply&#039;)!=1){

$.ajax({

url:&#039;/api/campaignnew/getstatus&#039;,

type:&quot;get&quot;,

sess:fun(data){

$(&#039;body&#039;).append(data.data.popup);

}

});

}else{

$(&#039;.floatshow&#039;).hide();

}

}

}

funoperate_init(firstitem){

switch(firstite_id){

//lucky_draw_20210714大转盘运营位lucky_draw_20210714

case&#039;lucky_draw_20210714&#039;:

/*双旦活动入口曝光打点*/

cpslog([702,{},&#039;new_year_activity_show&#039;]);

//判断是否一点击过运营位report0-已参加1-未参加

if(firstite==0){

$(&#039;.neop_i_er&#039;).show();

//已参加则不再显示运营位入口

$(&#039;.floatshow&#039;).hide();

$(&#039;.cellshow&#039;).hide();

$(&#039;.topbannershow&#039;).hide();

$(&#039;.windowshow&#039;).hide();

$(&#039;.shadow_bg&#039;).hide();

}else{

//未参加时,渲染运营位接口事件

switch(firstitem.type){

//弹窗

case1:

$(&#039;.windowsho(&#039;click&#039;,operationposition)

break;

//浮窗

case2:

$(&#039;.floatsho(&#039;click&#039;,operationposition)

break;

//底部cell条

case3:

$(&#039;.cellsho(&#039;click&#039;,operationposition)

break;

//banner

case4:

$(&#039;.topbannersho(&#039;click&#039;,operationposition)

break;

}

}

break;

default:

break;

}

}

funqywx(fid,obj){

if(fid===&#039;work_wechat_chapter_2024&#039;){

$(obj).removeattr(&quot;href&quot;);

$.ajax({

url:&#039;/api/worki/getchapterqrcode&#039;,

type:&quot;post&quot;,

sess:fun(data){

varispayedman=data.data.is_pay;

varwechat_url_bg=data.data.qr_dialog_bg_img

if(ispayedman!=0){

cpslog([702,{map:{work_wechat_click:ispayedman,workwechaturlbg:wechat_url_bg}},&#039;work_wechat_click&#039;]);

dotsellclick();

windo=&#039;/index/recharge/pay?from=wechat&amp;user_id=&#039;+user_id+&#039;&amp;froms=chapter&#039;;

}else{

$(&#039;.shadow_box_bg&#039;).show();

$(&#039;.js_work_pop&#039;).show();

$(&#039;.img_code&#039;).attr(&#039;src&#039;,data.data.wechat_url);

$(&#039;.wxdl_bg&#039;).attr(&#039;src&#039;,data.data.qr_dialog_bg_img);

$(&#039;body,html&#039;).addclass(&#039;stopscroll&#039;);

dotsellclick();

cpslog([702,{map:{work_wechat_click:ispayedman,workwechaturlbg:wechat_url_bg}},&#039;work_wechat_click&#039;]);

}

//二维码长按打点

$(&#039;.img_code&#039;).on({

touchstart:fun(e){

cleartimeout(this.loop);

this.loop=settimeout(fun(){

cpslog([703,{map:{workwechaturlbg:wechat_url_bg}},&#039;work_qr_code_long_press_chapter&#039;]);

}.bind(this),500);

},

toud:fun(e){

cleartimeout(this.loop);//清空定时器,防止重复注册定时器

}

}

);

$(&#039;.js_work_wechat_close&#039;).click(fun(){

$(&#039;.shadow_box_bg&#039;).hide();

$(&#039;.js_work_pop&#039;).hide();

$(&#039;body,html&#039;).removeclass(&#039;stopscroll&#039;)

cpslog([702,{map:{work_wechat_click:ispayedman}},&#039;work_wechat_dialog_close&#039;]);

});

}

});

}

}

//企业微信上报函数

fundotsellclick(){

$.post(&#039;/index/book/workdotclick&#039;);

}

//大转盘运营位入口点击事件

funoperationposition(){

turnshow(1)

//vara_id=$(&#039;.neop_i_er&#039;).attr(&#039;data-aid&#039;);//优惠券

//vara_tent=$(&#039;.neop_i_er&#039;).attr(&#039;data-atent&#039;);//优惠折扣

//vara_name=$(&#039;.neop_i_er&#039;).attr(&#039;data-aname&#039;);//优惠名称

//varactivityid=$(&#039;#christmas_lottery_activity_id&#039;).val();

//if(a_id){

//cpslog([702,{

//map:{

//a_id:a_id,

//a_name:a_name,

//a_type:&#039;6&#039;,

//from:&#039;lucky_draeration_clito&#039;

//}},&#039;lucky_draeration_clito&#039;]);

//windo=&#039;/index/recharge/xmas?a_id=&#039;+a_id+&#039;&amp;activity_id=&#039;+activityid+&#039;&amp;dist=&#039;+a_tent+&#039;&amp;source=luckydraw&#039;;

//}else{

////运营位入口打点

////cpslog([702,{from:&#039;all_operation_position&#039;},&#039;new_year_dialog_show&#039;]);

////$(&#039;#g_turn_mask&#039;).show()

////getchristmasatus();

//turnshow(1)

//}

}

})

&lt;/script

&lt;script

$(fun(){

try{

variframe=dot.createelement(&#039;iframe&#039;);

iframe.style.display=&#039;none&#039;;

iframe.src=&quot;&quot;+windo.split(windo)[1];

dot.body.appendchild(iframe);

}catch(e){

sole.log(e)

}

});

&lt;/script&lt;/body

&lt;/html