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IwMTggKFdpbmRvd3MpIj4gPHhtcE1NOkRlcml2ZWRGcm9tIHN0UmVmOmluc3RhbmNlSUQ9InhtcC5paWQ6NDRmMWQxNmItZTIxMC1lYzQwLWJmODYtYzE4OWRiYzNmOGYyIiBzdFJlZjpkb2N1bWVudElEPSJ4bXAuZGlkOjhiZDMxNDU3LTUwZjYtYWY0My1iZjhiLWQ1ZGNlMzFkODkxNSIvPiA8L3JkZjpEZXNjcmlwdGlvbj4gPC9yZGY6UkRGPiA8L3g6eG1wbWV0YT4gPD94cGFja2V0IGVuZD0iciI/PjImVg8AAAE3SURBVHja7JUxS0JhFIaPH7q03CUEB3HIUVxqcnEU/4O42F9oddCt/+CQ9BuiNaGmpnBssSgyCCqoxeH2nnwHC+65N8pAOC883Mvh5XC+j8P35ua7O5GIVGSpGXgpXl7Lqh73qvopgyZLZ+D2u2/FWwNdlsZgmtCzAfosDcCF0bMNRiz1AocukIokS4feIk2xpUNHpGv4dOht0k/pqUOXyCjI+pX7Y9+nN3A9FmRmmCfgHbzx35Kuxyt4BkeGbwiedBu4Kpb2wQO401XJ606DqwynvAHHGW9kCg4y+M5BK2PPE67J8srjOJZNVJANlQ/+38rzcf+ihLBI9f3E+9uegSFRJ5FxSE3ODimnXIgm5yGpGT5NzlPSSOmpyXlP2p6cnpyenP6O++CenJ6cnpyenGtIzg8BBgD9k45TMQlA3wAAAABJRU5ErkJggg=="},3946:function(t,a,i){"use strict";i.r(a);var e=function(){var t=this,a=t.$createElement,e=t._self._c||a;return e("div",{staticClass:"bargain"},[e("div",{class:[t.bargainPartake!=t.userInfo.uid?"header on":"header"]},[e("div",{staticClass:"people"},[t._v("\n "+t._s(t.lookCount)+"人查看 丨 "+t._s(t.shareCount)+"人分享 丨 "+t._s(t.userCount)+"人参与\n ")]),t.bargainPartake!=t.userInfo.uid?e("div",{staticClass:"pictxt acea-row row-center-wrapper"},[e("div",{staticClass:"pictrue"},[e("img",{attrs:{src:t.bargainUserInfo.avatar}})]),e("div",{staticClass:"text"},[t._v("\n "+t._s(t.bargainUserInfo.nickname)+"\n "),e("span",[t._v("邀请您帮忙砍价")])])]):e("CountDown",{attrs:{"is-day":!0,"tip-text":"倒计时 ","day-text":" 天 ","hour-text":" 时 ","minute-text":" 分 ","second-text":" 秒",datatime:t.datatime}})],1),e("div",{staticClass:"wrapper"},[e("div",{staticClass:"pictxt acea-row row-between-wrapper"},[e("div",{staticClass:"pictrue"},[e("img",{attrs:{src:t.bargain.image}})]),e("div",{staticClass:"text acea-row row-column-around"},[e("div",{staticClass:"line2",domProps:{textContent:t._s(t.bargain.title)}}),e("div",{staticClass:"money font-color-red"},[t._v("\n 已砍至: ¥\n "),e("span",{staticClass:"num",domProps:{textContent:t._s(t.price)}})]),e("div",{staticClass:"acea-row row-middle"},[e("div",{staticClass:"successNum",domProps:{textContent:t._s("原价"+t.bargain.price)}}),e("div",{staticClass:"successNum",domProps:{textContent:t._s("已有"+t.bargainSumCount+"人砍价成功")}})])])]),e("div",{staticClass:"cu-progress acea-row row-middle round margin-top"},[e("div",{staticClass:"acea-row row-middle bg-red",style:{width:t.loading?t.pricePercent+"%":""}})]),e("div",{staticClass:"balance acea-row row-between-wrapper"},[e("div",{domProps:{textContent:t._s("已砍"+t.alreadyPrice+"元")}}),0===t.surplusPrice?e("div",[t._v("砍价成功")]):e("div",{domProps:{textContent:t._s("还剩"+t.surplusPrice+"元")}})]),t.bargainPartake===t.userInfo.uid&&t.surplusPrice>0?e("div",{staticClass:"bargainBnt",on:{click:t.goPoster}},[t._v("\n 邀请好友帮砍价\n ")]):t.bargainPartake!=t.userInfo.uid?e("div",{staticClass:"bargainBnt",on:{click:t.getBargainHelp}},[t._v("\n 帮好友砍一刀\n ")]):t._e(),t.bargainPartake!=t.userInfo.uid?e("div",{staticClass:"bargainBnt",on:{click:t.getBargainStart}},[t._v("\n 开启砍价\n ")]):t._e(),0===t.surplusPrice&&t.bargainPartake===t.userInfo.uid&&1===t.userBargainStatus?e("div",{staticClass:"bargainBnt",on:{click:t.goPay}},[t._v("\n 立即支付\n ")]):t._e(),e("div",{staticClass:"bargainBnt on",on:{click:t.goList}},[t._v("抢更多商品")]),e("div",{staticClass:"tip"},[t._v("\n 已有\n "),e("span",{staticClass:"font-color-red",domProps:{textContent:t._s(t.helpCount)}}),t._v("\n 位好友成功帮您砍价\n ")]),e("div",{staticClass:"lock"})]),e("div",{staticClass:"bargainGang"},[t._m(0),e("div",{staticClass:"list"},t._l(t.bargainHelpList,function(a,i){return e("div",{key:i,staticClass:"item acea-row row-between-wrapper"},[e("div",{staticClass:"pictxt acea-row row-between-wrapper"},[e("div",{staticClass:"pictrue"},[e("img",{attrs:{src:a.avatar}})]),e("div",{staticClass:"text"},[e("div",{staticClass:"name line1",domProps:{textContent:t._s(a.nickname)}}),e("div",{staticClass:"line1",domProps:{textContent:t._s(a.add_time)}})])]),e("div",{staticClass:"money font-color-red"},[e("span",{staticClass:"iconfont icon-kanjia"}),t._v("\n 砍掉"+t._s(a.price)+"元\n ")])])}),0),t.helpListStatus||t.helpListLoading?t._e():e("div",{staticClass:"load font-color-red",on:{click:t.getBargainHelpList}},[t._v("\n 点击加载更多\n ")]),e("div",{staticClass:"lock"})]),e("div",{staticClass:"goodsDetails"},[t._m(1),e("div",{staticClass:"conter",domProps:{innerHTML:t._s(t.bargain.description)}}),e("div",{staticClass:"lock"})]),e("div",{staticClass:"goodsDetails"},[t._m(2),e("div",{staticClass:"conter",domProps:{innerHTML:t._s(t.bargain.rule)}})]),e("div",{staticClass:"bargainTip",class:!0===t.active?"on":""},[e("div",{staticClass:"pictrue"},[e("img",{attrs:{src:i("4fb4")}}),e("div",{staticClass:"iconfont icon-guanbi",on:{click:t.close}})]),t.bargainPartake===t.userInfo.uid?e("div",{staticClass:"cutOff"},[t._v("\n 您已砍掉\n "),e("span",{staticClass:"font-color-red",domProps:{textContent:t._s(t.bargainHelpPrice)}}),t._v("元,听说分享次数越多砍价成功的机会越大哦!\n ")]):e("div",{staticClass:"cutOff on"},[e("div",{staticClass:"help font-color-red",domProps:{textContent:t._s("成功帮砍"+t.bargainHelpPrice+"元")}}),t._v("\n ,您也可以砍价低价拿哦,快去挑选心仪的商品吧~\n ")]),t.bargainPartake===t.userInfo.uid?e("div",{staticClass:"tipBnt",on:{click:t.goPoster}},[t._v("\n 邀请好友帮砍价\n ")]):e("div",{staticClass:"tipBnt",on:{click:t.getBargainStart}},[t._v("我也要参与")])]),e("div",{staticClass:"mask",attrs:{hidden:!1===t.active},on:{touchmove:function(t){t.preventDefault()},click:t.close}})])},n=[function(){var t=this,a=t.$createElement,e=t._self._c||a;return e("div",{staticClass:"title font-color-red acea-row row-center-wrapper"},[e("div",{staticClass:"pictrue"},[e("img",{attrs:{src:i("34eb")}})]),e("div",{staticClass:"titleCon"},[t._v("砍价帮")]),e("div",{staticClass:"pictrue on"},[e("img",{attrs:{src:i("34eb")}})])])},function(){var t=this,a=t.$createElement,e=t._self._c||a;return e("div",{staticClass:"title font-color-red acea-row row-center-wrapper"},[e("div",{staticClass:"pictrue"},[e("img",{attrs:{src:i("34eb")}})]),e("div",{staticClass:"titleCon"},[t._v("商品详情")]),e("div",{staticClass:"pictrue on"},[e("img",{attrs:{src:i("34eb")}})])])},function(){var t=this,a=t.$createElement,e=t._self._c||a;return e("div",{staticClass:"title font-color-red acea-row row-center-wrapper"},[e("div",{staticClass:"pictrue"},[e("img",{attrs:{src:i("34eb")}})]),e("div",{staticClass:"titleCon"},[t._v("活动规则")]),e("div",{staticClass:"pictrue on"},[e("img",{attrs:{src:i("34eb")}})])])}],s=(i("7f7f"),i("5608")),r=i("ca41"),o=i("73f5"),c=i("2f62"),l=i("74f9"),d=i("ed08"),u="DargainDetails",g={name:"DargainDetails",components:{CountDown:s["a"]},props:{},data:function(){return{price:0,bargainId:0,bargainPartake:0,bargain:[],bargainSumCount:0,activeMsg:"",active:!1,loading:!1,datatime:0,lookCount:0,shareCount:0,userCount:0,bargainHelpPrice:0,bargainHelpList:[],helpListStatus:!1,helpListLoading:!1,page:1,limit:2,helpCount:0,surplusPrice:0,alreadyPrice:0,pricePercent:0,bargainUserInfo:[],userBargainStatus:2}},computed:Object(c["b"])(["userInfo","isLogin"]),watch:{$route:function(t){var a=this;t.name===u&&a.mountedStart()}},mounted:function(){var t=this;t.mountedStart(),setTimeout(function(){t.loading=!0},500)},methods:{mountedStart:function(){var t=this;t.bargainId=t.$route.params.id;var a=parseInt(t.$route.params.partake);void 0===a||a<=0||isNaN(a)?(t.bargainPartake=t.userInfo.uid,t.$router.push({path:"/activity/dargain_detail/"+t.bargainId+"/"+t.bargainPartake})):t.bargainPartake=parseInt(a),t.getBargainHelpCountStart(),t.getBargainDetail(),t.getBargainShare(0),t.bargainPartake===t.userInfo.uid?t.getBargainStart():t.getBargainStartUser()},setOpenShare:function(){var t=this,a={desc:"您的好友"+t.userInfo.nickname+"邀请您砍价",title:t.bargain.title,link:window.location.protocol+"//"+window.location.host+t.$router.currentRoute.path,imgUrl:t.bargain.image},i={title:"您的好友"+t.userInfo.nickname+"邀请您砍价"+t.bargain.title,link:window.location.protocol+"//"+window.location.host+t.$router.currentRoute.path,imgUrl:t.bargain.image};!0===Object(d["d"])()&&(console.log(1111),Object(l["ready"])().then(function(){console.log(2222),Object(l["openShareAppMessage"])(a),Object(l["openShareTimeline"])(i)}))},updateTitle:function(){document.title=this.bargain.title||this.$route.meta.title},goPay:function(){var t=this,a={},i=this;a.productId=i.bargain.product_id,a.cartNum=i.bargain.num,a.uniqueId="",a.bargainId=i.bargainId,a.new=1,Object(o["m"])(a).then(function(t){i.$router.push({path:"/order/submit/"+t.data.cartId})}).catch(function(a){t.$dialog.error(a.msg)})},goPoster:function(){var t=this;t.getBargainShare(t.bargainId),this.$router.push({path:"/activity/poster/"+t.bargainId+"/2"})},goList:function(){this.$router.push({path:"/activity/bargain"})},getBargainShare:function(t){var a=this;Object(r["h"])({bargainId:t}).then(function(t){a.lookCount=t.data.lookCount,a.shareCount=t.data.shareCount,a.userCount=t.data.userCount})},getBargainDetail:function(){var t=this;Object(r["a"])(t.bargainId).then(function(a){t.$set(t,"bargain",a.data.bargain),t.updateTitle(),t.datatime=t.bargain.stop_time,t.getBargainHelpCount(),t.setOpenShare()}).catch(function(a){t.$dialog.error(a.msg)})},getBargainStart:function(){var t=this;Object(r["i"])({bargainId:t.bargainId}).then(function(){t.bargainPartake=t.userInfo.uid,t.getBargainHelp()}).catch(function(a){t.$dialog.error(a.msg)})},getBargainHelp:function(){var t=this;if(0===t.surplusPrice&&t.bargainPartake!==t.userInfo.uid)return t.$dialog.success("好友已经砍价成功");var a={bargainId:t.bargainId,bargainUserUid:t.bargainPartake};Object(r["b"])(a).then(function(a){if(t.activeMsg=a.data.status,"SUCCESSFUL"===a.data.status&&t.bargainPartake!==t.userInfo.uid)return t.$dialog.toast({mes:"您已经砍过了"});t.helpListStatus=!1,t.page=1,t.bargainHelpList=[],t.getBargainHelpPrice()}).catch(function(a){t.$dialog.error(a.msg)})},getBargainHelpPrice:function(){var t=this;Object(r["e"])({bargainId:t.bargainId,bargainUserUid:t.bargainPartake}).then(function(a){switch(t.bargainHelpPrice=a.data.price,t.getBargainHelpCount(),t.getBargainHelpList(),t.activeMsg){case"SUCCESSFUL":break;case"SUCCESS":t.active=!0;break}}).catch(function(a){t.$dialog.error(a.msg)})},getBargainHelpList:function(){var t=this;!0!==t.helpListLoading&&!0!==t.helpListStatus&&(t.helpListLoading=!0,Object(r["d"])({bargainId:t.bargainId,bargainUserUid:t.bargainPartake,page:t.page,limit:t.limit}).then(function(a){t.helpListStatus=a.data.length0?(i=!0===t.isDay?Math.floor(a/86400):0,e=Math.floor(a/3600)-24*i,n=Math.floor(a/60)-24*i*60-60*e,s=Math.floor(a)-24*i*60*60-60*e*60-60*n,e<=9&&(e="0"+e),n<=9&&(n="0"+n),s<=9&&(s="0"+s),t.day=i,t.hour=e,t.minute=n,t.second=s):(t.day="00",t.hour="00",t.minute="00",t.second="00")}a(),setInterval(a,1e3)}}}),r=s,o=i("2877"),c=Object(o["a"])(r,e,n,!1,null,null,null);a["a"]=c.exports}}]); //# sourceMappingURL=chunk-df045abc.ed33cae0.js.map