frontend_h5/static/js/pages-answer-inner.906a51cb.js

1 line
9.2 KiB
JavaScript
Raw Normal View History

2024-06-17 15:25:46 +08:00
(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},"26c9":function(t,e,i){var n=i("24fb");e=n(!1),e.push([t.i,".startanswer[data-v-38f091d4]{background-image:url(https://pfapi.86698.cn/static/images/ksdt.png)!important;background-size:100% 100%;width:100%;height:100vh;overflow-x:hidden}.chose[data-v-38f091d4]{color:#fff;background:linear-gradient(180deg,#e1f477,#80cd73)}.nochose[data-v-38f091d4]{background:#f6f6f6;color:#333}.mask[data-v-38f091d4]{background:rgba(0,0,0,.6);width:100%;height:100vh;position:fixed;left:0;top:0;z-index:10}.mk2[data-v-38f091d4]{background-image:url(https://pfapi.86698.cn/static/images/dtzj.png);background-size:100% 100%;width:%?472?%;height:%?580?%}.bn[data-v-38f091d4]{background-image:url(https://pfapi.86698.cn/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},"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=[]},"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},6478:function(t,e,i){"use strict";i.d(e,"b",