mcrm-mobile 1.4.8 → 1.5.0

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/README.md CHANGED
@@ -1,42 +1,42 @@
1
- <div class="card">
2
- <div class="van-doc-intro">
3
- <h2 style="margin: 0; font-size: 36px; line-height: 60px;">McrmMobile</h2>
4
- <p>生意宝专用组件库</p>
5
- </div>
6
- </div>
7
- <p align="center">
8
- 🔥 <a href="http://20.26.39.174/downvue/mcrm-docs-new">文档网站</a>
9
- </p>
10
-
11
- ### 特性
12
-
13
- - 完善的文档和示例
14
- - 支持按需引入
15
- - 支持 TS
16
-
17
- ### 安装
18
-
19
- ```bash
20
- # 通过 npm 安装
21
- npm i mcrm-mobile -S
22
-
23
- # 通过 yarn 安装
24
- yarn add mcrm-mobile
25
- ```
26
-
27
- ### 快速上手
28
-
29
- ```js
30
- import Vue from "vue";
31
- import { Button } from "mcrm-mobile";
32
-
33
- Vue.use(Button);
34
- ```
35
-
36
- ### 浏览器支持
37
-
38
- 现代浏览器以及 Android 4.0+, iOS 7+
39
-
40
- ### 开源协议
41
-
42
- 本项目基于 [MIT](https://zh.wikipedia.org/wiki/MIT%E8%A8%B1%E5%8F%AF%E8%AD%89) 协议,请自由地享受和参与开源
1
+ <div class="card">
2
+ <div class="van-doc-intro">
3
+ <h2 style="margin: 0; font-size: 36px; line-height: 60px;">McrmMobile</h2>
4
+ <p>生意宝专用组件库</p>
5
+ </div>
6
+ </div>
7
+ <p align="center">
8
+ 🔥 <a href="http://20.26.39.174/downvue/mcrm-docs-new">文档网站</a>
9
+ </p>
10
+
11
+ ### 特性
12
+
13
+ - 完善的文档和示例
14
+ - 支持按需引入
15
+ - 支持 TS
16
+
17
+ ### 安装
18
+
19
+ ```bash
20
+ # 通过 npm 安装
21
+ npm i mcrm-mobile -S
22
+
23
+ # 通过 yarn 安装
24
+ yarn add mcrm-mobile
25
+ ```
26
+
27
+ ### 快速上手
28
+
29
+ ```js
30
+ import Vue from "vue";
31
+ import { Button } from "mcrm-mobile";
32
+
33
+ Vue.use(Button);
34
+ ```
35
+
36
+ ### 浏览器支持
37
+
38
+ 现代浏览器以及 Android 4.0+, iOS 7+
39
+
40
+ ### 开源协议
41
+
42
+ 本项目基于 [MIT](https://zh.wikipedia.org/wiki/MIT%E8%A8%B1%E5%8F%AF%E8%AD%89) 协议,请自由地享受和参与开源
@@ -1,5 +1,5 @@
1
- /**
2
- * Base64加解密封装
1
+ /**
2
+ * Base64加解密封装
3
3
  */
4
4
  function Base64() {
5
5
  // private property
@@ -116,8 +116,8 @@ function Base64() {
116
116
  return string;
117
117
  };
118
118
  }
119
- /**
120
- * 随机整数: [0, (n-1)]
119
+ /**
120
+ * 随机整数: [0, (n-1)]
121
121
  */
122
122
 
123
123
 
@@ -125,8 +125,8 @@ function rnd(n) {
125
125
  var random = Math.floor(Math.random() * n);
126
126
  return random;
127
127
  }
128
- /**-
129
- * 简单解密
128
+ /**-
129
+ * 简单解密
130
130
  */
131
131
 
132
132
 
@@ -139,8 +139,8 @@ function decodeBase64ForSec(str) {
139
139
  result = deleteChar(index2, result);
140
140
  return base64.decode(result);
141
141
  }
142
- /**
143
- * 简单加密
142
+ /**
143
+ * 简单加密
144
144
  */
145
145
 
146
146
 
@@ -153,8 +153,8 @@ function encodeBase64ForSec(str) {
153
153
  result = insertChar(index2, getRandomForSec(), result);
154
154
  return result.toString();
155
155
  }
156
- /**
157
- * 插入字符
156
+ /**
157
+ * 插入字符
158
158
  */
159
159
 
160
160
 
@@ -162,8 +162,8 @@ function insertChar(n, c, str) {
162
162
  var result = str.substring(0, n) + c + str.substring(n, str.length);
163
163
  return result;
164
164
  }
165
- /**
166
- * 删除字符
165
+ /**
166
+ * 删除字符
167
167
  */
168
168
 
169
169
 
@@ -171,8 +171,8 @@ function deleteChar(n, str) {
171
171
  var result = str.substring(0, n) + str.substring(n + 1, str.length);
172
172
  return result;
173
173
  }
174
- /**
175
- * 加解密获取随机字符
174
+ /**
175
+ * 加解密获取随机字符
176
176
  */
177
177
 
178
178
 
@@ -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";
@@ -14,11 +14,11 @@ var CryptoJS = require("crypto-js");
14
14
 
15
15
  var KEY = "TUNSTWQ1jcm1BQkNEIRUZHSA==";
16
16
  var IV = "VGRtYlmdsalAxMWUxBcHJraw==";
17
- /**
18
- * AES加密
19
- * @param content 需加密的文本
20
- * @param key 密钥
21
- * @param iv 偏移量
17
+ /**
18
+ * AES加密
19
+ * @param content 需加密的文本
20
+ * @param key 密钥
21
+ * @param iv 偏移量
22
22
  */
23
23
 
24
24
  var aesEncrypt = function aesEncrypt(content, key, iv) {
@@ -34,11 +34,11 @@ var aesEncrypt = function aesEncrypt(content, key, iv) {
34
34
  });
35
35
  return encrypted.toString(); //返回的是base64格式的密文
36
36
  };
37
- /**
38
- * AES解密
39
- * @param content 密文
40
- * @param key 密钥
41
- * @param iv 偏移量
37
+ /**
38
+ * AES解密
39
+ * @param content 密文
40
+ * @param key 密钥
41
+ * @param iv 偏移量
42
42
  */
43
43
 
44
44
 
@@ -56,30 +56,30 @@ var aesDecrypt = function aesDecrypt(content, key, iv) {
56
56
  });
