bztang-admin/addons/yun_shop/static/app/js/chunk-3982c4ac.622fa3fb.js

1 line
8.0 KiB
JavaScript

(window["webpackJsonp"]=window["webpackJsonp"]||[]).push([["chunk-3982c4ac"],{"9a3f":function(t,e,i){var a=i("f46c");a.__esModule&&(a=a.default),"string"===typeof a&&(a=[[t.i,a,""]]),a.locals&&(t.exports=a.locals);var l=i("499e").default;l("4789aa1c",a,!0,{sourceMap:!1,shadowMode:!1})},ac0d:function(t,e,i){"use strict";i.d(e,"a",(function(){return r}));var a=document.documentElement,l=document.body,r={data:function(){return{}},activated:function(){window.addEventListener("scroll",this.handleScroll)},deactivated:function(){window.removeEventListener("scroll",this.handleScroll)},methods:{getScrollTop:function(){var t=0;return a&&a.scrollTop?t=a.scrollTop:l&&(t=l.scrollTop),t},getClientHeight:function(){var t=0;return t=l.clientHeight&&a.clientHeight?Math.min(l.clientHeight,a.clientHeight):Math.max(l.clientHeight,a.clientHeight),t},getScrollHeight:function(){return Math.max(l.scrollHeight,a.scrollHeight)},handleScroll:function(){this.otherScroll();var t=document.documentElement.scrollTop||document.body.scrollTop;this.btnFlag=t>60,this.getScrollTop()+this.getClientHeight()+105>this.getScrollHeight()?(this.isLoadMore&&this.getMoreData(),this.isBottom=!0):this.isBottom=!1},otherScroll:function(){}}}},b0b6:function(t,e,i){"use strict";i("9a3f")},c638:function(t,e,i){"use strict";i.r(e);var a=function(){var t=this,e=t.$createElement,i=t._self._c||e;return i("div",{staticClass:"timer-shaft"},[i("c-title",{attrs:{text:!1}}),i("div",[i("div",{staticClass:"title"},[t._v(t._s(t.axis.name))]),t.axis.content?i("div",{staticClass:"content"},[t._v(t._s(t.axis.content))]):t._e(),i("div",{staticStyle:{display:"flex","justify-content":"flex-end","align-items":"center","margin-right":"0.9375rem","margin-bottom":"1rem","margin-top":"1rem"}},[i("span",{staticStyle:{"margin-right":"0.3125rem"}},[t._v(t._s(0==t.show_type?"倒序":"正序"))]),i("van-switch",{attrs:{size:"0.75rem","active-value":1,"inactive-value":0},on:{change:function(e){return t.change(t.show_type)}},model:{value:t.show_type,callback:function(e){t.show_type=e},expression:"show_type"}})],1),t._l(t.list,(function(e,a){return i("div",{key:e.id,staticStyle:{display:"flex","margin-bottom":"0.625rem","justify-content":"space-between"}},[i("div",{staticClass:"box-left"},[0==a||e.time.split(" ")[0].split("-")[0]!==t.list[a-1].time.split(" ")[0].split("-")[0]?i("div",{staticStyle:{"font-size":"1.125rem","font-weight":"bold"}},[t._v(t._s(e.time.split(" ")[0].split("-")[0]))]):t._e(),i("div",{class:0==a||e.time.split(" ")[0].split("-")[0]!==t.list[a-1].time.split(" ")[0].split("-")[0]?"mt-2":"",staticStyle:{color:"#666","font-size":"0.75rem"}},[0==a||e.time!==t.list[a-1].time?[t._v(t._s(e.time.split(" ")[0].split("-")[1]+"月")+t._s(e.time.split(" ")[0].split("-")[2]+"日"))]:t._e()],2),t.list[a+1]&&e.time.split(" ")[0].split("-")[0]==t.list[a+1].time.split(" ")[0].split("-")[0]&&e.time==t.list[a+1].time?i("div",{staticClass:"time-line h100"}):t._e(),t.list[a+1]&&e.time.split(" ")[0].split("-")[0]==t.list[a+1].time.split(" ")[0].split("-")[0]&&e.time!==t.list[a+1].time?i("div",{staticClass:"time-line",class:0==a||e.time.split(" ")[0].split("-")[0]!==t.list[a-1].time.split(" ")[0].split("-")[0]?"h40":e.time==t.list[a-1].time?"h100":"h80"}):t._e()]),i("div",{staticClass:"box-right",on:{click:function(i){return t.link(e.h5_link)}}},[i("div",{staticClass:"click-title",style:{color:e.color}},[t._v(t._s(e.name))]),i("div",{staticStyle:{display:"flex","justify-content":"space-between"}},[e.content?i("div",{staticStyle:{color:"#999","margin-right":"0.625rem","text-align":"left","font-size":"0.75rem"}},[t._v(t._s(e.content))]):t._e(),e.thumb_url?i("img",{staticStyle:{width:"3.125rem",height:"3.0625rem",margin:"0"},attrs:{src:e.thumb_url}}):t._e()]),i("div",{staticClass:"click-label-group"},[t._l(e.label_color,(function(e,a){return[e.label?i("span",{staticClass:"label-item",style:{"background-color":e.color}},[t._v(" "+t._s(e.label)+" ")]):t._e()]}))],2)])])}))],2)],1)},l=[],r=i("c7eb"),s=i("1da1"),n=(i("d3b7"),i("159b"),i("99af"),i("14d9"),i("fb6a"),i("b0c0"),i("ac0d")),o={mixins:[n["a"]],data:function(){return{list:[],current_page:1,last_page:1,isLoadMore:!0,show_type:0,aid:"",axis:{}}},activated:function(){this.aid=this.$route.query.id,this.isLoadMore=!0,this.getData()},methods:{getMoreData:function(){var t=this;return Object(s["a"])(Object(r["a"])().mark((function e(){var i,a,l,s,n,o;return Object(r["a"])().wrap((function(e){while(1)switch(e.prev=e.next){case 0:if(!(t.current_page>=t.last_page)){e.next=2;break}return e.abrupt("return");case 2:if(!t.isLoadMore){e.next=13;break}return t.isLoadMore=!1,i=t.current_page+1,e.next=7,$http.get("plugin.time-axis.frontend.controllers.axis.eventList",{aid:t.aid,page:i,show_type:t.show_type},"loading");case 7:a=e.sent,l=a.data,s=a.result,n=a.msg,t.isLoadMore=!0,1==s?(o=l.list,o.data.forEach((function(e){e.label_arr&&0!==e.label_arr.length&&(e.label_color=t.createGroups(e.label_arr,4),e.label_color=t.feat_color(e.label_color))})),t.list=t.list.concat(o.data),t.current_page=o.current_page,t.last_page=o.last_page):t.$toast(n);case 13:case"end":return e.stop()}}),e)})))()},change:function(t){var e=this;$http.get("plugin.time-axis.frontend.controllers.axis.eventList",{aid:this.aid,show_type:t}).then((function(t){if(1==t.result){var i=t.data.list;i.data.forEach((function(t){t.label_arr&&0!==t.label_arr.length&&(t.label_color=e.createGroups(t.label_arr,4),t.label_color=e.feat_color(t.label_color))})),e.list=i.data,e.current_page=i.current_page,e.last_page=i.last_page}else e.$toast(t.msg)}))},link:function(t){t&&window.open(t,"_blank")},createGroups:function(t,e){var i=0,a=[];while(i<t.length)a.push(t.slice(i,i+=e));return a},feat_color:function(t){var e=[],i=["#13C7A7","#FCA814","#FC6614","#1481FC"];t.forEach((function(t,a){e[a]=[],t.forEach((function(t,l){e[a].push({color:i[l],label:t})}))}));var a=[];return e.forEach((function(t){t.forEach((function(t){a.push(t)}))})),a},getData:function(){var t=this;return Object(s["a"])(Object(r["a"])().mark((function e(){var i,a,l,s,n,o,c,d,f;return Object(r["a"])().wrap((function(e){while(1)switch(e.prev=e.next){case 0:return e.next=2,$http.get("plugin.time-axis.frontend.controllers.axis.eventList",{aid:t.aid});case 2:i=e.sent,a=i.data,l=i.result,s=i.msg,1==l?(n=a.list,o=a.axis,t.axis=o,t.show_type=o.show_type,n.data.forEach((function(e){e.label_arr&&0!==e.label_arr.length&&(e.label_color=t.createGroups(e.label_arr,4),e.label_color=t.feat_color(e.label_color))})),t.list=n.data,t.current_page=n.current_page,t.last_page=n.last_page,c=o.name,d=o.img||"",f=o.content?o.content:o.name,t.fun.wxShare("",{},{title:c,imgUrl:d,description:f})):t.$toast(s);case 7:case"end":return e.stop()}}),e)})))()}}},c=o,d=(i("b0b6"),i("2877")),f=Object(d["a"])(c,a,l,!1,null,"feb3c0de",null);e["default"]=f.exports},f46c:function(t,e,i){var a=i("24fb");e=a(!1),e.push([t.i,".timer-shaft[data-v-feb3c0de]{padding-bottom:2.75rem}.timer-shaft .content[data-v-feb3c0de]{text-align:center;font-size:.6875rem;margin:0 .9375rem;color:#999}.timer-shaft .mt-2[data-v-feb3c0de]{margin-top:1rem}.timer-shaft .box-left[data-v-feb3c0de]{margin:0 .9375rem;-webkit-box-flex:1;-webkit-flex:1;-ms-flex:1;flex:1;overflow:hidden}.timer-shaft .title[data-v-feb3c0de]{margin-top:1rem;margin-bottom:.875rem;font-weight:500;font-size:1.1rem;color:#333}.timer-shaft .h100[data-v-feb3c0de]{height:98%}.timer-shaft .h40[data-v-feb3c0de],.timer-shaft .h80[data-v-feb3c0de]{height:100%}.timer-shaft .time-line[data-v-feb3c0de]{position:relative;left:50%;top:5%;width:1px;background-color:#ccc}.timer-shaft .click-title[data-v-feb3c0de]{text-align:left;margin-bottom:.8125rem;font-size:1.1rem}.timer-shaft .click-label-group[data-v-feb3c0de]{margin-top:.8125rem;font-size:.625rem;display:-webkit-box;display:-webkit-flex;display:-ms-flexbox;display:flex;-webkit-flex-wrap:wrap;-ms-flex-wrap:wrap;flex-wrap:wrap}.timer-shaft .label-item[data-v-feb3c0de]{padding:.2rem;border-radius:.0625rem;color:#fff;margin-right:.3125rem;margin-bottom:.3125rem}.timer-shaft .box-right[data-v-feb3c0de]{width:17.125rem;background:#fff;padding:.875rem;margin-right:.9375rem}",""]),t.exports=e}}]);