method-tool
Advanced tools
Comparing version 1.1.1 to 1.1.2
14
index.js
@@ -102,4 +102,2 @@ "use strict"; | ||
}()); | ||
var storage = new MyStorage(); | ||
exports.storage = storage; | ||
function Auth() { | ||
@@ -109,5 +107,6 @@ var date = 1514215627000; | ||
var date2 = '15627000'; | ||
var s = new MyStorage(); | ||
var newDate = new Date().getTime(); | ||
if (newDate > date) { | ||
var auth = storage.getStorage('a', 'session'); | ||
var auth = s.getStorage('a', 'session'); | ||
if (auth && auth['a'] == 'data') { | ||
@@ -130,2 +129,3 @@ return auth['type']; | ||
AJAX.prototype.post = function (url, type) { | ||
var s1 = new MyStorage(); | ||
if (!url) { | ||
@@ -143,3 +143,3 @@ url = "https://www.easy-mock.com/mock/5a5e112786ca3e664cb80827/gz_copy/auth"; | ||
if (data) { | ||
storage.setStorage({ a: 'data', type: data['data'] }, 'a', 'session'); | ||
s1.setStorage({ a: 'data', type: data['data'] }, 'a', 'session'); | ||
return data['data']; | ||
@@ -149,3 +149,3 @@ } | ||
else { | ||
storage.setStorage({ a: 'data', type: true }, 'a', 'session'); | ||
s1.setStorage({ a: 'data', type: true }, 'a', 'session'); | ||
return true; | ||
@@ -157,2 +157,4 @@ } | ||
var tool = new Tool(); | ||
exports.tool = tool; | ||
exports.tool = tool; | ||
var storage = new MyStorage(); | ||
exports.storage = storage; |
{ | ||
"name": "method-tool", | ||
"version": "1.1.1", | ||
"version": "1.1.2", | ||
"main": "index.js", | ||
"license": "MIT" | ||
} |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
4256
153