skill-cert-activity~25722d37.d4285ca.js 2.5 KB

1
  1. (window.webpackJsonp=window.webpackJsonp||[]).push([[65],{1009:function(t,e,n){"use strict";n.r(e);n(35);var r=n(8),c={data:function(){return{endTime:0,pageNow:Date.now(),serverTime:Date.now(),text:"",timer:null,isShowCountDown:!1}},mounted:function(){this.fetchActivityTime()},watch:{isShowCountDown:function(t){this.$emit("activityStateChange",t)}},methods:{fetchActivityTime:function(){var t=this;return Object(r.a)(regeneratorRuntime.mark((function e(){var n,r;return regeneratorRuntime.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,t.$axios.$post("/uapi/cert/info");case 2:if(1!=(n=e.sent).status){e.next=14;break}if(r=n.data.endtime,t.pageNow=Date.now(),!(r>0)){e.next=10;break}t.isShowCountDown=!0,e.next=12;break;case 10:return t.isShowCountDown=!1,e.abrupt("return");case 12:t.endTime=1e3*r,t.timer=setInterval((function(){var desc=Date.now()-t.pageNow,e=t.endTime-desc;e<=0&&(t.isShowCountDown=!1,t.clearTimer()),t.parseCountDownText(e)}),1e3);case 14:case"end":return e.stop()}}),e)})))()},clearTimer:function(){clearInterval(this.timer),this.timer=null},parseCountDownText:function(t){var e=Math.ceil(t/1e3),n=parseInt(e/86400,10),r=n;e-=24*n*60*60;var c=parseInt(e/3600,10),o=c>9?c:"0"+c;e-=60*c*60;var v=parseInt(e/60,10),w=v>9?v:"0"+v,h=e-=60*v,text="".concat(r,"天").concat(o,"小时").concat(w,"分钟").concat(h,"秒");this.text=text}}},o=(n(878),n(10)),component=Object(o.a)(c,(function(){var t=this,e=t.$createElement,n=t._self._c||e;return t.isShowCountDown?n("div",{staticClass:"activity-area"},[n("div",{staticClass:"activity-container"},[n("div",{staticClass:"activity-title"},[n("span",{staticClass:"text"},[t._v("100%派单限时活动")]),t._v(" "),t.isShowCountDown?n("span",{staticClass:"count-time"},[t._v("(剩余"+t._s(t.text)+")")]):t._e()]),t._v(" "),t._m(0),t._v(" "),n("div",{staticClass:"activity-tips"},[t._v("\n 活动时间:2022年5月5日—2022年8月5日0点\n ")])])]):t._e()}),[function(){var t=this.$createElement,e=this._self._c||t;return e("div",{staticClass:"activity-list"},[e("div",{staticClass:"activity-item"},[e("h6",[this._v("活动(提交时勾选即可):先认证,接单后再付费")]),this._v(" "),e("p",[this._v("\n * 参与技术认证,派单权重提升至最高一档"),e("br"),this._v("\n * 可选择先认证,成功接单并结算后,再支付200%的认证费用\n ")])])])}],!1,null,"a93eccd4",null);e.default=component.exports},609:function(t,e,n){},878:function(t,e,n){"use strict";var r=n(609);n.n(r).a}}]);