1 |
- (global["webpackJsonp"]=global["webpackJsonp"]||[]).push([["plugins/gift/receive/receive"],{"1a83":function(t,e,i){"use strict";var n=i("e925"),a=i.n(n);a.a},"219f":function(t,e,i){"use strict";i.r(e);var n=i("4000"),a=i.n(n);for(var o in n)"default"!==o&&function(t){i.d(e,t,(function(){return n[t]}))}(o);e["default"]=a.a},"2ac9":function(t,e,i){"use strict";i.r(e);var n=i("a9d7"),a=i("219f");for(var o in a)"default"!==o&&function(t){i.d(e,t,(function(){return a[t]}))}(o);i("1a83");var r,s=i("f0c5"),u=Object(s["a"])(a["default"],n["b"],n["c"],!1,null,"9bdaf4a6",null,!1,n["a"],r);e["default"]=u.exports},4e3:function(t,e,i){"use strict";(function(t){Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0;var n=o(i("a34a")),a=i("2f62");function o(t){return t&&t.__esModule?t:{default:t}}function r(t,e){var i=Object.keys(t);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(t);e&&(n=n.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),i.push.apply(i,n)}return i}function s(t){for(var e=1;e<arguments.length;e++){var i=null!=arguments[e]?arguments[e]:{};e%2?r(Object(i),!0).forEach((function(e){u(t,e,i[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(i)):r(Object(i)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(i,e))}))}return t}function u(t,e,i){return e in t?Object.defineProperty(t,e,{value:i,enumerable:!0,configurable:!0,writable:!0}):t[e]=i,t}function c(t,e,i,n,a,o,r){try{var s=t[o](r),u=s.value}catch(c){return void i(c)}s.done?e(u):Promise.resolve(u).then(n,a)}function f(t){return function(){var e=this,i=arguments;return new Promise((function(n,a){var o=t.apply(e,i);function r(t){c(o,n,a,r,s,"next",t)}function s(t){c(o,n,a,r,s,"throw",t)}r(void 0)}))}}var l=function(){i.e("plugins/gift/components/announcement/share-gift-text").then(function(){return resolve(i("53ee"))}.bind(null,i)).catch(i.oe)},g=function(){i.e("plugins/gift/components/receive/receive-content").then(function(){return resolve(i("3ce45"))}.bind(null,i)).catch(i.oe)},d={name:"receive",data:function(){return{loading:!1,big:"",small:"",status:"",gift_status:-1,gift_id:-1,gift_detail:{list:{type:"direct_open"}},is_play:!1}},onLoad:function(e){this.$commonLoad.onload(e),this.gift_id=e.gift_id,this.gift_status=e.status,this.$store.dispatch("gift/getConfig",this.$api.gift.config),this.request(),t.hideShareMenu();var i=this;this.innerAudioContext=t.createInnerAudioContext(),this.innerAudioContext.autoplay=!0,this.innerAudioContext.onEnded((function(t){i.is_play=!1}))},onHide:function(){this.is_play=!1,this.innerAudioContext.stop()},onShareAppMessage:function(){return this.hShareAppMessage()},methods:{hShareAppMessage:function(){var t=arguments.length>0&&void 0!==arguments[0]&&arguments[0];return this.$shareAppMessage({path:"/plugins/gift/index/index",title:this.gift_detail.list.bless_word,params:{gift_id:this.gift_id},imageUrl:0===this.gift_detail.is_big_gift?this.gift_detail.list.sendOrder[0].detail[0].goods.goodsWarehouse.cover_pic:this.big_gift_pic},t)},request:function(){var t=this;return f(n.default.mark((function e(){var i,a,o,r,s;return n.default.wrap((function(e){while(1)switch(e.prev=e.next){case 0:return t.$utils.showLoading(),e.next=3,t.$request({url:t.$api.gift.gift,methods:"get",data:{gift_id:t.gift_id}});case 3:i=e.sent,t.$utils.hideLoading(),t.gift_detail=i.data,0!=t.gift_status?"num_open"===t.gift_detail.list.type?0===t.gift_detail.open_status?(t.big="参与成功,等待开奖",t.small="满".concat(t.gift_detail.list.open_num,"人开奖")):0===t.gift_detail.status?(t.big="很遗憾,你未中奖",t.status="未中奖"):(t.big="恭喜你,中奖了",t.status="中奖了"):"time_open"===t.gift_detail.list.type?0===t.gift_detail.open_status?(t.big="参与成功,等待开奖",a=new Date(t.gift_detail.list.open_time.replace(/-/g,"/")),o=a.getMonth()+1,r=a.getDate(),t.small="".concat(o>10?o:"0"+o,"月").concat(r>10?r:"0"+r,"日 ").concat(a.getHours(),":").concat(a.getMinutes()>10?a.getMinutes():"0"+a.getMinutes(),":00 开奖")):0===t.gift_detail.status?(t.big="很遗憾,你未中奖",t.status="未中奖"):(t.big="恭喜你,中奖了",t.status="中奖了"):"direct_open"===t.gift_detail.list.type&&(1===t.gift_detail.status?(t.big="礼物领取成功",t.status="已领取"):(t.big="礼物已被抢光",t.status="已抢光")):(t.big=t.gift_detail.win_goods_name,"time_open"===t.gift_detail.list.type&&(s=new Date(t.gift_detail.list.open_time.replace(/-/g,"/")),t.small="".concat(s.getMonth()+1>10?s.getMonth()+1:"0"+s.getMonth()+1,"月").concat(s.getDate()>10?s.getDate():"0"+s.getDate(),"日 ").concat(s.getHours(),":").concat(s.getMinutes()>10?s.getMinutes():"0"+s.getMinutes(),":00 开奖"))),t.loading=!0;case 8:case"end":return e.stop()}}),e)})))()},play:function(t,e){this.is_play=t,t?(this.innerAudioContext.src=e,this.innerAudioContext.play()):this.innerAudioContext.stop()}},computed:s({},(0,a.mapState)("gift",{theme:function(t){return t.theme},big_gift_pic:function(t){return t.big_gift_pic}})),components:{"share-gift-text":l,"receive-content":g}};e.default=d}).call(this,i("543d")["default"])},a9d7:function(t,e,i){"use strict";var n;i.d(e,"b",(function(){return a})),i.d(e,"c",(function(){return o})),i.d(e,"a",(function(){return n}));var a=function(){var t=this,e=t.$createElement;t._self._c},o=[]},ab29:function(t,e,i){"use strict";(function(t){i("2d0a");n(i("66fd"));var e=n(i("2ac9"));function n(t){return t&&t.__esModule?t:{default:t}}t(e.default)}).call(this,i("543d")["createPage"])},e925:function(t,e,i){}},[["ab29","common/runtime","common/vendor"]]]);
|