1 line
7.9 KiB
JavaScript
1 line
7.9 KiB
JavaScript
(window["webpackJsonp"]=window["webpackJsonp"]||[]).push([["chunk-288c8e18"],{"604d":function(e,t,a){var i=a("959d");i.__esModule&&(i=i.default),"string"===typeof i&&(i=[[e.i,i,""]]),i.locals&&(e.exports=i.locals);var r=a("499e").default;r("e688dbbe",i,!0,{sourceMap:!1,shadowMode:!1})},"6c42":function(e,t,a){"use strict";a("a9e3");function i(){this.weekArr=["周一","周二","周三","周四","周五"]}i.prototype._padLeftZero=function(e){return e=String(e),("00"+e).substr(e.length)},i.prototype.getLocalTime=function(e){var t;t="number"!=typeof parseInt(e)||isNaN(Number(e))?new Date(e):new Date(1e3*parseInt(e));var a=t.getFullYear()+"-"+this._padLeftZero(t.getMonth()+1)+"-"+this._padLeftZero(t.getDate())+" "+this._padLeftZero(t.getHours())+":"+this._padLeftZero(t.getMinutes()+1),i=new Date,r=i.getDate(),s=i.getMonth()+1,n=i.getFullYear(),o="",l=a.substr(11,5);if(1==this.isYesterday(i,t))return o="昨天",o+" "+l;var c=this.isWeek(i,t);if(c.is&&c.cWeek-c.tWeek>=2)return o=this.weekArr[c.tWeek-1],o+" "+l;if(a.substr(0,4)==n)if(a.substr(5,2)==s){if(a.substr(8,2)==r)return l;o=a.substr(5,5)}else o=a.substr(5,5);else o=a.substr(0,7);return o+" "+l},i.prototype.isYesterday=function(e,t){var a=new Date(t.getFullYear()+"/"+(t.getMonth()+1)+"/"+t.getDate()),i=new Date(e.getFullYear()+"/"+(e.getMonth()+1)+"/"+e.getDate()),r=(i.getTime()-a.getTime())/864e5;return r},i.prototype.isWeek=function(e,t){var a=new Date(t.getFullYear()+"/"+(t.getMonth()+1)+"/"+t.getDate()),i=new Date(e.getFullYear()+"/"+(e.getMonth()+1)+"/"+e.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;t["a"]=r.getLocalTime.bind(r)},"7f8c":function(e,t,a){"use strict";a("604d")},"959d":function(e,t,a){var i=a("24fb");t=i(!1),t.push([e.i,".page[data-v-27ef8382]{background:#fafafa;min-height:100vh;padding-bottom:3.0625rem;text-align:left}.items[data-v-27ef8382]{padding:0 .781rem}.items .item .time[data-v-27ef8382]{height:2.75rem;line-height:2.75rem;letter-spacing:.019rem;color:#666;font-size:.75rem;text-align:center}.items .item .wrapper[data-v-27ef8382]{background-color:#fff;border-radius:.25rem;width:100%;padding:.844rem .875rem 0 .969rem}.items .item .wrapper .head[data-v-27ef8382]{display:-webkit-box;display:-webkit-flex;display:-ms-flexbox;display:flex;-webkit-box-align:center;-webkit-align-items:center;-ms-flex-align:center;align-items:center}.items .item .wrapper .head .face[data-v-27ef8382]{width:1.5rem;height:1.5rem;background-color:#eee}.items .item .wrapper .head .face img[data-v-27ef8382]{width:1.5rem;height:1.5rem;border-radius:50%}.items .item .wrapper .head .name[data-v-27ef8382]{margin-left:.438rem;font-size:.875rem;color:#000;letter-spacing:.022rem}.items .item .wrapper .head .label[data-v-27ef8382]{margin-left:.594rem;padding:.088rem .469rem .129rem .375rem;letter-spacing:.019rem;color:#fff;background-color:#43d9b0;border-radius:.563rem;font-size:.75rem}.items .item .wrapper .c1[data-v-27ef8382]{margin-top:.519rem}.items .item .wrapper .ca[data-v-27ef8382]{font-size:.75rem;line-height:1.25rem;letter-spacing:.019rem;color:#666}.items .item .wrapper .anchor[data-v-27ef8382]{display:-webkit-box;display:-webkit-flex;display:-ms-flexbox;display:flex;height:6.531rem;padding:1rem 0 1.531rem 0}.items .item .wrapper .anchor .face[data-v-27ef8382]{width:4rem;height:4rem;background-color:#eee}.items .item .wrapper .anchor .face img[data-v-27ef8382]{width:4rem;height:4rem}.items .item .wrapper .anchor .desc[data-v-27ef8382]{height:4rem;padding-left:.531rem;-webkit-box-flex:1;-webkit-flex:1;-ms-flex:1;flex:1;display:-webkit-box;display:-webkit-flex;display:-ms-flexbox;display:flex;-webkit-box-orient:vertical;-webkit-box-direction:normal;-webkit-flex-direction:column;-ms-flex-direction:column;flex-direction:column;-webkit-box-pack:justify;-webkit-justify-content:space-between;-ms-flex-pack:justify;justify-content:space-between}.items .item .wrapper .anchor .desc .name[data-v-27ef8382]{letter-spacing:.019rem;color:#000;font-size:.75rem;overflow:hidden;text-overflow:ellipsis;display:-webkit-box;-webkit-line-clamp:2;line-clamp:2;-webkit-box-orient:vertical}.items .item .wrapper .anchor .desc .tips[data-v-27ef8382]{letter-spacing:.019rem;font-size:.75rem;color:#f42a2a}",""]),e.exports=t},"96a7":function(e,t,a){"use strict";a.r(t);var i=function(){var e=this,t=e.$createElement,a=e._self._c||t;return a("div",{staticClass:"page"},[a("c-title",{attrs:{text:e.titleName}}),a("div",{staticClass:"items"},e._l(e.listData,(function(t){return a("div",{key:t._id,staticClass:"item",on:{click:function(a){return e.goPages(t.url)}}},[a("p",{staticClass:"time"},[e._v(e._s(t.created_at))]),a("div",{staticClass:"wrapper"},[a("div",{staticClass:"head"},[a("div",{staticClass:"face"},[a("img",{attrs:{src:t.platform_img,alt:""}})]),a("p",{staticClass:"name"},[e._v(e._s(t.title))]),a("div",{staticClass:"label"},[e._v(e._s(t.platform))])]),a("p",{staticClass:"c1 ca"},[e._v(e._s(t.desc))]),t.msg_body&&0!=t.msg_body.length?a("div",{staticClass:"anchor"},[a("div",{staticClass:"face"},[a("img",{attrs:{src:t.msg_body.img,alt:""}})]),a("div",{staticClass:"desc"},[a("p",{staticClass:"name"},[e._v(e._s(t.msg_body.title))]),t.msg_body.desc?a("p",{staticClass:"tips"},[e._v(e._s(t.msg_body.desc))]):a("p",{staticClass:"tips"},[e._v("点击查看")])])]):e._e()])])})),0)],1)},r=[],s=a("c7eb"),n=(a("e7e5"),a("d399")),o=a("1da1"),l=(a("d3b7"),a("159b"),a("99af"),a("ac0d")),c=a("6c42"),d={mixins:[l["a"]],data:function(){return{titleName:"交易物流",page:1,isLoadMore:!0,total_page:0,listData:[],msg_body:{title:"直播间标题",desc:"提示语",img:"商品图"}}},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 e=this;return Object(o["a"])(Object(s["a"])().mark((function t(){var a;return Object(s["a"])().wrap((function(t){while(1)switch(t.prev=t.next){case 0:return e.initData(),n["a"].loading({message:"加载中",forbidClick:!0}),t.next=4,$http.get("plugin.instation-message.api.message.get-type-list",{type_id:1});case 4:if(a=t.sent,n["a"].clear(),1===a.result){t.next=9;break}return Object(n["a"])(a.msg),t.abrupt("return");case 9:a.data.data.forEach((function(e){e.created_at=Object(c["a"])(e.created_at)})),e.isLoadMore=!0,e.total_page=a.data.last_page,e.total_page||(e.total_page=0),e.listData=a.data.data;case 14:case"end":return t.stop()}}),t)})))()},getMoreData:function(){var e=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:1}).then((function(t){if(e.isLoadMore=!0,1===t.result){var a=t.data.data;a.forEach((function(e){e.created_at=Object(c["a"])(e.created_at)})),e.listData=e.listData.concat(a)}else e.page=e.page-1,e.isLoadMore=!1})))},goPages:function(e){""!=e&&(window.location=e)}}},m=d,g=m,p=(a("7f8c"),a("2877")),f=Object(p["a"])(g,i,r,!1,null,"27ef8382",null);t["default"]=f.exports},ac0d:function(e,t,a){"use strict";a.d(t,"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 e=0;return i&&i.scrollTop?e=i.scrollTop:r&&(e=r.scrollTop),e},getClientHeight:function(){var e=0;return e=r.clientHeight&&i.clientHeight?Math.min(r.clientHeight,i.clientHeight):Math.max(r.clientHeight,i.clientHeight),e},getScrollHeight:function(){return Math.max(r.scrollHeight,i.scrollHeight)},handleScroll:function(){this.otherScroll();var e=document.documentElement.scrollTop||document.body.scrollTop;this.btnFlag=e>60,this.getScrollTop()+this.getClientHeight()+105>this.getScrollHeight()?(this.isLoadMore&&this.getMoreData(),this.isBottom=!0):this.isBottom=!1},otherScroll:function(){}}}}}]); |