mcrm-mobile 1.4.8 → 1.4.9

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/http/index.js CHANGED
@@ -1,39 +1,41 @@
1
1
  import _asyncToGenerator from "@babel/runtime/helpers/asyncToGenerator";
2
2
  import _regeneratorRuntime from "@babel/runtime/regenerator";
3
3
 
4
- /**
5
- * Created by Heath on 2019/11/21.
4
+ /**
5
+ * Created by Heath on 2019/11/21.
6
6
  */
7
7
  import Vue from "vue";
8
8
  import { post } from "../utils/http";
9
9
  import { json } from "../utils/create-request-body/json";
10
- /**
11
- * 创建外部订单流水入参
12
- * @typedef AddOutFormParams
13
- * @property {string} billId 用户手机号
14
- * @property {string} syscode 系统编号
15
- * @property {string} sysName 系统名称
16
- * @property {string} ordertype 业务类型 00 - 自助受理;01 - 营销案;02 - 终端;03 - 宽带新装;04 - 宽带续费;05 - 套卡激活
17
- * @property {string} publishType 推送类型 0:不推送;1:按操作员推送;2.按组织推送;3:推送至客户
18
- * @property {string} title 标题
19
- * @property {string} content 内容
20
- * @property {string} outOrderId 外部订单号 第三方传入的流水号
21
- * @property {string} qrId 二维码 id
22
- * @property {string} sourceCode 来源编码 生成规则:发起调用方的 pageCode + "_" + 要打开页面的 pageCode
23
- * @property {OrderInfo} orderInfo 订单信息
10
+ import mcrm from "mcrm-jsapi";
11
+ import Session from "../session";
12
+ /**
13
+ * 创建外部订单流水入参
14
+ * @typedef AddOutFormParams
15
+ * @property {string} billId 用户手机号
16
+ * @property {string} syscode 系统编号
17
+ * @property {string} sysName 系统名称
18
+ * @property {string} ordertype 业务类型 00 - 自助受理;01 - 营销案;02 - 终端;03 - 宽带新装;04 - 宽带续费;05 - 套卡激活
19
+ * @property {string} publishType 推送类型 0:不推送;1:按操作员推送;2.按组织推送;3:推送至客户
20
+ * @property {string} title 标题
21
+ * @property {string} content 内容
22
+ * @property {string} outOrderId 外部订单号 第三方传入的流水号
23
+ * @property {string} qrId 二维码 id
24
+ * @property {string} sourceCode 来源编码 生成规则:发起调用方的 pageCode + "_" + 要打开页面的 pageCode
25
+ * @property {OrderInfo} orderInfo 订单信息
24
26
  */
25
27
 
26
- /**
27
- * @typedef OrderInfo
28
- * @property {string} kindId 档次 ID
29
- * @property {string} verifyLogId 认证流水 认证流水号
30
- * @property {string} printId 无纸化单号 无纸化单号
31
- * @property {string} infoNo 免填单号 免填单号
28
+ /**
29
+ * @typedef OrderInfo
30
+ * @property {string} kindId 档次 ID
31
+ * @property {string} verifyLogId 认证流水 认证流水号
32
+ * @property {string} printId 无纸化单号 无纸化单号
33
+ * @property {string} infoNo 免填单号 免填单号
32
34
  */
33
35
 
34
- /**
35
- * 创建外部订单流水
36
- * @param {AddOutFormParams} body 入参
36
+ /**
37
+ * 创建外部订单流水
38
+ * @param {AddOutFormParams} body 入参
37
39
  */
38
40
 
39
41
  var addOutForm = /*#__PURE__*/function () {
@@ -62,24 +64,24 @@ var addOutForm = /*#__PURE__*/function () {
62
64
  return _ref.apply(this, arguments);
63
65
  };
64
66
  }();
