bztang-admin/addons/yun_shop/static/app/js/chunk-712498c4.02b7b4f3.js

1 line
6.0 KiB
JavaScript

(window["webpackJsonp"]=window["webpackJsonp"]||[]).push([["chunk-712498c4"],{"1c5c":function(t,e,a){var i=a("24fb");e=i(!1),e.push([t.i,".page[data-v-aaa49a20]{background:#fafafa;min-height:100vh;padding-bottom:3.0625rem;text-align:left}.items[data-v-aaa49a20]{padding:0 .781rem}.items .item .time[data-v-aaa49a20]{height:2.75rem;line-height:2.75rem;letter-spacing:.019rem;color:#666;font-size:.75rem;text-align:center}.items .item .wrapper[data-v-aaa49a20]{background-color:#fff;border-radius:.25rem;width:100%;padding:.844rem .875rem 1.031rem .969rem}.items .item .wrapper .face img[data-v-aaa49a20]{width:20.563rem;height:8.281rem;background-color:#eeecec}.items .item .wrapper .name[data-v-aaa49a20]{margin-top:.813rem;color:#000;font-size:1rem;-webkit-line-clamp:1;line-clamp:1}.items .item .wrapper .desc[data-v-aaa49a20],.items .item .wrapper .name[data-v-aaa49a20]{overflow:hidden;text-overflow:ellipsis;display:-webkit-box;-webkit-box-orient:vertical}.items .item .wrapper .desc[data-v-aaa49a20]{margin-top:.625rem;font-size:.75rem;letter-spacing:.019rem;color:#333;-webkit-line-clamp:2;line-clamp:2}",""]),t.exports=e},"46ab":function(t,e,a){"use strict";a.r(e);var i=function(){var t=this,e=t.$createElement,a=t._self._c||e;return a("div",{staticClass:"page"},[a("c-title",{attrs:{text:t.titleName}}),a("div",{staticClass:"items"},t._l(t.listData,(function(e){return a("div",{key:e._id,staticClass:"item",on:{click:function(a){return t.goPages(e.url)}}},[a("p",{staticClass:"time"},[t._v(t._s(e.created_at))]),a("div",{staticClass:"wrapper"},[""!=e.msg_img_src?a("div",{staticClass:"face"},[a("img",{attrs:{src:e.msg_img_src,alt:""}})]):t._e(),a("div",{staticClass:"name"},[t._v(t._s(e.title))]),a("div",{staticClass:"desc"},[t._v(t._s(e.desc))])])])})),0)],1)},r=[],s=a("c7eb"),n=(a("e7e5"),a("d399")),o=a("1da1"),c=(a("d3b7"),a("159b"),a("99af"),a("ac0d")),l=a("6c42"),g={mixins:[c["a"]],data:function(){return{titleName:"活动通知",page:1,isLoadMore:!0,total_page:0,listData:[],msg_body:{}}},activated:function(){this.$route.query.pageTitle&&(this.titleName=this.$route.query.pageTitle,this.fun.setWXTitle(this.titleName)),this.getListData()},methods:{initData:function(){this.page=1,this.isLoadMore=!0,this.total_page=0},getListData:function(){var t=this;return Object(o["a"])(Object(s["a"])().mark((function e(){var a;return Object(s["a"])().wrap((function(e){while(1)switch(e.prev=e.next){case 0:return t.initData(),n["a"].loading({message:"加载中",forbidClick:!0}),e.next=4,$http.get("plugin.instation-message.api.message.get-type-list",{type_id:8});case 4:if(a=e.sent,n["a"].clear(),1===a.result){e.next=9;break}return Object(n["a"])(a.msg),e.abrupt("return");case 9:a.data.data.forEach((function(t){t.created_at=Object(l["a"])(t.created_at)})),t.isLoadMore=!0,t.total_page=a.data.last_page,t.total_page||(t.total_page=0),t.listData=a.data.data;case 14:case"end":return e.stop()}}),e)})))()},getMoreData:function(){var t=this;this.isLoadMore=!1,this.page>=this.total_page||(this.page+=1,$http.get("plugin.instation-message.api.message.get-type-list",{page:this.page,type_id:8}).then((function(e){if(t.isLoadMore=!0,1===e.result){var a=e.data.data;a.forEach((function(t){t.created_at=Object(l["a"])(t.created_at)})),t.listData=t.listData.concat(a)}else t.page=t.page-1,t.isLoadMore=!1})))},goPages:function(t){""!=t&&(window.location=t)}}},u=g,d=u,p=(a("6367"),a("2877")),m=Object(p["a"])(d,i,r,!1,null,"aaa49a20",null);e["default"]=m.exports},6367:function(t,e,a){"use strict";a("6908")},6908:function(t,e,a){var i=a("1c5c");i.__esModule&&(i=i.default),"string"===typeof i&&(i=[[t.i,i,""]]),i.locals&&(t.exports=i.locals);var r=a("499e").default;r("f352f79e",i,!0,{sourceMap:!1,shadowMode:!1})},"6c42":function(t,e,a){"use strict";a("a9e3");function i(){this.weekArr=["周一","周二","周三","周四","周五"]}i.prototype._padLeftZero=function(t){return t=String(t),("00"+t).substr(t.length)},i.prototype.getLocalTime=function(t){var e;e="number"!=typeof parseInt(t)||isNaN(Number(t))?new Date(t):new Date(1e3*parseInt(t));var a=e.getFullYear()+"-"+this._padLeftZero(e.getMonth()+1)+"-"+this._padLeftZero(e.getDate())+" "+this._padLeftZero(e.getHours())+":"+this._padLeftZero(e.getMinutes()+1),i=new Date,r=i.getDate(),s=i.getMonth()+1,n=i.getFullYear(),o="",c=a.substr(11,5);if(1==this.isYesterday(i,e))return o="昨天",o+" "+c;var l=this.isWeek(i,e);if(l.is&&l.cWeek-l.tWeek>=2)return o=this.weekArr[l.tWeek-1],o+" "+c;if(a.substr(0,4)==n)if(a.substr(5,2)==s){if(a.substr(8,2)==r)return c;o=a.substr(5,5)}else o=a.substr(5,5);else o=a.substr(0,7);return o+" "+c},i.prototype.isYesterday=function(t,e){var a=new Date(e.getFullYear()+"/"+(e.getMonth()+1)+"/"+e.getDate()),i=new Date(t.getFullYear()+"/"+(t.getMonth()+1)+"/"+t.getDate()),r=(i.getTime()-a.getTime())/864e5;return r},i.prototype.isWeek=function(t,e){var a=new Date(e.getFullYear()+"/"+(e.getMonth()+1)+"/"+e.getDate()),i=new Date(t.getFullYear()+"/"+(t.getMonth()+1)+"/"+t.getDate()),r=0==a.getDay()?7:a.getDay(),s=0==i.getDay()?7:i.getDay(),n=!0,o=(i.getTime()-a.getTime())/864e5;return n=!(o>=7)&&(r==s||!(s<=r)),{is:n,cWeek:s,tWeek:r}};var r=new i;e["a"]=r.getLocalTime.bind(r)},ac0d:function(t,e,a){"use strict";a.d(e,"a",(function(){return s}));var i=document.documentElement,r=document.body,s={data:function(){return{}},activated:function(){window.addEventListener("scroll",this.handleScroll)},deactivated:function(){window.removeEventListener("scroll",this.handleScroll)},methods:{getScrollTop:function(){var t=0;return i&&i.scrollTop?t=i.scrollTop:r&&(t=r.scrollTop),t},getClientHeight:function(){var t=0;return t=r.clientHeight&&i.clientHeight?Math.min(r.clientHeight,i.clientHeight):Math.max(r.clientHeight,i.clientHeight),t},getScrollHeight:function(){return Math.max(r.scrollHeight,i.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(){}}}}}]);