frontend_h5/static/js/pages-answer-inner.55502d98.js

1 line
9.3 KiB
JavaScript

(window["webpackJsonp"]=window["webpackJsonp"]||[]).push([["pages-answer-inner"],{"25a3":function(t,e,i){"use strict";i("7a82");var n=i("4ea4").default;Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0,i("a9e3"),i("d401"),i("d3b7"),i("25f0");var a=n(i("8d07")),s={data:function(){return{curindex:-1,ans:[{tit:"分享给好友并访问活动"},{tit:"观看视频不少于15s"},{tit:"AB都是"}],ismask2:!1,acid:"",istrue:!1,cdTime:"",list:[],num:1,score:"",used_minute:"",winfen:0,pname:"",types:null,imgUrl:""}},onLoad:function(t){this.imgUrl=this.api.imgUrl,this.acid=t.id,this.getData()},components:{countme:a.default},methods:{getData:function(){var t=this;uni.showLoading({title:"加载中..."}),this.api.getquestion({id:this.acid}).then((function(e){console.log(e),200==e.data.code?(t.list=e.data.data.item,t.getdown(e.data.data.expire_minute)):(uni.hideLoading(),t.istrue=!0,uni.showToast({title:e.data.message,icon:"none"}))}))},getdown:function(t){var e=this,i=Number(t),n=(new Date).getTime(),a=n+60*i*1e3,s=setInterval((function(){e.cdTime=e.countDown(a),0==e.countDown(a)&&clearInterval(s)}),1e3)},countDown:function(t){var e,i,n=(new Date).getTime(),a=(t-n)/1e3;return a>=0?(e=Math.floor(a/60%60),i=Math.floor(a%60),0==e&&0==i?0:(i.toString().split("").length<2&&(i="0"+i),uni.hideLoading(),this.istrue=!0,e+":"+i)):0},chosewho:function(t){var e=this;e.curindex=t;var i="确认选择,下一题?";this.num==this.list.length&&(i="最后一题,确认提交?"),uni.showModal({title:"确认",content:i,success:function(t){t.confirm?e.goanswer():t.cancel&&(e.curindex=-1,console.log("用户点击取消"))}})},goanswer:function(){uni.showLoading({title:"提交中..."});var t=this;t.api.getanswer({id:t.list[t.num-1].id,answer:[t.list[t.num-1].question_items[t.curindex].answer],finished_flag:t.num==t.list.length}).then((function(e){console.log(e),uni.hideLoading(),200==e.data.code?t.num==t.list.length?(uni.showToast({title:"答题结束",icon:"none",duration:1500}),0==e.data.data.prize.length?(uni.showToast({title:"遗憾,未中奖",icon:"none",duration:1200}),setTimeout((function(){uni.reLaunch({url:"/pages/index/index"})}),1200)):(t.score=e.data.data.score,t.used_minute=e.data.data.used_minute,t.types=e.data.data.prize.type,t.winfen=e.data.data.prize.winningIntegral,2==e.data.data.prize.type&&(t.pname=e.data.data.prize.product.name),t.ismask2=!0),setTimeout((function(){t.ismask2=!0}),1500)):(t.num+=1,t.curindex=-1):(uni.hideLoading(),t.istrue=!0,uni.showToast({title:e.data.message,icon:"none"}))}))},goindex:function(){uni.reLaunch({url:"/pages/index/index"})},closemsk:function(){this.ismask=!1,this.ismask2=!1},callback:function(){console.log(111111111)}}};e.default=s},2662:function(t,e,i){var n=i("91d1");n.__esModule&&(n=n.default),"string"===typeof n&&(n=[[t.i,n,""]]),n.locals&&(t.exports=n.locals);var a=i("4f06").default;a("483e8a58",n,!0,{sourceMap:!1,shadowMode:!1})},"2bae":function(t,e,i){"use strict";i.d(e,"b",(function(){return n})),i.d(e,"c",(function(){return a})),i.d(e,"a",(function(){}));var n=function(){var t=this.$createElement,e=this._self._c||t;return e("v-uni-view",[this._v(this._s(this.cdTime))])},a=[]},"3e4b":function(t,e,i){"use strict";i.d(e,"b",(function(){return n})),i.d(e,"c",(function(){return a})),i.d(e,"a",(function(){}));var n=function(){var t=this,e=t.$createElement,i=t._self._c||e;return t.istrue?i("div",{staticClass:"startanswer flex_column flex_items pos"},[t.ismask2?i("v-uni-view",{staticClass:"mask flex_items flex_center"},[i("v-uni-view",{staticClass:"mk2 pos"},[i("v-uni-image",{staticClass:"abs",staticStyle:{width:"138rpx",height:"124rpx",left:"-50rpx",top:"-50rpx"},attrs:{src:t.imgUrl+"gift.png",mode:""}}),i("v-uni-image",{staticClass:"abs",staticStyle:{width:"112rpx",height:"32rpx",left:"50%",transform:"translate(-50%)",top:"10rpx"},attrs:{src:t.imgUrl+"cg.png"}}),i("v-uni-view",{staticClass:"flex_column flex_items"},[i("v-uni-text",{staticClass:"bold f40 mt80",staticStyle:{color:"#333"}},[t._v("您的成绩为"+t._s(t.score)+"分")]),i("v-uni-text",{staticClass:"f28 mt20",staticStyle:{color:"#333"}},[t._v("达到该成绩用时:"+t._s(t.used_minute)+"分")]),i("v-uni-text",{staticClass:"f28 mt10",staticStyle:{color:"#333"}},[t._v("击败全部99%的用户")]),i("v-uni-view",{staticClass:"flex_items flex_center"},[i("v-uni-view",{staticClass:"flex_between flex_items mt40",staticStyle:{width:"220rpx"}},[1==t.types?i("v-uni-text",{staticClass:"bold f24",staticStyle:{color:"#93D574"}},[t._v(t._s(t.winfen))]):t._e(),1==t.types?i("v-uni-text",{staticClass:"f24",staticStyle:{color:"#93D574"}},[t._v("积分兑换券")]):t._e(),2==t.types?i("v-uni-text",{staticClass:"f24",staticStyle:{color:"#93D574"}},[t._v("获得:")]):t._e(),2==t.types?i("v-uni-text",{staticClass:"f24",staticStyle:{color:"#93D574"}},[t._v(t._s(t.pname))]):t._e()],1)],1)],1),i("v-uni-view",{staticClass:"abs bn flex_center",on:{click:function(e){arguments[0]=e=t.$handleEvent(e),t.goindex.apply(void 0,arguments)}}},[i("v-uni-image",{staticClass:"mt20",staticStyle:{width:"160rpx",height:"40rpx"},attrs:{src:t.imgUrl+"ky.png",mode:""}})],1)],1)],1):t._e(),i("div",{staticClass:"flex_start flex_items mt50"},[i("v-uni-text",{staticClass:"bold",staticStyle:{color:"#333","font-size":"60rpx"}},[t._v("倒计时")]),i("v-uni-text",{staticClass:"ml35 bold",staticStyle:{color:"#7BCB7A","font-size":"70rpx"}},[t._v(t._s(t.cdTime))])],1),i("div",{staticClass:"flex_items flex_center mt80 pos",staticStyle:{"z-index":"2"}},[i("div",{staticClass:"bgwhite pos flex_column flex_items",staticStyle:{width:"658rpx",height:"814rpx","box-shadow":"0rpx 28rpx 64rpx 0rpx rgba(163,199,143,0.65)","border-radius":"52rpx"}},[i("v-uni-image",{staticClass:"abs",staticStyle:{width:"110rpx",height:"110rpx",left:"50%",transform:"translate(-50%)",top:"-55rpx"},attrs:{src:t.imgUrl+"duigou.png",mode:""}}),i("div",{staticClass:"flex_start flex_items mt80"},[i("v-uni-text",{staticClass:"f24",staticStyle:{color:"#7CCB72"}},[t._v("第"+t._s(t.num)+"题")]),i("div",{staticClass:"ml10",staticStyle:{height:"26rpx",width:"1px",background:"#b2b2b2"}}),i("v-uni-text",{staticClass:"f24 ml10",staticStyle:{color:"#9E9E9E"}},[t._v("共"+t._s(t.list.length)+"题")])],1),i("div",{staticClass:"flex_column flex_items mt20",staticStyle:{width:"calc(100% - 90rpx)"}},[i("v-uni-text",{staticClass:"f40 mb10",staticStyle:{color:"#333"}},[t._v(t._s(t.list[t.num-1].question_name))]),t._l(t.list[t.num-1].question_items,(function(e,n){return i("div",{key:n,class:["f-center","mt30","f30",n==t.curindex?"chose":"nochose"],staticStyle:{width:"542rpx",height:"86rpx","line-height":"86rpx","border-radius":"43rpx"},on:{click:function(e){arguments[0]=e=t.$handleEvent(e),t.chosewho(n)}}},[t._v(t._s(e.item))])}))],2)],1)]),i("div",{staticClass:"abs",staticStyle:{width:"100%",left:"0",bottom:"0"}},[i("v-uni-image",{staticStyle:{width:"100%",height:"470rpx"},attrs:{src:t.imgUrl+"bbm.png",mode:""}})],1),i("Ywatermark",{attrs:{info:"蓝色兄弟"}})],1):t._e()},a=[]},"611d":function(t,e,i){"use strict";i.r(e);var n=i("c6d4"),a=i.n(n);for(var s in n)["default"].indexOf(s)<0&&function(t){i.d(e,t,(function(){return n[t]}))}(s);e["default"]=a.a},"7ba3":function(t,e,i){"use strict";i.r(e);var n=i("25a3"),a=i.n(n);for(var s in n)["default"].indexOf(s)<0&&function(t){i.d(e,t,(function(){return n[t]}))}(s);e["default"]=a.a},"8d07":function(t,e,i){"use strict";i.r(e);var n=i("2bae"),a=i("611d");for(var s in a)["default"].indexOf(s)<0&&function(t){i.d(e,t,(function(){return a[t]}))}(s);var o=i("f0c5"),c=Object(o["a"])(a["default"],n["b"],n["c"],!1,null,"c5178940",null,!1,n["a"],void 0);e["default"]=c.exports},"91d1":function(t,e,i){var n=i("24fb");e=n(!1),e.push([t.i,".startanswer[data-v-ce67dee6]{background-image:url(http://jifenshop1.test.86698.cn/api/static/images/ksdt.png)!important;background-size:100% 100%;width:100%;height:100vh;overflow-x:hidden}.chose[data-v-ce67dee6]{color:#fff;background:linear-gradient(180deg,#e1f477,#80cd73)}.nochose[data-v-ce67dee6]{background:#f6f6f6;color:#333}.mask[data-v-ce67dee6]{background:rgba(0,0,0,.6);width:100%;height:100vh;position:fixed;left:0;top:0;z-index:10}.mk2[data-v-ce67dee6]{background-image:url(http://jifenshop1.test.86698.cn/api/static/images/dtzj.png);background-size:100% 100%;width:%?472?%;height:%?580?%}.bn[data-v-ce67dee6]{background-image:url(http://jifenshop1.test.86698.cn/api/static/images/bn.png);background-size:100% 100%;width:%?308?%;height:%?120?%;left:50%;-webkit-transform:translate(-50%);transform:translate(-50%);bottom:%?40?%;line-height:%?120?%}",""]),t.exports=e},c6d4:function(t,e,i){"use strict";i("7a82"),Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0,i("d401"),i("d3b7"),i("25f0");var n={data:function(){return{cdTime:""}},onLoad:function(){var t=this,e=(new Date).getTime(),i=e+3e5,n=setInterval((function(){t.cdTime=countDown(i),0==countDown(i)&&clearInterval(n)}),1e3)},methods:{countDown:function(t){var e,i,n=(new Date).getTime(),a=(t-n)/1e3;return a>=0?(e=Math.floor(a/60%60),i=Math.floor(a%60),0==e&&0==i?0:(i.toString().split("").length<2&&(i="0"+i),"0"+e+":"+i)):0}}};e.default=n},cfd1:function(t,e,i){"use strict";var n=i("2662"),a=i.n(n);a.a},f08b:function(t,e,i){"use strict";i.r(e);var n=i("3e4b"),a=i("7ba3");for(var s in a)["default"].indexOf(s)<0&&function(t){i.d(e,t,(function(){return a[t]}))}(s);i("cfd1");var o=i("f0c5"),c=Object(o["a"])(a["default"],n["b"],n["c"],!1,null,"ce67dee6",null,!1,n["a"],void 0);e["default"]=c.exports}}]);