eoss-ui 0.6.54 → 0.6.56

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.
Files changed (284) hide show
  1. package/lib/button-group.js +266 -212
  2. package/lib/button.js +403 -347
  3. package/lib/checkbox-group.js +273 -219
  4. package/lib/data-table-form.js +269 -215
  5. package/lib/data-table.js +277 -228
  6. package/lib/date-picker.js +403 -347
  7. package/lib/dialog.js +268 -219
  8. package/lib/enable-drag.js +8 -8
  9. package/lib/eoss-ui.common.js +1049 -894
  10. package/lib/flow-group.js +272 -216
  11. package/lib/flow-list.js +699 -626
  12. package/lib/flow.js +548 -499
  13. package/lib/form.js +274 -225
  14. package/lib/handle-user.js +503 -429
  15. package/lib/handler.js +272 -216
  16. package/lib/icon.js +272 -216
  17. package/lib/index.js +1 -1
  18. package/lib/input-number.js +403 -347
  19. package/lib/input.js +406 -350
  20. package/lib/login.js +273 -224
  21. package/lib/main.js +550 -431
  22. package/lib/menu.js +48 -12
  23. package/lib/nav.js +274 -218
  24. package/lib/page.js +272 -216
  25. package/lib/pagination.js +272 -216
  26. package/lib/player.js +494 -416
  27. package/lib/qr-code.js +285 -229
  28. package/lib/radio-group.js +279 -223
  29. package/lib/retrial-auth.js +272 -216
  30. package/lib/select-ganged.js +406 -350
  31. package/lib/select.js +410 -352
  32. package/lib/selector-panel.js +271 -217
  33. package/lib/selector.js +272 -216
  34. package/lib/sizer.js +269 -220
  35. package/lib/steps.js +277 -221
  36. package/lib/switch.js +272 -216
  37. package/lib/table-form.js +272 -216
  38. package/lib/tabs.js +272 -216
  39. package/lib/theme-chalk/index.css +1 -1
  40. package/lib/theme-chalk/main.css +1 -1
  41. package/lib/theme-chalk/simplicity.css +1 -1
  42. package/lib/tips.js +277 -221
  43. package/lib/tree-group.js +272 -216
  44. package/lib/tree.js +277 -221
  45. package/lib/upload.js +290 -233
  46. package/lib/utils/util.js +231 -182
  47. package/lib/wujie.js +272 -216
  48. package/lib/wxlogin.js +404 -348
  49. package/package.json +159 -159
  50. package/packages/.DS_Store +0 -0
  51. package/packages/button/index.js +5 -5
  52. package/packages/button/src/main.vue +418 -418
  53. package/packages/button-group/index.js +5 -5
  54. package/packages/button-group/src/main.vue +298 -298
  55. package/packages/calendar/index.js +5 -5
  56. package/packages/card/index.js +5 -5
  57. package/packages/card/src/main.vue +156 -156
  58. package/packages/cascader/index.js +5 -5
  59. package/packages/cascader/src/main.vue +168 -168
  60. package/packages/checkbox-group/index.js +5 -5
  61. package/packages/checkbox-group/src/main.vue +333 -333
  62. package/packages/clients/index.js +5 -5
  63. package/packages/clients/src/main.vue +144 -144
  64. package/packages/data-table/.DS_Store +0 -0
  65. package/packages/data-table/index.js +5 -5
  66. package/packages/data-table/src/children.vue +39 -39
  67. package/packages/data-table/src/column.vue +989 -989
  68. package/packages/data-table/src/main.vue +1822 -1822
  69. package/packages/data-table/src/sizer.vue +195 -195
  70. package/packages/data-table-form/.DS_Store +0 -0
  71. package/packages/data-table-form/index.js +5 -5
  72. package/packages/data-table-form/src/checkbox.vue +101 -101
  73. package/packages/data-table-form/src/colgroup.vue +17 -17
  74. package/packages/data-table-form/src/main.vue +181 -181
  75. package/packages/data-table-form/src/radio.vue +65 -65
  76. package/packages/data-table-form/src/table.vue +233 -233
  77. package/packages/data-table-form/src/tbody.vue +336 -336
  78. package/packages/data-table-form/src/thead.vue +68 -68
  79. package/packages/date-picker/index.js +5 -5
  80. package/packages/date-picker/src/main.vue +236 -236
  81. package/packages/dialog/index.js +5 -5
  82. package/packages/enable-drag/index.js +5 -5
  83. package/packages/enterprise/index.js +5 -5
  84. package/packages/enterprise/src/main.vue +66 -66
  85. package/packages/error-page/.DS_Store +0 -0
  86. package/packages/error-page/index.js +5 -5
  87. package/packages/error-page/src/main.vue +44 -44
  88. package/packages/flow/.DS_Store +0 -0
  89. package/packages/flow/index.js +5 -5
  90. package/packages/flow/src/component/CommonOpinions.vue +345 -345
  91. package/packages/flow/src/component/CustomPreset.vue +322 -322
  92. package/packages/flow/src/component/FileList.vue +99 -99
  93. package/packages/flow/src/component/Preset.vue +255 -255
  94. package/packages/flow/src/component/SendMsg.vue +229 -229
  95. package/packages/flow/src/component/TimeLimit.vue +190 -190
  96. package/packages/flow/src/component/taskUnionExamine.vue +611 -611
  97. package/packages/flow/src/form.vue +121 -121
  98. package/packages/flow/src/freeStartFlow.vue +2843 -2843
  99. package/packages/flow/src/main.vue +3131 -3131
  100. package/packages/flow/src/processForm.vue +1031 -1031
  101. package/packages/flow/src/processReject.vue +293 -293
  102. package/packages/flow/src/reset.vue +900 -900
  103. package/packages/flow/src/startTaskRead.vue +641 -641
  104. package/packages/flow/src/supervise.vue +138 -138
  105. package/packages/flow/src/table.vue +58 -58
  106. package/packages/flow-group/.DS_Store +0 -0
  107. package/packages/flow-group/index.js +5 -5
  108. package/packages/flow-group/src/main.vue +688 -688
  109. package/packages/flow-list/index.js +5 -5
  110. package/packages/flow-list/src/main.vue +1437 -1437
  111. package/packages/form/.DS_Store +0 -0
  112. package/packages/form/index.js +5 -5
  113. package/packages/form/src/main.vue +3583 -3583
  114. package/packages/form/src/table.vue +1426 -1426
  115. package/packages/handle-user/index.js +5 -5
  116. package/packages/handle-user/src/main.vue +138 -138
  117. package/packages/handler/.DS_Store +0 -0
  118. package/packages/handler/index.js +5 -5
  119. package/packages/handler/src/main.vue +493 -493
  120. package/packages/icon/index.js +5 -5
  121. package/packages/icon/src/main.vue +101 -101
  122. package/packages/icons/index.js +5 -5
  123. package/packages/icons/src/main.vue +81 -81
  124. package/packages/input/index.js +5 -5
  125. package/packages/input/src/main.vue +356 -356
  126. package/packages/input-number/index.js +5 -5
  127. package/packages/input-number/src/main.vue +106 -106
  128. package/packages/label/index.js +5 -5
  129. package/packages/label/src/main.vue +457 -457
  130. package/packages/layout/index.js +5 -5
  131. package/packages/layout/src/item.vue +152 -152
  132. package/packages/layout/src/main.vue +31 -31
  133. package/packages/login/.DS_Store +0 -0
  134. package/packages/login/index.js +5 -5
  135. package/packages/login/src/main.vue +1935 -1935
  136. package/packages/login/src/resetPassword.vue +562 -562
  137. package/packages/main/.DS_Store +0 -0
  138. package/packages/main/index.js +5 -5
  139. package/packages/main/src/.DS_Store +0 -0
  140. package/packages/main/src/default/message.vue +249 -249
  141. package/packages/main/src/default/notice.vue +157 -157
  142. package/packages/main/src/default/userinfo.vue +503 -503
  143. package/packages/main/src/public/online.vue +89 -89
  144. package/packages/main/src/public/search.vue +462 -466
  145. package/packages/main/src/public/settings.vue +221 -221
  146. package/packages/main/src/simplicity/apps.vue +388 -388
  147. package/packages/main/src/simplicity/avatar.vue +82 -82
  148. package/packages/main/src/simplicity/handler.vue +259 -259
  149. package/packages/main/src/simplicity/index.vue +2076 -2064
  150. package/packages/main/src/simplicity/lists.vue +84 -84
  151. package/packages/main/src/simplicity/menu-list.vue +135 -128
  152. package/packages/main/src/simplicity/message.vue +259 -259
  153. package/packages/main/src/simplicity/notice.vue +190 -190
  154. package/packages/main/src/simplicity/router-page.vue +45 -45
  155. package/packages/main/src/simplicity/sub-menu.vue +263 -241
  156. package/packages/main/src/simplicity/user.vue +257 -257
  157. package/packages/main/src/simplicity/userinfo.vue +312 -312
  158. package/packages/menu/index.js +5 -5
  159. package/packages/menu/src/main.vue +580 -536
  160. package/packages/nav/index.js +5 -5
  161. package/packages/nav/src/main.vue +351 -351
  162. package/packages/notify/index.js +5 -5
  163. package/packages/notify/src/main.vue +538 -538
  164. package/packages/page/index.js +5 -5
  165. package/packages/page/src/main.vue +167 -167
  166. package/packages/pagination/index.js +5 -5
  167. package/packages/pagination/src/main.vue +96 -96
  168. package/packages/player/index.js +5 -5
  169. package/packages/player/src/main.vue +194 -194
  170. package/packages/qr-code/index.js +5 -5
  171. package/packages/qr-code/src/main.vue +170 -170
  172. package/packages/radio-group/index.js +6 -6
  173. package/packages/radio-group/src/main.vue +319 -319
  174. package/packages/retrial-auth/.DS_Store +0 -0
  175. package/packages/retrial-auth/index.js +5 -5
  176. package/packages/retrial-auth/src/main.vue +280 -280
  177. package/packages/select/.DS_Store +0 -0
  178. package/packages/select/index.js +5 -5
  179. package/packages/select/src/main.vue +778 -776
  180. package/packages/select-ganged/index.js +5 -5
  181. package/packages/select-ganged/src/main.vue +724 -724
  182. package/packages/selector/.DS_Store +0 -0
  183. package/packages/selector/index.js +5 -5
  184. package/packages/selector/src/main.vue +687 -687
  185. package/packages/selector-panel/.DS_Store +0 -0
  186. package/packages/selector-panel/index.js +5 -5
  187. package/packages/selector-panel/src/main.vue +1027 -1027
  188. package/packages/selector-panel/src/selection.vue +177 -177
  189. package/packages/selector-panel/src/tree.vue +129 -129
  190. package/packages/sizer/.DS_Store +0 -0
  191. package/packages/sizer/index.js +5 -5
  192. package/packages/sizer/src/main.vue +254 -254
  193. package/packages/steps/index.js +5 -5
  194. package/packages/steps/src/main.vue +181 -181
  195. package/packages/switch/index.js +5 -5
  196. package/packages/switch/src/main.vue +154 -154
  197. package/packages/table-form/index.js +5 -5
  198. package/packages/tabs/.DS_Store +0 -0
  199. package/packages/tabs/index.js +5 -5
  200. package/packages/tabs/src/main.vue +788 -788
  201. package/packages/tabs-panel/index.js +5 -5
  202. package/packages/tabs-panel/src/main.vue +29 -29
  203. package/packages/theme-chalk/lib/index.css +1 -1
  204. package/packages/theme-chalk/lib/main.css +1 -1
  205. package/packages/theme-chalk/lib/simplicity.css +1 -1
  206. package/packages/theme-chalk/src/.DS_Store +0 -0
  207. package/packages/theme-chalk/src/base.scss +260 -260
  208. package/packages/theme-chalk/src/button-group.scss +175 -175
  209. package/packages/theme-chalk/src/button.scss +24 -24
  210. package/packages/theme-chalk/src/calendar.scss +113 -113
  211. package/packages/theme-chalk/src/card.scss +99 -99
  212. package/packages/theme-chalk/src/checkbox-group.scss +8 -8
  213. package/packages/theme-chalk/src/clients.scss +87 -87
  214. package/packages/theme-chalk/src/data-table-form.scss +67 -67
  215. package/packages/theme-chalk/src/data-table.scss +293 -293
  216. package/packages/theme-chalk/src/date-picker.scss +7 -7
  217. package/packages/theme-chalk/src/dialog.scss +77 -77
  218. package/packages/theme-chalk/src/enable-drag.scss +181 -181
  219. package/packages/theme-chalk/src/enterprise.scss +5 -5
  220. package/packages/theme-chalk/src/error-page.scss +18 -18
  221. package/packages/theme-chalk/src/flow-group.scss +110 -110
  222. package/packages/theme-chalk/src/flow-list.scss +36 -36
  223. package/packages/theme-chalk/src/flow.scss +336 -336
  224. package/packages/theme-chalk/src/form.scss +496 -496
  225. package/packages/theme-chalk/src/handle-user.scss +40 -40
  226. package/packages/theme-chalk/src/handler.scss +143 -143
  227. package/packages/theme-chalk/src/icon.scss +1789 -1789
  228. package/packages/theme-chalk/src/icons.scss +99 -99
  229. package/packages/theme-chalk/src/input.scss +9 -9
  230. package/packages/theme-chalk/src/label.scss +24 -24
  231. package/packages/theme-chalk/src/layout.scss +46 -46
  232. package/packages/theme-chalk/src/login.scss +969 -969
  233. package/packages/theme-chalk/src/main.scss +663 -663
  234. package/packages/theme-chalk/src/menu.scss +222 -222
  235. package/packages/theme-chalk/src/mixins/color.scss +117 -117
  236. package/packages/theme-chalk/src/nav.scss +111 -111
  237. package/packages/theme-chalk/src/page.scss +3 -3
  238. package/packages/theme-chalk/src/pagination.scss +29 -29
  239. package/packages/theme-chalk/src/player.scss +9 -9
  240. package/packages/theme-chalk/src/qr-code.scss +17 -17
  241. package/packages/theme-chalk/src/radio-group.scss +9 -9
  242. package/packages/theme-chalk/src/retrial-auth.scss +38 -38
  243. package/packages/theme-chalk/src/select-ganged.scss +8 -8
  244. package/packages/theme-chalk/src/select.scss +8 -8
  245. package/packages/theme-chalk/src/selector-panel.scss +204 -204
  246. package/packages/theme-chalk/src/selector.scss +91 -91
  247. package/packages/theme-chalk/src/simplicity.scss +1351 -1265
  248. package/packages/theme-chalk/src/sizer.scss +36 -36
  249. package/packages/theme-chalk/src/steps.scss +88 -88
  250. package/packages/theme-chalk/src/switch.scss +3 -3
  251. package/packages/theme-chalk/src/table-form.scss +1 -1
  252. package/packages/theme-chalk/src/tabs.scss +87 -87
  253. package/packages/theme-chalk/src/tips.scss +7 -7
  254. package/packages/theme-chalk/src/toolbar.scss +179 -179
  255. package/packages/theme-chalk/src/tree-group.scss +72 -72
  256. package/packages/theme-chalk/src/tree.scss +165 -165
  257. package/packages/theme-chalk/src/upload.scss +168 -168
  258. package/packages/theme-chalk/src/wxlogin.scss +3 -3
  259. package/packages/tips/index.js +5 -5
  260. package/packages/tips/src/main.vue +141 -141
  261. package/packages/toolbar/index.js +5 -5
  262. package/packages/toolbar/src/main.vue +430 -430
  263. package/packages/tree/index.js +5 -5
  264. package/packages/tree/src/main.vue +2 -2
  265. package/packages/tree-group/index.js +5 -5
  266. package/packages/upload/.DS_Store +0 -0
  267. package/packages/upload/index.js +5 -5
  268. package/packages/upload/src/main.vue +1347 -1343
  269. package/packages/upload/src/picture.js +15 -15
  270. package/packages/wujie/index.js +5 -5
  271. package/packages/wujie/src/main.vue +145 -145
  272. package/packages/wxlogin/index.js +5 -5
  273. package/packages/wxlogin/src/main.vue +128 -128
  274. package/src/.DS_Store +0 -0
  275. package/src/config/api.js +281 -281
  276. package/src/config/image.js +2 -2
  277. package/src/index.js +160 -160
  278. package/src/utils/bus.js +3 -3
  279. package/src/utils/date-util.js +312 -312
  280. package/src/utils/http.js +50 -50
  281. package/src/utils/rules.js +18 -18
  282. package/src/utils/store.js +21 -21
  283. package/src/utils/util.js +2 -2
  284. package/src/utils/webSocket.js +107 -107
