mcrm-mobile 1.8.0 → 1.8.2
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/es/data-process/index.js +75 -55
- package/es/index.js +1 -1
- package/es/menu-jump/index.js +242 -159
- package/lib/data-process/index.js +75 -55
- package/lib/index.js +1 -1
- package/lib/mcrm-mobile.js +1957 -265
- package/lib/mcrm-mobile.min.js +5 -5
- package/lib/menu-jump/index.js +241 -158
- package/package.json +3 -2
- package/vetur/attributes.json +619 -619
- package/vetur/tags.json +157 -157
- package/vetur/web-types.json +1464 -1464
package/es/data-process/index.js
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* @author Wuner
|
|
3
|
-
* @date 2021/9/28
|
|
4
|
-
* @Description: 数据加解密
|
|
1
|
+
/**
|
|
2
|
+
* @author Wuner
|
|
3
|
+
* @date 2021/9/28
|
|
4
|
+
* @Description: 数据加解密
|
|
5
5
|
*/
|
|
6
6
|
import Vue from "vue";
|
|
7
7
|
import { strEnc, strDec } from "./des.js";
|
|
@@ -10,17 +10,19 @@ var _require = require("./ark.js"),
|
|
|
10
10
|
encodeBase64ForSec = _require.encodeBase64ForSec,
|
|
11
11
|
decodeBase64ForSec = _require.decodeBase64ForSec;
|
|
12
12
|
|
|
13
|
+
import GMCrypt from "gm-crypt";
|
|
14
|
+
|
|
13
15
|
var CryptoJS = require("crypto-js");
|
|
14
16
|
|
|
15
17
|
var KEY1 = "TWFrV29d0R3JlYXRBKZ2Fpbg==";
|
|
16
18
|
var IV1 = "VWVuY1xhta1EyMmYyRcXNwcA==";
|
|
17
19
|
var KEY = "TUNSTWQ1jcm1BQkNEIRUZHSA==";
|
|
18
20
|
var IV = "VGRtYlmdsalAxMWUxBcHJraw==";
|
|
19
|
-
/**
|
|
20
|
-
* AES加密
|
|
21
|
-
* @param content 需加密的文本
|
|
22
|
-
* @param key 密钥
|
|
23
|
-
* @param iv 偏移量
|
|
21
|
+
/**
|
|
22
|
+
* AES加密
|
|
23
|
+
* @param content 需加密的文本
|
|
24
|
+
* @param key 密钥
|
|
25
|
+
* @param iv 偏移量
|
|
24
26
|
*/
|
|
25
27
|
|
|
26
28
|
var aesEncrypt = function aesEncrypt(content, key, iv) {
|
|
@@ -36,11 +38,11 @@ var aesEncrypt = function aesEncrypt(content, key, iv) {
|
|
|
36
38
|
});
|
|
37
39
|
return encrypted.toString(); //返回的是base64格式的密文
|
|
38
40
|
};
|
|
39
|
-
/**
|
|
40
|
-
* AES加密(拦截器)
|
|
41
|
-
* @param content 需加密的文本
|
|
42
|
-
* @param key 密钥
|
|
43
|
-
* @param iv 偏移量
|
|
41
|
+
/**
|
|
42
|
+
* AES加密(拦截器)
|
|
43
|
+
* @param content 需加密的文本
|
|
44
|
+
* @param key 密钥
|
|
45
|
+
* @param iv 偏移量
|
|
44
46
|
*/
|
|
45
47
|
|
|
46
48
|
|
|
@@ -57,10 +59,10 @@ var aesEncryptHttp = function aesEncryptHttp(content, key, iv) {
|
|
|
57
59
|
});
|
|
58
60
|
return encrypted.toString(); //返回的是base64格式的密文
|
|
59
61
|
};
|
|
60
|
-
/**
|
|
61
|
-
* 菜单跳转加密函数
|
|
62
|
-
* @param {string} data - 需要加密的数据, 传过来前先进行 JSON.stringify(data);
|
|
63
|
-
* @param {string} key - 加密使用的 key
|
|
62
|
+
/**
|
|
63
|
+
* 菜单跳转加密函数
|
|
64
|
+
* @param {string} data - 需要加密的数据, 传过来前先进行 JSON.stringify(data);
|
|
65
|
+
* @param {string} key - 加密使用的 key
|
|
64
66
|
*/
|
|
65
67
|
|
|
66
68
|
|
|
@@ -77,10 +79,27 @@ var aesEncryptBusiness = function aesEncryptBusiness(data, key) {
|
|
|
77
79
|
|
|
78
80
|
return hexStr;
|
|
79
81
|
};
|
|
80
|
-
/**
|
|
81
|
-
* 菜单跳转加密函数
|
|
82
|
-
* @param {string}
|
|
83
|
-
* @param {string} key - 加密使用的 key
|
|
82
|
+
/**
|
|
83
|
+
* 菜单跳转加密函数(新)
|
|
84
|
+
* @param {string} data - 需要加密的数据, 传过来前先进行 JSON.stringify(data);
|
|
85
|
+
* @param {string} key - 加密使用的 key
|
|
86
|
+
* @param {string} iv - 加密使用的 iv
|
|
87
|
+
*/
|
|
88
|
+
|
|
89
|
+
|
|
90
|
+
var aesEncryptBusinessNew = function aesEncryptBusinessNew(data, key, iv) {
|
|
91
|
+
var gmCrypto = new GMCrypt.sm4({
|
|
92
|
+
key: key,
|
|
93
|
+
mode: "cbc",
|
|
94
|
+
iv: iv,
|
|
95
|
+
cipherType: "base64"
|
|
96
|
+
});
|
|
97
|
+
return gmCrypto.encrypt(data);
|
|
98
|
+
};
|
|
99
|
+
/**
|
|
100
|
+
* 菜单跳转加密函数
|
|
101
|
+
* @param {string} encrypted - 加密的数据;
|
|
102
|
+
* @param {string} key - 加密使用的 key
|
|
84
103
|
*/
|
|
85
104
|
|
|
86
105
|
|
|
@@ -94,11 +113,11 @@ var aesDecryptBusiness = function aesDecryptBusiness(encrypted, key) {
|
|
|
94
113
|
});
|
|
95
114
|
return CryptoJS.enc.Utf8.stringify(decrypt);
|
|
96
115
|
};
|
|
97
|
-
/**
|
|
98
|
-
* AES解密
|
|
99
|
-
* @param content 密文
|
|
100
|
-
* @param key 密钥
|
|
101
|
-
* @param iv 偏移量
|
|
116
|
+
/**
|
|
117
|
+
* AES解密
|
|
118
|
+
* @param content 密文
|
|
119
|
+
* @param key 密钥
|
|
120
|
+
* @param iv 偏移量
|
|
102
121
|
*/
|
|
103
122
|
|
|
104
123
|
|
|
@@ -116,11 +135,11 @@ var aesDecrypt = function aesDecrypt(content, key, iv) {
|
|
|
116
135
|
});
|
|
117
136
|
return decrypted.toString(CryptoJS.enc.Utf8);
|
|
118
137
|
};
|
|
119
|
-
/**
|
|
120
|
-
* AES解密(拦截器)
|
|
121
|
-
* @param content 需加密的文本
|
|
122
|
-
* @param key 密钥
|
|
123
|
-
* @param iv 偏移量
|
|
138
|
+
/**
|
|
139
|
+
* AES解密(拦截器)
|
|
140
|
+
* @param content 需加密的文本
|
|
141
|
+
* @param key 密钥
|
|
142
|
+
* @param iv 偏移量
|
|
124
143
|
*/
|
|
125
144
|
|
|
126
145
|
|
|
@@ -138,30 +157,30 @@ var aesDecryptHttp = function aesDecryptHttp(content, key, iv) {
|
|
|
138
157
|
});
|
|
139
158
|
return decrypted.toString(CryptoJS.enc.Utf8);
|
|
140
159
|
};
|
|
141
|
-
/**
|
|
142
|
-
* DES解密
|
|
143
|
-
* @param content 密文
|
|
144
|
-
* @param keys 密钥
|
|
160
|
+
/**
|
|
161
|
+
* DES解密
|
|
162
|
+
* @param content 密文
|
|
163
|
+
* @param keys 密钥
|
|
145
164
|
*/
|
|
146
165
|
|
|
147
166
|
|
|
148
167
|
var desDecrypt = function desDecrypt(content, keys) {
|
|
149
168
|
return strDec(content, keys[0], keys[1], keys[2]);
|
|
150
169
|
};
|
|
151
|
-
/**
|
|
152
|
-
* DES加密
|
|
153
|
-
* @param content 需加密的文本
|
|
154
|
-
* @param keys 密钥
|
|
170
|
+
/**
|
|
171
|
+
* DES加密
|
|
172
|
+
* @param content 需加密的文本
|
|
173
|
+
* @param keys 密钥
|
|
155
174
|
*/
|
|
156
175
|
|
|
157
176
|
|
|
158
177
|
var desEncrypt = function desEncrypt(content, keys) {
|
|
159
178
|
return strEnc(content, keys[0], keys[1], keys[2]);
|
|
160
179
|
};
|
|
161
|
-
/**
|
|
162
|
-
* base64加密
|
|
163
|
-
* @param content
|
|
164
|
-
* @returns {*}
|
|
180
|
+
/**
|
|
181
|
+
* base64加密
|
|
182
|
+
* @param content
|
|
183
|
+
* @returns {*}
|
|
165
184
|
*/
|
|
166
185
|
|
|
167
186
|
|
|
@@ -169,10 +188,10 @@ var base64Encrypt = function base64Encrypt(content) {
|
|
|
169
188
|
var words = CryptoJS.enc.Utf8.parse(content);
|
|
170
189
|
return CryptoJS.enc.Base64.stringify(words);
|
|
171
190
|
};
|
|
172
|
-
/**
|
|
173
|
-
* base64解密
|
|
174
|
-
* @param content
|
|
175
|
-
* @returns {*}
|
|
191
|
+
/**
|
|
192
|
+
* base64解密
|
|
193
|
+
* @param content
|
|
194
|
+
* @returns {*}
|
|
176
195
|
*/
|
|
177
196
|
|
|
178
197
|
|
|
@@ -180,18 +199,18 @@ var base64Decrypt = function base64Decrypt(content) {
|
|
|
180
199
|
var words = CryptoJS.enc.Base64.parse(content);
|
|
181
200
|
return CryptoJS.enc.Utf8.stringify(words);
|
|
182
201
|
};
|
|
183
|
-
/**
|
|
184
|
-
* 方舟加密
|
|
185
|
-
* @param content 需要加密对文本
|
|
202
|
+
/**
|
|
203
|
+
* 方舟加密
|
|
204
|
+
* @param content 需要加密对文本
|
|
186
205
|
*/
|
|
187
206
|
|
|
188
207
|
|
|
189
208
|
export var arkEncrypt = function arkEncrypt(content) {
|
|
190
209
|
return encodeBase64ForSec(content);
|
|
191
210
|
};
|
|
192
|
-
/**
|
|
193
|
-
* 方舟解密
|
|
194
|
-
* @param content 需要解密对文本
|
|
211
|
+
/**
|
|
212
|
+
* 方舟解密
|
|
213
|
+
* @param content 需要解密对文本
|
|
195
214
|
*/
|
|
196
215
|
|
|
197
216
|
var arkDecrypt = function arkDecrypt(content) {
|
|
@@ -210,7 +229,8 @@ var DataProcess = {
|
|
|
210
229
|
aesEncryptHttp: aesEncryptHttp,
|
|
211
230
|
aesDecryptHttp: aesDecryptHttp,
|
|
212
231
|
aesDecryptBusiness: aesDecryptBusiness,
|
|
213
|
-
aesEncryptBusiness: aesEncryptBusiness
|
|
232
|
+
aesEncryptBusiness: aesEncryptBusiness,
|
|
233
|
+
aesEncryptBusinessNew: aesEncryptBusinessNew
|
|
214
234
|
};
|
|
215
235
|
Vue.prototype.$DataProcess = DataProcess;
|
|
216
236
|
export default DataProcess;
|
package/es/index.js
CHANGED
|
@@ -91,7 +91,7 @@ import Tag from './tag';
|
|
|
91
91
|
import Toast from './toast';
|
|
92
92
|
import TreeSelect from './tree-select';
|
|
93
93
|
import Uploader from './uploader';
|
|
94
|
-
var version = '1.8.
|
|
94
|
+
var version = '1.8.2';
|
|
95
95
|
var components = [ActionSheet, AddressPicker, Api, Badge, Biz, Button, Calendar, Card, Cell, CellGroup, Checkbox, CheckboxGroup, Circle, Col, Collapse, CollapseItem, CommonUtils, CountDown, DataProcess, DatePicker, DatetimePicker, Dialog, Directive, Divider, Drag, DropdownItem, DropdownMenu, Empty, Field, GoodsAction, GoodsActionButton, GoodsActionIcon, Grid, GridItem, Http, Icon, Image, ImagePreview, IndexAnchor, IndexBar, Info, List, Loading, Local, Menu, MenuIcon, MenuJump, Menus, NavBar, NoticeBar, Notify, Overlay, Pagination, Panel, PasswordInput, Picker, Popover, Popup, Progress, PullRefresh, Radio, RadioGroup, Rank, Rate, Row, SafeKeyboard, Search, Session, ShareSheet, Sidebar, SidebarItem, Slider, Step, Stepper, Steps, Sticky, Swipe, SwipeCell, SwipeItem, Switch, SwitchCell, Tab, Tabbar, TabbarItem, Table, TableColumn, Tabs, Tag, Toast, TreeSelect, Uploader];
|
|
96
96
|
|
|
97
97
|
var install = function install(Vue) {
|