webpackJsonp([38],{"569H":function(e,t,o){(e.exports=o("FZ+f")(!1)).push([e.i,'\n.header[data-v-69998ba9] {\n  position: fixed;\n}\n.content[data-v-69998ba9] {\n  padding-top: 4rem;\n}\n.goodscoupon[data-v-69998ba9] {\n  padding: 2.25rem 4.375rem;\n}\n.coupon-box[data-v-69998ba9] {\n  position: relative;\n  width: 100%;\n  height: 17.08333rem;\n  background-image: url("https://static.xidibuy.com/m/static/global/images/1.0.0/getCoupon.png");\n  background-size: 100% 100%;\n}\n.coupon-box .coupon-label[data-v-69998ba9] {\n    width: 100%;\n    height: 53.66%;\n    display: -webkit-box;\n    display: -ms-flexbox;\n    display: flex;\n    -webkit-box-orient: vertical;\n    -webkit-box-direction: normal;\n        -ms-flex-direction: column;\n            flex-direction: column;\n    -webkit-box-pack: center;\n        -ms-flex-pack: center;\n            justify-content: center;\n    -webkit-box-align: center;\n        -ms-flex-align: center;\n            align-items: center;\n}\n.coupon-box .coupon-label .label-faceVal[data-v-69998ba9] {\n      font-size: 2.08333rem;\n      color: #fff;\n      text-align: center;\n      line-height: 1;\n}\n.coupon-box .coupon-label .label-faceVal span[data-v-69998ba9] {\n        font-size: 5.33333rem;\n}\n.coupon-box .coupon-label .label-condition[data-v-69998ba9] {\n      margin-top: 2%;\n      font-size: 1.33333rem;\n      line-height: 1;\n      color: #fff;\n      text-align: center;\n}\n.coupon-box .coupon-content[data-v-69998ba9] {\n    position: absolute;\n    top: 63%;\n    width: 100%;\n}\n.coupon-box .coupon-content .coupon-item[data-v-69998ba9] {\n      font-size: 1.08333rem;\n      line-height: 1.6;\n      color: #222222;\n      margin-top: 2%;\n      width: 100%;\n      display: -webkit-box;\n      display: -ms-flexbox;\n      display: flex;\n}\n.coupon-box .coupon-content .coupon-item[data-v-69998ba9]:first-child {\n        margin-top: 0;\n}\n.coupon-box .coupon-content .coupon-item .coupon-left[data-v-69998ba9] {\n        margin-left: 4%;\n}\n.coupon-box .coupon-content .coupon-item .coupon-right[data-v-69998ba9] {\n        margin-left: 0.83333rem;\n        max-width: 65%;\n        overflow: hidden;\n        display: -webkit-box;\n        -webkit-line-clamp: 2;\n        -webkit-box-orient: vertical;\n}\n.coupon-box .coupon-content .coupon-item[data-v-69998ba9]::after {\n        content: "";\n        clear: both;\n        width: 0;\n        height: 0;\n        overflow: hidden;\n        display: block;\n}\n.coupon-box .coupon-status[data-v-69998ba9] {\n    position: absolute;\n    top: 1%;\n    right: 1.5%;\n    width: 25.19%;\n    height: 32.68%;\n    background-image: url("https://static.xidibuy.com/m/static/global/images/1.0.0/received.png");\n    background-size: 100% 100%;\n}\n.coupon-btn[data-v-69998ba9] {\n  margin-top: 1.58333rem;\n  width: 100%;\n  height: 2.83333rem;\n  background-color: #ff958e;\n  color: #fff;\n  font-size: 1.41667rem;\n  text-align: center;\n  line-height: 2.83333rem;\n}\n.goodscoupon .receive_suc[data-v-69998ba9], .goodscoupon .receive_fail[data-v-69998ba9] {\n  padding-top: 7.5rem;\n  text-align: center;\n}\n.goodscoupon .receive_suc p[data-v-69998ba9], .goodscoupon .receive_fail p[data-v-69998ba9] {\n    color: #777777;\n    font-size: 1.16667rem;\n}\n.goodscoupon .receive_suc .receive_img[data-v-69998ba9], .goodscoupon .receive_fail .receive_img[data-v-69998ba9] {\n    text-align: center;\n}\n.goodscoupon .receive_suc .receive_text[data-v-69998ba9], .goodscoupon .receive_fail .receive_text[data-v-69998ba9] {\n    padding: 2.5rem 0;\n}\n.goodscoupon .receive_suc .receive_text .text_res[data-v-69998ba9], .goodscoupon .receive_fail .receive_text .text_res[data-v-69998ba9] {\n      font-size: 1.58333rem;\n      color: #222222;\n      font-weight: bold;\n      padding-bottom: 1.25rem;\n}\n.goodscoupon .receive_suc .receive_text .text_res b[data-v-69998ba9], .goodscoupon .receive_fail .receive_text .text_res b[data-v-69998ba9] {\n        color: #ff6a42;\n        font-size: 1.66667rem;\n}\n.goodscoupon .receive_suc .receive_submit[data-v-69998ba9], .goodscoupon .receive_fail .receive_submit[data-v-69998ba9] {\n    padding: 0 6.5%;\n}\n.goodscoupon .receive_suc .receive_submit .submit_but[data-v-69998ba9], .goodscoupon .receive_fail .receive_submit .submit_but[data-v-69998ba9] {\n      display: block;\n      margin-bottom: 1.25rem;\n}\n.goodscoupon .receive_suc img[data-v-69998ba9] {\n  width: 9.58333rem;\n  height: 9.58333rem;\n}\n.goodscoupon .receive_fail img[data-v-69998ba9] {\n  width: 10rem;\n  height: 10rem;\n}\n#color_new[data-v-69998ba9] {\n  color: #3366cc;\n}\n',""])},XsPT:function(e,t,o){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n=o("mvHQ"),i=o.n(n),a=o("xMe2"),s=o("YhRe"),c=o("sHg/"),r={name:"getCoupon",data:function(){return{list:"",arrSub:{},errTitle:"",errMsg:"",showFail:!1,errorMsg:{isShow:!1,content:""},haveData:!1,haveExchange:!1,use_time:1,clearTimeJump:0}},beforeMount:function(){this.skipToPC(this.$route)},mounted:function(){c.default.tongji(this.ENVIRONMENT)},activated:function(){this.loadData()},deactivated:function(){this.clearTimeJump&&clearTimeout(this.clearTimeJump),this.closeLogoTips()},beforeDestroy:function(){window.clearInterval(this.timer)},components:{LogoTips:s.a},methods:{loadData:function(){var e=this,t={tid:e.$route.query.tid||""};e.arrSub=t,a.a.getGoodsCoupon(t,function(t){0==t.code?(e.list=t.data,e.haveData=!0,e.haveExchange=0!=t.data.isCouponReceived,e.use_time=t.data.use_time,2==t.data.status?(e.showFail=!0,e.errTitle="活动已结束",e.errMsg="请您下次要早点来哦~~"):e.showFail=!1):alert(t.msg)})},handleLogin:function(){var e=this.$route.path,t=i()(this.$route.query);this.gotoLogin(e,t)},gotoBack:function(){this.goBack()},exchange:function(e,t,o,n,i){var s=this,c=s.arrSub;a.a.exchangeGoodsCoupon(c,function(e){0==e.code?(s.haveExchange=!0,s.use_time=0,s.showFail=!1,s.errorMsg.isShow=!0,s.errorMsg.content="领取成功",s.clearTimeJump=setTimeout(function(){s.closeLogoTips(),s.pageJump(t,o,n,i)},2e3)):-1==e.code?(s.showFail=!0,s.errTitle="领取失败",s.errMsg="啊哦，领取失败，再试试~~"):-11705==e.code?(s.showFail=!0,s.errTitle="领取失败",s.errMsg="今天您已领取，明天再来吧~~"):-11704==e.code?(s.showFail=!0,s.errTitle="领取失败",s.errMsg="该活动您已参加，不要贪心哦~~"):-504==e.code||-10052==e.code?(s.errorMsg.isShow=!0,s.errorMsg.content="用户未登录",s.handleLogin()):(s.errorMsg.isShow=!0,s.errorMsg.content=e.msg)})},closeLogoTips:function(){this.errorMsg.isShow=!1,this.errorMsg.content=""},pageJump:function(e,t,o,n){0==e?this.$router.push("/"):3==e||4==e?this.$router.push({name:"detail",params:{goodsId:n}}):this.$router.push({path:"/coupon/goods",query:{use_type:e,sns:i()(t),title:o}})}}},l={render:function(){var e=this,t=e.$createElement,o=e._self._c||t;return e.haveData?o("div",{directives:[{name:"wechat-title",rawName:"v-wechat-title",value:e.$route.meta.title,expression:"$route.meta.title"}],staticClass:"goodsCoupon"},[o("header",{staticClass:"header headFixed"},[o("a",{staticClass:"icon icon_back",attrs:{"xa-click":"favourite|m-memberSpace"},on:{click:e.gotoBack}}),e._v(" "),e._m(0)]),e._v(" "),e.countObjectSize(e.list)?o("section",{staticClass:"content"},[e.showFail?o("div",{staticClass:"goodscoupon"},[o("div",{staticClass:"receive_fail"},[e._m(1),e._v(" "),o("div",{staticClass:"receive_text"},[o("div",{staticClass:"text_res"},[e._v(e._s(e.errTitle))]),e._v(" "),o("p",[e._v(e._s(e.errMsg))])])])]):o("div",{staticClass:"goodscoupon"},[o("div",{staticClass:"coupon-box"},[o("div",{staticClass:"coupon-label"},[[e.list.coupon_type?o("p",{staticClass:"label-faceVal"},[o("span",[e._v(e._s(e.list.coupon_discount))]),e._v("折")]):o("p",{staticClass:"label-faceVal"},[e._v("¥"),o("span",[e._v(e._s(e.list.face_value))])])],e._v(" "),0!=e.list.door_sill?o("p",{staticClass:"label-condition"},[e._v("满"+e._s(e.list.door_sill)+"元可用")]):e._e(),e._v(" "),0==e.list.door_sill&&1!=e.list.coupon_type?o("p",{staticClass:"label-condition"},[e._v("无金额门槛")]):e._e()],2),e._v(" "),o("div",{staticClass:"coupon-content"},[o("div",{staticClass:"coupon-item"},[o("p",{staticClass:"coupon-left"},[e._v("使用说明：")]),e._v(" "),o("p",{staticClass:"coupon-right",attrs:{id:"color_new"},domProps:{textContent:e._s(e.list.direction)},on:{click:function(t){e.pageJump(e.list.use_type,e.list.sns,e.list.title,e.list.goodsId)}}})]),e._v(" "),o("div",{staticClass:"coupon-item"},[o("p",{staticClass:"coupon-left"},[e._v("使用日期：")]),e._v(" "),2==e.list.valid_type?o("p",{staticClass:"coupon-right"},[e._v("领取后"+e._s(e.list.valid_day)+"天内有效")]):o("p",{staticClass:"coupon-right"},[e._v(e._s(e.list.valid_start)+"-"+e._s(e.list.valid_end))])])]),e._v(" "),e.haveExchange&&0==e.use_time?o("div",{staticClass:"coupon-status"}):e._e()]),e._v(" "),!e.haveExchange||e.haveExchange&&0!=e.use_time?o("div",{staticClass:"coupon-btn",on:{click:function(t){e.exchange(e.list.valid_day,e.list.use_type,e.list.sns,e.list.title,e.list.goodsId)}}},[e._v("立即领取")]):e._e(),e._v(" "),e.haveExchange&&0==e.use_time?o("div",{staticClass:"coupon-btn",on:{click:function(t){e.pageJump(e.list.use_type,e.list.sns,e.list.title,e.list.goodsId)}}},[e._v("立即使用")]):e._e()])]):e._e(),e._v(" "),o("logo-tips",{attrs:{content:e.errorMsg.content,isShowErrormsg:e.errorMsg.isShow},on:{closeLogoTips:e.closeLogoTips}})],1):e._e()},staticRenderFns:[function(){var e=this.$createElement,t=this._self._c||e;return t("h2",{staticClass:"header-title",attrs:{id:"hd-pageName"}},[t("p",[this._v("优惠券领取")])])},function(){var e=this.$createElement,t=this._self._c||e;return t("div",{staticClass:"receive_img"},[t("img",{attrs:{src:"//static.xidibuy.com/m/static/global/images/1.0.0/goodscoupon-err.png"}})])}]};var d=o("VU/8")(r,l,!1,function(e){o("rWry")},"data-v-69998ba9",null);t.default=d.exports},rWry:function(e,t,o){var n=o("569H");"string"==typeof n&&(n=[[e.i,n,""]]),n.locals&&(e.exports=n.locals);o("rjj0")("34b93832",n,!0,{})}});