57
57
  return decrypted.toString(CryptoJS.enc.Utf8);
58
58
  };
59
- /**
60
- * DES解密
61
- * @param content 密文
62
- * @param keys 密钥
59
+ /**
60
+ * DES解密
61
+ * @param content 密文
62
+ * @param keys 密钥
63
63
  */
64
64
 
65
65
 
66
66
  var desDecrypt = function desDecrypt(content, keys) {
67
67
  return strDec(content, keys[0], keys[1], keys[2]);
68
68
  };
69
- /**
70
- * DES加密
71
- * @param content 需加密的文本
72
- * @param keys 密钥
69
+ /**
70
+ * DES加密
71
+ * @param content 需加密的文本
72
+ * @param keys 密钥
73
73
  */
74
74
 
75
75
 
76
76
  var desEncrypt = function desEncrypt(content, keys) {
77
77
  return strEnc(content, keys[0], keys[1], keys[2]);
78
78
  };
79
- /**
80
- * base64加密
81
- * @param content
82
- * @returns {*}
79
+ /**
80
+ * base64加密
81
+ * @param content
82
+ * @returns {*}
83
83
  */
84
84
 
85
85
 
@@ -87,10 +87,10 @@ var base64Encrypt = function base64Encrypt(content) {
87
87
  var words = CryptoJS.enc.Utf8.parse(content);
88
88
  return CryptoJS.enc.Base64.stringify(words);
89
89
  };
90
- /**
91
- * base64解密
92
- * @param content
93
- * @returns {*}
90
+ /**
91
+ * base64解密
92
+ * @param content
93
+ * @returns {*}
94
94
  */
95
95
 
96
96
 
@@ -98,18 +98,18 @@ var base64Decrypt = function base64Decrypt(content) {
98
98
  var words = CryptoJS.enc.Base64.parse(content);
99
99
  return CryptoJS.enc.Utf8.stringify(words);
100
100
  };
101
- /**
102
- * 方舟加密
103
- * @param content 需要加密对文本
101
+ /**
102
+ * 方舟加密
103
+ * @param content 需要加密对文本
104
104
  */
