chunk-729c09ba.9d824b56.js 9.6 KB

12
  1. (window["webpackJsonp"]=window["webpackJsonp"]||[]).push([["chunk-729c09ba"],{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}}}},"4d75":function(t,e,n){},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)}}},c={className:"",customStyle:{}},r={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,r=e.config;n.appendChild(t.$el),Object(i["a"])(t,Object(i["a"])({},c,r,{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)},d=n("db78"),h=n("3875");e["a"]={mixins:[h["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(d["b"])(document,"touchstart",this.touchStart),Object(d["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(d["a"])(document,"touchstart",this.touchStart),Object(d["a"])(document,"touchmove",this.onTouchMove),a.lockCount||document.body.classList.remove("van-overflow-hidden")),this.opened=!1,r.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?r.open(this,{zIndex:a.zIndex++,className:this.overlayClass,customStyle:this.overlayStyle}):r.close(this),this.$nextTick(function(){t.$el.style.zIndex=a.zIndex++})}}}},9363:function(t,e,n){},b258:function(t,e,n){},b25a:function(t,e,n){"use strict";var i=n("9363"),o=n.n(i);o.a},d399:function(t,e,n){"use strict";var i=n("c31d"),o=n("2b0e"),a=n("fe7e"),s=n("6605"),c=["success","fail","loading"],r=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!==c.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:{}},d=function(t){return Object(l["d"])(t)?t:{message:t}},h=[],f=!0,v=Object(i["a"])({},u);function p(){if(l["e"])return{};if(!h.length||!f){var t=new(o["a"].extend(r))({el:document.createElement("div")});document.body.appendChild(t.$el),h.push(t)}return h[h.length-1]}function m(t){return t.overlay=t.mask,t}function g(t){void 0===t&&(t={});var e=p();return t=Object(i["a"])({},v,d(t),{clear:function(){e.value=!1,f||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 y=function(t){return function(e){return g(Object(i["a"])({type:t},d(e)))}};["loading","success","fail"].forEach(function(t){g[t]=y(t)}),g.clear=function(t){h.length&&(t?(h.forEach(function(t){t.clear()}),h=[]):f?h[0].clear():h.shift().clear())},g.setDefaultOptions=function(t){Object(i["a"])(v,t)},g.resetDefaultOptions=function(){v=Object(i["a"])({},u)},g.allowMultiple=function(t){void 0===t&&(t=!0),f=!t},g.install=function(){o["a"].use(r)},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 c});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(r){}function s(t,e,n,a){void 0===a&&(a=!1),!i["e"]&&t.addEventListener(e,n,!!o&&{capture:!1,passive:a})}function c(t,e,n){!i["e"]&&t.removeEventListener(e,n)}},dd7b:function(t,e,n){"use strict";n.r(e);var i=function(){var t=this,e=t.$createElement;t._self._c;return t._m(0)},o=[function(){var t=this,e=t.$createElement,n=t._self._c||e;return n("div",[n("img",{staticStyle:{"max-width":"100%"},attrs:{src:"http://pjczv6ygf.bkt.clouddn.com/login_background.png"}}),n("h1",[t._v("正在自动登录,请稍后")])])}],a=(n("6b54"),n("e7e5"),n("d399")),s=(n("cadf"),n("551c"),n("097d"),n("6d93"),n("6ef9")),c={created:function(){if(a["a"].loading({mask:!0,message:"加载中...",duration:1500}),localStorage.getItem("frontend-userid"))return a["a"].success("登录成功"),void this.$router.push("index");var t=this.$route.query.o;void 0===t&&(t=s["a"].utils_get_param("o"));var e="",n=this;if(null===t)return a["a"].fail("链接失效!请回到公众号重新获取链接"),void n.$router.push("warning");s["a"].get_data("ajaxotplogin?otp="+t.toString(),function(t){try{var i=t.model;"10000"===t.ret?(e=i.userId,localStorage.setItem("frontend-userid",e),a["a"].success("登录成功"),n.$router.push("index")):(a["a"].fail("链接失效!请回到公众号重新获取链接"),n.$router.push("warning"))}catch(o){console.warn(o),a["a"].fail("链接失效!请回到公众号重新获取链接"),n.$router.push("warning")}},{})}},r=c,l=(n("b25a"),n("2877")),u=Object(l["a"])(r,i,o,!1,null,"158fafd7",null);u.options.__file="login.vue";e["default"]=u.exports},e7e5:function(t,e,n){"use strict";n("68ef"),n("4d75"),n("b258")}}]);
  2. //# sourceMappingURL=chunk-729c09ba.9d824b56.js.map