65
- /**
66
- * 菜单页面打开接口Body参数
67
- * @typedef MenuPageOpenBody
68
- * @property {string} funcId 认证编号
69
- * @property {string} funcType 认证类型
70
- * @property {string} verifyLogId 认证流水号
71
- * @property {string} billId 用户号码
72
- * @property {string} opVerifyLogId 操作员认证流水
73
- * @property {string} opSys 操作系统 引流使用字段
74
- * @property {string} appVersion APP版本号 引流使用字段
75
- * @property {string} menuCode 菜单编号 地市专区不用传
76
- * @property {string} pageCode 页面编号
77
- * @property {string} pageType 页面类型 不传默认是外部页面,传cityZone是地市专区
67
+ /**
68
+ * 菜单页面打开接口Body参数
69
+ * @typedef MenuPageOpenBody
70
+ * @property {string} funcId 认证编号
71
+ * @property {string} funcType 认证类型
72
+ * @property {string} verifyLogId 认证流水号
73
+ * @property {string} billId 用户号码
74
+ * @property {string} opVerifyLogId 操作员认证流水
75
+ * @property {string} opSys 操作系统 引流使用字段
76
+ * @property {string} appVersion APP版本号 引流使用字段
77
+ * @property {string} menuCode 菜单编号 地市专区不用传
78
+ * @property {string} pageCode 页面编号
79
+ * @property {string} pageType 页面类型 不传默认是外部页面,传cityZone是地市专区
78
80
  */
79
81
 
80
- /**
81
- * 菜单页面打开接口
82
- * @param {MenuPageOpenBody} body 入参
82
+ /**
83
+ * 菜单页面打开接口
84
+ * @param {MenuPageOpenBody} body 入参
83
85
  */
84
86
 
85
87
 
@@ -109,10 +111,10 @@ var menuPageOpen = /*#__PURE__*/function () {
109
111
  return _ref2.apply(this, arguments);
110
112
  };
111
113
  }();
112
- /**
113
- * 菜单页面查询接口
114
- * @param {string} pageCode 页面编号
115
- * @param {string} pageType 页面类型
114
+ /**
115
+ * 菜单页面查询接口
116
+ * @param {string} pageCode 页面编号
117
+ * @param {string} pageType 页面类型
116
118
  */
117
119
 
118
120
 
@@ -145,10 +147,10 @@ var menuPageQuery = /*#__PURE__*/function () {
145
147
  return _ref3.apply(this, arguments);
146
148
  };
147
149
  }();
148
- /**
149
- * 登录前菜单页面查询接口
150
- * @param {string} pageCode 页面编号
151
- * @param {string} pageType 页面类型
150
+ /**
151
+ * 登录前菜单页面查询接口
152
+ * @param {string} pageCode 页面编号
153
+ * @param {string} pageType 页面类型
152
154
  */
153
155
 
154
156
 
@@ -181,23 +183,23 @@ var authMenuPageQuery = /*#__PURE__*/function () {
181
183
  return _ref4.apply(this, arguments);
182
184
  };
183
185
  }();
184
- /**
185
- * 菜单权限校验接口Body参数
186
- * @typedef MenuPageVerifyBody
187
- * @property {string} funcId 认证编号
188
- * @property {string} funcType 认证类型
189
- * @property {string} verifyLogId 认证流水号
190
- * @property {string} custUniqueId 客户唯一标识
191
- * @property {string} billId 用户号码
192
- * @property {string} opVerifyLogId 操作员认证流水
193
- * @property {string} opSys 操作系统 引流使用字段
194
- * @property {string} appVersion APP版本号 引流使用字段
195
- * @property {string} menuCode 菜单编号 地市专区不用传
186
+ /**
187
+ * 菜单权限校验接口Body参数
188
+ * @typedef MenuPageVerifyBody
189
+ * @property {string} funcId 认证编号
190
+ * @property {string} funcType 认证类型
191
+ * @property {string} verifyLogId 认证流水号
192
+ * @property {string} custUniqueId 客户唯一标识
193
+ * @property {string} billId 用户号码
194
+ * @property {string} opVerifyLogId 操作员认证流水
195
+ * @property {string} opSys 操作系统 引流使用字段
196
+ * @property {string} appVersion APP版本号 引流使用字段
197
+ * @property {string} menuCode 菜单编号 地市专区不用传
196
198
  */
197
199
 
198
- /**
199
- * 菜单权限校验接口
200
- * @param {MenuPageVerifyBody} body 菜单权限校验接口Body参数
200
+ /**
201
+ * 菜单权限校验接口
202
+ * @param {MenuPageVerifyBody} body 菜单权限校验接口Body参数
201
203
  */
202
204
 
203
205
 
@@ -227,10 +229,10 @@ var menuPageVerify = /*#__PURE__*/function () {
227
229
  return _ref5.apply(this, arguments);
228
230
  };
229
231
  }();
