1234567 |
- (window["webpackJsonp"]=window["webpackJsonp"]||[]).push([["chunk-ae539474"],{2774:function(t,e,n){"use strict";var i=n("fb75"),r=n.n(i);r.a},"2bfe":function(t,e,n){
- /*!
- * Vue-Lazyload.js v1.2.3
- * (c) 2018 Awe <hilongjw@gmail.com>
- * Released under the MIT License.
- */
- !function(e,n){t.exports=n()}(0,(function(){"use strict";function t(t){return t.constructor&&"function"==typeof t.constructor.isBuffer&&t.constructor.isBuffer(t)}function e(t){t=t||{};var e=arguments.length,r=0;if(1===e)return t;for(;++r<e;){var o=arguments[r];m(t)&&(t=o),i(o)&&n(t,o)}return t}function n(t,n){for(var o in y(t,n),n)if("__proto__"!==o&&r(n,o)){var s=n[o];i(s)?("undefined"===_(t[o])&&"function"===_(s)&&(t[o]=s),t[o]=e(t[o]||{},s)):t[o]=s}return t}function i(t){return"object"===_(t)||"function"===_(t)}function r(t,e){return Object.prototype.hasOwnProperty.call(t,e)}function o(t,e){if(t.length){var n=t.indexOf(e);return n>-1?t.splice(n,1):void 0}}function s(t,e){for(var n=!1,i=0,r=t.length;i<r;i++)if(e(t[i])){n=!0;break}return n}function a(t,e){if("IMG"===t.tagName&&t.getAttribute("data-srcset")){var n=t.getAttribute("data-srcset"),i=[],r=t.parentNode,o=r.offsetWidth*e,s=void 0,a=void 0,u=void 0;n=n.trim().split(","),n.map((function(t){t=t.trim(),s=t.lastIndexOf(" "),-1===s?(a=t,u=999998):(a=t.substr(0,s),u=parseInt(t.substr(s+1,t.length-s-2),10)),i.push([u,a])})),i.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 c="",l=void 0,d=i.length,f=0;f<d;f++)if(l=i[f],l[0]>=o){c=l[1];break}return c}}function u(t,e){for(var n=void 0,i=0,r=t.length;i<r;i++)if(e(t[i])){n=t[i];break}return n}function c(){if(!S)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}function l(t,e){var n=null,i=0;return function(){if(!n){var r=Date.now()-i,o=this,s=arguments,a=function(){i=Date.now(),n=!1,t.apply(o,s)};r>=e?a():n=setTimeout(a,e)}}}function d(t){return null!==t&&"object"===(void 0===t?"undefined":p(t))}function f(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}function h(t){for(var e=t.length,n=[],i=0;i<e;i++)n.push(t[i]);return n}function v(){}var p="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},b=function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")},g=function(){function t(t,e){for(var n=0;n<e.length;n++){var i=e[n];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(t,i.key,i)}}return function(e,n,i){return n&&t(e.prototype,n),i&&t(e,i),e}}(),m=function(t){return null==t||"function"!=typeof t&&"object"!==(void 0===t?"undefined":p(t))},y=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,i=Object(t),r=arguments.length,o=0;++o<r;)for(var s=Object(arguments[o]),a=Object.getOwnPropertySymbols(s),u=0;u<a.length;u++){var c=a[u];n.call(s,c)&&(i[c]=s[c])}return i},k=Object.prototype.toString,_=function(e){var n=void 0===e?"undefined":p(e);return"undefined"===n?"undefined":null===e?"null":!0===e||!1===e||e instanceof Boolean?"boolean":"string"===n||e instanceof String?"string":"number"===n||e instanceof Number?"number":"function"===n||e instanceof Function?void 0!==e.constructor.name&&"Generator"===e.constructor.name.slice(0,9)?"generatorfunction":"function":void 0!==Array.isArray&&Array.isArray(e)?"array":e instanceof RegExp?"regexp":e instanceof Date?"date":(n=k.call(e),"[object RegExp]"===n?"regexp":"[object Date]"===n?"date":"[object Arguments]"===n?"arguments":"[object Error]"===n?"error":"[object Promise]"===n?"promise":t(e)?"buffer":"[object Set]"===n?"set":"[object WeakSet]"===n?"weakset":"[object Map]"===n?"map":"[object WeakMap]"===n?"weakmap":"[object Symbol]"===n?"symbol":"[object Map Iterator]"===n?"mapiterator":"[object Set Iterator]"===n?"setiterator":"[object String Iterator]"===n?"stringiterator":"[object Array Iterator]"===n?"arrayiterator":"[object Int8Array]"===n?"int8array":"[object Uint8Array]"===n?"uint8array":"[object Uint8ClampedArray]"===n?"uint8clampedarray":"[object Int16Array]"===n?"int16array":"[object Uint16Array]"===n?"uint16array":"[object Int32Array]"===n?"int32array":"[object Uint32Array]"===n?"uint32array":"[object Float32Array]"===n?"float32array":"[object Float64Array]"===n?"float64array":"object")},w=e,S="undefined"!=typeof window,L=S&&"IntersectionObserver"in window,A={event:"event",observer:"observer"},C=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(S)return"function"==typeof window.CustomEvent?window.CustomEvent:(t.prototype=window.Event.prototype,t)}(),j=function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:1;return S&&window.devicePixelRatio||t},E=function(){if(S){var t=!1;try{var e=Object.defineProperty({},"passive",{get:function(){t=!0}});window.addEventListener("test",null,e)}catch(t){}return t}}(),x={on:function(t,e,n){var i=arguments.length>3&&void 0!==arguments[3]&&arguments[3];E?t.addEventListener(e,n,{capture:i,passive:!0}):t.addEventListener(e,n,i)},off:function(t,e,n){var i=arguments.length>3&&void 0!==arguments[3]&&arguments[3];t.removeEventListener(e,n,i)}},z=function(t,e,n){var i=new Image;i.src=t.src,i.onload=function(){e({naturalHeight:i.naturalHeight,naturalWidth:i.naturalWidth,src:i.src})},i.onerror=function(t){n(t)}},I=function(t,e){return"undefined"!=typeof getComputedStyle?getComputedStyle(t,null).getPropertyValue(e):t.style[e]},O=function(t){return I(t,"overflow")+I(t,"overflow-y")+I(t,"overflow-x")},$=function(t){if(S){if(!(t instanceof HTMLElement))return window;for(var e=t;e&&e!==document.body&&e!==document.documentElement&&e.parentNode;){if(/(scroll|auto)/.test(O(e)))return e;e=e.parentNode}return window}},T={},H=function(){function t(e){var n=e.el,i=e.src,r=e.error,o=e.loading,s=e.bindType,a=e.$parent,u=e.options,c=e.elRenderer;b(this,t),this.el=n,this.src=i,this.error=r,this.loading=o,this.bindType=s,this.attempt=0,this.naturalHeight=0,this.naturalWidth=0,this.options=u,this.rect=null,this.$parent=a,this.elRenderer=c,this.performanceData={init:Date.now(),loadStart:0,loadEnd:0},this.filter(),this.initState(),this.render("loading",!1)}return g(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,i=t.error,r=this.src;this.src=e,this.loading=n,this.error=i,this.filter(),r!==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;f(this.options.filter).map((function(e){t.options.filter[e](t,t.options)}))}},{key:"renderLoading",value:function(t){var e=this;z({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]:v;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||T[this.src]?(this.state.loaded=!0,e(),this.render("loaded",!0)):void this.renderLoading((function(){t.attempt++,t.record("loadStart"),z({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),T[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}(),R="data:image/gif;base64,R0lGODlhAQABAIAAAAAAAP///yH5BAEAAAAALAAAAAABAAEAAAIBRAA7",P=["scroll","wheel","mousewheel","resize","animationend","transitionend","touchmove"],Q={rootMargin:"0px",threshold:0},B=function(t){return function(){function e(t){var n=t.preLoad,i=t.error,r=t.throttleWait,o=t.preLoadTop,s=t.dispatchEvent,a=t.loading,u=t.attempt,d=t.silent,f=void 0===d||d,h=t.scale,v=t.listenEvents,p=(t.hasbind,t.filter),g=t.adapter,m=t.observer,y=t.observerOptions;b(this,e),this.version="1.2.3",this.mode=A.event,this.ListenerQueue=[],this.TargetIndex=0,this.TargetQueue=[],this.options={silent:f,dispatchEvent:!!s,throttleWait:r||200,preLoad:n||1.3,preLoadTop:o||0,error:i||R,loading:a||R,attempt:u||3,scale:h||j(h),ListenEvents:v||P,hasbind:!1,supportWebp:c(),filter:p||{},adapter:g||{},observer:!!m,observerOptions:y||Q},this._initEvent(),this.lazyLoadHandler=l(this._lazyLoadHandler.bind(this),this.options.throttleWait),this.setMode(this.options.observer?A.observer:A.event)}return g(e,[{key:"config",value:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};w(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),S&&(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,i){var r=this;if(s(this.ListenerQueue,(function(t){return t.el===e})))return this.update(e,n),t.nextTick(this.lazyLoadHandler);var o=this._valueFormatter(n.value),u=o.src,c=o.loading,l=o.error;t.nextTick((function(){u=a(e,r.options.scale)||u,r._observer&&r._observer.observe(e);var o=Object.keys(n.modifiers)[0],s=void 0;o&&(s=i.context.$refs[o],s=s?s.$el||s:document.getElementById(o)),s||(s=$(e));var d=new H({bindType:n.arg,$parent:s,el:e,loading:c,error:l,src:u,elRenderer:r._elRenderer.bind(r),options:r.options});r.ListenerQueue.push(d),S&&(r._addListenerTarget(window),r._addListenerTarget(s)),r.lazyLoadHandler(),t.nextTick((function(){return r.lazyLoadHandler()}))}))}},{key:"update",value:function(e,n){var i=this,r=this._valueFormatter(n.value),o=r.src,s=r.loading,c=r.error;o=a(e,this.options.scale)||o;var l=u(this.ListenerQueue,(function(t){return t.el===e}));l&&l.update({src:o,loading:s,error:c}),this._observer&&(this._observer.unobserve(e),this._observer.observe(e)),this.lazyLoadHandler(),t.nextTick((function(){return i.lazyLoadHandler()}))}},{key:"remove",value:function(t){if(t){this._observer&&this._observer.unobserve(t);var e=u(this.ListenerQueue,(function(e){return e.el===t}));e&&(this._removeListenerTarget(e.$parent),this._removeListenerTarget(window),o(this.ListenerQueue,e)&&e.destroy())}}},{key:"removeComponent",value:function(t){t&&(o(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;L||t!==A.observer||(t=A.event),this.mode=t,t===A.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=u(this.TargetQueue,(function(e){return e.el===t}));return e?e.childrenCount++:(e={el:t,id:++this.TargetIndex,childrenCount:1,listened:!0},this.mode===A.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,i){n.el===t&&(--n.childrenCount||(e._initListen(n.el,!1),e.TargetQueue.splice(i,1),n=null))}))}},{key:"_initListen",value:function(t,e){var n=this;this.options.ListenEvents.forEach((function(i){return x[e?"on":"off"](t,i,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){function i(){r.$off(e,i),n.apply(r,arguments)}var r=t;t.$on(e,i)},this.$off=function(e,n){n?o(t.Event.listeners[e],n):t.Event.listeners[e]=[]},this.$emit=function(e,n,i){t.Event.listeners[e].forEach((function(t){return t(n,i)}))}}},{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;L&&(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 i=t.el,r=t.bindType,o=void 0;switch(e){case"loading":o=t.loading;break;case"error":o=t.error;break;default:o=t.src}if(r?i.style[r]='url("'+o+'")':i.getAttribute("src")!==o&&i.setAttribute("src",o),i.setAttribute("lazy",e),this.$emit(e,t,n),this.options.adapter[e]&&this.options.adapter[e](t,this.options),this.options.dispatchEvent){var s=new C(e,{detail:t});i.dispatchEvent(s)}}}},{key:"_valueFormatter",value:function(t){var e=t,n=this.options.loading,i=this.options.error;return d(t)&&(t.src||this.options.silent||console.error("Vue Lazyload warning: miss src with "+t),e=t.src,n=t.loading||this.options.loading,i=t.error||this.options.error),{src:e,loading:n,error:i}}}]),e}()},N=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(),S&&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)}}}},G=function(){function t(e){var n=e.lazy;b(this,t),this.lazy=n,n.lazyContainerMananger=this,this._queue=[]}return g(t,[{key:"bind",value:function(t,e,n){var i=new D({el:t,binding:e,vnode:n,lazy:this.lazy});this._queue.push(i)}},{key:"update",value:function(t,e,n){var i=u(this._queue,(function(e){return e.el===t}));i&&i.update({el:t,binding:e,vnode:n})}},{key:"unbind",value:function(t,e,n){var i=u(this._queue,(function(e){return e.el===t}));i&&(i.clear(),o(this._queue,i))}}]),t}(),W={selector:"img"},D=function(){function t(e){var n=e.el,i=e.binding,r=e.vnode,o=e.lazy;b(this,t),this.el=null,this.vnode=r,this.binding=i,this.options={},this.lazy=o,this._queue=[],this.update({el:n,binding:i})}return g(t,[{key:"update",value:function(t){var e=this,n=t.el,i=t.binding;this.el=n,this.options=w({},W,i.value),this.getImgs().forEach((function(t){e.lazy.add(t,w({},e.binding,{value:{src:t.dataset.src,error:t.dataset.error,loading:t.dataset.loading}}),e.vnode)}))}},{key:"getImgs",value:function(){return h(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=B(t),i=new n(e),r=new G({lazy:i}),o="2"===t.version.split(".")[0];t.prototype.$Lazyload=i,e.lazyComponent&&t.component("lazy-component",N(i)),o?(t.directive("lazy",{bind:i.add.bind(i),update:i.update.bind(i),componentUpdated:i.lazyLoadHandler.bind(i),unbind:i.remove.bind(i)}),t.directive("lazy-container",{bind:r.bind.bind(r),update:r.update.bind(r),unbind:r.unbind.bind(r)})):(t.directive("lazy",{bind:i.lazyLoadHandler.bind(i),update:function(t,e){w(this.vm.$refs,this.vm.$els),i.add(this.el,{modifiers:this.modifiers||{},arg:this.arg,value:t,oldValue:e},{context:this.vm})},unbind:function(){i.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)}}))}}}))},3050:function(t,e,n){"use strict";var i=function(){var t=this,e=t.$createElement,n=t._self._c||e;return n("div",{class:{"top-nav-wrap":t.placeholder}},[n("div",{staticClass:"nav-bar",class:{"nav-bar-fixed":t.fixed,"nav-bar-transparent":t.transparent},style:t.obj},[t.leftArrow?n("div",{staticClass:"nav-bar-left",on:{click:t.left}},[n("i",{staticClass:"icon iconfont",class:{"nav-bar-icon":t.transparent},staticStyle:{"font-size":"18px"}},[t._v("")])]):t._e(),n("div",{staticClass:"nav-bar-middle",class:{"nav-bar-title":t.transparent}},[t._v(t._s(t.title))]),t.rightArrow?n("div",{staticClass:"nav-bar-right",on:{click:t.right}},["share"==t.rightIcon?n("i",{staticClass:"icon iconfont",class:{"nav-bar-icon":t.transparent},staticStyle:{"font-size":"18px"}},[t._v("")]):t._e(),"delete"==t.rightIcon?n("i",{staticClass:"icon iconfont",class:{"nav-bar-icon":t.transparent},staticStyle:{"font-size":"16px"}},[t._v("")]):t._e()]):t._e()])])},r=[],o=(n("a9e3"),{name:"NavBar",props:{title:{type:String,default:""},zIndex:{type:Number,default:0},fixed:{type:Boolean,default:!1},transparent:{type:Boolean,default:!1},backgroundColor:{type:String,default:""},placeholder:{type:Boolean,default:!1},leftArrow:{type:Boolean,default:!1},rightArrow:{type:Boolean,default:!1},rightIcon:{type:String,default:""}},data:function(){return{obj:{}}},mounted:function(){this.zIndex>0&&(this.obj={"z-index":this.zIndex}),""!=this.backgroundColor&&Object.assign(this.obj,{"background-color":this.backgroundColor})},methods:{left:function(){this.$emit("click-left")},right:function(){this.$emit("click-right")}}}),s=o,a=(n("a60c"),n("2877")),u=Object(a["a"])(s,i,r,!1,null,"e78cf01c",null);e["a"]=u.exports},"343b":function(t,e,n){"use strict";var i=n("2bfe"),r=n.n(i);e["a"]=r.a},3631:function(t,e,n){"use strict";var i=n("cce7"),r=n.n(i);r.a},"36e7":function(t,e,n){},"40a8":function(t,e,n){"use strict";var i=n("ac76"),r=n.n(i);r.a},"4d63":function(t,e,n){var i=n("83ab"),r=n("da84"),o=n("94ca"),s=n("7156"),a=n("9bf2").f,u=n("241c").f,c=n("44e7"),l=n("ad6d"),d=n("9f7f"),f=n("6eeb"),h=n("d039"),v=n("69f3").set,p=n("2626"),b=n("b622"),g=b("match"),m=r.RegExp,y=m.prototype,k=/a/g,_=/a/g,w=new m(k)!==k,S=d.UNSUPPORTED_Y,L=i&&o("RegExp",!w||S||h((function(){return _[g]=!1,m(k)!=k||m(_)==_||"/a/i"!=m(k,"i")})));if(L){var A=function(t,e){var n,i=this instanceof A,r=c(t),o=void 0===e;if(!i&&r&&t.constructor===A&&o)return t;w?r&&!o&&(t=t.source):t instanceof A&&(o&&(e=l.call(t)),t=t.source),S&&(n=!!e&&e.indexOf("y")>-1,n&&(e=e.replace(/y/g,"")));var a=s(w?new m(t,e):m(t,e),i?this:y,A);return S&&n&&v(a,{sticky:n}),a},C=function(t){t in A||a(A,t,{configurable:!0,get:function(){return m[t]},set:function(e){m[t]=e}})},j=u(m),E=0;while(j.length>E)C(j[E++]);y.constructor=A,A.prototype=y,f(r,"RegExp",A)}p("RegExp")},"66cf":function(t,e,n){"use strict";n("68ef")},"66d3":function(t,e,n){"use strict";var i=n("36e7"),r=n.n(i);r.a},"6b91":function(t,e,n){"use strict";var i=n("9714"),r=n.n(i);r.a},"7cc0":function(t,e,n){"use strict";var i=function(){var t=this,e=t.$createElement,n=t._self._c||e;return n("div",{staticClass:"goods-action"},[t._t("default")],2)},r=[],o={name:"GoodsAction"},s=o,a=(n("6b91"),n("2877")),u=Object(a["a"])(s,i,r,!1,null,"77a9565c",null);e["a"]=u.exports},"85b3":function(t,e,n){"use strict";var i=function(){var t=this,e=t.$createElement,n=t._self._c||e;return n("div",[n("div",{staticClass:"sku-action",class:{"sku-show":1==t.value}},[n("div",{staticClass:"sku-header"},[n("div",{staticClass:"sku-header-image"},[n("img",{attrs:{src:t.goods.photo}})]),n("div",{staticClass:"sku-header-goods-info"},[t._t("sku-header-price",[n("div",{staticClass:"sku-header-goods-price"},[n("span",{staticClass:"symbol"},[t._v("¥")]),n("span",{staticClass:"price"},[t._v(t._s(t.goodsPrice||""))])])],{price:t.goodsPrice}),n("div",{staticClass:"sku-header-item"},[n("span",{staticClass:"sku-stock"},[t._v(" 剩余"),n("i",{staticClass:"stock-num"},[t._v(t._s(t.goodsStockNumber||t.goods.store_nums||"0"))]),t._v("件 ")])]),n("div",{staticClass:"sku-header-item"},[t._v(t._s(t.specSelected||""))])],2)]),n("div",{staticClass:"sku-body",style:{"max-height":t.maxHeight+"px"}},[n("div",{staticClass:"sku-group-container"},t._l(t.attribute,(function(e,i){return n("div",{key:i,staticClass:"sku-row"},[n("div",{staticClass:"sku-row-title"},[t._v(t._s(e.name))]),t._l(e.list,(function(i,r){return n("span",{key:r,staticClass:"sku-row-item",class:{"sku-row-item-active":i.selected&&0==i.disable,"sku-row-item-disable":i.disable}},[n("i",{staticClass:"sku-row-item-name",on:{click:function(n){return t.onSelected(e.id,i.id)}}},[t._v(t._s(i.value))])])}))],2)})),0),n("div",{staticClass:"sku-stepper-stock"},[n("div",{staticClass:"sku-stepper-title"},[t._v("购买数量")]),n("div",{staticClass:"stepper sku-stepper"},[n("button",{staticClass:"stepper-minus",class:{"stepper-minus-disabled":t.number<=1},attrs:{type:"button"},on:{click:function(e){return e.stopPropagation(),t.minus(e)}}}),n("input",{staticClass:"stepper-input",attrs:{type:"number",disabled:"disabled"},domProps:{value:t.number}}),n("button",{staticClass:"stepper-plus",class:{"stepper-minus-disabled":t.number>=t.goodsStockNumber},attrs:{type:"button"},on:{click:function(e){return e.stopPropagation(),t.plus(e)}}})])]),n("div",{staticStyle:{width:"100%",height:"55px"}})]),n("i",{staticClass:"fa fa-times-circle",attrs:{id:"close"},on:{click:function(e){return e.stopPropagation(),t.onClose(e)}}})]),n("popup",{model:{value:t.value,callback:function(e){t.value=e},expression:"value"}})],1)},r=[],o=(n("a15b"),n("fb6a"),n("b0c0"),n("4d63"),n("ac1f"),n("25f0"),n("ade3")),s=n("badd"),a={name:"SkuAction",components:Object(o["a"])({},s["a"].name,s["a"]),props:{value:{type:Boolean,default:!1},fields:{required:!0,type:Array,default:function(){return[]}},goods:{default:function(){return{}}},attribute:{default:function(){return[]}},item:{default:function(){return{}}},goodsInfo:{default:function(){return{}}}},data:function(){return{maxHeight:0,number:1,minNumber:1,maxNumber:0,specSelected:"",selectedSku:[],goodsPrice:"",goodsStockNumber:"",selectedGoodsInfo:{}}},mounted:function(){this.maxHeight=window.innerHeight-200},watch:{goods:{handler:function(t,e){this.goodsStockNumber=this.goods.store_nums,this.goodsPrice=this.goods.sell_price;var n={};for(var i in this.goods)this.$tools.in_array(i,this.fields)&&(n[i]=this.goods[i]);Object.assign(n,{num:this.number,isSubmit:!0,selectedSku:{id:"",specSelected:""}}),this.selectedGoodsInfo=n},deep:!0},attribute:{handler:function(t,e){if(!(this.attribute.length<=0)){var n=[];for(var i in this.selectedSku=[],this.attribute)for(var r in this.attribute[i]["list"])this.attribute[i]["list"][r]["selected"]&&!this.attribute[i]["list"][r]["disable"]&&(this.selectedSku.push(this.attribute[i]["list"][r]),n.push({name:this.attribute[i].name,value:this.attribute[i]["list"][r].value}));var o=[];for(var s in this.selectedSku)o.push(this.selectedSku[s].pid+"_"+this.selectedSku[s].id);if(this.attribute.length==o.length&&void 0!=this.item[o.join("_")]){var a=this.item[o.join("_")];this.goodsPrice=a.sell_price,this.goodsStockNumber=a.store_nums,this.number>=a.store_nums&&(this.number=a.store_nums),this.selectedGoodsInfo.selectedSku.id=a.product_id,this.selectedGoodsInfo.isSubmit=!0}else this.selectedGoodsInfo.isSubmit=!1;this.specSelected="";var u=[];for(var c in n)u.push(n[c].name+":"+n[c].value);u.length>0&&(this.selectedGoodsInfo.selectedSku.specSelected=u.join(","),this.specSelected="己选择:"+u.join(","))}},deep:!0},selectedGoodsInfo:{handler:function(t,e){this.$emit("update:goods-info",this.selectedGoodsInfo)},deep:!0}},methods:{minus:function(){this.number<=1||(this.number-=1,this.selectedGoodsInfo.num=this.number)},plus:function(){this.number>=this.goodsStockNumber||(this.number+=1,this.selectedGoodsInfo.num=this.number)},onClose:function(){this.$emit("input",!this.value)},checkStatus:function(t,e){var n=this.attribute,i=!1;for(var r in n)if(t==n[r]["id"])for(var o in n[r]["list"]){var s=n[r]["list"][o];if(t==s["pid"]&&e==s["id"]&&s["disable"]){i=!0;break}}return i},onSelected:function(t,e){if(!this.checkStatus(t,e)){var n=[];for(var i in this.attribute)if(n[i]="[A-Za-z0-9_\\:\\,]+",t==this.attribute[i]["id"])for(var r in this.attribute[i]["list"]){var o=this.attribute[i]["list"][r];if(t==o["pid"]&&e==o["id"]){var s=!o.selected;this.$set(this.attribute[i]["list"][r],"selected",s),1==s&&(n[i]=o.pid+":"+o.id)}else this.$set(this.attribute[i]["list"][r],"selected",!1)}for(var a in this.attribute)for(var u in this.attribute[a]["list"]){var c=this.attribute[a]["list"][u],l=n.slice();l[a]=c.pid+":"+c.id;var d=!0;for(var f in this.item){var h=new RegExp(l.join(","));h.test(this.item[f].key)&&this.item[f].store_nums>0&&(d=!1)}this.$set(this.attribute[a]["list"][u],"disable",d)}}}}},u=a,c=(n("66d3"),n("2877")),l=Object(c["a"])(u,i,r,!1,null,"96545ac6",null);e["a"]=l.exports},9714:function(t,e,n){},a15b:function(t,e,n){"use strict";var i=n("23e7"),r=n("44ad"),o=n("fc6a"),s=n("a640"),a=[].join,u=r!=Object,c=s("join",",");i({target:"Array",proto:!0,forced:u||!c},{join:function(t){return a.call(o(this),void 0===t?",":t)}})},a60c:function(t,e,n){"use strict";var i=n("c435"),r=n.n(i);r.a},a65e:function(t,e,n){"use strict";var i=function(){var t=this,e=t.$createElement,n=t._self._c||e;return n("div",{staticClass:"goods-action-icon",class:"goods-action-icon-"+t.icon},[n("div",{on:{click:t.btn}},["home"==t.icon?n("span",{staticClass:"icon iconfont",staticStyle:{"font-size":"18px"}},[t._v("")]):t._e(),"cart"==t.icon?n("span",{staticClass:"icon iconfont",staticStyle:{"font-size":"18px"}},[t._v("")]):t._e(),"collect"==t.icon?n("span",{staticClass:"icon iconfont",class:{active:t.active},staticStyle:{"font-size":"18px"}},[t._v("")]):t._e(),t.count>0?n("i",[t._v(t._s(t.count))]):t._e()]),n("div",[n("span",{class:{active:t.active}},[t._v(t._s(t.text))])])])},r=[],o=(n("a9e3"),{name:"GoodsActionIcon",props:{icon:{type:String,default:""},text:{type:String,default:""},count:{type:[String,Number],default:"0"},active:{type:Boolean,default:!1}},methods:{btn:function(){this.$emit("click")}}}),s=o,a=(n("2774"),n("2877")),u=Object(a["a"])(s,i,r,!1,null,"fd591e2e",null);e["a"]=u.exports},ac76:function(t,e,n){},badd:function(t,e,n){"use strict";var i=function(){var t=this,e=t.$createElement,n=t._self._c||e;return n("div",{staticClass:"mask",class:{hide:0==t.value,show:1==t.value},on:{click:function(e){return e.stopPropagation(),t.onClose(e)}}},[t._t("default")],2)},r=[],o={name:"Popup",props:{value:{type:Boolean,default:!1}},methods:{onClose:function(){}}},s=o,a=(n("3631"),n("2877")),u=Object(a["a"])(s,i,r,!1,null,"d88c033e",null);e["a"]=u.exports},c435:function(t,e,n){},cce7:function(t,e,n){},ed72:function(t,e,n){"use strict";var i=function(){var t=this,e=t.$createElement,n=t._self._c||e;return n("button",{staticClass:"goods-action-button",class:"button-"+t.type,on:{click:t.btn}},[t._v(" "+t._s(t.text)+" ")])},r=[],o={name:"GoodsActionButton",props:{type:{type:String,default:""},text:{type:String,default:"按钮"}},methods:{btn:function(){this.$emit("click")}}},s=o,a=(n("40a8"),n("2877")),u=Object(a["a"])(s,i,r,!1,null,"6450d556",null);e["a"]=u.exports},fb6a:function(t,e,n){"use strict";var i=n("23e7"),r=n("861d"),o=n("e8b5"),s=n("23cb"),a=n("50c4"),u=n("fc6a"),c=n("8418"),l=n("b622"),d=n("1dde"),f=n("ae40"),h=d("slice"),v=f("slice",{ACCESSORS:!0,0:0,1:2}),p=l("species"),b=[].slice,g=Math.max;i({target:"Array",proto:!0,forced:!h||!v},{slice:function(t,e){var n,i,l,d=u(this),f=a(d.length),h=s(t,f),v=s(void 0===e?f:e,f);if(o(d)&&(n=d.constructor,"function"!=typeof n||n!==Array&&!o(n.prototype)?r(n)&&(n=n[p],null===n&&(n=void 0)):n=void 0,n===Array||void 0===n))return b.call(d,h,v);for(i=new(void 0===n?Array:n)(g(v-h,0)),l=0;h<v;h++,l++)h in d&&c(i,l,d[h]);return i.length=l,i}})},fb75:function(t,e,n){}}]);
|