(window["webpackJsonp"]=window["webpackJsonp"]||[]).push([["chunk-32d064e7"],{"076b":function(e,t,c){e.exports=c.p+"img/N-top1.7fe5da0a.png"},"079f":function(e,t,c){"use strict";c("8fd9")},"130a":function(e,t,c){e.exports=c.p+"img/N-bz.be473685.png"},"13c1":function(e,t,c){e.exports=c.p+"img/N-icon.66d25ba9.png"},"2cd8":function(e,t,c){},"89a0":function(e,t,c){"use strict";c("68ef"),c("cb51"),c("3743")},"8fd9":function(e,t,c){},a410:function(e,t,c){"use strict";var a=c("9a1c"),l=(c("89a0"),c("14d9"),c("7a23")),s=c("0530"),n=c("6605"),o=c("f286");const i={class:"header-left"},r={class:"header-middle"},d={class:"header-right"};var b={__name:"index",props:{title:{type:String,default:""},back:{type:Boolean,default:!0},border:{type:Boolean,default:!1},theme:{type:Boolean,default:!1},to:{type:String,default:""},fixed:{type:Boolean,default:!0},transparent:{type:Boolean,default:!1},dark:{type:Boolean,default:!1},isType:{type:String,default:"1"}},emits:["confirm"],setup(e,{emit:t}){const c=t,b=Object(n["d"])(),O=Object(o["a"])(),j=e,p=Object(l["computed"])(()=>({paddingTop:O.getNavHeight()}));let u=!0;const m=()=>{if("surprised"==j.isType&&u)return c("confirm"),void(u=!1);"APP"!=j.isType?j.to?b.push(j.to):b.go(-1):s["a"].finish()};return(t,c)=>{const s=a["a"];return Object(l["openBlock"])(),Object(l["createElementBlock"])(l["Fragment"],null,[Object(l["createElementVNode"])("header",{class:Object(l["normalizeClass"])(["common-header",{theme:e.theme,"van-hairline--bottom":e.border,fixed:e.fixed,transparent:e.transparent,dark:e.dark}]),style:Object(l["normalizeStyle"])(p.value)},[Object(l["createElementVNode"])("div",i,[Object(l["renderSlot"])(t.$slots,"left",{},()=>[Object(l["withDirectives"])(Object(l["createElementVNode"])("div",{class:"back-wrapper",onClick:m},[Object(l["createVNode"])(s,{name:"arrow-left"})],512),[[l["vShow"],e.back]])])]),Object(l["createElementVNode"])("div",r,[Object(l["renderSlot"])(t.$slots,"default",{},()=>[Object(l["createTextVNode"])(Object(l["toDisplayString"])(e.title),1)])]),Object(l["createElementVNode"])("div",d,[Object(l["renderSlot"])(t.$slots,"right")])],6),e.fixed?(Object(l["openBlock"])(),Object(l["createElementBlock"])("div",{key:0,class:"header-placeholder",style:Object(l["normalizeStyle"])(p.value)},null,4)):Object(l["createCommentVNode"])("",!0)],64)}}},O=(c("079f"),c("6b0d")),j=c.n(O);const p=j()(b,[["__scopeId","data-v-06b8b977"]]);t["a"]=p},aff3:function(e,t,c){"use strict";c("2cd8")},dfa0:function(e,t,c){"use strict";c.r(t);var a=c("5f24"),l=(c("ac6b"),c("cdc2")),s=(c("6b65"),c("a410")),n=c("7a23"),o=c("076b"),i=c.n(o),r=c("130a"),d=c.n(r),b=c("13c1"),O=c.n(b),j=c("f9da"),p=c.n(j),u=c("f286"),m=c("0530"),k=c("81a0"),v=c("2d31"),_=c.n(v),f=c("9911"),y=c("6c43"),N=c("ed08"),E=c("60fe");const g=e=>(Object(n["pushScopeId"])("data-v-39fd581f"),e=e(),Object(n["popScopeId"])(),e),V={class:"surprised-N"},h=["src"],B=g(()=>Object(n["createElementVNode"])("img",{src:i.a,alt:"",class:"N-top1"},null,-1)),w={key:0,class:"flex datasBox"},S={class:"datas"},x=g(()=>Object(n["createElementVNode"])("div",{class:"title"},"任务总奖励",-1)),T={class:"num"},D=g(()=>Object(n["createElementVNode"])("span",null,"金币",-1)),C=g(()=>Object(n["createElementVNode"])("div",{class:"sudo"},null,-1)),I={class:"datas"},z=g(()=>Object(n["createElementVNode"])("div",{class:"title"},"累计领取",-1)),F={class:"num"},H=g(()=>Object(n["createElementVNode"])("span",null,"金币",-1)),L=g(()=>Object(n["createElementVNode"])("div",{class:"sudo"},null,-1)),A=g(()=>Object(n["createElementVNode"])("div",{class:"title"},"已试玩",-1)),P={class:"num"},M=g(()=>Object(n["createElementVNode"])("span",null,"天",-1)),R={class:"top2"},$={class:"flex-ac timeBox"},J={class:"block toto"},U=g(()=>Object(n["createElementVNode"])("span",{class:"colon"},":",-1)),W={class:"block"},Y=g(()=>Object(n["createElementVNode"])("span",{class:"colon"},":",-1)),q={class:"block"},G=g(()=>Object(n["createElementVNode"])("img",{src:d.a,alt:"",class:"N-bz"},null,-1)),K={class:"stateBox flex",id:"stateBox"},Q=["onClick"],X={class:"title"},Z={class:"num"},ee=g(()=>Object(n["createElementVNode"])("span",null,"币",-1)),te={class:"ss"},ce={class:"top3"},ae=g(()=>Object(n["createElementVNode"])("div",{class:"navs"},[Object(n["createElementVNode"])("img",{src:O.a,alt:"",class:"N-icon"}),Object(n["createTextVNode"])("体验应用 即可领取奖励~ ")],-1)),le={class:"kezi"},se={class:"left"},ne=["src"],oe={class:"title"},ie={class:"time"},re={key:0,class:"num"},de={key:1,class:"num"},be=g(()=>Object(n["createElementVNode"])("img",{src:p.a,alt:""},null,-1)),Oe={key:0,class:"right"},je=["onClick"],pe=["onClick"],ue={key:2,class:"text"},me={key:3,class:"text"},ke={key:1,class:"right"},ve={class:"btn not"},_e={key:0,class:"text"},fe={key:1,class:"text"},ye={key:2,class:"right"},Ne={class:"number"},Ee=g(()=>Object(n["createElementVNode"])("img",{src:p.a,alt:""},null,-1)),ge={key:0,class:"text"},Ve={key:1,class:"text"},he={class:"surprised"},Be={class:"tips"},we={class:"miao"};var Se={__name:"N",setup(e){const t=Object(u["a"])(),c=Object(n["ref"])({}),o=()=>{Object(u["a"])().setSurpriseTime({...Object(u["a"])().surpriseTime,show:!1})};let i=Object(n["ref"])({});const r=e=>{if(Se=!0,O.value==j.value&&"今天"==c.value.task_depth_list[O.value].the_day){if(console.log(e,"---"),i.value=e,Object(u["a"])().surpriseTime.task_id){if(e.task_id!=Object(u["a"])().surpriseTime.task_id)return void Object(y["c"])("已有应用在试玩中")}else Object(u["a"])().setSurpriseTime({task_id:e.task_id,pkg_name:e.app_bundle,time:e.duration*(1==e.duration_type?1:60),show:!1,ok:!1});m["a"].appInstalled(Object(u["a"])().surpriseTime.pkg_name,async t=>{if(2==t.code)return Object(f["y"])({icon:c.value.domain+e.app_icon}),await Object(k["f"])({depth_id:e.depth_id,state:4}),void await g();Object(u["a"])().setSurpriseOpenTime(+new Date),m["a"].setTaskStartTime(Object(u["a"])().surpriseTime.task_id,Object(u["a"])().surpriseTime.pkg_name),m["a"].openApp(Object(u["a"])().surpriseTime.pkg_name),await Object(k["f"])({depth_id:e.depth_id,state:1}),e.state=1})}else Object(y["c"])("任务还未开始")},d=()=>{Object(y["c"])("任务时间结束"),v.value=v.value.map(e=>({...e,state:3}))},b=e=>{O.value=e,v.value=c.value.task_depth_list[O.value].depth_task_list;const t=v.value.find(e=>1==e.state);t?(Object(u["a"])().setSurpriseTime({task_id:t.task_id,pkg_name:t.app_bundle,time:t.duration*(1==t.duration_type?1:60),show:!1,ok:!1}),console.log(Object(u["a"])().surpriseTime,t,"List.value")):Object(u["a"])().setSurpriseTime({task_id:"",pkg_name:"",time:9999,show:!1,ok:!1})};let O=Object(n["ref"])(0),j=Object(n["ref"])(0);const p=Object(n["ref"])(999999),v=Object(n["ref"])([]),g=async()=>{const{data:e}=await Object(k["a"])();c.value=e;let t=new Date,a=De(t);c.value.task_depth_list=c.value.task_depth_list.map((e,t)=>(e.the_day==a&&(O.value=t,j.value=t),{...e,the_day:e.the_day==a-1?"昨天":e.the_day==a?"今天":e.the_day==a+1?"明天":e.the_day==a+2?"后天":Ce(String(e.the_day).slice(4),2,".")})),b(O.value),setTimeout(()=>{const e=document.getElementById("istabs"),t=document.getElementById("stateBox"),c=e.getBoundingClientRect().width;t.scrollLeft=(c+20)*(O.value-3)},0)};let Se=!1;Object(n["onMounted"])(async()=>{Object(f["L"])({types:1}),p.value=Ie(),await g()});const xe=()=>{Object(y["c"])("你还未完成今日试玩任务哦~")},Te=e=>{const{type:c,task_id:a}=e||{};m["a"].showRewardAd({userId:t.userInfo.user_id,sid:E["a"].VIEW_VIDEO,day_ad_view:1,pageaff:"惊喜任务",belocation:"观看视频",scene_id:2002},async t=>{const c=5===t.code;if(c){await Object(k["g"])({depth_id:e.depth_id,task_id:e.task_id});Object(f["H"])({type:"wc",point:e.point,onConfirm:()=>{}}),await g()}})};function De(e){let t=e.getFullYear(),c=(e.getMonth()+1).toString().padStart(2,"0"),a=e.getDate().toString().padStart(2,"0");return Number(t.toString()+c+a)}function Ce(e,t,c){return e.slice(0,t)+c+e.slice(t)}function Ie(){const e=new Date,t=new Date;t.setHours(23,59,59,999);const c=t-e;return Math.floor(c)}return Object(n["watchEffect"])(async()=>{Object(u["a"])().surpriseTime.ok&&Se&&(await Object(k["f"])({depth_id:i.value.depth_id,state:2}),g(),console.log("体验完成"))}),(e,t)=>{const m=s["a"],k=l["a"],f=a["a"];return Object(n["openBlock"])(),Object(n["createElementBlock"])("div",V,[Object(n["createVNode"])(m,{title:"惊喜任务 边玩边赚",isType:"surprised",onConfirm:xe}),Object(n["createElementVNode"])("img",{src:c.value.domain+c.value.n_day_detail_banner,alt:"",class:"Nbg"},null,8,h),B,c.value.user_reward_record?(Object(n["openBlock"])(),Object(n["createElementBlock"])("div",w,[Object(n["createElementVNode"])("div",S,[x,Object(n["createElementVNode"])("div",T,[Object(n["createTextVNode"])(Object(n["toDisplayString"])(c.value.user_reward_record.total_task_point),1),D])]),C,Object(n["createElementVNode"])("div",I,[z,Object(n["createElementVNode"])("div",F,[Object(n["createTextVNode"])(Object(n["toDisplayString"])(c.value.user_reward_record.total_receive_point),1),H])]),L,Object(n["createElementVNode"])("div",null,[A,Object(n["createElementVNode"])("div",P,[Object(n["createTextVNode"])(Object(n["toDisplayString"])(c.value.user_reward_record.total_day_count),1),M])])])):Object(n["createCommentVNode"])("",!0),Object(n["createElementVNode"])("div",R,[Object(n["createElementVNode"])("div",$,[Object(n["createTextVNode"])(" 今日任务剩余时间 "),Object(n["createVNode"])(k,{ref:"countDownRef",onFinish:d,time:p.value,format:"HH:mm:ss"},{default:Object(n["withCtx"])(e=>[Object(n["createElementVNode"])("span",J,Object(n["toDisplayString"])(e.hours),1),U,Object(n["createElementVNode"])("span",W,Object(n["toDisplayString"])(e.minutes),1),Y,Object(n["createElementVNode"])("span",q,Object(n["toDisplayString"])(e.seconds),1)]),_:1},8,["time"])]),G,Object(n["createElementVNode"])("div",K,[(Object(n["openBlock"])(!0),Object(n["createElementBlock"])(n["Fragment"],null,Object(n["renderList"])(c.value.task_depth_list,(e,t)=>(Object(n["openBlock"])(),Object(n["createElementBlock"])("div",{class:Object(n["normalizeClass"])([t==Object(n["unref"])(j)?"state state4":Object(n["unref"])(j)>t?"state opacity":"state",t==Object(n["unref"])(O)?"bgred":""]),key:t,id:"istabs",onClick:e=>b(t)},[Object(n["createElementVNode"])("div",X,Object(n["toDisplayString"])(e.the_day)+"奖励",1),Object(n["createElementVNode"])("div",Z,[Object(n["createTextVNode"])(" +"+Object(n["toDisplayString"])(e.total_task_reward_point),1),ee]),Object(n["createElementVNode"])("div",te,Object(n["toDisplayString"])(t==Object(n["unref"])(j)?"限时完成":0==e.receive_point&&Object(n["unref"])(j)>t?"未领":e.receive_point>0&&Object(n["unref"])(j)>t?"已领":"数量有限"),1)],10,Q))),128))])]),Object(n["createElementVNode"])("div",ce,[ae,Object(n["createElementVNode"])("div",le,[(Object(n["openBlock"])(!0),Object(n["createElementBlock"])(n["Fragment"],null,Object(n["renderList"])(v.value,(e,t)=>(Object(n["openBlock"])(),Object(n["createElementBlock"])("div",{class:"listBox",key:t},[Object(n["createElementVNode"])("div",se,[Object(n["createElementVNode"])("img",{src:e.app_icon?c.value.domain+e.app_icon:Object(n["unref"])(_.a),alt:"",class:"icon"},null,8,ne),Object(n["createElementVNode"])("div",null,[Object(n["createElementVNode"])("div",oe,Object(n["toDisplayString"])(e.app_name),1),Object(n["createElementVNode"])("div",ie," 打开APP, 试玩"+Object(n["toDisplayString"])(e.duration)+Object(n["toDisplayString"])(1==e.duration_type?"秒":"分钟"),1),99!=e.state||e.is_last_day?(Object(n["openBlock"])(),Object(n["createElementBlock"])("div",de,[be,Object(n["createTextVNode"])("+"+Object(n["toDisplayString"])(e.point)+"金币 ",1)])):(Object(n["openBlock"])(),Object(n["createElementBlock"])("div",re," 不要卸载,明天再来领奖哦～ "))])]),[0,1,2].includes(e.state)?(Object(n["openBlock"])(),Object(n["createElementBlock"])("div",Oe,[2==e.state?(Object(n["openBlock"])(),Object(n["createElementBlock"])("div",{key:0,class:"btn",onClick:t=>Te(e)}," 观看视频 ",8,je)):(Object(n["openBlock"])(),Object(n["createElementBlock"])("div",{key:1,class:"btn",onClick:t=>r(e)},Object(n["toDisplayString"])(0==e.state?"打开试玩":"继续试玩"),9,pe)),e.is_last_day?(Object(n["openBlock"])(),Object(n["createElementBlock"])("div",ue,"最后1天")):(Object(n["openBlock"])(),Object(n["createElementBlock"])("div",me,"已试玩"+Object(n["toDisplayString"])(e.play_day_count)+"天",1))])):Object(n["createCommentVNode"])("",!0),[3,4].includes(e.state)?(Object(n["openBlock"])(),Object(n["createElementBlock"])("div",ke,[Object(n["createElementVNode"])("div",ve,Object(n["toDisplayString"])(4==e.state?"已失效":"已过期"),1),e.is_last_day?(Object(n["openBlock"])(),Object(n["createElementBlock"])("div",_e,"最后1天")):(Object(n["openBlock"])(),Object(n["createElementBlock"])("div",fe,"已试玩"+Object(n["toDisplayString"])(e.play_day_count)+"天",1))])):Object(n["createCommentVNode"])("",!0),99==e.state?(Object(n["openBlock"])(),Object(n["createElementBlock"])("div",ye,[Object(n["createElementVNode"])("div",Ne,[Ee,Object(n["createTextVNode"])("+"),Object(n["createElementVNode"])("span",null,Object(n["toDisplayString"])(e.point),1),Object(n["createTextVNode"])("金币 ")]),e.is_last_day?(Object(n["openBlock"])(),Object(n["createElementBlock"])("div",ge,"最后1天")):(Object(n["openBlock"])(),Object(n["createElementBlock"])("div",Ve,"已试玩"+Object(n["toDisplayString"])(e.play_day_count)+"天",1))])):Object(n["createCommentVNode"])("",!0)]))),128))])]),Object(n["createVNode"])(f,{show:Object(n["unref"])(u["a"])().surpriseTime.show,"onUpdate:show":t[1]||(t[1]=e=>Object(n["unref"])(u["a"])().surpriseTime.show=e),"close-on-click-overlay":!1},{default:Object(n["withCtx"])(()=>[Object(n["createElementVNode"])("div",he,[Object(n["createElementVNode"])("div",Be,[Object(n["createTextVNode"])(" 剩余试玩时间："),Object(n["createElementVNode"])("span",we,Object(n["toDisplayString"])(Object(n["unref"])(N["c"])(Object(n["unref"])(u["a"])().surpriseTime.time,"分","秒")),1)]),Object(n["createElementVNode"])("div",{class:"btn",onClick:t[0]||(t[0]=e=>r(Object(n["unref"])(i)))})]),Object(n["createElementVNode"])("div",{class:"close",onClick:o})]),_:1},8,["show"])])}}},xe=(c("aff3"),c("6b0d")),Te=c.n(xe);const De=Te()(Se,[["__scopeId","data-v-39fd581f"]]);t["default"]=De},f9da:function(e,t,c){e.exports=c.p+"img/N-jin.44c5286b.png"}}]);