230
- /**
231
- * 引流菜单校验接口
232
- * @param {string} menuCode 菜单编号
233
- * @param {string} sourceSyscode 系统编号
232
+ /**
233
+ * 引流菜单校验接口
234
+ * @param {string} menuCode 菜单编号
235
+ * @param {string} sourceSyscode 系统编号
234
236
  */
235
237
 
236
238
 
@@ -263,11 +265,11 @@ var menuCanaryRedirect = /*#__PURE__*/function () {
263
265
  return _ref6.apply(this, arguments);
264
266
  };
265
267
  }();
266
- /**
267
- * 引流地址查询接口
268
- * @param {string} envTag 环境标识
269
- * @param {string} opSys 操作系统
270
- * @param {string} appVersion 应用版本号
268
+ /**
269
+ * 引流地址查询接口
270
+ * @param {string} envTag 环境标识
271
+ * @param {string} opSys 操作系统
272
+ * @param {string} appVersion 应用版本号
271
273
  */
272
274
 
273
275
 
@@ -301,34 +303,34 @@ var coreCanaryRedirect = /*#__PURE__*/function () {
301
303
  return _ref7.apply(this, arguments);
302
304
  };
303
305
  }();
304
- /**
305
- * @typedef BuryingSaveLogBody 埋点日志接口body参数
306
- * @property {string} appVersion App版本
307
- * @property {string} areaCode 地区编码
308
- * @property {string} cityCode 地市编码
309
- * @property {string} internetState 手机所用网络
310
- * @property {string} loginSessionId 登入session
311
- * @property {string} opName 操作人
312
- * @property {string} pageDesc 页面描述
313
- * @property {string} pageID 页面ID
314
- * @property {string} pagePath 页面路径
315
- * @property {string} phoneKernel 手机内核
316
- * @property {string} phoneOpVersion 手机操作系统版本
317
- * @property {string} phonePlatformVersion 手机平台版本
318
- * @property {string} phoneSwitched 设备名称
319
- * @property {string} menuCode 菜单编码
320
- * @property {string} date 时间戳
321
- * @property {string} year 日期--年份
322
- * @property {string} month 日期--月份
323
- * @property {string} day 日期--天
324
- * @property {string} source 数据来源
325
- * @property {string} type 数据类型
326
- * @property {string} serviceName 业务名称
306
+ /**
307
+ * @typedef BuryingSaveLogBody 埋点日志接口body参数
308
+ * @property {string} appVersion App版本
309
+ * @property {string} areaCode 地区编码
310
+ * @property {string} cityCode 地市编码
311
+ * @property {string} internetState 手机所用网络
312
+ * @property {string} loginSessionId 登入session
313
+ * @property {string} opName 操作人
314
+ * @property {string} pageDesc 页面描述
315
+ * @property {string} pageID 页面ID
316
+ * @property {string} pagePath 页面路径
317
+ * @property {string} phoneKernel 手机内核
318
+ * @property {string} phoneOpVersion 手机操作系统版本
319
+ * @property {string} phonePlatformVersion 手机平台版本
320
+ * @property {string} phoneSwitched 设备名称
321
+ * @property {string} menuCode 菜单编码
322
+ * @property {string} date 时间戳
323
+ * @property {string} year 日期--年份
324
+ * @property {string} month 日期--月份
325
+ * @property {string} day 日期--天
326
+ * @property {string} source 数据来源
327
+ * @property {string} type 数据类型
328
+ * @property {string} serviceName 业务名称
327
329
  */
328
330
 
329
- /**
330
- * 埋点日志接口
331
- * @param {BuryingSaveLogBody} body 埋点日志接口body参数
331
+ /**
332
+ * 埋点日志接口
333
+ * @param {BuryingSaveLogBody} body 埋点日志接口body参数
332
334
  */
333
335
 
334
336
 
@@ -359,6 +361,108 @@ var buryingSaveLog = /*#__PURE__*/function () {
359
361
  };
360
362
  }();
361
363
 