105
105
 
106
106
 
107
107
  export var arkEncrypt = function arkEncrypt(content) {
108
108
  return encodeBase64ForSec(content);
109
109
  };
110
- /**
111
- * 方舟解密
112
- * @param content 需要解密对文本
110
+ /**
111
+ * 方舟解密
112
+ * @param content 需要解密对文本
113
113
  */
114
114
 
115
115
  var arkDecrypt = function arkDecrypt(content) {
@@ -10,7 +10,7 @@ var buriedPoint = {
10
10
  inserted: function inserted(el, binding) {
11
11
  el.addEventListener("click", /*#__PURE__*/function () {
12
12
  var _ref = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee(e) {
13
- var clickParams, buriedPointData, expInfo, buriedPointLevel, _clickParams, isBuriedPoint, noDrainage, _clickParams$pageName, pageName, _clickParams$menuName, menuName, _clickParams$menuCode, menuCode, _clickParams$extraPar, extraParams, appVersion, areaCode, cityCode, internetState, opName, phoneKernel, phoneOpVersion, phonePlatformVersion, phoneSwitched, loginSessionId, pageText, pageDesc, pageID, pagePath, _CommonUtils$getSysDa, year, month, day, date, source, type, serviceName;
13
+ var clickParams, buriedPointData, expInfo, buriedPointLevel, _clickParams, isBuriedPoint, noDrainage, _clickParams$pageName, pageName, _clickParams$menuName, menuName, _clickParams$menuCode, menuCode, _clickParams$extraPar, extraParams, appVersion, areaCode, cityCode, internetState, opName, phoneKernel, phoneOpVersion, phonePlatformVersion, phoneSwitched, loginSessionId, pageText, pageDesc, pageID, pagePath, _CommonUtils$getSysDa, year, month, day, date, source, type, serviceName, yddStatus, fivegStatus;
14
14
 
15
15
  return _regeneratorRuntime.wrap(function _callee$(_context) {
16
16
  while (1) {
@@ -57,6 +57,8 @@ var buriedPoint = {
57
57
  source = "mcrm";
58
58
  type = menuCode ? "menu" : "locus";
59
59
  serviceName = "BURYING_POINT";
60
+ yddStatus = Session.get('yddStatus') || '';
61
+ fivegStatus = Session.get('fivegStatus') || '';
60
62
 
61
63
  if (isBuriedPoint || buriedPointLevel === "2" || buriedPointLevel === 2 || buriedPointLevel === "1" && menuCode || buriedPointLevel === 1 && menuCode) {
62
64
  isBuriedPoint !== false && Http.buryingSaveLog(_extends({}, extraParams, {
@@ -80,7 +82,9 @@ var buriedPoint = {
80
82
  day: year + "-" + month + "-" + day,
81
83
  source: source,
82
84
  type: type,
83
- serviceName: serviceName
85
+ serviceName: serviceName,
86
+ yddStatus: yddStatus,
87
+ fivegStatus: fivegStatus
84
88
  }));
85
89
  } // const updateOrgInfoService = (data) => {
86
90
  // if (data) {
@@ -104,7 +108,7 @@ var buriedPoint = {
104
108
  // });
105
109
 
106
110
 
107
- case 21:
111
+ case 23:
108
112
  case "end":
109
113
  return _context.stop();
110
114
  }
package/es/http/index.js CHANGED
@@ -7,6 +7,8 @@ import _regeneratorRuntime from "@babel/runtime/regenerator";
7
7
  import Vue from "vue";
8
8
  import { post } from "../utils/http";
9
9
  import { json } from "../utils/create-request-body/json";
10
+ import mcrm from "mcrm-jsapi";
11
+ import Session from "../session";
10
12
  /**
11
13
  * 创建外部订单流水入参
12
14
  * @typedef AddOutFormParams
@@ -324,6 +326,8 @@ var coreCanaryRedirect = /*#__PURE__*/function () {
324
326
  * @property {string} source 数据来源
325
327
  * @property {string} type 数据类型
326
328
  * @property {string} serviceName 业务名称
329
+ * @property {string} yddStatus 移动盾连接状态
330
+ * @property {string} fivegStatus 5g网络状态
327
331
  */
328
332
 
329
333
  /**
@@ -359,6 +363,108 @@ var buryingSaveLog = /*#__PURE__*/function () {
359
363
  };
360
364
  }();
361
365
 
366
+ var operationSaveLog = /*#__PURE__*/function () {
367
+ var _ref9 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee9(body) {
368
+ var params, _ref10, SESSIONNEED, _ref10$mainAcct, mainAcct, _ref10$resAcct, resAcct, _ref10$switchNames, switchNames, _body$operationTypeNa, operationTypeName, _body$operationTypeCo, operationTypeCode, _body$moduleNo, moduleNo, _body$moduleName, moduleName, _body$operationResult, operationResult, setLog;
369
+
370
+ return _regeneratorRuntime.wrap(function _callee9$(_context9) {
371
+ while (1) {
372
+ switch (_context9.prev = _context9.next) {
373
+ case 0:
374
+ params = {};
375
+ _ref10 = Session.get("mmExpInfo") || {}, SESSIONNEED = _ref10.SESSIONNEED, _ref10$mainAcct = _ref10.mainAcct, mainAcct = _ref10$mainAcct === void 0 ? "" : _ref10$mainAcct, _ref10$resAcct = _ref10.resAcct, resAcct = _ref10$resAcct === void 0 ? "" : _ref10$resAcct, _ref10$switchNames = _ref10.switchNames, switchNames = _ref10$switchNames === void 0 ? {} : _ref10$switchNames;
376
+
377
+ if (!switchNames.OPERATION_LOG_SWITCH) {
378
+ _context9.next = 35;
379
+ break;
380
+ }
381
+
382
+ _body$operationTypeNa = body.operationTypeName, operationTypeName = _body$operationTypeNa === void 0 ? "" : _body$operationTypeNa, _body$operationTypeCo = body.operationTypeCode, operationTypeCode = _body$operationTypeCo === void 0 ? "" : _body$operationTypeCo, _body$moduleNo = body.moduleNo, moduleNo = _body$moduleNo === void 0 ? "" : _body$moduleNo, _body$moduleName = body.moduleName, moduleName = _body$moduleName === void 0 ? "" : _body$moduleName, _body$operationResult = body.operationResult, operationResult = _body$operationResult === void 0 ? 0 : _body$operationResult;
383
+ _context9.next = 6;
384
+ return mcrm.util.common({
385
+ action: "getIPAddress",
386
+ onSuccess: function onSuccess(data) {
387
+ params.clientIp = data.ip;
388
+ },
389
+ onFail: function onFail() {
390
+ params.clientIp = "";
391
+ }
392
+ });
393
+
394
+ case 6:
395
+ params.operationSessionId = SESSIONNEED;
396
+ params.operationTypeName = operationTypeName;
397
+ params.operationTypeCode = operationTypeCode;
398
+ params.moduleNo = moduleNo;
399
+ params.moduleName = moduleName;
400
+ params.mainAccount = mainAcct;
401
+ params.resourceSubAccount = resAcct;
402
+ params.operationResult = operationResult;
403
+ _context9.t0 = operationTypeCode;
404
+ _context9.next = _context9.t0 === "openMenu" ? 17 : _context9.t0 === "logIn" ? 19 : _context9.t0 === "logOut" ? 21 : _context9.t0 === "query" ? 23 : _context9.t0 === "handle" ? 25 : 27;
405
+ break;
406
+
407
+ case 17:
408
+ params.operationContent = mainAcct + operationTypeName + moduleName;
409
+ return _context9.abrupt("break", 29);
410
+
411
+ case 19:
412
+ params.operationContent = mainAcct + operationTypeName;
413
+ return _context9.abrupt("break", 29);
414
+
415
+ case 21:
416
+ params.operationContent = mainAcct + operationTypeName;
417
+ return _context9.abrupt("break", 29);
418
+
419
+ case 23:
420
+ params.operationContent = mainAcct + "查询了" + moduleName;
421
+ return _context9.abrupt("break", 29);
422
+
423
+ case 25:
424
+ params.operationContent = mainAcct + "办理了" + moduleName;
425
+ return _context9.abrupt("break", 29);
426
+
427
+ case 27:
428
+ params.operationContent = "";
429
+ return _context9.abrupt("break", 29);
430
+
431
+ case 29:
432
+ if (window.secureOptLog) {
433
+ setLog = window.secureOptLog;
434
+ setLog.set("operationTypeName", operationTypeName);
435
+ setLog.set("operationSessionId", SESSIONNEED);
436
+ setLog.set("operationTypeCode", operationTypeCode);
437
+ setLog.set("operationContent", params.operationContent);
438
+ setLog.set("moduleNo", moduleNo);
439
+ setLog.set("moduleName", moduleName);
440
+ setLog.set("mainAccount", mainAcct);
441
+ setLog.set("resourceSubAccount", resAcct);
442
+ setLog.set("clientIp", params.clientIp);
443
+ setLog.set("operationResult", operationResult);
444
+ window.secureOptLog && (params.invokeSessionId = window.secureOptLog.getAESData());
445
+ }
446
+
447
+ _context9.t1 = post;
448
+ _context9.next = 33;
449
+ return json(params);
450
+
451
+ case 33:
452
+ _context9.t2 = _context9.sent;
453
+ return _context9.abrupt("return", (0, _context9.t1)("/expension/log/addMenuBuryingPoint", _context9.t2));
454
+
455
+ case 35:
456
+ case "end":
457
+ return _context9.stop();
458
+ }
459
+ }
460
+ }, _callee9);
461
+ }));
462
+
463
+ return function operationSaveLog(_x14) {
464
+ return _ref9.apply(this, arguments);
465
+ };
466
+ }();
467
+
362
468
  var Http = {
363
469
  addOutForm: addOutForm,
364
470
  menuPageOpen: menuPageOpen,
@@ -367,7 +473,8 @@ var Http = {
367
473
  coreCanaryRedirect: coreCanaryRedirect,
368
474
  buryingSaveLog: buryingSaveLog,
369
475
  authMenuPageQuery: authMenuPageQuery,
370
- menuCanaryRedirect: menuCanaryRedirect
476
+ menuCanaryRedirect: menuCanaryRedirect,
477
+ operationSaveLog: operationSaveLog
371
478
  };
372
479
  Vue.prototype.$Http = Http;
373
480
  export default Http;
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.4.8';
94
+ var version = '1.5.0';
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) {
package/es/menu/index.js CHANGED
@@ -1,6 +1,8 @@
1
1
  import create from "../utils/create";
2
2
  import MenuJump from "../menu-jump";
3
3
  import Toast from "../toast";
4
+ import Http from "../http";
5
+ import { logMenusFilter } from "../utils/filter";
4
6
  export default create({
5
7
  render: function render() {
6
8
  var _vm = this;
@@ -87,7 +89,9 @@ export default create({
87
89
  isRoute = this.isRoute,
88
90
  menu = this.menu,
89
91
  hideHeader = this.hideHeader;
90
- var menuPageCode = menu.menuPageCode;
92
+ var menuPageCode = menu.menuPageCode,
93
+ menuCode = menu.menuCode,
94
+ menuName = menu.menuName;
91
95
 
92
96
  if (disabled) {
93
97
  if (disabledText) {
@@ -123,6 +127,14 @@ export default create({
123
127
  _this.$emit("click", menu);
124
128
  } else {
125
129
  if (isRoute) {
130
+ logMenusFilter(menuCode) && Http.operationSaveLog({
131
+ operationTypeName: "打开菜单",
132
+ operationTypeCode: "openMenu",
133
+ operationResult: 0,
134
+ moduleNo: menuPageCode || "",
135
+ moduleName: menuName || ""
136
+ });
137
+
126
138
  _this.$router.push({
127
139
  name: menuPageCode
128
140
  });
@@ -135,6 +147,13 @@ export default create({
135
147
  }
136
148
  }, function (error) {
137
149
  Toast.clear();
150
+ logMenusFilter(menuCode) && Http.operationSaveLog({
151
+ operationTypeName: "打开菜单",
152
+ operationTypeCode: "openMenu",
153
+ operationResult: 1,
154
+ moduleNo: menuPageCode || "",
155
+ moduleName: menuName || ""
156
+ });
138
157
  error && error.message && Toast(error.message);
139
158
 
140
159
  _this.$emit("fail", {