10 lines
13 KiB
Vue
10 lines
13 KiB
Vue
var x=Object.defineProperty,A=Object.defineProperties;var F=Object.getOwnPropertyDescriptors;var u=Object.getOwnPropertySymbols;var R=Object.prototype.hasOwnProperty,E=Object.prototype.propertyIsEnumerable;var l=(t,r,o)=>r in t?x(t,r,{enumerable:!0,configurable:!0,writable:!0,value:o}):t[r]=o,c=(t,r)=>{for(var o in r||(r={}))R.call(r,o)&&l(t,o,r[o]);if(u)for(var o of u(r))E.call(r,o)&&l(t,o,r[o]);return t},d=(t,r)=>A(t,F(r));import{ai as commonjsGlobal,ak as defineComponent,r as ref,a6 as useRouter,a as resolveComponent,o as openBlock,c as createElementBlock,e as createVNode,w as withCtx,b as createBaseVNode,ae as pushScopeId,af as popScopeId,j as createTextVNode,T as Toast}from"./vendor.3937d42d.js";import{_ as _imports_0}from"./login-icon.96d0defa.js";import{l as loginByTel}from"./user-info.5efb75c3.js";import{_ as _export_sfc}from"./index.e47da145.js";var md5$1={exports:{}};/**
|
|
* [js-md5]{@link https://github.com/emn178/js-md5}
|
|
*
|
|
* @namespace md5
|
|
* @version 0.7.3
|
|
* @author Chen, Yi-Cyuan [emn178@gmail.com]
|
|
* @copyright Chen, Yi-Cyuan 2014-2017
|
|
* @license MIT
|
|
*/(function(module){(function(){var ERROR="input is invalid type",WINDOW=typeof window=="object",root=WINDOW?window:{};root.JS_MD5_NO_WINDOW&&(WINDOW=!1);var WEB_WORKER=!WINDOW&&typeof self=="object",NODE_JS=!root.JS_MD5_NO_NODE_JS&&typeof process=="object"&&process.versions&&process.versions.node;NODE_JS?root=commonjsGlobal:WEB_WORKER&&(root=self);var COMMON_JS=!root.JS_MD5_NO_COMMON_JS&&!0&&module.exports,ARRAY_BUFFER=!root.JS_MD5_NO_ARRAY_BUFFER&&typeof ArrayBuffer!="undefined",HEX_CHARS="0123456789abcdef".split(""),EXTRA=[128,32768,8388608,-2147483648],SHIFT=[0,8,16,24],OUTPUT_TYPES=["hex","array","digest","buffer","arrayBuffer","base64"],BASE64_ENCODE_CHAR="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".split(""),blocks=[],buffer8;if(ARRAY_BUFFER){var buffer=new ArrayBuffer(68);buffer8=new Uint8Array(buffer),blocks=new Uint32Array(buffer)}(root.JS_MD5_NO_NODE_JS||!Array.isArray)&&(Array.isArray=function(t){return Object.prototype.toString.call(t)==="[object Array]"}),ARRAY_BUFFER&&(root.JS_MD5_NO_ARRAY_BUFFER_IS_VIEW||!ArrayBuffer.isView)&&(ArrayBuffer.isView=function(t){return typeof t=="object"&&t.buffer&&t.buffer.constructor===ArrayBuffer});var createOutputMethod=function(t){return function(r){return new Md5(!0).update(r)[t]()}},createMethod=function(){var t=createOutputMethod("hex");NODE_JS&&(t=nodeWrap(t)),t.create=function(){return new Md5},t.update=function(e){return t.create().update(e)};for(var r=0;r<OUTPUT_TYPES.length;++r){var o=OUTPUT_TYPES[r];t[o]=createOutputMethod(o)}return t},nodeWrap=function(method){var crypto=eval("require('crypto')"),Buffer=eval("require('buffer').Buffer"),nodeMethod=function(t){if(typeof t=="string")return crypto.createHash("md5").update(t,"utf8").digest("hex");if(t==null)throw ERROR;return t.constructor===ArrayBuffer&&(t=new Uint8Array(t)),Array.isArray(t)||ArrayBuffer.isView(t)||t.constructor===Buffer?crypto.createHash("md5").update(new Buffer(t)).digest("hex"):method(t)};return nodeMethod};function Md5(t){if(t)blocks[0]=blocks[16]=blocks[1]=blocks[2]=blocks[3]=blocks[4]=blocks[5]=blocks[6]=blocks[7]=blocks[8]=blocks[9]=blocks[10]=blocks[11]=blocks[12]=blocks[13]=blocks[14]=blocks[15]=0,this.blocks=blocks,this.buffer8=buffer8;else if(ARRAY_BUFFER){var r=new ArrayBuffer(68);this.buffer8=new Uint8Array(r),this.blocks=new Uint32Array(r)}else this.blocks=[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0];this.h0=this.h1=this.h2=this.h3=this.start=this.bytes=this.hBytes=0,this.finalized=this.hashed=!1,this.first=!0}Md5.prototype.update=function(t){if(!this.finalized){var r,o=typeof t;if(o!=="string"){if(o==="object"){if(t===null)throw ERROR;if(ARRAY_BUFFER&&t.constructor===ArrayBuffer)t=new Uint8Array(t);else if(!Array.isArray(t)&&(!ARRAY_BUFFER||!ArrayBuffer.isView(t)))throw ERROR}else throw ERROR;r=!0}for(var e,a=0,i,s=t.length,f=this.blocks,n=this.buffer8;a<s;){if(this.hashed&&(this.hashed=!1,f[0]=f[16],f[16]=f[1]=f[2]=f[3]=f[4]=f[5]=f[6]=f[7]=f[8]=f[9]=f[10]=f[11]=f[12]=f[13]=f[14]=f[15]=0),r)if(ARRAY_BUFFER)for(i=this.start;a<s&&i<64;++a)n[i++]=t[a];else for(i=this.start;a<s&&i<64;++a)f[i>>2]|=t[a]<<SHIFT[i++&3];else if(ARRAY_BUFFER)for(i=this.start;a<s&&i<64;++a)e=t.charCodeAt(a),e<128?n[i++]=e:e<2048?(n[i++]=192|e>>6,n[i++]=128|e&63):e<55296||e>=57344?(n[i++]=224|e>>12,n[i++]=128|e>>6&63,n[i++]=128|e&63):(e=65536+((e&1023)<<10|t.charCodeAt(++a)&1023),n[i++]=240|e>>18,n[i++]=128|e>>12&63,n[i++]=128|e>>6&63,n[i++]=128|e&63);else for(i=this.start;a<s&&i<64;++a)e=t.charCodeAt(a),e<128?f[i>>2]|=e<<SHIFT[i++&3]:e<2048?(f[i>>2]|=(192|e>>6)<<SHIFT[i++&3],f[i>>2]|=(128|e&63)<<SHIFT[i++&3]):e<55296||e>=57344?(f[i>>2]|=(224|e>>12)<<SHIFT[i++&3],f[i>>2]|=(128|e>>6&63)<<SHIFT[i++&3],f[i>>2]|=(128|e&63)<<SHIFT[i++&3]):(e=65536+((e&1023)<<10|t.charCodeAt(++a)&1023),f[i>>2]|=(240|e>>18)<<SHIFT[i++&3],f[i>>2]|=(128|e>>12&63)<<SHIFT[i++&3],f[i>>2]|=(128|e>>6&63)<<SHIFT[i++&3],f[i>>2]|=(128|e&63)<<SHIFT[i++&3]);this.lastByteIndex=i,this.bytes+=i-this.start,i>=64?(this.start=i-64,this.hash(),this.hashed=!0):this.start=i}return this.bytes>4294967295&&(this.hBytes+=this.bytes/4294967296<<0,this.bytes=this.bytes%4294967296),this}},Md5.prototype.finalize=function(){if(!this.finalized){this.finalized=!0;var t=this.blocks,r=this.lastByteIndex;t[r>>2]|=EXTRA[r&3],r>=56&&(this.hashed||this.hash(),t[0]=t[16],t[16]=t[1]=t[2]=t[3]=t[4]=t[5]=t[6]=t[7]=t[8]=t[9]=t[10]=t[11]=t[12]=t[13]=t[14]=t[15]=0),t[14]=this.bytes<<3,t[15]=this.hBytes<<3|this.bytes>>>29,this.hash()}},Md5.prototype.hash=function(){var t,r,o,e,a,i,s=this.blocks;this.first?(t=s[0]-680876937,t=(t<<7|t>>>25)-271733879<<0,e=(-1732584194^t&2004318071)+s[1]-117830708,e=(e<<12|e>>>20)+t<<0,o=(-271733879^e&(t^-271733879))+s[2]-1126478375,o=(o<<17|o>>>15)+e<<0,r=(t^o&(e^t))+s[3]-1316259209,r=(r<<22|r>>>10)+o<<0):(t=this.h0,r=this.h1,o=this.h2,e=this.h3,t+=(e^r&(o^e))+s[0]-680876936,t=(t<<7|t>>>25)+r<<0,e+=(o^t&(r^o))+s[1]-389564586,e=(e<<12|e>>>20)+t<<0,o+=(r^e&(t^r))+s[2]+606105819,o=(o<<17|o>>>15)+e<<0,r+=(t^o&(e^t))+s[3]-1044525330,r=(r<<22|r>>>10)+o<<0),t+=(e^r&(o^e))+s[4]-176418897,t=(t<<7|t>>>25)+r<<0,e+=(o^t&(r^o))+s[5]+1200080426,e=(e<<12|e>>>20)+t<<0,o+=(r^e&(t^r))+s[6]-1473231341,o=(o<<17|o>>>15)+e<<0,r+=(t^o&(e^t))+s[7]-45705983,r=(r<<22|r>>>10)+o<<0,t+=(e^r&(o^e))+s[8]+1770035416,t=(t<<7|t>>>25)+r<<0,e+=(o^t&(r^o))+s[9]-1958414417,e=(e<<12|e>>>20)+t<<0,o+=(r^e&(t^r))+s[10]-42063,o=(o<<17|o>>>15)+e<<0,r+=(t^o&(e^t))+s[11]-1990404162,r=(r<<22|r>>>10)+o<<0,t+=(e^r&(o^e))+s[12]+1804603682,t=(t<<7|t>>>25)+r<<0,e+=(o^t&(r^o))+s[13]-40341101,e=(e<<12|e>>>20)+t<<0,o+=(r^e&(t^r))+s[14]-1502002290,o=(o<<17|o>>>15)+e<<0,r+=(t^o&(e^t))+s[15]+1236535329,r=(r<<22|r>>>10)+o<<0,t+=(o^e&(r^o))+s[1]-165796510,t=(t<<5|t>>>27)+r<<0,e+=(r^o&(t^r))+s[6]-1069501632,e=(e<<9|e>>>23)+t<<0,o+=(t^r&(e^t))+s[11]+643717713,o=(o<<14|o>>>18)+e<<0,r+=(e^t&(o^e))+s[0]-373897302,r=(r<<20|r>>>12)+o<<0,t+=(o^e&(r^o))+s[5]-701558691,t=(t<<5|t>>>27)+r<<0,e+=(r^o&(t^r))+s[10]+38016083,e=(e<<9|e>>>23)+t<<0,o+=(t^r&(e^t))+s[15]-660478335,o=(o<<14|o>>>18)+e<<0,r+=(e^t&(o^e))+s[4]-405537848,r=(r<<20|r>>>12)+o<<0,t+=(o^e&(r^o))+s[9]+568446438,t=(t<<5|t>>>27)+r<<0,e+=(r^o&(t^r))+s[14]-1019803690,e=(e<<9|e>>>23)+t<<0,o+=(t^r&(e^t))+s[3]-187363961,o=(o<<14|o>>>18)+e<<0,r+=(e^t&(o^e))+s[8]+1163531501,r=(r<<20|r>>>12)+o<<0,t+=(o^e&(r^o))+s[13]-1444681467,t=(t<<5|t>>>27)+r<<0,e+=(r^o&(t^r))+s[2]-51403784,e=(e<<9|e>>>23)+t<<0,o+=(t^r&(e^t))+s[7]+1735328473,o=(o<<14|o>>>18)+e<<0,r+=(e^t&(o^e))+s[12]-1926607734,r=(r<<20|r>>>12)+o<<0,a=r^o,t+=(a^e)+s[5]-378558,t=(t<<4|t>>>28)+r<<0,e+=(a^t)+s[8]-2022574463,e=(e<<11|e>>>21)+t<<0,i=e^t,o+=(i^r)+s[11]+1839030562,o=(o<<16|o>>>16)+e<<0,r+=(i^o)+s[14]-35309556,r=(r<<23|r>>>9)+o<<0,a=r^o,t+=(a^e)+s[1]-1530992060,t=(t<<4|t>>>28)+r<<0,e+=(a^t)+s[4]+1272893353,e=(e<<11|e>>>21)+t<<0,i=e^t,o+=(i^r)+s[7]-155497632,o=(o<<16|o>>>16)+e<<0,r+=(i^o)+s[10]-1094730640,r=(r<<23|r>>>9)+o<<0,a=r^o,t+=(a^e)+s[13]+681279174,t=(t<<4|t>>>28)+r<<0,e+=(a^t)+s[0]-358537222,e=(e<<11|e>>>21)+t<<0,i=e^t,o+=(i^r)+s[3]-722521979,o=(o<<16|o>>>16)+e<<0,r+=(i^o)+s[6]+76029189,r=(r<<23|r>>>9)+o<<0,a=r^o,t+=(a^e)+s[9]-640364487,t=(t<<4|t>>>28)+r<<0,e+=(a^t)+s[12]-421815835,e=(e<<11|e>>>21)+t<<0,i=e^t,o+=(i^r)+s[15]+530742520,o=(o<<16|o>>>16)+e<<0,r+=(i^o)+s[2]-995338651,r=(r<<23|r>>>9)+o<<0,t+=(o^(r|~e))+s[0]-198630844,t=(t<<6|t>>>26)+r<<0,e+=(r^(t|~o))+s[7]+1126891415,e=(e<<10|e>>>22)+t<<0,o+=(t^(e|~r))+s[14]-1416354905,o=(o<<15|o>>>17)+e<<0,r+=(e^(o|~t))+s[5]-57434055,r=(r<<21|r>>>11)+o<<0,t+=(o^(r|~e))+s[12]+1700485571,t=(t<<6|t>>>26)+r<<0,e+=(r^(t|~o))+s[3]-1894986606,e=(e<<10|e>>>22)+t<<0,o+=(t^(e|~r))+s[10]-1051523,o=(o<<15|o>>>17)+e<<0,r+=(e^(o|~t))+s[1]-2054922799,r=(r<<21|r>>>11)+o<<0,t+=(o^(r|~e))+s[8]+1873313359,t=(t<<6|t>>>26)+r<<0,e+=(r^(t|~o))+s[15]-30611744,e=(e<<10|e>>>22)+t<<0,o+=(t^(e|~r))+s[6]-1560198380,o=(o<<15|o>>>17)+e<<0,r+=(e^(o|~t))+s[13]+1309151649,r=(r<<21|r>>>11)+o<<0,t+=(o^(r|~e))+s[4]-145523070,t=(t<<6|t>>>26)+r<<0,e+=(r^(t|~o))+s[11]-1120210379,e=(e<<10|e>>>22)+t<<0,o+=(t^(e|~r))+s[2]+718787259,o=(o<<15|o>>>17)+e<<0,r+=(e^(o|~t))+s[9]-343485551,r=(r<<21|r>>>11)+o<<0,this.first?(this.h0=t+1732584193<<0,this.h1=r-271733879<<0,this.h2=o-1732584194<<0,this.h3=e+271733878<<0,this.first=!1):(this.h0=this.h0+t<<0,this.h1=this.h1+r<<0,this.h2=this.h2+o<<0,this.h3=this.h3+e<<0)},Md5.prototype.hex=function(){this.finalize();var t=this.h0,r=this.h1,o=this.h2,e=this.h3;return HEX_CHARS[t>>4&15]+HEX_CHARS[t&15]+HEX_CHARS[t>>12&15]+HEX_CHARS[t>>8&15]+HEX_CHARS[t>>20&15]+HEX_CHARS[t>>16&15]+HEX_CHARS[t>>28&15]+HEX_CHARS[t>>24&15]+HEX_CHARS[r>>4&15]+HEX_CHARS[r&15]+HEX_CHARS[r>>12&15]+HEX_CHARS[r>>8&15]+HEX_CHARS[r>>20&15]+HEX_CHARS[r>>16&15]+HEX_CHARS[r>>28&15]+HEX_CHARS[r>>24&15]+HEX_CHARS[o>>4&15]+HEX_CHARS[o&15]+HEX_CHARS[o>>12&15]+HEX_CHARS[o>>8&15]+HEX_CHARS[o>>20&15]+HEX_CHARS[o>>16&15]+HEX_CHARS[o>>28&15]+HEX_CHARS[o>>24&15]+HEX_CHARS[e>>4&15]+HEX_CHARS[e&15]+HEX_CHARS[e>>12&15]+HEX_CHARS[e>>8&15]+HEX_CHARS[e>>20&15]+HEX_CHARS[e>>16&15]+HEX_CHARS[e>>28&15]+HEX_CHARS[e>>24&15]},Md5.prototype.toString=Md5.prototype.hex,Md5.prototype.digest=function(){this.finalize();var t=this.h0,r=this.h1,o=this.h2,e=this.h3;return[t&255,t>>8&255,t>>16&255,t>>24&255,r&255,r>>8&255,r>>16&255,r>>24&255,o&255,o>>8&255,o>>16&255,o>>24&255,e&255,e>>8&255,e>>16&255,e>>24&255]},Md5.prototype.array=Md5.prototype.digest,Md5.prototype.arrayBuffer=function(){this.finalize();var t=new ArrayBuffer(16),r=new Uint32Array(t);return r[0]=this.h0,r[1]=this.h1,r[2]=this.h2,r[3]=this.h3,t},Md5.prototype.buffer=Md5.prototype.arrayBuffer,Md5.prototype.base64=function(){for(var t,r,o,e="",a=this.array(),i=0;i<15;)t=a[i++],r=a[i++],o=a[i++],e+=BASE64_ENCODE_CHAR[t>>>2]+BASE64_ENCODE_CHAR[(t<<4|r>>>4)&63]+BASE64_ENCODE_CHAR[(r<<2|o>>>6)&63]+BASE64_ENCODE_CHAR[o&63];return t=a[i],e+=BASE64_ENCODE_CHAR[t>>>2]+BASE64_ENCODE_CHAR[t<<4&63]+"==",e};var exports=createMethod();COMMON_JS?module.exports=exports:root.md5=exports})()})(md5$1);var md5=md5$1.exports,Index_vue_vue_type_style_index_0_scoped_true_lang="";const _withScopeId=t=>(pushScopeId("data-v-5b823462"),t=t(),popScopeId(),t),_hoisted_1={class:"login-con"},_hoisted_2=_withScopeId(()=>createBaseVNode("div",{class:"header"},[createBaseVNode("img",{class:"img",src:_imports_0})],-1)),_hoisted_3={class:"btn-con"},_hoisted_4=createTextVNode(" \u63D0\u4EA4 "),_sfc_main=defineComponent({setup(t){const r=ref(""),o=ref(""),e=useRouter(),a=async i=>{try{const s=await loginByTel(d(c({},i),{password:md5(i.password)}));Toast("\u767B\u9646\u6210\u529F"),window.userInfo=s,e.push({path:"/home"})}catch{}};return(i,s)=>{const f=resolveComponent("van-field"),n=resolveComponent("van-cell-group"),_=resolveComponent("van-button"),p=resolveComponent("van-form");return openBlock(),createElementBlock("div",_hoisted_1,[_hoisted_2,createVNode(p,{onSubmit:a},{default:withCtx(()=>[createVNode(n,{inset:""},{default:withCtx(()=>[createVNode(f,{modelValue:r.value,"onUpdate:modelValue":s[0]||(s[0]=h=>r.value=h),class:"form-input phone",type:"tel",name:"telephoneCode",label:"",placeholder:"\u624B\u673A\u53F7",rules:[{required:!0,message:"\u8BF7\u8F93\u5165\u624B\u673A\u53F7"}]},null,8,["modelValue"]),createVNode(f,{modelValue:o.value,"onUpdate:modelValue":s[1]||(s[1]=h=>o.value=h),class:"form-input password",type:"password",name:"password",label:"",placeholder:"\u9ED8\u8BA4\u5BC6\u7801\u624B\u673A\u53F7\u540E\u516D\u4F4D",rules:[{required:!0,message:"\u8BF7\u586B\u5199\u5BC6\u7801"}]},null,8,["modelValue"])]),_:1}),createBaseVNode("div",_hoisted_3,[createVNode(_,{class:"btn",round:"",block:"",type:"primary","native-type":"submit"},{default:withCtx(()=>[_hoisted_4]),_:1})]),createBaseVNode("div",{class:"forget-password",onClick:s[2]||(s[2]=h=>i.$router.push({path:"forget-password"}))}," \u5FD8\u8BB0\u5BC6\u7801? ")]),_:1})])}}});var Index=_export_sfc(_sfc_main,[["__scopeId","data-v-5b823462"]]);export{Index as default};
|