364
+ var operationSaveLog = /*#__PURE__*/function () {
365
+ var _ref9 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee9(body) {
366
+ 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;
367
+
368
+ return _regeneratorRuntime.wrap(function _callee9$(_context9) {
369
+ while (1) {
370
+ switch (_context9.prev = _context9.next) {
371
+ case 0:
372
+ params = {};
373
+ _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;
374
+
375
+ if (!switchNames.OPERATION_LOG_SWITCH) {
376
+ _context9.next = 35;
377
+ break;
378
+ }
379
+
380
+ _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;
381
+ _context9.next = 6;
382
+ return mcrm.util.common({
383
+ action: "getIPAddress",
384
+ onSuccess: function onSuccess(data) {
385
+ params.clientIp = data.ip;
386
+ },
387
+ onFail: function onFail() {
388
+ params.clientIp = "";
389
+ }
390
+ });
391
+
392
+ case 6:
393
+ params.operationSessionId = SESSIONNEED;
394
+ params.operationTypeName = operationTypeName;
395
+ params.operationTypeCode = operationTypeCode;
396
+ params.moduleNo = moduleNo;
397
+ params.moduleName = moduleName;
398
+ params.mainAccount = mainAcct;
399
+ params.resourceSubAccount = resAcct;
400
+ params.operationResult = operationResult;
401
+ _context9.t0 = operationTypeCode;
402
+ _context9.next = _context9.t0 === "openMenu" ? 17 : _context9.t0 === "logIn" ? 19 : _context9.t0 === "logOut" ? 21 : _context9.t0 === "query" ? 23 : _context9.t0 === "handle" ? 25 : 27;
403
+ break;
404
+
405
+ case 17:
406
+ params.operationContent = mainAcct + operationTypeName + moduleName;
407
+ return _context9.abrupt("break", 29);
408
+
409
+ case 19:
410
+ params.operationContent = mainAcct + operationTypeName;
411
+ return _context9.abrupt("break", 29);
412
+
413
+ case 21:
414
+ params.operationContent = mainAcct + operationTypeName;
415
+ return _context9.abrupt("break", 29);
416
+
417
+ case 23:
418
+ params.operationContent = mainAcct + "查询了" + moduleName;
419
+ return _context9.abrupt("break", 29);
420
+
421
+ case 25:
422
+ params.operationContent = mainAcct + "办理了" + moduleName;
423
+ return _context9.abrupt("break", 29);
424
+
425
+ case 27:
426
+ params.operationContent = "";
427
+ return _context9.abrupt("break", 29);
428
+
429
+ case 29:
430
+ if (window.secureOptLog) {
431
+ setLog = window.secureOptLog;
432
+ setLog.set("operationTypeName", operationTypeName);
433
+ setLog.set("operationSessionId", SESSIONNEED);
434
+ setLog.set("operationTypeCode", operationTypeCode);
435
+ setLog.set("operationContent", params.operationContent);
436
+ setLog.set("moduleNo", moduleNo);
437
+ setLog.set("moduleName", moduleName);
438
+ setLog.set("mainAccount", mainAcct);
439
+ setLog.set("resourceSubAccount", resAcct);
440
+ setLog.set("clientIp", params.clientIp);
441
+ setLog.set("operationResult", operationResult);
442
+ window.secureOptLog && (params.invokeSessionId = window.secureOptLog.getAESData());
443
+ }
444
+
445
+ _context9.t1 = post;
446
+ _context9.next = 33;
447
+ return json(params);
448
+
449
+ case 33:
450
+ _context9.t2 = _context9.sent;
451
+ return _context9.abrupt("return", (0, _context9.t1)("/expension/log/addMenuBuryingPoint", _context9.t2));
452
+
453
+ case 35:
454
+ case "end":
455
+ return _context9.stop();
456
+ }
457
+ }
458
+ }, _callee9);
459
+ }));
460
+
461
+ return function operationSaveLog(_x14) {
462
+ return _ref9.apply(this, arguments);
463
+ };
464
+ }();
465
+
362
466
  var Http = {
363
467
  addOutForm: addOutForm,
364
468
  menuPageOpen: menuPageOpen,
@@ -367,7 +471,8 @@ var Http = {
367
471
  coreCanaryRedirect: coreCanaryRedirect,
368
472
  buryingSaveLog: buryingSaveLog,
369
473
  authMenuPageQuery: authMenuPageQuery,
370
- menuCanaryRedirect: menuCanaryRedirect
474
+ menuCanaryRedirect: menuCanaryRedirect,
475
+ operationSaveLog: operationSaveLog
371
476
  };
372
477
  Vue.prototype.$Http = Http;
373
478
  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.4.9';
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", {