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DIDIwMTggKFdpbmRvd3MpIj4gPHhtcE1NOkRlcml2ZWRGcm9tIHN0UmVmOmluc3RhbmNlSUQ9InhtcC5paWQ6NDRmMWQxNmItZTIxMC1lYzQwLWJmODYtYzE4OWRiYzNmOGYyIiBzdFJlZjpkb2N1bWVudElEPSJ4bXAuZGlkOjhiZDMxNDU3LTUwZjYtYWY0My1iZjhiLWQ1ZGNlMzFkODkxNSIvPiA8L3JkZjpEZXNjcmlwdGlvbj4gPC9yZGY6UkRGPiA8L3g6eG1wbWV0YT4gPD94cGFja2V0IGVuZD0iciI/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 n=function(){var t=this,a=t.$createElement,n=t._self._c||a;return n("div",{staticClass:"bargain"},[n("div",{class:[t.bargainPartake!=t.userInfo.uid?"header on":"header"]},[n("div",{staticClass:"people"},[t._v("\n "+t._s(t.lookCount)+"人查看 丨 "+t._s(t.shareCount)+"人分享 丨 "+t._s(t.userCount)+"人参与\n ")]),t.bargainPartake!=t.userInfo.uid?n("div",{staticClass:"pictxt acea-row row-center-wrapper"},[n("div",{staticClass:"pictrue"},[n("img",{attrs:{src:t.bargainUserInfo.avatar}})]),n("div",{staticClass:"text"},[t._v("\n "+t._s(t.bargainUserInfo.nickname)+"\n "),n("span",[t._v("邀请您帮忙砍价")])])]):n("CountDown",{attrs:{"is-day":!0,"tip-text":"倒计时 ","day-text":" 天 ","hour-text":" 时 ","minute-text":" 分 ","second-text":" 秒",datatime:t.datatime}})],1),n("div",{staticClass:"wrapper"},[n("div",{staticClass:"pictxt acea-row row-between-wrapper"},[n("div",{staticClass:"pictrue"},[n("img",{attrs:{src:t.bargain.image}})]),n("div",{staticClass:"text acea-row row-column-around"},[n("div",{staticClass:"line2",domProps:{textContent:t._s(t.bargain.title)}}),n("div",{staticClass:"money font-color-red"},[t._v("\n 已砍至: ¥\n "),n("span",{staticClass:"num",domProps:{textContent:t._s(t.price)}})]),n("div",{staticClass:"acea-row row-middle"},[n("div",{staticClass:"successNum",domProps:{textContent:t._s("原价"+t.bargain.price)}}),n("div",{staticClass:"successNum",domProps:{textContent:t._s("已有"+t.bargainSumCount+"人砍价成功")}})])])]),n("div",{staticClass:"cu-progress acea-row row-middle round margin-top"},[n("div",{staticClass:"acea-row row-middle bg-red",style:{width:t.loading?t.pricePercent+"%":""}})]),n("div",{staticClass:"balance acea-row row-between-wrapper"},[n("div",{domProps:{textContent:t._s("已砍"+t.alreadyPrice+"元")}}),0===t.surplusPrice?n("div",[t._v("砍价成功")]):n("div",{domProps:{textContent:t._s("还剩"+t.surplusPrice+"元")}})]),t.bargainPartake===t.userInfo.uid&&t.surplusPrice>0?n("div",{staticClass:"bargainBnt",on:{click:t.goPoster}},[t._v("\n 邀请好友帮砍价\n ")]):t.bargainPartake!=t.userInfo.uid?n("div",{staticClass:"bargainBnt",on:{click:t.getBargainHelp}},[t._v("\n 帮好友砍一刀\n ")]):t._e(),t.bargainPartake!=t.userInfo.uid?n("div",{staticClass:"bargainBnt",on:{click:t.getBargainStart}},[t._v("\n 开启砍价\n ")]):t._e(),0===t.surplusPrice&&t.bargainPartake===t.userInfo.uid&&1===t.userBargainStatus?n("div",{staticClass:"bargainBnt",on:{click:t.goPay}},[t._v("\n 立即支付\n ")]):t._e(),n("div",{staticClass:"bargainBnt on",on:{click:t.goList}},[t._v("抢更多商品")]),n("div",{staticClass:"tip"},[t._v("\n 已有\n "),n("span",{staticClass:"font-color-red",domProps:{textContent:t._s(t.helpCount)}}),t._v("\n 位好友成功帮您砍价\n ")]),n("div",{staticClass:"lock"})]),n("div",{staticClass:"bargainGang"},[t._m(0),n("div",{staticClass:"list"},t._l(t.bargainHelpList,function(a,i){return n("div",{key:i,staticClass:"item acea-row row-between-wrapper"},[n("div",{staticClass:"pictxt acea-row row-between-wrapper"},[n("div",{staticClass:"pictrue"},[n("img",{attrs:{src:a.avatar}})]),n("div",{staticClass:"text"},[n("div",{staticClass:"name line1",domProps:{textContent:t._s(a.nickname)}}),n("div",{staticClass:"line1",domProps:{textContent:t._s(a.add_time)}})])]),n("div",{staticClass:"money font-color-red"},[n("span",{staticClass:"iconfont icon-kanjia"}),t._v("\n 砍掉"+t._s(a.price)+"元\n ")])])}),0),t.helpListStatus||t.helpListLoading?t._e():n("div",{staticClass:"load font-color-red",on:{click:t.getBargainHelpList}},[t._v("\n 点击加载更多\n ")]),n("div",{staticClass:"lock"})]),n("div",{staticClass:"goodsDetails"},[t._m(1),n("div",{staticClass:"conter",domProps:{innerHTML:t._s(t.bargain.description)}}),n("div",{staticClass:"lock"})]),n("div",{staticClass:"goodsDetails"},[t._m(2),n("div",{staticClass:"conter",domProps:{innerHTML:t._s(t.bargain.rule)}})]),n("div",{staticClass:"bargainTip",class:!0===t.active?"on":""},[n("div",{staticClass:"pictrue"},[n("img",{attrs:{src:i("4fb4")}}),n("div",{staticClass:"iconfont icon-guanbi",on:{click:t.close}})]),t.bargainPartake===t.userInfo.uid?n("div",{staticClass:"cutOff"},[t._v("\n 您已砍掉\n "),n("span",{staticClass:"font-color-red",domProps:{textContent:t._s(t.bargainHelpPrice)}}),t._v("元,听说分享次数越多砍价成功的机会越大哦!\n ")]):n("div",{staticClass:"cutOff on"},[n("div",{staticClass:"help font-color-red",domProps:{textContent:t._s("成功帮砍"+t.bargainHelpPrice+"元")}}),t._v("\n ,您也可以砍价低价拿哦,快去挑选心仪的商品吧~\n ")]),t.bargainPartake===t.userInfo.uid?n("div",{staticClass:"tipBnt",on:{click:t.goPoster}},[t._v("\n 邀请好友帮砍价\n ")]):n("div",{staticClass:"tipBnt",on:{click:t.getBargainStart}},[t._v("我也要参与")])]),n("div",{staticClass:"mask",attrs:{hidden:!1===t.active},on:{touchmove:function(t){t.preventDefault()},click:t.close}})])},e=[function(){var t=this,a=t.$createElement,n=t._self._c||a;return n("div",{staticClass:"title font-color-red acea-row row-center-wrapper"},[n("div",{staticClass:"pictrue"},[n("img",{attrs:{src:i("34eb")}})]),n("div",{staticClass:"titleCon"},[t._v("砍价帮")]),n("div",{staticClass:"pictrue on"},[n("img",{attrs:{src:i("34eb")}})])])},function(){var t=this,a=t.$createElement,n=t._self._c||a;return n("div",{staticClass:"title font-color-red acea-row row-center-wrapper"},[n("div",{staticClass:"pictrue"},[n("img",{attrs:{src:i("34eb")}})]),n("div",{staticClass:"titleCon"},[t._v("商品详情")]),n("div",{staticClass:"pictrue on"},[n("img",{attrs:{src:i("34eb")}})])])},function(){var t=this,a=t.$createElement,n=t._self._c||a;return n("div",{staticClass:"title font-color-red acea-row row-center-wrapper"},[n("div",{staticClass:"pictrue"},[n("img",{attrs:{src:i("34eb")}})]),n("div",{staticClass:"titleCon"},[t._v("活动规则")]),n("div",{staticClass:"pictrue on"},[n("img",{attrs:{src:i("34eb")}})])])}],r=i("7618"),s=(i("a481"),i("7f7f"),i("5608")),o=i("ca41"),c=i("73f5"),u=i("2f62"),l=i("74f9"),d=i("ed08"),g="DargainDetails",p={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(u["b"])(["userInfo","isLogin"]),watch:{$route:function(t){var a=this;t.name===g&&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);if(void 0===a||a<=0||isNaN(a))return t.bargainPartake=t.userInfo.uid,t.$router.replace({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(),console.log(Object(r["a"])(t.bargainPartake),t.bargainPartake,Object(r["a"])(t.userInfo.uid),t.userInfo.uid,t.userBargainStatus,t.surplusPrice)},setOpenShare:function(){var t=this,a={title:"您的好友"+t.userInfo.nickname+"邀请您砍价"+t.bargain.title,desc:t.bargain.info,link:window.location.protocol+"//"+window.location.host+"/activity/dargain_detail/"+t.bargainId+"/"+t.bargainPartake,imgUrl:t.bargain.image};!0===Object(d["d"])()&&Object(l["wechatEvevt"])(["updateAppMessageShareData","updateTimelineShareData"],a).then(function(t){console.log(t)}).catch(function(t){t.is_ready&&(t.wx.updateAppMessageShareData(a),t.wx.updateTimelineShareData(a))})},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(c["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(o["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(o["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(o["i"])({bargainId:t.bargainId}).then(function(){t.bargainPartake=t.userInfo.uid,t.setOpenShare(),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(o["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(o["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(o["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,n=Math.floor(a/3600)-24*i,e=Math.floor(a/60)-24*i*60-60*n,r=Math.floor(a)-24*i*60*60-60*n*60-60*e,n<=9&&(n="0"+n),e<=9&&(e="0"+e),r<=9&&(r="0"+r),t.day=i,t.hour=n,t.minute=e,t.second=r):(t.day="00",t.hour="00",t.minute="00",t.second="00")}a(),setInterval(a,1e3)}}}),s=r,o=i("2877"),c=Object(o["a"])(s,n,e,!1,null,null,null);a["a"]=c.exports},ca41:function(t,a,i){"use strict";i.d(a,"n",function(){return e}),i.d(a,"m",function(){return r}),i.d(a,"o",function(){return s}),i.d(a,"q",function(){return o}),i.d(a,"p",function(){return c}),i.d(a,"r",function(){return u}),i.d(a,"t",function(){return l}),i.d(a,"s",function(){return d}),i.d(a,"f",function(){return g}),i.d(a,"a",function(){return p}),i.d(a,"h",function(){return b}),i.d(a,"i",function(){return f}),i.d(a,"b",function(){return v}),i.d(a,"e",function(){return m}),i.d(a,"c",function(){return h}),i.d(a,"j",function(){return C}),i.d(a,"d",function(){return I}),i.d(a,"g",function(){return k}),i.d(a,"l",function(){return w}),i.d(a,"k",function(){return _});var n=i("b775");function e(t){return n["a"].get("/combination/list",t,{login:!1})}function r(t){return n["a"].get("/combination/detail/"+t,{},{login:!1})}function s(t){return n["a"].get("/combination/pink/"+t)}function o(t){return n["a"].post("/combination/remove",t)}function c(t){return n["a"].post("/combination/poster",t)}function u(){return n["a"].get("/seckill/index",{},{login:!1})}function l(t,a){return n["a"].get("/seckill/list/"+t,a,{login:!1})}function d(t){return n["a"].get("/seckill/detail/"+t,{},{login:!1})}function g(t){return n["a"].get("/bargain/list",t,{login:!1})}function p(t){return n["a"].get("/bargain/detail/"+t)}function b(t){return n["a"].post("/bargain/share",t)}function f(t){return n["a"].post("/bargain/start",t)}function v(t){return n["a"].post("/bargain/help",t)}function m(t){return n["a"].post("/bargain/help/price",t)}function h(t){return n["a"].post("/bargain/help/count",t)}function C(t){return n["a"].post("/bargain/start/user",t)}function I(t){return n["a"].post("/bargain/help/list",t)}function k(t){return n["a"].post("/bargain/poster",t)}function w(t){return n["a"].get("/bargain/user/list",t)}function _(t){return n["a"].post("/bargain/user/cancel",t)}}}]); //# sourceMappingURL=chunk-48b5e2cc.b826772e.js.map