19.750059b8cc478f1cdec8.js 20 KB

1
  1. webpackJsonp([19],{"8aUD":function(t,e,n){"use strict";var r=n("cTzj"),i=n.n(r);e.a=i.a},"LxD/":function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});n("qVvv");var r=n("8aUD"),i=n("7+uW"),o=(n("TIfe"),n("PJh5")),a=n.n(o),s=n("mtWM"),u=n.n(s);i.a.use(r.a);var l={data:function(){var t={tree:[],list:[],price:"0",stock_num:0,collection_id:0,none_sku:!0,messages:[],hide_stock:!1};return{showCustomAction:!1,initialSku:t,sku:t,goods:{title:"",picture:""},list:[],filter:{page:1,cid:2345,status:1,offset:0,limit:10,type:0}}},created:function(){var t=this;this.$nextTick(function(){t.$refs.my_scroller.finishInfinite(!1)}),this.$route.query.category_id>0&&(this.filter.category_id=this.$route.query.category_id)},filters:{parsePriceInt:function(t){return Math.floor(t)},parsePriceFloat:function(t){var e=t.toString().split(".");return e.length>1?"."+e[1]:""},datetime:function(t){return a()(1e3*t).format("YYYY-MM-DD HH:mm")}},methods:{go_detail:function(t){localStorage.setItem("page_content_html",t.content),this.$router.push({name:"version_info",query:{id:t.id}})},get_list:function(t){var e=this;u.a.get("https://www.g107.com/blog/ajax/getBlogPostList",{params:this.filter}).then(function(n){for(var r in t(),e.$refs.my_scroller.finishInfinite(0===n.data.data.data.length),n.data.data.data)e.list.push(n.data.data.data[r]);e.filter.page++})},refresh:function(t){var e=this,n=this;setTimeout(function(){e.filter.page=1,e.get_list(function(){n.list=[],t()})},100)},del:function(t,e){var n=this;u()({method:"get",url:"/public/index.php/index/address/del",params:{id:t}}).then(function(t){1==t.data.code?(n.$toast(t.data.msg),n.list.splice(e,1)):n.$toast(t.data.msg)})},infinite:function(t){this.get_list(t)}}},c={render:function(){var t=this,e=t.$createElement,n=t._self._c||e;return n("div",{staticClass:"aff_list_com"},[n("van-nav-bar",{attrs:{title:"版本更新","left-text":"返回","left-arrow":""},on:{"click-left":t.$route_back}}),t._v(" "),n("div",{staticClass:"aff_list_com_body_com has_header"},[n("scroller",{ref:"my_scroller",attrs:{"on-refresh":t.refresh,"on-infinite":t.infinite}},[n("div",{staticStyle:{height:"0.16rem"}}),t._v(" "),n("div",{staticClass:"aff_list_com_box"},t._l(t.list,function(e,r){return n("div",{key:r,staticClass:"aff_list_item",on:{click:function(n){return t.go_detail(e)}}},[n("div",{staticClass:"info_username"},[t._v(t._s(e.title))]),t._v(" "),n("div",{staticClass:"reg_time"},[t._v("发布时间:"+t._s(t._f("datetime")(e.createtime)))])])}),0)])],1)],1)},staticRenderFns:[]};var d=n("VU/8")(l,c,!1,function(t){n("cdXV")},"data-v-cf13e1f8",null);e.default=d.exports},cTzj:function(t,e,n){var r;r=function(){"use strict";function t(t){t=t||{};var r=arguments.length,i=0;if(1===r)return t;for(;++i<r;){var o=arguments[i];d(t)&&(t=o),n(o)&&e(t,o)}return t}function e(e,i){for(var o in f(e,i),i)if("__proto__"!==o&&r(i,o)){var a=i[o];n(a)?("undefined"===v(e[o])&&"function"===v(a)&&(e[o]=a),e[o]=t(e[o]||{},a)):e[o]=a}return e}function n(t){return"object"===v(t)||"function"===v(t)}function r(t,e){return Object.prototype.hasOwnProperty.call(t,e)}function i(t,e){if(t.length){var n=t.indexOf(e);return n>-1?t.splice(n,1):void 0}}function o(t,e){if("IMG"===t.tagName&&t.getAttribute("data-srcset")){var n=t.getAttribute("data-srcset"),r=[],i=t.parentNode.offsetWidth*e,o=void 0,a=void 0,s=void 0;(n=n.trim().split(",")).map(function(t){t=t.trim(),-1===(o=t.lastIndexOf(" "))?(a=t,s=999998):(a=t.substr(0,o),s=parseInt(t.substr(o+1,t.length-o-2),10)),r.push([s,a])}),r.sort(function(t,e){if(t[0]<e[0])return-1;if(t[0]>e[0])return 1;if(t[0]===e[0]){if(-1!==e[1].indexOf(".webp",e[1].length-5))return 1;if(-1!==t[1].indexOf(".webp",t[1].length-5))return-1}return 0});for(var u="",l=void 0,c=r.length,d=0;d<c;d++)if((l=r[d])[0]>=i){u=l[1];break}return u}}function a(t,e){for(var n=void 0,r=0,i=t.length;r<i;r++)if(e(t[r])){n=t[r];break}return n}function s(){}var u="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},l=function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")},c=function(){function t(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}return function(e,n,r){return n&&t(e.prototype,n),r&&t(e,r),e}}(),d=function(t){return null==t||"function"!=typeof t&&"object"!==(void 0===t?"undefined":u(t))},f=function(t,e){if(null===t||void 0===t)throw new TypeError("expected first argument to be an object.");if(void 0===e||"undefined"==typeof Symbol)return t;if("function"!=typeof Object.getOwnPropertySymbols)return t;for(var n=Object.prototype.propertyIsEnumerable,r=Object(t),i=arguments.length,o=0;++o<i;)for(var a=Object(arguments[o]),s=Object.getOwnPropertySymbols(a),u=0;u<s.length;u++){var l=s[u];n.call(a,l)&&(r[l]=a[l])}return r},h=Object.prototype.toString,v=function(t){var e=void 0===t?"undefined":u(t);return"undefined"===e?"undefined":null===t?"null":!0===t||!1===t||t instanceof Boolean?"boolean":"string"===e||t instanceof String?"string":"number"===e||t instanceof Number?"number":"function"===e||t instanceof Function?void 0!==t.constructor.name&&"Generator"===t.constructor.name.slice(0,9)?"generatorfunction":"function":void 0!==Array.isArray&&Array.isArray(t)?"array":t instanceof RegExp?"regexp":t instanceof Date?"date":"[object RegExp]"===(e=h.call(t))?"regexp":"[object Date]"===e?"date":"[object Arguments]"===e?"arguments":"[object Error]"===e?"error":"[object Promise]"===e?"promise":function(t){return t.constructor&&"function"==typeof t.constructor.isBuffer&&t.constructor.isBuffer(t)}(t)?"buffer":"[object Set]"===e?"set":"[object WeakSet]"===e?"weakset":"[object Map]"===e?"map":"[object WeakMap]"===e?"weakmap":"[object Symbol]"===e?"symbol":"[object Map Iterator]"===e?"mapiterator":"[object Set Iterator]"===e?"setiterator":"[object String Iterator]"===e?"stringiterator":"[object Array Iterator]"===e?"arrayiterator":"[object Int8Array]"===e?"int8array":"[object Uint8Array]"===e?"uint8array":"[object Uint8ClampedArray]"===e?"uint8clampedarray":"[object Int16Array]"===e?"int16array":"[object Uint16Array]"===e?"uint16array":"[object Int32Array]"===e?"int32array":"[object Uint32Array]"===e?"uint32array":"[object Float32Array]"===e?"float32array":"[object Float64Array]"===e?"float64array":"object"},p=t,b="undefined"!=typeof window,y=b&&"IntersectionObserver"in window,g={event:"event",observer:"observer"},m=function(){function t(t,e){e=e||{bubbles:!1,cancelable:!1,detail:void 0};var n=document.createEvent("CustomEvent");return n.initCustomEvent(t,e.bubbles,e.cancelable,e.detail),n}if(b)return"function"==typeof window.CustomEvent?window.CustomEvent:(t.prototype=window.Event.prototype,t)}(),_=function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:1;return b&&window.devicePixelRatio||t},w=function(){if(b){var t=!1;try{var e=Object.defineProperty({},"passive",{get:function(){t=!0}});window.addEventListener("test",null,e)}catch(t){}return t}}(),L={on:function(t,e,n){var r=arguments.length>3&&void 0!==arguments[3]&&arguments[3];w?t.addEventListener(e,n,{capture:r,passive:!0}):t.addEventListener(e,n,r)},off:function(t,e,n){var r=arguments.length>3&&void 0!==arguments[3]&&arguments[3];t.removeEventListener(e,n,r)}},k=function(t,e,n){var r=new Image;r.src=t.src,r.onload=function(){e({naturalHeight:r.naturalHeight,naturalWidth:r.naturalWidth,src:r.src})},r.onerror=function(t){n(t)}},E=function(t,e){return"undefined"!=typeof getComputedStyle?getComputedStyle(t,null).getPropertyValue(e):t.style[e]},A=function(t){return E(t,"overflow")+E(t,"overflow-y")+E(t,"overflow-x")},j={},T=function(){function t(e){var n=e.el,r=e.src,i=e.error,o=e.loading,a=e.bindType,s=e.$parent,u=e.options,c=e.elRenderer;l(this,t),this.el=n,this.src=r,this.error=i,this.loading=o,this.bindType=a,this.attempt=0,this.naturalHeight=0,this.naturalWidth=0,this.options=u,this.rect=null,this.$parent=s,this.elRenderer=c,this.performanceData={init:Date.now(),loadStart:0,loadEnd:0},this.filter(),this.initState(),this.render("loading",!1)}return c(t,[{key:"initState",value:function(){this.el.dataset.src=this.src,this.state={error:!1,loaded:!1,rendered:!1}}},{key:"record",value:function(t){this.performanceData[t]=Date.now()}},{key:"update",value:function(t){var e=t.src,n=t.loading,r=t.error,i=this.src;this.src=e,this.loading=n,this.error=r,this.filter(),i!==this.src&&(this.attempt=0,this.initState())}},{key:"getRect",value:function(){this.rect=this.el.getBoundingClientRect()}},{key:"checkInView",value:function(){return this.getRect(),this.rect.top<window.innerHeight*this.options.preLoad&&this.rect.bottom>this.options.preLoadTop&&this.rect.left<window.innerWidth*this.options.preLoad&&this.rect.right>0}},{key:"filter",value:function(){var t=this;(function(t){if(!(t instanceof Object))return[];if(Object.keys)return Object.keys(t);var e=[];for(var n in t)t.hasOwnProperty(n)&&e.push(n);return e})(this.options.filter).map(function(e){t.options.filter[e](t,t.options)})}},{key:"renderLoading",value:function(t){var e=this;k({src:this.loading},function(n){e.render("loading",!1),t()},function(){t(),e.options.silent||console.warn("VueLazyload log: load failed with loading image("+e.loading+")")})}},{key:"load",value:function(){var t=this,e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:s;return this.attempt>this.options.attempt-1&&this.state.error?(this.options.silent||console.log("VueLazyload log: "+this.src+" tried too more than "+this.options.attempt+" times"),void e()):this.state.loaded||j[this.src]?(this.state.loaded=!0,e(),this.render("loaded",!0)):void this.renderLoading(function(){t.attempt++,t.record("loadStart"),k({src:t.src},function(n){t.naturalHeight=n.naturalHeight,t.naturalWidth=n.naturalWidth,t.state.loaded=!0,t.state.error=!1,t.record("loadEnd"),t.render("loaded",!1),j[t.src]=1,e()},function(e){!t.options.silent&&console.error(e),t.state.error=!0,t.state.loaded=!1,t.render("error",!1)})})}},{key:"render",value:function(t,e){this.elRenderer(this,t,e)}},{key:"performance",value:function(){var t="loading",e=0;return this.state.loaded&&(t="loaded",e=(this.performanceData.loadEnd-this.performanceData.loadStart)/1e3),this.state.error&&(t="error"),{src:this.src,state:t,time:e}}},{key:"destroy",value:function(){this.el=null,this.src=null,this.error=null,this.loading=null,this.bindType=null,this.attempt=0}}]),t}(),z="data:image/gif;base64,R0lGODlhAQABAIAAAAAAAP///yH5BAEAAAAALAAAAAABAAEAAAIBRAA7",$=["scroll","wheel","mousewheel","resize","animationend","transitionend","touchmove"],I={rootMargin:"0px",threshold:0},x=function(t){return function(){function e(t){var n=t.preLoad,r=t.error,i=t.throttleWait,o=t.preLoadTop,a=t.dispatchEvent,s=t.loading,u=t.attempt,c=t.silent,d=void 0===c||c,f=t.scale,h=t.listenEvents,v=(t.hasbind,t.filter),p=t.adapter,y=t.observer,m=t.observerOptions;l(this,e),this.version="1.2.3",this.mode=g.event,this.ListenerQueue=[],this.TargetIndex=0,this.TargetQueue=[],this.options={silent:d,dispatchEvent:!!a,throttleWait:i||200,preLoad:n||1.3,preLoadTop:o||0,error:r||z,loading:s||z,attempt:u||3,scale:f||_(f),ListenEvents:h||$,hasbind:!1,supportWebp:function(){if(!b)return!1;var t=!0,e=document;try{var n=e.createElement("object");n.type="image/webp",n.style.visibility="hidden",n.innerHTML="!",e.body.appendChild(n),t=!n.offsetWidth,e.body.removeChild(n)}catch(e){t=!1}return t}(),filter:v||{},adapter:p||{},observer:!!y,observerOptions:m||I},this._initEvent(),this.lazyLoadHandler=function(t,e){var n=null,r=0;return function(){if(!n){var i=this,o=arguments,a=function(){r=Date.now(),n=!1,t.apply(i,o)};Date.now()-r>=e?a():n=setTimeout(a,e)}}}(this._lazyLoadHandler.bind(this),this.options.throttleWait),this.setMode(this.options.observer?g.observer:g.event)}return c(e,[{key:"config",value:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};p(this.options,t)}},{key:"performance",value:function(){var t=[];return this.ListenerQueue.map(function(e){t.push(e.performance())}),t}},{key:"addLazyBox",value:function(t){this.ListenerQueue.push(t),b&&(this._addListenerTarget(window),this._observer&&this._observer.observe(t.el),t.$el&&t.$el.parentNode&&this._addListenerTarget(t.$el.parentNode))}},{key:"add",value:function(e,n,r){var i=this;if(function(t,e){for(var n=!1,r=0,i=t.length;r<i;r++)if(e(t[r])){n=!0;break}return n}(this.ListenerQueue,function(t){return t.el===e}))return this.update(e,n),t.nextTick(this.lazyLoadHandler);var a=this._valueFormatter(n.value),s=a.src,u=a.loading,l=a.error;t.nextTick(function(){s=o(e,i.options.scale)||s,i._observer&&i._observer.observe(e);var a=Object.keys(n.modifiers)[0],c=void 0;a&&(c=(c=r.context.$refs[a])?c.$el||c:document.getElementById(a)),c||(c=function(t){if(b){if(!(t instanceof HTMLElement))return window;for(var e=t;e&&e!==document.body&&e!==document.documentElement&&e.parentNode;){if(/(scroll|auto)/.test(A(e)))return e;e=e.parentNode}return window}}(e));var d=new T({bindType:n.arg,$parent:c,el:e,loading:u,error:l,src:s,elRenderer:i._elRenderer.bind(i),options:i.options});i.ListenerQueue.push(d),b&&(i._addListenerTarget(window),i._addListenerTarget(c)),i.lazyLoadHandler(),t.nextTick(function(){return i.lazyLoadHandler()})})}},{key:"update",value:function(e,n){var r=this,i=this._valueFormatter(n.value),s=i.src,u=i.loading,l=i.error;s=o(e,this.options.scale)||s;var c=a(this.ListenerQueue,function(t){return t.el===e});c&&c.update({src:s,loading:u,error:l}),this._observer&&(this._observer.unobserve(e),this._observer.observe(e)),this.lazyLoadHandler(),t.nextTick(function(){return r.lazyLoadHandler()})}},{key:"remove",value:function(t){if(t){this._observer&&this._observer.unobserve(t);var e=a(this.ListenerQueue,function(e){return e.el===t});e&&(this._removeListenerTarget(e.$parent),this._removeListenerTarget(window),i(this.ListenerQueue,e)&&e.destroy())}}},{key:"removeComponent",value:function(t){t&&(i(this.ListenerQueue,t),this._observer&&this._observer.unobserve(t.el),t.$parent&&t.$el.parentNode&&this._removeListenerTarget(t.$el.parentNode),this._removeListenerTarget(window))}},{key:"setMode",value:function(t){var e=this;y||t!==g.observer||(t=g.event),this.mode=t,t===g.event?(this._observer&&(this.ListenerQueue.forEach(function(t){e._observer.unobserve(t.el)}),this._observer=null),this.TargetQueue.forEach(function(t){e._initListen(t.el,!0)})):(this.TargetQueue.forEach(function(t){e._initListen(t.el,!1)}),this._initIntersectionObserver())}},{key:"_addListenerTarget",value:function(t){if(t){var e=a(this.TargetQueue,function(e){return e.el===t});return e?e.childrenCount++:(e={el:t,id:++this.TargetIndex,childrenCount:1,listened:!0},this.mode===g.event&&this._initListen(e.el,!0),this.TargetQueue.push(e)),this.TargetIndex}}},{key:"_removeListenerTarget",value:function(t){var e=this;this.TargetQueue.forEach(function(n,r){n.el===t&&(--n.childrenCount||(e._initListen(n.el,!1),e.TargetQueue.splice(r,1),n=null))})}},{key:"_initListen",value:function(t,e){var n=this;this.options.ListenEvents.forEach(function(r){return L[e?"on":"off"](t,r,n.lazyLoadHandler)})}},{key:"_initEvent",value:function(){var t=this;this.Event={listeners:{loading:[],loaded:[],error:[]}},this.$on=function(e,n){t.Event.listeners[e].push(n)},this.$once=function(e,n){var r=t;t.$on(e,function t(){r.$off(e,t),n.apply(r,arguments)})},this.$off=function(e,n){n?i(t.Event.listeners[e],n):t.Event.listeners[e]=[]},this.$emit=function(e,n,r){t.Event.listeners[e].forEach(function(t){return t(n,r)})}}},{key:"_lazyLoadHandler",value:function(){var t=this;this.ListenerQueue.forEach(function(e,n){e.state.loaded||e.checkInView()&&e.load(function(){!e.error&&e.loaded&&t.ListenerQueue.splice(n,1)})})}},{key:"_initIntersectionObserver",value:function(){var t=this;y&&(this._observer=new IntersectionObserver(this._observerHandler.bind(this),this.options.observerOptions),this.ListenerQueue.length&&this.ListenerQueue.forEach(function(e){t._observer.observe(e.el)}))}},{key:"_observerHandler",value:function(t,e){var n=this;t.forEach(function(t){t.isIntersecting&&n.ListenerQueue.forEach(function(e){if(e.el===t.target){if(e.state.loaded)return n._observer.unobserve(e.el);e.load()}})})}},{key:"_elRenderer",value:function(t,e,n){if(t.el){var r=t.el,i=t.bindType,o=void 0;switch(e){case"loading":o=t.loading;break;case"error":o=t.error;break;default:o=t.src}if(i?r.style[i]='url("'+o+'")':r.getAttribute("src")!==o&&r.setAttribute("src",o),r.setAttribute("lazy",e),this.$emit(e,t,n),this.options.adapter[e]&&this.options.adapter[e](t,this.options),this.options.dispatchEvent){var a=new m(e,{detail:t});r.dispatchEvent(a)}}}},{key:"_valueFormatter",value:function(t){var e=t,n=this.options.loading,r=this.options.error;return function(t){return null!==t&&"object"===(void 0===t?"undefined":u(t))}(t)&&(t.src||this.options.silent||console.error("Vue Lazyload warning: miss src with "+t),e=t.src,n=t.loading||this.options.loading,r=t.error||this.options.error),{src:e,loading:n,error:r}}}]),e}()},O=function(){function t(e){var n=e.lazy;l(this,t),this.lazy=n,n.lazyContainerMananger=this,this._queue=[]}return c(t,[{key:"bind",value:function(t,e,n){var r=new C({el:t,binding:e,vnode:n,lazy:this.lazy});this._queue.push(r)}},{key:"update",value:function(t,e,n){var r=a(this._queue,function(e){return e.el===t});r&&r.update({el:t,binding:e,vnode:n})}},{key:"unbind",value:function(t,e,n){var r=a(this._queue,function(e){return e.el===t});r&&(r.clear(),i(this._queue,r))}}]),t}(),S={selector:"img"},C=function(){function t(e){var n=e.el,r=e.binding,i=e.vnode,o=e.lazy;l(this,t),this.el=null,this.vnode=i,this.binding=r,this.options={},this.lazy=o,this._queue=[],this.update({el:n,binding:r})}return c(t,[{key:"update",value:function(t){var e=this,n=t.el,r=t.binding;this.el=n,this.options=p({},S,r.value),this.getImgs().forEach(function(t){e.lazy.add(t,p({},e.binding,{value:{src:t.dataset.src,error:t.dataset.error,loading:t.dataset.loading}}),e.vnode)})}},{key:"getImgs",value:function(){return function(t){for(var e=t.length,n=[],r=0;r<e;r++)n.push(t[r]);return n}(this.el.querySelectorAll(this.options.selector))}},{key:"clear",value:function(){var t=this;this.getImgs().forEach(function(e){return t.lazy.remove(e)}),this.vnode=null,this.binding=null,this.lazy=null}}]),t}();return{install:function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=new(x(t))(e),r=new O({lazy:n}),i="2"===t.version.split(".")[0];t.prototype.$Lazyload=n,e.lazyComponent&&t.component("lazy-component",function(t){return{props:{tag:{type:String,default:"div"}},render:function(t){return!1===this.show?t(this.tag):t(this.tag,null,this.$slots.default)},data:function(){return{el:null,state:{loaded:!1},rect:{},show:!1}},mounted:function(){this.el=this.$el,t.addLazyBox(this),t.lazyLoadHandler()},beforeDestroy:function(){t.removeComponent(this)},methods:{getRect:function(){this.rect=this.$el.getBoundingClientRect()},checkInView:function(){return this.getRect(),b&&this.rect.top<window.innerHeight*t.options.preLoad&&this.rect.bottom>0&&this.rect.left<window.innerWidth*t.options.preLoad&&this.rect.right>0},load:function(){this.show=!0,this.state.loaded=!0,this.$emit("show",this)}}}}(n)),i?(t.directive("lazy",{bind:n.add.bind(n),update:n.update.bind(n),componentUpdated:n.lazyLoadHandler.bind(n),unbind:n.remove.bind(n)}),t.directive("lazy-container",{bind:r.bind.bind(r),update:r.update.bind(r),unbind:r.unbind.bind(r)})):(t.directive("lazy",{bind:n.lazyLoadHandler.bind(n),update:function(t,e){p(this.vm.$refs,this.vm.$els),n.add(this.el,{modifiers:this.modifiers||{},arg:this.arg,value:t,oldValue:e},{context:this.vm})},unbind:function(){n.remove(this.el)}}),t.directive("lazy-container",{update:function(t,e){r.update(this.el,{modifiers:this.modifiers||{},arg:this.arg,value:t,oldValue:e},{context:this.vm})},unbind:function(){r.unbind(this.el)}}))}}},t.exports=r()},cdXV:function(t,e){},qVvv:function(t,e,n){"use strict";var r=n("nsZj");n.n(r)}});