chunk-39830972.14f70882.js 18 KB

12
  1. (window["webpackJsonp"]=window["webpackJsonp"]||[]).push([["chunk-39830972"],{2241:function(t,e,n){"use strict";var i,o=n("c31d"),a=n("2b0e"),s=n("fe7e"),r=n("b650"),c=n("6605"),l=Object(s["a"])({render:function(){var t=this,e=t.$createElement,n=t._self._c||e;return n("transition",{attrs:{name:"van-dialog-bounce"}},[n("div",{directives:[{name:"show",rawName:"v-show",value:t.value,expression:"value"}],class:[t.b(),t.className]},[t.title?n("div",{class:t.b("header",{isolated:!t.message&&!t.$slots.default}),domProps:{textContent:t._s(t.title)}}):t._e(),t.message||t.$slots.default?n("div",{class:t.b("content")},[t._t("default",[t.message?n("div",{class:t.b("message",{"has-title":t.title}),domProps:{innerHTML:t._s(t.message)}}):t._e()])],2):t._e(),n("div",{staticClass:"van-hairline--top",class:t.b("footer",{buttons:t.showCancelButton&&t.showConfirmButton})},[n("van-button",{directives:[{name:"show",rawName:"v-show",value:t.showCancelButton,expression:"showCancelButton"}],class:t.b("cancel"),attrs:{loading:t.loading.cancel,size:"large"},on:{click:function(e){t.handleAction("cancel")}}},[t._v("\n "+t._s(t.cancelButtonText||t.$t("cancel"))+"\n ")]),n("van-button",{directives:[{name:"show",rawName:"v-show",value:t.showConfirmButton,expression:"showConfirmButton"}],class:[t.b("confirm"),{"van-hairline--left":t.showCancelButton&&t.showConfirmButton}],attrs:{size:"large",loading:t.loading.confirm},on:{click:function(e){t.handleAction("confirm")}}},[t._v("\n "+t._s(t.confirmButtonText||t.$t("confirm"))+"\n ")])],1)])])},name:"dialog",components:{VanButton:r["a"]},mixins:[c["a"]],props:{title:String,message:String,callback:Function,className:[String,Object,Array],beforeClose:Function,confirmButtonText:String,cancelButtonText:String,showCancelButton:Boolean,showConfirmButton:{type:Boolean,default:!0},overlay:{type:Boolean,default:!0},closeOnClickOverlay:{type:Boolean,default:!1}},data:function(){return{loading:{confirm:!1,cancel:!1}}},methods:{handleAction:function(t){var e=this;this.beforeClose?(this.loading[t]=!0,this.beforeClose(t,function(n){!1!==n&&e.onClose(t),e.loading[t]=!1})):this.onClose(t)},onClose:function(t){this.$emit("input",!1),this.$emit(t),this.callback&&this.callback(t)}}}),u=n("a142"),f=function(){i=new(a["a"].extend(l))({el:document.createElement("div")}),i.$on("input",function(t){i.value=t}),document.body.appendChild(i.$el)},d=function t(e){return u["e"]?Promise.resolve():new Promise(function(n,a){i||f(),Object(o["a"])(i,Object(o["a"])({resolve:n,reject:a},t.currentOptions,e))})};d.defaultOptions={value:!0,title:"",message:"",overlay:!0,className:"",lockScroll:!0,beforeClose:null,confirmButtonText:"",cancelButtonText:"",showConfirmButton:!0,showCancelButton:!1,closeOnClickOverlay:!1,callback:function(t){i["confirm"===t?"resolve":"reject"](t)}},d.alert=d,d.confirm=function(t){return d(Object(o["a"])({showCancelButton:!0},t))},d.close=function(){i&&(i.value=!1)},d.setDefaultOptions=function(t){Object(o["a"])(d.currentOptions,t)},d.resetDefaultOptions=function(){d.currentOptions=Object(o["a"])({},d.defaultOptions)},d.install=function(){a["a"].use(l)},a["a"].prototype.$dialog=d,d.resetDefaultOptions();e["a"]=d},"2f21":function(t,e,n){"use strict";var i=n("79e5");t.exports=function(t,e){return!!t&&i(function(){e?t.call(null,function(){},1):t.call(null)})}},"2fcb":function(t,e,n){},3875:function(t,e,n){"use strict";var i=10;function o(t,e){return t>e&&t>i?"horizontal":e>t&&e>i?"vertical":""}e["a"]={data:function(){return{direction:""}},methods:{touchStart:function(t){this.resetTouchStatus(),this.startX=t.touches[0].clientX,this.startY=t.touches[0].clientY},touchMove:function(t){var e=t.touches[0];this.deltaX=e.clientX-this.startX,this.deltaY=e.clientY-this.startY,this.offsetX=Math.abs(this.deltaX),this.offsetY=Math.abs(this.deltaY),this.direction=this.direction||o(this.offsetX,this.offsetY)},resetTouchStatus:function(){this.direction="",this.deltaX=0,this.deltaY=0,this.offsetX=0,this.offsetY=0}}}},"4d48":function(t,e,n){"use strict";n("68ef"),n("bf60")},"4d75":function(t,e,n){},"55dd":function(t,e,n){"use strict";var i=n("5ca1"),o=n("d8e8"),a=n("4bf8"),s=n("79e5"),r=[].sort,c=[1,2,3];i(i.P+i.F*(s(function(){c.sort(void 0)})||!s(function(){c.sort(null)})||!n("2f21")(r)),"Array",{sort:function(t){return void 0===t?r.call(a(this)):r.call(a(this),o(t))}})},6605:function(t,e,n){"use strict";var i=n("c31d"),o=n("2b0e"),a={zIndex:2e3,stack:[],lockCount:0,get top(){return this.stack[this.stack.length-1]}},s={render:function(){var t=this,e=t.$createElement,n=t._self._c||e;return n("transition",{attrs:{name:"van-fade"}},[n("div",{directives:[{name:"show",rawName:"v-show",value:t.visible,expression:"visible"}],staticClass:"van-overlay",class:t.className,style:t.style,on:{touchmove:function(t){t.preventDefault(),t.stopPropagation()},click:function(e){t.$emit("click",e)}}})])},name:"overlay",props:{zIndex:Number,visible:Boolean,className:String,customStyle:Object},computed:{style:function(){return Object(i["a"])({zIndex:this.zIndex},this.customStyle)}}},r={className:"",customStyle:{}},c={open:function(t,e){if(!a.stack.some(function(e){return e.vm===t})){var n=t.$el,i=n&&n.parentNode?n.parentNode:document.body;a.stack.push({vm:t,config:e,target:i}),this.update()}},close:function(t){var e=a.stack;e.length&&(a.top.vm===t?(e.pop(),this.update()):a.stack=e.filter(function(e){return e.vm!==t}))},update:function(){var t=a.modal;if(t||(t=new(o["a"].extend(s))({el:document.createElement("div")}),t.$on("click",this.onClick),a.modal=t),t.$el.parentNode&&(t.visible=!1),a.top){var e=a.top,n=e.target,c=e.config;n.appendChild(t.$el),Object(i["a"])(t,Object(i["a"])({},r,c,{visible:!0}))}},onClick:function(){if(a.top){var t=a.top.vm;t.$emit("click-overlay"),t.closeOnClickOverlay&&t.$emit("input",!1)}}},l=n("a142"),u={getScrollEventTarget:function(t,e){void 0===e&&(e=window);var n=t;while(n&&"HTML"!==n.tagName&&"BODY"!==n.tagName&&1===n.nodeType&&n!==e){var i=this.getComputedStyle(n).overflowY;if("scroll"===i||"auto"===i)return n;n=n.parentNode}return e},getScrollTop:function(t){return"scrollTop"in t?t.scrollTop:t.pageYOffset},setScrollTop:function(t,e){"scrollTop"in t?t.scrollTop=e:t.scrollTo(t.scrollX,e)},getElementTop:function(t){return(t===window?0:t.getBoundingClientRect().top)+this.getScrollTop(window)},getVisibleHeight:function(t){return t===window?t.innerHeight:t.getBoundingClientRect().height},getComputedStyle:!l["e"]&&document.defaultView.getComputedStyle.bind(document.defaultView)},f=n("db78"),d=n("3875");e["a"]={mixins:[d["a"]],props:{value:Boolean,overlay:Boolean,overlayStyle:Object,overlayClass:String,closeOnClickOverlay:Boolean,zIndex:[String,Number],getContainer:[String,Function],lockScroll:{type:Boolean,default:!0},lazyRender:{type:Boolean,default:!0}},data:function(){return{inited:this.value}},computed:{shouldRender:function(){return this.inited||!this.lazyRender}},watch:{value:function(t){this.inited=this.inited||this.value,this[t?"open":"close"]()},getContainer:function(){this.move()},overlay:function(){this.renderOverlay()}},mounted:function(){this.getContainer&&this.move(),this.value&&this.open()},activated:function(){this.value&&this.open()},beforeDestroy:function(){this.close(),this.getContainer&&this.$parent.$el.appendChild(this.$el)},deactivated:function(){this.close()},methods:{open:function(){this.$isServer||this.opened||(void 0!==this.zIndex&&(a.zIndex=this.zIndex),this.opened=!0,this.renderOverlay(),this.lockScroll&&(Object(f["b"])(document,"touchstart",this.touchStart),Object(f["b"])(document,"touchmove",this.onTouchMove),a.lockCount||document.body.classList.add("van-overflow-hidden"),a.lockCount++))},close:function(){this.opened&&(this.lockScroll&&(a.lockCount--,Object(f["a"])(document,"touchstart",this.touchStart),Object(f["a"])(document,"touchmove",this.onTouchMove),a.lockCount||document.body.classList.remove("van-overflow-hidden")),this.opened=!1,c.close(this),this.$emit("input",!1))},move:function(){var t,e=this.getContainer;e?t="string"===typeof e?document.querySelector(e):e():this.$parent&&(t=this.$parent.$el),t&&t.appendChild(this.$el)},onTouchMove:function(t){this.touchMove(t);var e=this.deltaY>0?"10":"01",n=u.getScrollEventTarget(t.target,this.$el),i=n.scrollHeight,o=n.offsetHeight,a=n.scrollTop,s="11";0===a?s=o>=i?"00":"01":a+o>=i&&(s="10"),"11"===s||"vertical"!==this.direction||parseInt(s,2)&parseInt(e,2)||(t.preventDefault(),t.stopPropagation())},renderOverlay:function(){var t=this;this.overlay?c.open(this,{zIndex:a.zIndex++,className:this.overlayClass,customStyle:this.overlayStyle}):c.close(this),this.$nextTick(function(){t.$el.style.zIndex=a.zIndex++})}}}},"66b9":function(t,e,n){"use strict";n("68ef")},"66fd":function(t,e,n){"use strict";var i=n("a3e2"),o=n("fe7e");e["a"]=Object(o["a"])({render:function(){var t=this,e=t.$createElement,n=t._self._c||e;return n("div",{class:t.b({center:t.centered})},[n("a",{class:t.b("thumb"),attrs:{href:t.thumbLink}},[t._t("thumb",[n("img",{class:t.b("img"),attrs:{src:t.thumb}})]),t.tag?n("van-tag",{class:t.b("tag"),attrs:{mark:"",type:"danger"}},[t._v("\n "+t._s(t.tag)+"\n ")]):t._e()],2),n("div",{class:t.b("content")},[n("div",{class:t.b("left")},[t._t("title",[t.title?n("div",{class:t.b("title")},[t._v("\n "+t._s(t.title)+"\n ")]):t._e()]),t._t("desc",[t.desc?n("div",{class:[t.b("desc"),"van-ellipsis"]},[t._v("\n "+t._s(t.desc)+"\n ")]):t._e()]),t._t("tags")],2),n("div",{class:t.b("right")},[t.isDef(t.price)?n("div",[t._v(t._s(t.currency)+" "+t._s(t.price))]):t._e(),t.isDef(t.originPrice)?n("div",{class:t.b("origin-price")},[t._v("\n "+t._s(t.currency)+" "+t._s(t.originPrice)+"\n ")]):t._e(),t.isDef(t.num)?n("div",{class:t.b("num")},[t._v("\n x "+t._s(t.num)+"\n ")]):t._e()])]),t.$slots.footer?n("div",{class:t.b("footer")},[t._t("footer")],2):t._e()])},name:"card",components:{VanTag:i["a"]},props:{tag:String,desc:String,thumb:String,title:String,centered:Boolean,num:[Number,String],price:[Number,String],originPrice:[Number,String],currency:{type:String,default:"¥"},thumbLink:{type:String,default:"javascript:;"}}})},"7b0a":function(t,e,n){},"81e6":function(t,e,n){"use strict";n("68ef"),n("7b0a")},"9b7e":function(t,e,n){},"9cb7":function(t,e,n){"use strict";n("68ef"),n("9b7e"),n("ea82")},"9ffb":function(t,e,n){"use strict";var i=n("fe7e");e["a"]=Object(i["a"])({render:function(){var t,e=this,n=e.$createElement,i=e._self._c||n;return i(e.tag,{tag:"component",class:e.b((t={},t[e.span]=e.span,t["offset-"+e.offset]=e.offset,t)),style:e.style},[e._t("default")],2)},name:"col",props:{span:[Number,String],offset:[Number,String],tag:{type:String,default:"div"}},computed:{gutter:function(){return this.$parent&&Number(this.$parent.gutter)||0},style:function(){var t=this.gutter/2+"px";return this.gutter?{paddingLeft:t,paddingRight:t}:{}}}})},a3e2:function(t,e,n){"use strict";var i=n("fe7e"),o="#f44",a="#1989fa",s="#4b0",r="#969799",c={danger:o,primary:a,success:s};e["a"]=Object(i["a"])({render:function(){var t,e=this,n=e.$createElement,i=e._self._c||n;return i("span",{class:[e.b((t={mark:e.mark,plain:e.plain,round:e.round},t[e.size]=e.size,t)),{"van-hairline--surround":e.plain}],style:e.style},[e._t("default")],2)},name:"tag",props:{size:String,type:String,mark:Boolean,color:String,plain:Boolean,round:Boolean},computed:{style:function(){var t,e=this.color||c[this.type]||r,n=this.plain?"color":"backgroundColor";return t={},t[n]=e,t}}})},aa77:function(t,e,n){var i=n("5ca1"),o=n("be13"),a=n("79e5"),s=n("fdef"),r="["+s+"]",c="​…",l=RegExp("^"+r+r+"*"),u=RegExp(r+r+"*$"),f=function(t,e,n){var o={},r=a(function(){return!!s[t]()||c[t]()!=c}),l=o[t]=r?e(d):s[t];n&&(o[n]=l),i(i.P+i.F*r,"String",o)},d=f.trim=function(t,e){return t=String(o(t)),1&e&&(t=t.replace(l,"")),2&e&&(t=t.replace(u,"")),t};t.exports=f},b258:function(t,e,n){},b650:function(t,e,n){"use strict";var i=n("fe7e");e["a"]=Object(i["a"])({render:function(){var t=this,e=t.$createElement,n=t._self._c||e;return n(t.tag,{tag:"component",class:t.b([t.type,t.size,{block:t.block,plain:t.plain,round:t.round,square:t.square,loading:t.loading,disabled:t.disabled,unclickable:t.disabled||t.loading,"bottom-action":t.bottomAction}]),attrs:{type:t.nativeType,disabled:t.disabled},on:{click:t.onClick}},[t.loading?n("loading",{attrs:{size:"20px",color:"default"===t.type?void 0:""}}):n("span",{class:t.b("text")},[t._t("default",[t._v(t._s(t.text))])],2)],1)},name:"button",props:{text:String,block:Boolean,plain:Boolean,round:Boolean,square:Boolean,loading:Boolean,disabled:Boolean,nativeType:String,bottomAction:Boolean,tag:{type:String,default:"button"},type:{type:String,default:"default"},size:{type:String,default:"normal"}},methods:{onClick:function(t){this.loading||this.disabled||this.$emit("click",t)}}})},bf60:function(t,e,n){},c5f6:function(t,e,n){"use strict";var i=n("7726"),o=n("69a8"),a=n("2d95"),s=n("5dbc"),r=n("6a99"),c=n("79e5"),l=n("9093").f,u=n("11e9").f,f=n("86cc").f,d=n("aa77").trim,h="Number",p=i[h],v=p,m=p.prototype,g=a(n("2aeb")(m))==h,b="trim"in String.prototype,y=function(t){var e=r(t,!1);if("string"==typeof e&&e.length>2){e=b?e.trim():d(e,3);var n,i,o,a=e.charCodeAt(0);if(43===a||45===a){if(n=e.charCodeAt(2),88===n||120===n)return NaN}else if(48===a){switch(e.charCodeAt(1)){case 66:case 98:i=2,o=49;break;case 79:case 111:i=8,o=55;break;default:return+e}for(var s,c=e.slice(2),l=0,u=c.length;l<u;l++)if(s=c.charCodeAt(l),s<48||s>o)return NaN;return parseInt(c,i)}}return+e};if(!p(" 0o1")||!p("0b1")||p("+0x1")){p=function(t){var e=arguments.length<1?0:t,n=this;return n instanceof p&&(g?c(function(){m.valueOf.call(n)}):a(n)!=h)?s(new v(y(e)),n,p):y(e)};for(var _,S=n("9e1e")?l(v):"MAX_VALUE,MIN_VALUE,NaN,NEGATIVE_INFINITY,POSITIVE_INFINITY,EPSILON,isFinite,isInteger,isNaN,isSafeInteger,MAX_SAFE_INTEGER,MIN_SAFE_INTEGER,parseFloat,parseInt,isInteger".split(","),k=0;S.length>k;k++)o(v,_=S[k])&&!o(p,_)&&f(p,_,u(v,_));p.prototype=m,m.constructor=p,n("2aba")(i,h,p)}},d1e1:function(t,e,n){"use strict";var i=n("fe7e");e["a"]=Object(i["a"])({render:function(){var t,e=this,n=e.$createElement,i=e._self._c||n;return i(e.tag,{tag:"component",class:e.b((t={flex:e.flex},t["align-"+e.align]=e.flex&&e.align,t["justify-"+e.justify]=e.flex&&e.justify,t)),style:e.style},[e._t("default")],2)},name:"row",props:{type:String,align:String,justify:String,tag:{type:String,default:"div"},gutter:{type:[Number,String],default:0}},computed:{flex:function(){return"flex"===this.type},style:function(){var t="-"+Number(this.gutter)/2+"px";return this.gutter?{marginLeft:t,marginRight:t}:{}}}})},d399:function(t,e,n){"use strict";var i=n("c31d"),o=n("2b0e"),a=n("fe7e"),s=n("6605"),r=["success","fail","loading"],c=Object(a["a"])({render:function(){var t=this,e=t.$createElement,n=t._self._c||e;return n("transition",{attrs:{name:"van-fade"}},[n("div",{directives:[{name:"show",rawName:"v-show",value:t.value,expression:"value"}],class:t.b([t.style,t.position])},["text"===t.style?n("div",[t._v(t._s(t.message))]):t._e(),"html"===t.style?n("div",{domProps:{innerHTML:t._s(t.message)}}):t._e(),"default"===t.style?["loading"===t.type?n("loading",{attrs:{color:"white",type:t.loadingType}}):n("icon",{class:t.b("icon"),attrs:{name:t.type}}),t.isDef(t.message)?n("div",{class:t.b("text")},[t._v("\n "+t._s(t.message)+"\n ")]):t._e()]:t._e()],2)])},name:"toast",mixins:[s["a"]],props:{forbidClick:Boolean,message:[String,Number],type:{type:String,default:"text"},loadingType:{type:String,default:"circular"},position:{type:String,default:"middle"},lockScroll:{type:Boolean,default:!1}},data:function(){return{clickable:!1}},computed:{style:function(){return-1!==r.indexOf(this.type)?"default":this.type}},mounted:function(){this.toggleClickale()},destroyed:function(){this.toggleClickale()},watch:{value:function(){this.toggleClickale()},forbidClick:function(){this.toggleClickale()}},methods:{toggleClickale:function(){var t=this.value&&this.forbidClick;if(this.clickable!==t){this.clickable=t;var e=t?"add":"remove";document.body.classList[e]("van-toast--unclickable")}}}}),l=n("a142"),u={type:"text",mask:!1,message:"",value:!0,duration:3e3,position:"middle",loadingType:"circular",forbidClick:!1,overlayStyle:{}},f=function(t){return Object(l["d"])(t)?t:{message:t}},d=[],h=!0,p=Object(i["a"])({},u);function v(){if(l["e"])return{};if(!d.length||!h){var t=new(o["a"].extend(c))({el:document.createElement("div")});document.body.appendChild(t.$el),d.push(t)}return d[d.length-1]}function m(t){return t.overlay=t.mask,t}function g(t){void 0===t&&(t={});var e=v();return t=Object(i["a"])({},p,f(t),{clear:function(){e.value=!1,h||l["e"]||(document.body.removeChild(e.$el),e.$destroy())}}),Object(i["a"])(e,m(t)),clearTimeout(e.timer),t.duration>0&&(e.timer=setTimeout(function(){e.clear()},t.duration)),e}var b=function(t){return function(e){return g(Object(i["a"])({type:t},f(e)))}};["loading","success","fail"].forEach(function(t){g[t]=b(t)}),g.clear=function(t){d.length&&(t?(d.forEach(function(t){t.clear()}),d=[]):h?d[0].clear():d.shift().clear())},g.setDefaultOptions=function(t){Object(i["a"])(p,t)},g.resetDefaultOptions=function(){p=Object(i["a"])({},u)},g.allowMultiple=function(t){void 0===t&&(t=!0),h=!t},g.install=function(){o["a"].use(c)},o["a"].prototype.$toast=g;e["a"]=g},db78:function(t,e,n){"use strict";n.d(e,"b",function(){return s}),n.d(e,"a",function(){return r});var i=n("a142"),o=!1;if(!i["e"])try{var a={};Object.defineProperty(a,"passive",{get:function(){o=!0}}),window.addEventListener("test-passive",null,a)}catch(c){}function s(t,e,n,a){void 0===a&&(a=!1),!i["e"]&&t.addEventListener(e,n,!!o&&{capture:!1,passive:a})}function r(t,e,n){!i["e"]&&t.removeEventListener(e,n)}},e17f:function(t,e,n){"use strict";n("68ef"),n("4d75"),n("2fcb")},e7e5:function(t,e,n){"use strict";n("68ef"),n("4d75"),n("b258")},ea82:function(t,e,n){},fdef:function(t,e){t.exports="\t\n\v\f\r   ᠎              \u2028\u2029\ufeff"}}]);
  2. //# sourceMappingURL=chunk-39830972.14f70882.js.map