perf:发布版本1.0.2
This commit is contained in:
@@ -22,7 +22,7 @@ const getParamFormUrl = (key, host) => {
|
||||
* @param value
|
||||
* @returns {boolean}
|
||||
*/
|
||||
export const isEmpty = (value) => {
|
||||
const isEmpty = (value) => {
|
||||
return value === undefined || value === null || value === '';
|
||||
};
|
||||
|
||||
@@ -31,7 +31,7 @@ export const isEmpty = (value) => {
|
||||
* @param value
|
||||
* @param def
|
||||
*/
|
||||
export const parseJSON = (value, def = {}) => {
|
||||
const parseJSON = (value, def = {}) => {
|
||||
let obj;
|
||||
try {
|
||||
obj = JSON.parse(value);
|
||||
@@ -48,7 +48,7 @@ export const parseJSON = (value, def = {}) => {
|
||||
* @param obj
|
||||
* @param seq
|
||||
*/
|
||||
export const split = (obj, seq = ',') => {
|
||||
const split = (obj, seq = ',') => {
|
||||
if (obj) {
|
||||
return obj.split(seq);
|
||||
}
|
||||
@@ -60,7 +60,7 @@ export const split = (obj, seq = ',') => {
|
||||
* @param key
|
||||
* @param url
|
||||
*/
|
||||
export const isDevelopment = () => {
|
||||
const isDevelopment = () => {
|
||||
return process.env.NODE_ENV === 'development';
|
||||
};
|
||||
|
||||
@@ -81,12 +81,12 @@ const replaceAll = (string, s1, s2) => {
|
||||
* @param endStr
|
||||
* @returns {boolean}
|
||||
*/
|
||||
export const endWith = (string = '', endStr) => {
|
||||
const endWith = (string = '', endStr) => {
|
||||
let d = string.length - endStr.length;
|
||||
return d >= 0 && string.lastIndexOf(endStr) == d;
|
||||
};
|
||||
|
||||
export default {
|
||||
module.exports = {
|
||||
getParamFormUrl,
|
||||
isEmpty,
|
||||
parseJSON,
|
||||
|
||||
8
src/utils/Crypto.js
Normal file
8
src/utils/Crypto.js
Normal file
@@ -0,0 +1,8 @@
|
||||
const {SM4} = require('cryptsm2-sm4');
|
||||
|
||||
|
||||
// let decryptByDataKey = app.decryptByDataKey("LT7Wd2k7tk0EXuGtUAyz0Q==", );
|
||||
|
||||
const sm4 = new SM4("WmdUzPJXbngVNiaSsQrihg==");
|
||||
sm4.
|
||||
console.log(sm4);
|
||||
@@ -1,4 +1,4 @@
|
||||
import Common from "./Common";
|
||||
const Common = require("./Common");
|
||||
|
||||
///////////////////////////////////////// 用户token
|
||||
|
||||
@@ -34,7 +34,7 @@ const get = (key) => {
|
||||
|
||||
///////////////////////////////////////// 导出模块
|
||||
|
||||
export default {
|
||||
module.exports = {
|
||||
save,
|
||||
get,
|
||||
saveUserToken,
|
||||
|
||||
Reference in New Issue
Block a user