chunk-ec5fb900.d8616b0e.js 4.3 KB

12
  1. (window["webpackJsonp"]=window["webpackJsonp"]||[]).push([["chunk-ec5fb900"],{3201:function(t,a,s){"use strict";s.r(a);var i=function(){var t=this,a=t.$createElement,s=t._self._c||a;return s("div",{ref:"container",staticClass:"bargain-record"},[t._l(t.bargain,function(a,i){return s("div",{key:i,staticClass:"item"},[s("div",{staticClass:"picTxt acea-row row-between-wrapper"},[s("div",{staticClass:"pictrue"},[s("img",{attrs:{src:a.image}})]),s("div",{staticClass:"text acea-row row-column-around"},[s("div",{staticClass:"line1"},[t._v(t._s(a.title))]),s("count-down",{attrs:{"is-day":!0,"tip-text":"倒计时 ","day-text":" 天 ","hour-text":" 时 ","minute-text":" 分 ","second-text":" 秒",datatime:a.datatime}}),s("div",{staticClass:"money font-color-red"},[t._v("\n 已砍至"),s("span",{staticClass:"symbol"},[t._v("¥")]),s("span",{staticClass:"num"},[t._v(t._s(a.residue_price))])])],1)]),s("div",{staticClass:"bottom acea-row row-between-wrapper"},[1===a.status?s("div",{staticClass:"purple"},[t._v("活动进行中")]):3===a.status?s("div",{staticClass:"success"},[t._v("砍价成功")]):s("div",{staticClass:"end"},[t._v("活动已结束")]),s("div",{staticClass:"acea-row row-middle row-right"},[1===a.status?s("div",{staticClass:"bnt cancel",on:{click:function(s){return t.getBargainUserCancel(a.bargain_id)}}},[t._v("\n 取消活动\n ")]):t._e(),1===a.status?s("div",{staticClass:"bnt bg-color-red",on:{click:function(s){return t.goDetail(a.bargain_id)}}},[t._v("\n 继续砍价\n ")]):s("div",{staticClass:"bnt bg-color-red",on:{click:t.goList}},[t._v("重开一个")])])])])}),s("Loading",{attrs:{loaded:t.status,loading:t.loadingList}})],2)},e=[],n=s("5608"),r=s("ca41"),o=s("3a5e"),c={name:"BargainRecord",components:{CountDown:n["a"],Loading:o["a"]},props:{},data:function(){return{bargain:[],status:!1,loadingList:!1,page:1,limit:20}},mounted:function(){var t=this;this.getBargainUserList(),this.$scroll(this.$refs.container,function(){!t.loadingList&&t.getBargainUserList()})},methods:{goDetail:function(t){this.$router.push({path:"/activity/dargain_detail/"+t+"/0"})},goList:function(){this.$router.push({path:"/activity/bargain"})},getBargainUserList:function(){var t=this;t.loadingList||t.status||Object(r["l"])({page:t.page,limit:t.limit}).then(function(a){t.status=a.data.length<t.limit,t.bargain.push.apply(t.bargain,a.data),t.page++,t.loadingList=!1}).catch(function(a){t.$dialog.error(a.msg)})},getBargainUserCancel:function(t){var a=this;Object(r["k"])({bargainId:t}).then(function(t){a.$dialog.success(t.msg).then(function(){a.status=!1,a.loadingList=!1,a.page=1,a.bargain=[],a.getBargainUserList()})}).catch(function(t){a.$dialog.error(t.msg)})}}},l=c,u=s("2877"),d=Object(u["a"])(l,i,e,!1,null,null,null);a["default"]=d.exports},5608:function(t,a,s){"use strict";var i=function(){var t=this,a=t.$createElement,s=t._self._c||a;return s("div",{staticClass:"time"},[t._v("\n "+t._s(t.tipText)),!0===t.isDay?s("span",{staticClass:"styleAll"},[t._v(t._s(t.day))]):t._e(),s("span",{staticClass:"timeTxt"},[t._v(t._s(t.dayText))]),s("span",{staticClass:"styleAll"},[t._v(t._s(t.hour))]),s("span",{staticClass:"timeTxt"},[t._v(t._s(t.hourText))]),s("span",{staticClass:"styleAll"},[t._v(t._s(t.minute))]),s("span",{staticClass:"timeTxt"},[t._v(t._s(t.minuteText))]),s("span",{staticClass:"styleAll"},[t._v(t._s(t.second))]),s("span",{staticClass:"timeTxt"},[t._v(t._s(t.secondText))])])},e=[],n=(s("c5f6"),{name:"CountDown",props:{tipText:{type:String,default:"倒计时"},dayText:{type:String,default:"天"},hourText:{type:String,default:"时"},minuteText:{type:String,default:"分"},secondText:{type:String,default:"秒"},datatime:{type:Number,default:0},isDay:{type:Boolean,default:!0}},data:function(){return{day:"00",hour:"00",minute:"00",second:"00"}},created:function(){this.show_time()},mounted:function(){},methods:{show_time:function(){var t=this;function a(){var a=t.datatime-Date.parse(new Date)/1e3,s=0,i=0,e=0,n=0;a>0?(s=!0===t.isDay?Math.floor(a/86400):0,i=Math.floor(a/3600)-24*s,e=Math.floor(a/60)-24*s*60-60*i,n=Math.floor(a)-24*s*60*60-60*i*60-60*e,i<=9&&(i="0"+i),e<=9&&(e="0"+e),n<=9&&(n="0"+n),t.day=s,t.hour=i,t.minute=e,t.second=n):(t.day="00",t.hour="00",t.minute="00",t.second="00")}a(),setInterval(a,1e3)}}}),r=n,o=s("2877"),c=Object(o["a"])(r,i,e,!1,null,null,null);a["a"]=c.exports}}]);
  2. //# sourceMappingURL=chunk-ec5fb900.d8616b0e.js.map