bztang-admin/addons/yun_shop/static/app/js/chunk-7364370c.75f57cf4.js

1 line
7.3 KiB
JavaScript

(window["webpackJsonp"]=window["webpackJsonp"]||[]).push([["chunk-7364370c"],{"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,s=i.getDate(),n=i.getMonth()+1,r=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)==r)if(a.substr(5,2)==n){if(a.substr(8,2)==s)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()),s=(i.getTime()-a.getTime())/864e5;return s},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()),s=0==a.getDay()?7:a.getDay(),n=0==i.getDay()?7:i.getDay(),r=!0,o=(i.getTime()-a.getTime())/864e5;return r=!(o>=7)&&(s==n||!(n<=s)),{is:r,cWeek:n,tWeek:s}};var s=new i;e["a"]=s.getLocalTime.bind(s)},7488:function(t,e,a){"use strict";a("cba1")},a669:function(t,e,a){var i=a("24fb");e=i(!1),e.push([t.i,".page[data-v-66d9c024]{background:#fafafa;min-height:100vh;padding-bottom:3.0625rem;text-align:left}.items[data-v-66d9c024]{padding:0 .781rem}.items .item .time[data-v-66d9c024]{height:2.75rem;line-height:2.75rem;letter-spacing:.019rem;color:#666;font-size:.75rem;text-align:center}.items .item .wrapper[data-v-66d9c024]{background-color:#fff;border-radius:.25rem;width:100%;padding:.844rem .875rem 0 .969rem}.items .item .wrapper .name[data-v-66d9c024]{-webkit-box-flex:1;-webkit-flex:1;-ms-flex:1;flex:1;color:#000;font-size:1rem}.items .item .wrapper .c1[data-v-66d9c024]{margin-top:.519rem}.items .item .wrapper .ca[data-v-66d9c024]{font-size:.75rem;line-height:1.25rem;letter-spacing:.019rem;color:#666}.items .item .wrapper .botm[data-v-66d9c024]{margin-top:.813rem;border-top:.031rem solid #f4f4f4;height:1.938rem;display:-webkit-box;display:-webkit-flex;display:-ms-flexbox;display:flex;-webkit-box-pack:justify;-webkit-justify-content:space-between;-ms-flex-pack:justify;justify-content:space-between;-webkit-box-align:center;-webkit-align-items:center;-ms-flex-align:center;align-items:center;letter-spacing:.022rem;color:#666;font-size:.875rem}",""]),t.exports=e},aa59: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("van-tabs",{on:{click:t.changeTags},model:{value:t.active,callback:function(e){t.active=e},expression:"active"}},t._l(t.subTypeList,(function(e){return a("van-tab",{key:e.sub_type,attrs:{title:e.sub_title}},[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"},[a("div",{staticClass:"name"},[t._v(t._s(e.title))]),a("p",{staticClass:"c1 ca"},[t._v(t._s(e.desc))]),t._l(e.msg_body,(function(e,i){return a("p",{key:i,staticClass:"c2 ca"},[t._v(t._s(t.msg_body[i])+t._s(e))])})),a("div",{staticClass:"botm"},[a("span",[t._v("查看详情")]),a("i",{staticClass:"iconfont icon-advertise-next"})])],2)])})),0)])})),1)],1)},s=[],n=a("c7eb"),r=(a("e7e5"),a("d399")),o=a("1da1"),c=(a("d3b7"),a("159b"),a("99af"),a("ac0d")),l=a("6c42"),u={mixins:[c["a"]],data:function(){return{titleName:"订单提醒",active:0,page:1,isLoadMore:!0,total_page:0,listData:[],msg_body:{nickname:"昵称:",time:"时间:",order_sn:"订单编号:",goodsName:"商品名:",pay_money:"订单金额:",refund_money:"退款金额:"},subTypeList:[]}},activated:function(){this.$route.query.pageTitle&&(this.titleName=this.$route.query.pageTitle,this.fun.setWXTitle(this.titleName)),this.active=0,this.getSubType()},methods:{initData:function(){this.page=1,this.isLoadMore=!0,this.total_page=0},getSubType:function(){var t=this;return Object(o["a"])(Object(n["a"])().mark((function e(){var a;return Object(n["a"])().wrap((function(e){while(1)switch(e.prev=e.next){case 0:return r["a"].loading({message:"加载中",forbidClick:!0}),e.next=3,$http.get("plugin.instation-message.api.message.get-sub-type",{type_id:7});case 3:if(a=e.sent,r["a"].clear(),1===a.result){e.next=8;break}return Object(r["a"])(a.msg),e.abrupt("return");case 8:t.subTypeList=a.data,t.getListData();case 10:case"end":return e.stop()}}),e)})))()},getListData:function(){var t=this;return Object(o["a"])(Object(n["a"])().mark((function e(){var a;return Object(n["a"])().wrap((function(e){while(1)switch(e.prev=e.next){case 0:return t.initData(),r["a"].loading({message:"加载中",forbidClick:!0}),e.next=4,$http.get("plugin.instation-message.api.message.get-type-list",{type_id:7,sub_type:t.subTypeList[t.active].sub_type});case 4:if(a=e.sent,r["a"].clear(),1===a.result){e.next=9;break}return Object(r["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:7,sub_type:this.subTypeList[this.active].sub_type}).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})))},changeTags:function(){this.getListData()},goPages:function(t){""!=t&&(window.location=t)}}},g=u,d=g,p=(a("7488"),a("2877")),m=Object(p["a"])(d,i,s,!1,null,"66d9c024",null);e["default"]=m.exports},ac0d:function(t,e,a){"use strict";a.d(e,"a",(function(){return n}));var i=document.documentElement,s=document.body,n={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:s&&(t=s.scrollTop),t},getClientHeight:function(){var t=0;return t=s.clientHeight&&i.clientHeight?Math.min(s.clientHeight,i.clientHeight):Math.max(s.clientHeight,i.clientHeight),t},getScrollHeight:function(){return Math.max(s.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(){}}}},cba1:function(t,e,a){var i=a("a669");i.__esModule&&(i=i.default),"string"===typeof i&&(i=[[t.i,i,""]]),i.locals&&(t.exports=i.locals);var s=a("499e").default;s("7f874464",i,!0,{sourceMap:!1,shadowMode:!1})}}]);