package/lib/wxlogin.js CHANGED
@@ -91,20 +91,26 @@ module.exports =
91
91
  /***/ (function(module, __webpack_exports__, __webpack_require__) {
92
92
 
93
93
  "use strict";
94
- /* harmony import */ var _config_api__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(1);
95
- /* harmony import */ var axios__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(5);
96
- /* harmony import */ var axios__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(axios__WEBPACK_IMPORTED_MODULE_1__);
97
- /* harmony import */ var qs__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(4);
98
- /* harmony import */ var qs__WEBPACK_IMPORTED_MODULE_2___default = /*#__PURE__*/__webpack_require__.n(qs__WEBPACK_IMPORTED_MODULE_2__);
99
- /* harmony import */ var json_bigint__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(6);
100
- /* harmony import */ var json_bigint__WEBPACK_IMPORTED_MODULE_3___default = /*#__PURE__*/__webpack_require__.n(json_bigint__WEBPACK_IMPORTED_MODULE_3__);
101
- /* harmony import */ var _webSocket__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(7);
102
- /* harmony import */ var eoss_element__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(2);
103
- /* harmony import */ var eoss_element__WEBPACK_IMPORTED_MODULE_5___default = /*#__PURE__*/__webpack_require__.n(eoss_element__WEBPACK_IMPORTED_MODULE_5__);
94
+ /* harmony import */ var babel_runtime_regenerator__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(4);
95
+ /* harmony import */ var babel_runtime_regenerator__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(babel_runtime_regenerator__WEBPACK_IMPORTED_MODULE_0__);
96
+ /* harmony import */ var _config_api__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(1);
97
+ /* harmony import */ var axios__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(6);
98
+ /* harmony import */ var axios__WEBPACK_IMPORTED_MODULE_2___default = /*#__PURE__*/__webpack_require__.n(axios__WEBPACK_IMPORTED_MODULE_2__);
99
+ /* harmony import */ var qs__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(5);
100
+ /* harmony import */ var qs__WEBPACK_IMPORTED_MODULE_3___default = /*#__PURE__*/__webpack_require__.n(qs__WEBPACK_IMPORTED_MODULE_3__);
101
+ /* harmony import */ var json_bigint__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(7);
102
+ /* harmony import */ var json_bigint__WEBPACK_IMPORTED_MODULE_4___default = /*#__PURE__*/__webpack_require__.n(json_bigint__WEBPACK_IMPORTED_MODULE_4__);
103
+ /* harmony import */ var _webSocket__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(8);
104
+ /* harmony import */ var eoss_element__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(2);
105
+ /* harmony import */ var eoss_element__WEBPACK_IMPORTED_MODULE_6___default = /*#__PURE__*/__webpack_require__.n(eoss_element__WEBPACK_IMPORTED_MODULE_6__);
106
+
107
+
104
108
  var _typeof = typeof Symbol === "function" && typeof Symbol.iterator === "symbol" ? function (obj) { return typeof obj; } : function (obj) { return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; };
105
109
 
106
110
  var _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; };
107
111
 
112
+ function _asyncToGenerator(fn) { return function () { var gen = fn.apply(this, arguments); return new Promise(function (resolve, reject) { function step(key, arg) { try { var info = gen[key](arg); var value = info.value; } catch (error) { reject(error); return; } if (info.done) { resolve(value); } else { return Promise.resolve(value).then(function (value) { step("next", value); }, function (err) { step("throw", err); }); } } return step("next"); }); }; }
113
+
108
114
  function _objectWithoutProperties(obj, keys) { var target = {}; for (var i in obj) { if (keys.indexOf(i) >= 0) continue; if (!Object.prototype.hasOwnProperty.call(obj, i)) continue; target[i] = obj[i]; } return target; }
109
115
 
110
116
  /**
@@ -115,8 +121,8 @@ function _objectWithoutProperties(obj, keys) { var target = {}; for (var i in ob
115
121
  **/
116
122
 
117
123
  /* eslint-disable indent */
118
- var sm2 = __webpack_require__(11).sm2;
119
- var lodash = __webpack_require__(10);
124
+ var sm2 = __webpack_require__(12).sm2;
125
+ var lodash = __webpack_require__(11);
120
126
 
121
127
 
122
128
 
@@ -137,7 +143,7 @@ var loginMsg = void 0;
137
143
  var initAuth = void 0;
138
144
  var $_http = void 0;
139
145
 
140
- var JSONbigToString = json_bigint__WEBPACK_IMPORTED_MODULE_3___default()({ storeAsString: true });
146
+ var JSONbigToString = json_bigint__WEBPACK_IMPORTED_MODULE_4___default()({ storeAsString: true });
141
147
 
142
148
 
143
149
  /**
@@ -208,7 +214,7 @@ var ajax = function ajax(_ref) {
208
214
  var http = $_http;
209
215
  if (!http) {
210
216
  var baseURL = host === true ? getStorage('host') : host === false ? '' : host;
211
- http = axios__WEBPACK_IMPORTED_MODULE_1___default.a.create({
217
+ http = axios__WEBPACK_IMPORTED_MODULE_2___default.a.create({
212
218
  baseURL: baseURL,
213
219
  timeout: 99000,
214
220
  transformResponse: [function (data) {
@@ -281,7 +287,7 @@ var ajax = function ajax(_ref) {
281
287
  clearTimeout(loginMsg);
282
288
  loginMsg = setTimeout(function () {
283
289
  sessionStorage.setItem('remind', 1);
284
- eoss_element__WEBPACK_IMPORTED_MODULE_5__["MessageBox"].confirm(response.data.rCode === 69 ? '该账号在其他地方已登陆!' : '登录已过期,请重新登录!', '提示', response.data.rCode === 69 ? {
290
+ eoss_element__WEBPACK_IMPORTED_MODULE_6__["MessageBox"].confirm(response.data.rCode === 69 ? '该账号在其他地方已登陆!' : '登录已过期,请重新登录!', '提示', response.data.rCode === 69 ? {
285
291
  confirmButtonText: '确定',
286
292
  closeOnClickModal: false,
287
293
  type: 'warning'
@@ -332,7 +338,7 @@ var ajax = function ajax(_ref) {
332
338
  } else if (response.data.rCode === 61) {
333
339
  clearTimeout(initAuth);
334
340
  initAuth = setTimeout(function () {
335
- Object(eoss_element__WEBPACK_IMPORTED_MODULE_5__["MessageBox"])({
341
+ Object(eoss_element__WEBPACK_IMPORTED_MODULE_6__["MessageBox"])({
336
342
  title: '请进行二次鉴权',
337
343
  closeOnClickModal: false,
338
344
  closeOnPressEscape: false,
@@ -488,7 +494,7 @@ var ajax = function ajax(_ref) {
488
494
  }
489
495
  }
490
496
  if (method === 'post' && format) {
491
- data = qs__WEBPACK_IMPORTED_MODULE_2___default.a.stringify(data);
497
+ data = qs__WEBPACK_IMPORTED_MODULE_3___default.a.stringify(data);
492
498
  if (!header['content-type'] && !header['Content-Type']) {
493
499
  header['content-type'] = 'application/x-www-form-urlencoded;charset=UTF-8';
494
500
  }
@@ -1616,7 +1622,7 @@ var getLightness = function getLightness($v, $i, $isLight) {
1616
1622
  * @param {function} callback - 回调函数
1617
1623
  **/
1618
1624
  var getMainConfig = function getMainConfig(callback) {
1619
- ajax({ url: _config_api__WEBPACK_IMPORTED_MODULE_0__[/* mainConfig */ "kb"] }).then(function (res) {
1625
+ ajax({ url: _config_api__WEBPACK_IMPORTED_MODULE_1__[/* mainConfig */ "kb"] }).then(function (res) {
1620
1626
  if (res && res.rCode === 0) {
1621
1627
  callback(res.results);
1622
1628
  }
@@ -2348,137 +2354,196 @@ var isFunction = function isFunction(obj) {
2348
2354
  * @param {sting} [loginPage] - 第三方登录页面地址
2349
2355
  * @param {boolean} [redirect] - 是否重定向(用于新脚手架)
2350
2356
  **/
2351
- var isLogined = function isLogined(_ref10) {
2352
- var to = _ref10.to,
2353
- from = _ref10.from,
2354
- next = _ref10.next,
2355
- _ref10$exclude = _ref10.exclude,
2356
- exclude = _ref10$exclude === undefined ? [] : _ref10$exclude,
2357
- cookie = _ref10.cookie,
2358
- loginPage = _ref10.loginPage,
2359
- redirect = _ref10.redirect;
2360
-
2361
- if (cookie === undefined) {
2362
- cookie = getParams({ name: 'cookie' });
2363
- }
2364
- var quit = getParams('quit') || getParams('logout');
2365
- if (quit) {
2366
- ajax({ method: 'post', url: _config_api__WEBPACK_IMPORTED_MODULE_0__[/* logout */ "jb"] }).then(function (res) {
2367
- if (res.rCode === 0) {
2368
- removeStorage();
2369
- }
2370
- }).catch(function () {});
2371
- return;
2372
- }
2373
- var pathname = '';
2374
- try {
2375
- pathname = win.top.location.pathname;
2376
- } catch (error) {
2377
- pathname = win.location.pathname;
2378
- }
2379
- if (loginPage) {
2380
- sessionStorage.setItem('loginPage', loginPage);
2381
- if (!startWith(loginPage, ['http', '/'], true)) {
2382
- if (pathname !== '/') {
2383
- var path = pathname.split('/');
2384
- path.splice(pathname.length - 1);
2385
- path = path.join('/');
2386
- loginPage = path + '/' + loginPage.replace('./', '');
2387
- } else {
2388
- loginPage = pathname + loginPage.replace('./', '');
2389
- }
2390
- }
2391
- }
2392
- var token = getStorage('token') || getStorage('Authorization');
2393
- // const logined = getStorage('logined');
2394
- // eslint-disable-next-line eqeqeq
2395
- if (token || cookie == true || cookie == 1) {
2396
- next && next();
2397
- } else {
2398
- if (!token && Object.prototype.hasOwnProperty.call(to.query, 'serverId') && Object.prototype.hasOwnProperty.call(to.query, 'authType')) {
2399
- var loadingInstance = eoss_element__WEBPACK_IMPORTED_MODULE_5__["Loading"].service({ text: '页面加载中', spinner: 'el-icon-loading', background: 'rgba(0, 0, 0, 0.65)' });
2400
- ajax({
2401
- method: 'post',
2402
- url: _config_api__WEBPACK_IMPORTED_MODULE_0__[/* authCenter */ "b"],
2403
- data: to.query
2404
- }).then(function (res) {
2405
- if (res.rCode === 0) {
2406
- var results = res.results;
2407
-
2408
- switch (results.statusCode) {
2409
- case 0:
2410
- var storage = getStorage('storage');
2411
- setStorage({
2412
- type: storage,
2413
- key: {
2414
- ssId: results.ssId,
2415
- token: results.token,
2416
- Authorization: results.token,
2417
- deviceUnique: results.deviceUnique
2357
+ var isLogined = function () {
2358
+ var _ref10 = _asyncToGenerator( /*#__PURE__*/babel_runtime_regenerator__WEBPACK_IMPORTED_MODULE_0___default.a.mark(function _callee(_ref11) {
2359
+ var to = _ref11.to,
2360
+ from = _ref11.from,
2361
+ next = _ref11.next,
2362
+ _ref11$exclude = _ref11.exclude,
2363
+ exclude = _ref11$exclude === undefined ? [] : _ref11$exclude,
2364
+ cookie = _ref11.cookie,
2365
+ loginPage = _ref11.loginPage,
2366
+ redirect = _ref11.redirect;
2367
+ var quit, pathname, path, token, loadingInstance;
2368
+ return babel_runtime_regenerator__WEBPACK_IMPORTED_MODULE_0___default.a.wrap(function _callee$(_context) {
2369
+ while (1) {
2370
+ switch (_context.prev = _context.next) {
2371
+ case 0:
2372
+ if (cookie === undefined) {
2373
+ cookie = getParams({ name: 'cookie' });
2374
+ }
2375
+ quit = getParams('quit') || getParams('logout');
2376
+
2377
+ if (!quit) {
2378
+ _context.next = 5;
2379
+ break;
2380
+ }
2381
+
2382
+ ajax({ method: 'post', url: _config_api__WEBPACK_IMPORTED_MODULE_1__[/* logout */ "jb"] }).then(function (res) {
2383
+ if (res.rCode === 0) {
2384
+ removeStorage();
2385
+ }
2386
+ }).catch(function () {});
2387
+ return _context.abrupt('return');
2388
+
2389
+ case 5:
2390
+ pathname = '';
2391
+
2392
+ try {
2393
+ pathname = win.top.location.pathname;
2394
+ } catch (error) {
2395
+ pathname = win.location.pathname;
2396
+ }
2397
+ if (loginPage) {
2398
+ sessionStorage.setItem('loginPage', loginPage);
2399
+ if (!startWith(loginPage, ['http', '/'], true)) {
2400
+ if (pathname !== '/') {
2401
+ path = pathname.split('/');
2402
+
2403
+ path.splice(pathname.length - 1);
2404
+ path = path.join('/');
2405
+ loginPage = path + '/' + loginPage.replace('./', '');
2406
+ } else {
2407
+ loginPage = pathname + loginPage.replace('./', '');
2418
2408
  }
2419
- });
2420
- try {
2421
- var url = delUrlParam({
2422
- url: win.top.location.href,
2423
- key: ['serverId', 'authType', 'code', 'sessionId']
2424
- });
2425
- win.top.location.href = url;
2426
- setTimeout(function () {
2427
- win.top.location.reload();
2428
- }, 200);
2429
- } catch (error) {
2430
- var _url2 = delUrlParam({
2431
- url: win.location.href,
2432
- key: ['serverId', 'authType', 'code', 'sessionId']
2433
- });
2434
- win.location.href = _url2;
2435
- setTimeout(function () {
2436
- win.location.reload();
2437
- }, 200);
2438
2409
  }
2410
+ }
2411
+ token = getStorage('token') || getStorage('Authorization');
2412
+ // const logined = getStorage('logined');
2413
+ // eslint-disable-next-line eqeqeq
2414
+
2415
+ if (!(token || cookie == true || cookie == 1)) {
2416
+ _context.next = 13;
2439
2417
  break;
2440
- case 1:
2441
- break;
2442
- case 2:
2443
- break;
2444
- case 3:
2445
- try {
2446
- var href = results.authorizeUrl.replace('{redirectUri}', encodeURIComponent(win.top.location.href));
2447
- win.top.location.href = href;
2448
- } catch (error) {
2449
- var _href = results.authorizeUrl.replace('{redirectUri}', encodeURIComponent(win.location.href));
2450
- win.location.href = _href;
2451
- }
2418
+ }
2419
+
2420
+ next && next();
2421
+ _context.next = 20;
2422
+ break;
2423
+
2424
+ case 13:
2425
+ if (!(!token && Object.prototype.hasOwnProperty.call(to.query, 'serverId') && Object.prototype.hasOwnProperty.call(to.query, 'authType'))) {
2426
+ _context.next = 19;
2452
2427
  break;
2453
- case 4:
2454
- eoss_element__WEBPACK_IMPORTED_MODULE_5__["MessageBox"].alert(results.msg ? results.msg : '账号未绑定,账号密码登录后自动绑定!', '提示', {
2455
- confirmButtonText: '确定',
2456
- type: 'error',
2457
- callback: function callback() {
2458
- sessionStorage.setItem('extUserBindHandleId', results.extUserBindHandleId);
2459
- try {
2460
- if (loginPage) {
2461
- win.top.location.replace(loginPage);
2462
- } else if (document.referrer) {
2463
- win.top.location.replace(document.referrer);
2464
- } else if (win.top.location.href.indexOf('main.html') > -1) {
2465
- win.top.location.href = './login.html';
2466
- } else {
2467
- next('/login');
2428
+ }
2429
+
2430
+ loadingInstance = eoss_element__WEBPACK_IMPORTED_MODULE_6__["Loading"].service({ text: '页面加载中', spinner: 'el-icon-loading', background: 'rgba(0, 0, 0, 0.65)' });
2431
+ _context.next = 17;
2432
+ return ajax({
2433
+ method: 'post',
2434
+ url: _config_api__WEBPACK_IMPORTED_MODULE_1__[/* authCenter */ "b"],
2435
+ data: to.query
2436
+ }).then(function (res) {
2437
+ if (res.rCode === 0) {
2438
+ var results = res.results;
2439
+
2440
+ switch (results.statusCode) {
2441
+ case 0:
2442
+ var storage = getStorage('storage');
2443
+ setStorage({
2444
+ type: storage,
2445
+ key: {
2446
+ ssId: results.ssId,
2447
+ token: results.token,
2448
+ Authorization: results.token,
2449
+ deviceUnique: results.deviceUnique
2450
+ }
2451
+ });
2452
+ try {
2453
+ var url = delUrlParam({
2454
+ url: win.top.location.href,
2455
+ key: ['serverId', 'authType', 'code', 'sessionId']
2456
+ });
2457
+ win.top.location.href = url;
2458
+ setTimeout(function () {
2459
+ win.top.location.reload();
2460
+ }, 200);
2461
+ } catch (error) {
2462
+ var _url2 = delUrlParam({
2463
+ url: win.location.href,
2464
+ key: ['serverId', 'authType', 'code', 'sessionId']
2465
+ });
2466
+ win.location.href = _url2;
2467
+ setTimeout(function () {
2468
+ win.location.reload();
2469
+ }, 200);
2468
2470
  }
2469
- } catch (error) {
2470
- win.postMessage({ type: 1 }, '*');
2471
- }
2471
+ break;
2472
+ case 1:
2473
+ break;
2474
+ case 2:
2475
+ break;
2476
+ case 3:
2477
+ try {
2478
+ var href = results.authorizeUrl.replace('{redirectUri}', encodeURIComponent(win.top.location.href));
2479
+ win.top.location.href = href;
2480
+ } catch (error) {
2481
+ var _href = results.authorizeUrl.replace('{redirectUri}', encodeURIComponent(win.location.href));
2482
+ win.location.href = _href;
2483
+ }
2484
+ break;
2485
+ case 4:
2486
+ eoss_element__WEBPACK_IMPORTED_MODULE_6__["MessageBox"].alert(results.msg ? results.msg : '账号未绑定,账号密码登录后自动绑定!', '提示', {
2487
+ confirmButtonText: '确定',
2488
+ type: 'error',
2489
+ callback: function callback() {
2490
+ sessionStorage.setItem('extUserBindHandleId', results.extUserBindHandleId);
2491
+ try {
2492
+ if (loginPage) {
2493
+ win.top.location.replace(loginPage);
2494
+ } else if (document.referrer) {
2495
+ win.top.location.replace(document.referrer);
2496
+ } else if (win.top.location.href.indexOf('main.html') > -1) {
2497
+ win.top.location.href = './login.html';
2498
+ } else {
2499
+ next('/login');
2500
+ }
2501
+ } catch (error) {
2502
+ win.postMessage({ type: 1 }, '*');
2503
+ }
2504
+ }
2505
+ });
2506
+ break;
2507
+ default:
2472
2508
  }
2473
- });
2474
- break;
2475
- default:
2476
- }
2477
- } else {
2478
- eoss_element__WEBPACK_IMPORTED_MODULE_5__["MessageBox"].alert(res.msg, '提示', {
2479
- confirmButtonText: '确定',
2480
- type: 'error',
2481
- callback: function callback() {
2509
+ } else {
2510
+ eoss_element__WEBPACK_IMPORTED_MODULE_6__["MessageBox"].alert(res.msg, '提示', {
2511
+ confirmButtonText: '确定',
2512
+ type: 'error',
2513
+ callback: function callback() {
2514
+ try {
2515
+ if (loginPage) {
2516
+ win.top.location.replace(loginPage);
2517
+ } else if (document.referrer) {
2518
+ win.top.location.replace(document.referrer);
2519
+ } else if (win.top.location.href.indexOf('main.html') > -1) {
2520
+ win.top.location.href = './login.html';
2521
+ } else {
2522
+ next('/login');
2523
+ }
2524
+ } catch (error) {
2525
+ win.postMessage({ type: 1 }, '*');
2526
+ }
2527
+ }
2528
+ });
2529
+ }
2530
+ loadingInstance.close();
2531
+ }).catch(function (e) {
2532
+ loadingInstance.close();
2533
+ });
2534
+
2535
+ case 17:
2536
+ _context.next = 20;
2537
+ break;
2538
+
2539
+ case 19:
2540
+ if (token || to.path === '/' || to.path === '/404' || to.path === '/error' || typeof exclude === 'boolean' && exclude || exclude.indexOf(to.path) > -1 || exclude.indexOf(to.name) > -1 || to.path === '/login' || token && to.path === '/main') {
2541
+ if (redirect && (to.path === '/main' || to.path === '/login')) {
2542
+ window.location.replace(urlJoinParams({ url: '.' + to.path + '.html', param: to.query }));
2543
+ } else {
2544
+ next();
2545
+ }
2546
+ } else {
2482
2547
  try {
2483
2548
  if (loginPage) {
2484
2549
  win.top.location.replace(loginPage);
@@ -2493,35 +2558,19 @@ var isLogined = function isLogined(_ref10) {
2493
2558
  win.postMessage({ type: 1 }, '*');
2494
2559
  }
2495
2560
  }
2496
- });
2497
- }
2498
- loadingInstance.close();
2499
- }).catch(function (e) {
2500
- loadingInstance.close();
2501
- });
2502
- } else if (token || to.path === '/' || to.path === '/404' || to.path === '/error' || typeof exclude === 'boolean' && exclude || exclude.indexOf(to.path) > -1 || exclude.indexOf(to.name) > -1 || to.path === '/login' || token && to.path === '/main') {
2503
- if (redirect && (to.path === '/main' || to.path === '/login')) {
2504
- window.location.replace(urlJoinParams({ url: '.' + to.path + '.html', param: to.query }));
2505
- } else {
2506
- next();
2507
- }
2508
- } else {
2509
- try {
2510
- if (loginPage) {
2511
- win.top.location.replace(loginPage);
2512
- } else if (document.referrer) {
2513
- win.top.location.replace(document.referrer);
2514
- } else if (win.top.location.href.indexOf('main.html') > -1) {
2515
- win.top.location.href = './login.html';
2516
- } else {
2517
- next('/login');
2561
+
2562
+ case 20:
2563
+ case 'end':
2564
+ return _context.stop();
2518
2565
  }
2519
- } catch (error) {
2520
- win.postMessage({ type: 1 }, '*');
2521
2566
  }
2522
- }
2523
- }
2524
- };
2567
+ }, _callee, this);
2568
+ }));
2569
+
2570
+ return function isLogined(_x5) {
2571
+ return _ref10.apply(this, arguments);
2572
+ };
2573
+ }();
2525
2574
  var isLogged = function isLogged(res) {
2526
2575
  isLogined(res);
2527
2576
  };
@@ -2571,9 +2620,9 @@ var isObjectEqual = function isObjectEqual(obj, _obj) {
2571
2620
  * @param {string/array} [url] - 地址
2572
2621
  * @param {boolean} [single] - 是否做js沙箱隔离
2573
2622
  **/
2574
- var jointUrl = function jointUrl(_ref11) {
2575
- var url = _ref11.url,
2576
- reg = _ref11.reg;
2623
+ var jointUrl = function jointUrl(_ref12) {
2624
+ var url = _ref12.url,
2625
+ reg = _ref12.reg;
2577
2626
 
2578
2627
  if (startWith(url, ['https', 'http', 'blob:'], true) || !reg || !reg.length) {
2579
2628
  return url;
@@ -2588,13 +2637,13 @@ var jointUrl = function jointUrl(_ref11) {
2588
2637
  return startWith(url, reg) ? url : reg + url;
2589
2638
  };
2590
2639
 
2591
- var loadJs = function loadJs(_ref12) {
2592
- var url = _ref12.url,
2593
- _ref12$type = _ref12.type,
2594
- type = _ref12$type === undefined ? 'text/javascript' : _ref12$type,
2595
- id = _ref12.id,
2596
- _ref12$single = _ref12.single,
2597
- single = _ref12$single === undefined ? true : _ref12$single;
2640
+ var loadJs = function loadJs(_ref13) {
2641
+ var url = _ref13.url,
2642
+ _ref13$type = _ref13.type,
2643
+ type = _ref13$type === undefined ? 'text/javascript' : _ref13$type,
2644
+ id = _ref13.id,
2645
+ _ref13$single = _ref13.single,
2646
+ single = _ref13$single === undefined ? true : _ref13$single;
2598
2647
 
2599
2648
  return new Promise(function (resolve, reject) {
2600
2649
  var script = document.getElementById(id) || document.createElement('script');
@@ -2629,7 +2678,7 @@ var loadJs = function loadJs(_ref12) {
2629
2678
  **/
2630
2679
  var loading = function loading($loading, res) {
2631
2680
  if (!$loading) {
2632
- $loading = eoss_element__WEBPACK_IMPORTED_MODULE_5__["Loading"].service;
2681
+ $loading = eoss_element__WEBPACK_IMPORTED_MODULE_6__["Loading"].service;
2633
2682
  }
2634
2683
  if (isObject(res)) {
2635
2684
  var config = extend({}, {
@@ -2729,11 +2778,11 @@ var queryParams = function queryParams(obj) {
2729
2778
  * @param {string} [url] - 消息源的 URI
2730
2779
  * @param {function} [callback] - 回调函数
2731
2780
  **/
2732
- var receiveMessage = function receiveMessage(_ref13) {
2733
- var _ref13$data = _ref13.data,
2734
- data = _ref13$data === undefined ? {} : _ref13$data,
2735
- url = _ref13.url,
2736
- callback = _ref13.callback;
2781
+ var receiveMessage = function receiveMessage(_ref14) {
2782
+ var _ref14$data = _ref14.data,
2783
+ data = _ref14$data === undefined ? {} : _ref14$data,
2784
+ url = _ref14.url,
2785
+ callback = _ref14.callback;
2737
2786
 
2738
2787
  win.addEventListener('message', function (e) {
2739
2788
  if (url !== undefined) {
@@ -2777,9 +2826,9 @@ var removeStorage = function removeStorage(key) {
2777
2826
  * @param {string、number} [data] - 数字或字符串型数字
2778
2827
  * @param {number} [precision] - 需要的小数位数
2779
2828
  **/
2780
- var replenish = function replenish(_ref14) {
2781
- var data = _ref14.data,
2782
- precision = _ref14.precision;
2829
+ var replenish = function replenish(_ref15) {
2830
+ var data = _ref15.data,
2831
+ precision = _ref15.precision;
2783
2832
 
2784
2833
  if (data && precision && precision > 0) {
2785
2834
  var power = Math.pow(10, precision);
@@ -2925,10 +2974,10 @@ var setScale = function setScale() {
2925
2974
  * @param {object} [data] - 数据---其中type必须表示操作类型
2926
2975
  * @param {string} [url] - 指定的消息发送URI地址
2927
2976
  **/
2928
- var sendMessage = function sendMessage(_ref15) {
2929
- var _ref15$data = _ref15.data,
2930
- data = _ref15$data === undefined ? {} : _ref15$data,
2931
- url = _ref15.url;
2977
+ var sendMessage = function sendMessage(_ref16) {
2978
+ var _ref16$data = _ref16.data,
2979
+ data = _ref16$data === undefined ? {} : _ref16$data,
2980
+ url = _ref16.url;
2932
2981
 
2933
2982
  var iframes = document.getElementsByTagName('iframe');
2934
2983
  for (var i = 0; i < iframes.length; i++) {
@@ -2972,10 +3021,10 @@ var setFavicon = function setFavicon(url) {
2972
3021
  * @param {String, Array, Object} [key] - 数据的名称,array类型表示多个key保存同一个value,object类型时对象的属性名称作为key属性值作为value
2973
3022
  * @param {String} [value] - 数据的值
2974
3023
  **/
2975
- var setStorage = function setStorage(_ref16) {
2976
- var type = _ref16.type,
2977
- key = _ref16.key,
2978
- value = _ref16.value;
3024
+ var setStorage = function setStorage(_ref17) {
3025
+ var type = _ref17.type,
3026
+ key = _ref17.key,
3027
+ value = _ref17.value;
2979
3028
 
2980
3029
  if (value && (typeof value === 'undefined' ? 'undefined' : _typeof(value)) === 'object') {
2981
3030
  value = JSON.stringify(value);
@@ -3022,7 +3071,7 @@ var setStorage = function setStorage(_ref16) {
3022
3071
  * @param {Function} [error] - 重连间隔时间
3023
3072
  **/
3024
3073
  function socket(option, vm) {
3025
- var socket = new _webSocket__WEBPACK_IMPORTED_MODULE_4__[/* default */ "a"]();
3074
+ var socket = new _webSocket__WEBPACK_IMPORTED_MODULE_5__[/* default */ "a"]();
3026
3075
  socket.init(option, vm);
3027
3076
  return socket;
3028
3077
  }
@@ -3269,10 +3318,10 @@ var upperCase = function upperCase(text) {
3269
3318
  * @param {Object} [url] - url地址
3270
3319
  * @param {Object} [param] - 被转换的对象
3271
3320
  **/
3272
- var urlJoinParams = function urlJoinParams(_ref17) {
3273
- var url = _ref17.url,
3274
- param = _ref17.param,
3275
- timestamp = _ref17.timestamp;
3321
+ var urlJoinParams = function urlJoinParams(_ref18) {
3322
+ var url = _ref18.url,
3323
+ param = _ref18.param,
3324
+ timestamp = _ref18.timestamp;
3276
3325
 
3277
3326
  var arry = decodeURI(url).split('?');
3278
3327
  var times = new Date().getTime();
@@ -3879,13 +3928,20 @@ var formContents = '/lowcode/admin/online/onlineForm/getOnlineFormFromCache';
3879
3928
  /***/ 10:
3880
3929
  /***/ (function(module, exports) {
3881
3930
 
3882
- module.exports = require("lodash");
3931
+ module.exports = require("stompjs");
3883
3932
 
3884
3933
  /***/ }),
3885
3934
 
3886
3935
  /***/ 11:
3887
3936
  /***/ (function(module, exports) {
3888
3937
 
3938
+ module.exports = require("lodash");
3939
+
3940
+ /***/ }),
3941
+
3942
+ /***/ 12:
3943
+ /***/ (function(module, exports) {
3944
+
3889
3945
  module.exports = require("sm-crypto");
3890
3946
 
3891
3947
  /***/ }),
@@ -4005,164 +4061,28 @@ function normalizeComponent(
4005
4061
  /***/ 4:
4006
4062
  /***/ (function(module, exports) {
4007
4063
 
4008
- module.exports = require("qs");
4064
+ module.exports = require("babel-runtime/regenerator");
4009
4065
 
4010
4066
  /***/ }),
4011
4067
 
4012
4068
  /***/ 5:
4013
4069
  /***/ (function(module, exports) {
4014
4070
 
4015
- module.exports = require("axios");
4071
+ module.exports = require("qs");
4016
4072
 
4017
4073
  /***/ }),
4018
4074
 
4019
4075
  /***/ 6:
4020
4076
  /***/ (function(module, exports) {
4021
4077
 
4022
- module.exports = require("json-bigint");
4078
+ module.exports = require("axios");
4023
4079
 
4024
4080
  /***/ }),
4025
4081
 
4026
4082
  /***/ 7:
4027
- /***/ (function(module, __webpack_exports__, __webpack_require__) {
4028
-
4029
- "use strict";
4030
- /* harmony import */ var sockjs_client__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(8);
4031
- /* harmony import */ var sockjs_client__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(sockjs_client__WEBPACK_IMPORTED_MODULE_0__);
4032
- /* harmony import */ var stompjs__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(9);
4033
- /* harmony import */ var stompjs__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(stompjs__WEBPACK_IMPORTED_MODULE_1__);
4034
- function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
4035
-
4036
-
4037
-
4038
-
4039
- var WebSocket = function () {
4040
- // 构造函数
4041
- function WebSocket() {
4042
- _classCallCheck(this, WebSocket);
4043
-
4044
- this.host = sessionStorage.getItem('wshost') || '';
4045
- this.tryTimes = 1; // 重连次数
4046
- this.callback = null; // 回调函数
4047
- this.client = null; // stomp对象
4048
- this.reconTimeout = null; // 重连延时器
4049
- this.debug = true; // 调试
4050
- this.interval = 20; // 重连间隔时间
4051
- this.vm = null;
4052
- this.nextDate = 0;
4053
- this.connects = 1;
4054
- this.recon = false;
4055
- this.sendTimeout = null;
4056
- this.socket = null;
4057
- this.subscription = null;
4058
- }
4059
-
4060
- /** socket连接 */
4061
-
4062
-
4063
- WebSocket.prototype.connect = function connect() {
4064
- var _this = this;
4065
-
4066
- if (!this.client) {
4067
- // 连接SockJS
4068
- this.socket = new sockjs_client__WEBPACK_IMPORTED_MODULE_0___default.a(this.host + this.url, { timeout: 60000 });
4069
- this.client = stompjs__WEBPACK_IMPORTED_MODULE_1___default.a.over(this.socket);
4070
- }
4071
-
4072
- // 日志不打印
4073
- if (!this.debug) {
4074
- this.client.debug = function () {};
4075
- }
4076
-
4077
- // 向服务器发起websocket连接
4078
- this.client.connect({}, function () {
4079
- _this.recon = true;
4080
- // tryTimes定义重置
4081
- _this.connects = 1;
4082
- // 订阅消息
4083
- _this.subscribe();
4084
- }, function (error) {
4085
- _this.unsubscribe();
4086
- _this.client = null;
4087
- var diffSecond = parseInt((new Date() - _this.nextDate) / 1000, 10);
4088
- if (_this.connects > 5 && diffSecond < _this.interval) {
4089
- _this.error && _this.error(error);
4090
- } else {
4091
- _this.reconTimeout = setTimeout(function () {
4092
- _this.connect();
4093
- _this.connects++;
4094
- }, 5000);
4095
- }
4096
- });
4097
- }; // 清除订阅
4098
-
4099
-
4100
- WebSocket.prototype.unsubscribe = function unsubscribe() {
4101
- if (this.subscription) {
4102
- this.subscription.unsubscribe();
4103
- this.subscription = null;
4104
- }
4105
- };
4106
- /** 订阅服务端 */
4107
-
4108
-
4109
- WebSocket.prototype.subscribe = function subscribe() {
4110
- var _this2 = this;
4111
-
4112
- // 订阅服务端提供的某个topic
4113
- this.subscription = this.client.subscribe(this.take, function (response) {
4114
- if (response && (_this2.callback || _this2.success)) {
4115
- var callback = _this2.callback || _this2.success;
4116
- callback(JSON.parse(response.body));
4117
- }
4118
- });
4119
- };
4120
-
4121
- /** 赋值、初始化socket */
4122
-
4123
-
4124
- WebSocket.prototype.init = function init(option, vm) {
4125
- for (var i in option) {
4126
- this[i] = option[i];
4127
- }
4128
- this.vm = vm;
4129
- // 初始化连接
4130
- this.connect();
4131
- };
4132
-
4133
- /** 发送消息 */
4134
-
4135
-
4136
- WebSocket.prototype.send = function send(data) {
4137
- var _this3 = this;
4138
-
4139
- if (this.recon) {
4140
- clearTimeout(this.sendTimeout);
4141
- this.client.send(this.take, {}, typeof data === 'string' ? data : JSON.stringify(data));
4142
- } else {
4143
- this.sendTimeout = setTimeout(function () {
4144
- _this3.send(data);
4145
- }, 1000);
4146
- }
4147
- };
4148
-
4149
- /** 销毁 */
4150
-
4151
-
4152
- WebSocket.prototype.destroy = function destroy() {
4153
- // 断开连接,清除定时器
4154
- this.unsubscribe();
4155
- if (this.client) {
4156
- this.client.disconnect();
4157
- };
4158
- this.reconTimeout && clearTimeout(this.reconTimeout);
4159
- this.sendTimeout && clearTimeout(this.sendTimeout);
4160
- };
4161
-
4162
- return WebSocket;
4163
- }();
4083
+ /***/ (function(module, exports) {
4164
4084
 
4165
- /* harmony default export */ __webpack_exports__["a"] = (WebSocket);
4085
+ module.exports = require("json-bigint");
4166
4086
 
4167
4087
  /***/ }),
4168
4088
 
@@ -4212,7 +4132,7 @@ render._withStripped = true
4212
4132
  var util = __webpack_require__(0);
4213
4133
 
4214
4134
  // EXTERNAL MODULE: external "qs"
4215
- var external_qs_ = __webpack_require__(4);
4135
+ var external_qs_ = __webpack_require__(5);
4216
4136
  var external_qs_default = /*#__PURE__*/__webpack_require__.n(external_qs_);
4217
4137
 
4218
4138
  // CONCATENATED MODULE: ./node_modules/babel-loader/lib!./node_modules/vue-loader/lib??vue-loader-options!./packages/wxlogin/src/main.vue?vue&type=script&lang=js&
@@ -4372,16 +4292,152 @@ main.install = function (Vue) {
4372
4292
  /***/ }),
4373
4293
 
4374
4294
  /***/ 8:
4375
- /***/ (function(module, exports) {
4295
+ /***/ (function(module, __webpack_exports__, __webpack_require__) {
4376
4296
 
4377
- module.exports = require("sockjs-client");
4297
+ "use strict";
4298
+ /* harmony import */ var sockjs_client__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(9);
4299
+ /* harmony import */ var sockjs_client__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(sockjs_client__WEBPACK_IMPORTED_MODULE_0__);
4300
+ /* harmony import */ var stompjs__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(10);
4301
+ /* harmony import */ var stompjs__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(stompjs__WEBPACK_IMPORTED_MODULE_1__);
4302
+ function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
4303
+
4304
+
4305
+
4306
+
4307
+ var WebSocket = function () {
4308
+ // 构造函数
4309
+ function WebSocket() {
4310
+ _classCallCheck(this, WebSocket);
4311
+
4312
+ this.host = sessionStorage.getItem('wshost') || '';
4313
+ this.tryTimes = 1; // 重连次数
4314
+ this.callback = null; // 回调函数
4315
+ this.client = null; // stomp对象
4316
+ this.reconTimeout = null; // 重连延时器
4317
+ this.debug = true; // 调试
4318
+ this.interval = 20; // 重连间隔时间
4319
+ this.vm = null;
4320
+ this.nextDate = 0;
4321
+ this.connects = 1;
4322
+ this.recon = false;
4323
+ this.sendTimeout = null;
4324
+ this.socket = null;
4325
+ this.subscription = null;
4326
+ }
4327
+
4328
+ /** socket连接 */
4329
+
4330
+
4331
+ WebSocket.prototype.connect = function connect() {
4332
+ var _this = this;
4333
+
4334
+ if (!this.client) {
4335
+ // 连接SockJS
4336
+ this.socket = new sockjs_client__WEBPACK_IMPORTED_MODULE_0___default.a(this.host + this.url, { timeout: 60000 });
4337
+ this.client = stompjs__WEBPACK_IMPORTED_MODULE_1___default.a.over(this.socket);
4338
+ }
4339
+
4340
+ // 日志不打印
4341
+ if (!this.debug) {
4342
+ this.client.debug = function () {};
4343
+ }
4344
+
4345
+ // 向服务器发起websocket连接
4346
+ this.client.connect({}, function () {
4347
+ _this.recon = true;
4348
+ // tryTimes定义重置
4349
+ _this.connects = 1;
4350
+ // 订阅消息
4351
+ _this.subscribe();
4352
+ }, function (error) {
4353
+ _this.unsubscribe();
4354
+ _this.client = null;
4355
+ var diffSecond = parseInt((new Date() - _this.nextDate) / 1000, 10);
4356
+ if (_this.connects > 5 && diffSecond < _this.interval) {
4357
+ _this.error && _this.error(error);
4358
+ } else {
4359
+ _this.reconTimeout = setTimeout(function () {
4360
+ _this.connect();
4361
+ _this.connects++;
4362
+ }, 5000);
4363
+ }
4364
+ });
4365
+ }; // 清除订阅
4366
+
4367
+
4368
+ WebSocket.prototype.unsubscribe = function unsubscribe() {
4369
+ if (this.subscription) {
4370
+ this.subscription.unsubscribe();
4371
+ this.subscription = null;
4372
+ }
4373
+ };
4374
+ /** 订阅服务端 */
4375
+
4376
+
4377
+ WebSocket.prototype.subscribe = function subscribe() {
4378
+ var _this2 = this;
4379
+
4380
+ // 订阅服务端提供的某个topic
4381
+ this.subscription = this.client.subscribe(this.take, function (response) {
4382
+ if (response && (_this2.callback || _this2.success)) {
4383
+ var callback = _this2.callback || _this2.success;
4384
+ callback(JSON.parse(response.body));
4385
+ }
4386
+ });
4387
+ };
4388
+
4389
+ /** 赋值、初始化socket */
4390
+
4391
+
4392
+ WebSocket.prototype.init = function init(option, vm) {
4393
+ for (var i in option) {
4394
+ this[i] = option[i];
4395
+ }
4396
+ this.vm = vm;
4397
+ // 初始化连接
4398
+ this.connect();
4399
+ };
4400
+
4401
+ /** 发送消息 */
4402
+
4403
+
4404
+ WebSocket.prototype.send = function send(data) {
4405
+ var _this3 = this;
4406
+
4407
+ if (this.recon) {
4408
+ clearTimeout(this.sendTimeout);
4409
+ this.client.send(this.take, {}, typeof data === 'string' ? data : JSON.stringify(data));
4410
+ } else {
4411
+ this.sendTimeout = setTimeout(function () {
4412
+ _this3.send(data);
4413
+ }, 1000);
4414
+ }
4415
+ };
4416
+
4417
+ /** 销毁 */
4418
+
4419
+
4420
+ WebSocket.prototype.destroy = function destroy() {
4421
+ // 断开连接,清除定时器
4422
+ this.unsubscribe();
4423
+ if (this.client) {
4424
+ this.client.disconnect();
4425
+ };
4426
+ this.reconTimeout && clearTimeout(this.reconTimeout);
4427
+ this.sendTimeout && clearTimeout(this.sendTimeout);
4428
+ };
4429
+
4430
+ return WebSocket;
4431
+ }();
4432
+
4433
+ /* harmony default export */ __webpack_exports__["a"] = (WebSocket);
4378
4434
 
4379
4435
  /***/ }),
4380
4436
 
4381
4437
  /***/ 9:
4382
4438
  /***/ (function(module, exports) {
4383
4439
 
4384
- module.exports = require("stompjs");
4440
+ module.exports = require("sockjs-client");
4385
4441
 
4386
4442
  /***/ })
4387
4443