eoss-ui 0.6.38 → 0.6.39

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 (261) hide show
  1. package/lib/button-group.js +535 -374
  2. package/lib/button.js +535 -374
  3. package/lib/checkbox-group.js +536 -375
  4. package/lib/config/api.js +31 -19
  5. package/lib/data-table-form.js +547 -386
  6. package/lib/data-table.js +547 -382
  7. package/lib/date-picker.js +535 -374
  8. package/lib/dialog.js +535 -374
  9. package/lib/eoss-ui.common.js +11182 -4328
  10. package/lib/error-page.js +4 -4
  11. package/lib/flow-group.js +553 -377
  12. package/lib/flow-list.js +621 -460
  13. package/lib/flow.js +9822 -2988
  14. package/lib/form.js +540 -379
  15. package/lib/handle-user.js +536 -375
  16. package/lib/handler.js +536 -375
  17. package/lib/icon.js +536 -375
  18. package/lib/index.js +1 -1
  19. package/lib/input-number.js +535 -374
  20. package/lib/input.js +535 -374
  21. package/lib/layout.js +2 -2
  22. package/lib/login.js +550 -389
  23. package/lib/main.js +704 -543
  24. package/lib/nav.js +535 -374
  25. package/lib/notify.js +127 -109
  26. package/lib/page.js +535 -374
  27. package/lib/pagination.js +535 -374
  28. package/lib/player.js +535 -374
  29. package/lib/qr-code.js +548 -387
  30. package/lib/radio-group.js +536 -375
  31. package/lib/retrial-auth.js +538 -377
  32. package/lib/select-ganged.js +536 -375
  33. package/lib/select.js +536 -375
  34. package/lib/selector-panel.js +558 -396
  35. package/lib/selector.js +539 -378
  36. package/lib/sizer.js +541 -380
  37. package/lib/steps.js +535 -374
  38. package/lib/switch.js +535 -374
  39. package/lib/table-form.js +535 -374
  40. package/lib/tabs.js +539 -378
  41. package/lib/theme-chalk/flow.css +1 -1
  42. package/lib/theme-chalk/index.css +1 -1
  43. package/lib/tips.js +536 -375
  44. package/lib/tree-group.js +535 -374
  45. package/lib/tree.js +536 -375
  46. package/lib/upload.js +545 -384
  47. package/lib/utils/util.js +411 -268
  48. package/lib/wujie.js +535 -374
  49. package/lib/wxlogin.js +535 -374
  50. package/package.json +159 -158
  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/index.js +5 -5
  65. package/packages/data-table/src/children.vue +39 -39
  66. package/packages/data-table/src/column.vue +983 -983
  67. package/packages/data-table/src/main.vue +1820 -1816
  68. package/packages/data-table/src/sizer.vue +195 -195
  69. package/packages/data-table-form/index.js +5 -5
  70. package/packages/data-table-form/src/checkbox.vue +101 -101
  71. package/packages/data-table-form/src/colgroup.vue +17 -17
  72. package/packages/data-table-form/src/main.vue +181 -181
  73. package/packages/data-table-form/src/radio.vue +65 -65
  74. package/packages/data-table-form/src/table.vue +233 -233
  75. package/packages/data-table-form/src/tbody.vue +336 -336
  76. package/packages/data-table-form/src/thead.vue +68 -68
  77. package/packages/date-picker/index.js +5 -5
  78. package/packages/date-picker/src/main.vue +236 -236
  79. package/packages/dialog/index.js +5 -5
  80. package/packages/enterprise/index.js +5 -5
  81. package/packages/enterprise/src/main.vue +66 -66
  82. package/packages/error-page/index.js +5 -5
  83. package/packages/error-page/src/main.vue +44 -44
  84. package/packages/flow/index.js +5 -5
  85. package/packages/flow/src/component/CommonOpinions.vue +345 -341
  86. package/packages/flow/src/component/CustomPreset.vue +322 -322
  87. package/packages/flow/src/component/FileList.vue +99 -99
  88. package/packages/flow/src/component/Preset.vue +255 -255
  89. package/packages/flow/src/component/SendMsg.vue +229 -229
  90. package/packages/flow/src/component/TimeLimit.vue +190 -190
  91. package/packages/flow/src/component/taskUnionExamine.vue +603 -547
  92. package/packages/flow/src/form.vue +121 -121
  93. package/packages/flow/src/freeStartFlow.vue +2843 -0
  94. package/packages/flow/src/main.vue +2864 -2731
  95. package/packages/flow/src/processForm.vue +1007 -954
  96. package/packages/flow/src/processReject.vue +293 -293
  97. package/packages/flow/src/reset.vue +901 -0
  98. package/packages/flow/src/selectUser.vue +5 -0
  99. package/packages/flow/src/startTaskRead.vue +596 -596
  100. package/packages/flow/src/table.vue +58 -58
  101. package/packages/flow-group/index.js +5 -5
  102. package/packages/flow-group/src/main.vue +688 -684
  103. package/packages/flow-list/index.js +5 -5
  104. package/packages/flow-list/src/main.vue +1172 -1172
  105. package/packages/form/index.js +5 -5
  106. package/packages/form/src/main.vue +3584 -3584
  107. package/packages/form/src/table.vue +1420 -1420
  108. package/packages/handle-user/index.js +5 -5
  109. package/packages/handle-user/src/main.vue +138 -138
  110. package/packages/handler/index.js +5 -5
  111. package/packages/handler/src/main.vue +388 -388
  112. package/packages/icon/index.js +5 -5
  113. package/packages/icon/src/main.vue +101 -101
  114. package/packages/icons/index.js +5 -5
  115. package/packages/icons/src/main.vue +81 -81
  116. package/packages/input/index.js +5 -5
  117. package/packages/input/src/main.vue +356 -356
  118. package/packages/input-number/index.js +5 -5
  119. package/packages/input-number/src/main.vue +106 -106
  120. package/packages/label/index.js +5 -5
  121. package/packages/label/src/main.vue +457 -457
  122. package/packages/layout/index.js +5 -5
  123. package/packages/layout/src/item.vue +152 -152
  124. package/packages/layout/src/main.vue +31 -31
  125. package/packages/login/index.js +5 -5
  126. package/packages/login/src/main.vue +1892 -1894
  127. package/packages/login/src/resetPassword.vue +562 -562
  128. package/packages/main/index.js +5 -5
  129. package/packages/main/src/default/message.vue +249 -249
  130. package/packages/main/src/default/notice.vue +157 -157
  131. package/packages/main/src/default/userinfo.vue +505 -505
  132. package/packages/main/src/public/online.vue +89 -89
  133. package/packages/main/src/public/search.vue +454 -454
  134. package/packages/main/src/public/settings.vue +221 -221
  135. package/packages/main/src/simplicity/apps.vue +388 -388
  136. package/packages/main/src/simplicity/avatar.vue +82 -82
  137. package/packages/main/src/simplicity/handler.vue +221 -221
  138. package/packages/main/src/simplicity/index.vue +1993 -1993
  139. package/packages/main/src/simplicity/lists.vue +84 -84
  140. package/packages/main/src/simplicity/menu-list.vue +128 -128
  141. package/packages/main/src/simplicity/message.vue +259 -259
  142. package/packages/main/src/simplicity/notice.vue +190 -190
  143. package/packages/main/src/simplicity/router-page.vue +45 -45
  144. package/packages/main/src/simplicity/sub-menu.vue +241 -241
  145. package/packages/main/src/simplicity/user.vue +257 -257
  146. package/packages/main/src/simplicity/userinfo.vue +312 -312
  147. package/packages/menu/index.js +5 -5
  148. package/packages/menu/src/main.vue +536 -536
  149. package/packages/nav/index.js +5 -5
  150. package/packages/nav/src/main.vue +402 -402
  151. package/packages/notify/index.js +5 -5
  152. package/packages/notify/src/main.vue +538 -538
  153. package/packages/page/index.js +5 -5
  154. package/packages/page/src/main.vue +167 -167
  155. package/packages/pagination/index.js +5 -5
  156. package/packages/pagination/src/main.vue +96 -96
  157. package/packages/player/index.js +5 -5
  158. package/packages/player/src/main.vue +194 -194
  159. package/packages/qr-code/index.js +5 -5
  160. package/packages/qr-code/src/main.vue +170 -170
  161. package/packages/radio-group/index.js +6 -6
  162. package/packages/radio-group/src/main.vue +319 -319
  163. package/packages/retrial-auth/index.js +5 -5
  164. package/packages/retrial-auth/src/main.vue +280 -280
  165. package/packages/select/index.js +5 -5
  166. package/packages/select/src/main.vue +775 -775
  167. package/packages/select-ganged/index.js +5 -5
  168. package/packages/select-ganged/src/main.vue +724 -724
  169. package/packages/selector/index.js +5 -5
  170. package/packages/selector/src/main.vue +677 -677
  171. package/packages/selector-panel/index.js +5 -5
  172. package/packages/selector-panel/src/main.vue +1028 -1027
  173. package/packages/selector-panel/src/selection.vue +177 -177
  174. package/packages/selector-panel/src/tree.vue +129 -129
  175. package/packages/sizer/index.js +5 -5
  176. package/packages/sizer/src/main.vue +254 -254
  177. package/packages/steps/index.js +5 -5
  178. package/packages/steps/src/main.vue +181 -181
  179. package/packages/switch/index.js +5 -5
  180. package/packages/switch/src/main.vue +154 -154
  181. package/packages/table-form/index.js +5 -5
  182. package/packages/tabs/index.js +5 -5
  183. package/packages/tabs/src/main.vue +788 -788
  184. package/packages/tabs-panel/index.js +5 -5
  185. package/packages/tabs-panel/src/main.vue +29 -29
  186. package/packages/theme-chalk/lib/flow.css +1 -1
  187. package/packages/theme-chalk/lib/index.css +1 -1
  188. package/packages/theme-chalk/src/base.scss +260 -260
  189. package/packages/theme-chalk/src/button-group.scss +175 -175
  190. package/packages/theme-chalk/src/button.scss +24 -24
  191. package/packages/theme-chalk/src/calendar.scss +113 -113
  192. package/packages/theme-chalk/src/card.scss +99 -99
  193. package/packages/theme-chalk/src/checkbox-group.scss +8 -8
  194. package/packages/theme-chalk/src/clients.scss +87 -87
  195. package/packages/theme-chalk/src/data-table-form.scss +67 -67
  196. package/packages/theme-chalk/src/data-table.scss +293 -293
  197. package/packages/theme-chalk/src/date-picker.scss +7 -7
  198. package/packages/theme-chalk/src/dialog.scss +77 -77
  199. package/packages/theme-chalk/src/enterprise.scss +5 -5
  200. package/packages/theme-chalk/src/error-page.scss +18 -18
  201. package/packages/theme-chalk/src/flow-group.scss +110 -110
  202. package/packages/theme-chalk/src/flow-list.scss +36 -36
  203. package/packages/theme-chalk/src/flow.scss +310 -308
  204. package/packages/theme-chalk/src/form.scss +496 -496
  205. package/packages/theme-chalk/src/handle-user.scss +40 -40
  206. package/packages/theme-chalk/src/handler.scss +143 -143
  207. package/packages/theme-chalk/src/icon.scss +1760 -1760
  208. package/packages/theme-chalk/src/icons.scss +99 -99
  209. package/packages/theme-chalk/src/input.scss +9 -9
  210. package/packages/theme-chalk/src/label.scss +24 -24
  211. package/packages/theme-chalk/src/layout.scss +46 -46
  212. package/packages/theme-chalk/src/login.scss +939 -939
  213. package/packages/theme-chalk/src/main.scss +632 -632
  214. package/packages/theme-chalk/src/menu.scss +222 -222
  215. package/packages/theme-chalk/src/mixins/color.scss +117 -117
  216. package/packages/theme-chalk/src/nav.scss +125 -125
  217. package/packages/theme-chalk/src/page.scss +3 -3
  218. package/packages/theme-chalk/src/pagination.scss +29 -29
  219. package/packages/theme-chalk/src/player.scss +9 -9
  220. package/packages/theme-chalk/src/qr-code.scss +17 -17
  221. package/packages/theme-chalk/src/radio-group.scss +9 -9
  222. package/packages/theme-chalk/src/retrial-auth.scss +38 -38
  223. package/packages/theme-chalk/src/select-ganged.scss +8 -8
  224. package/packages/theme-chalk/src/select.scss +8 -8
  225. package/packages/theme-chalk/src/selector-panel.scss +204 -204
  226. package/packages/theme-chalk/src/selector.scss +91 -91
  227. package/packages/theme-chalk/src/simplicity.scss +1262 -1262
  228. package/packages/theme-chalk/src/sizer.scss +36 -36
  229. package/packages/theme-chalk/src/steps.scss +88 -88
  230. package/packages/theme-chalk/src/switch.scss +3 -3
  231. package/packages/theme-chalk/src/table-form.scss +1 -1
  232. package/packages/theme-chalk/src/tabs.scss +87 -87
  233. package/packages/theme-chalk/src/tips.scss +7 -7
  234. package/packages/theme-chalk/src/toolbar.scss +179 -179
  235. package/packages/theme-chalk/src/tree-group.scss +72 -72
  236. package/packages/theme-chalk/src/tree.scss +165 -165
  237. package/packages/theme-chalk/src/upload.scss +167 -167
  238. package/packages/theme-chalk/src/wxlogin.scss +3 -3
  239. package/packages/tips/index.js +5 -5
  240. package/packages/tips/src/main.vue +141 -141
  241. package/packages/toolbar/index.js +5 -5
  242. package/packages/toolbar/src/main.vue +430 -430
  243. package/packages/tree/index.js +5 -5
  244. package/packages/tree-group/index.js +5 -5
  245. package/packages/upload/index.js +5 -5
  246. package/packages/upload/src/main.vue +1334 -1334
  247. package/packages/upload/src/picture.js +15 -15
  248. package/packages/wujie/index.js +5 -5
  249. package/packages/wujie/src/main.vue +145 -145
  250. package/packages/wxlogin/index.js +5 -5
  251. package/packages/wxlogin/src/main.vue +128 -128
  252. package/src/config/api.js +248 -236
  253. package/src/config/image.js +2 -2
  254. package/src/index.js +1 -1
  255. package/src/utils/bus.js +3 -3
  256. package/src/utils/date-util.js +312 -312
  257. package/src/utils/http.js +50 -50
  258. package/src/utils/rules.js +18 -18
  259. package/src/utils/store.js +21 -21
  260. package/src/utils/util.js +398 -258
  261. package/src/utils/webSocket.js +107 -107
package/lib/utils/util.js CHANGED
@@ -52,6 +52,7 @@ var $darkColorCount = 4;
52
52
  var publicKey = 'abcdefghijklmnopqrstuvwxyz12345678';
53
53
  var loginMsg = void 0;
54
54
  var initAuth = void 0;
55
+ var $_http = void 0;
55
56
 
56
57
  var JSONbigToString = (0, _jsonBigint2.default)({ storeAsString: true });
57
58
 
@@ -121,216 +122,219 @@ var ajax = function ajax(_ref) {
121
122
  } else {
122
123
  method = method.toLowerCase();
123
124
  }
124
- var baseURL = host === true ? getStorage('host') : host === false ? '' : host;
125
- var http = _axios2.default.create({
126
- baseURL: baseURL,
127
- timeout: 99000,
128
- transformResponse: [function (data) {
129
- try {
130
- return JSONbigToString.parse(data);
131
- } catch (err) {
132
- return data;
133
- }
134
- }]
135
- });
136
- // 请求拦截
137
- http.interceptors.request.use(function (config) {
138
- config.headers.common = getStorage();
139
- // 根据请求的信息(请求方式,url,请求get/post数据),产生map的key
140
- // let requestKey = getRequestKey(config);
141
- // // 判断请求是否重复
142
- // if (pendingRequest.has(requestKey)) {
143
- // // 取消上次请求
144
- // let cancel = pendingRequest.get(requestKey);
145
- // cancel();
146
- // // 删除请求信息
147
- // pendingRequest.delete(requestKey);
148
- // }
149
- // // 把请求信息,添加请求到map当中
150
- // // 生成取消方法
151
- // config.cancelToken =
152
- // config.cancelToken ||
153
- // new axios.CancelToken(cancel => {
154
- // // 把取消方法添加到map
155
- // if (!pendingRequest.has(requestKey)) {
156
- // pendingRequest.set(requestKey, cancel);
157
- // }
158
- // });
159
- return config;
160
- }, function (err) {
161
- return err;
162
- });
163
- // 响应拦截
164
- http.interceptors.response.use(function (response) {
165
- // delPendingRequest(response.config);
166
- loading && loading.close();
167
- if (response.headers.authorization && response.headers.authorization !== getStorage('token')) {
168
- if (localStorage.getItem('storage') === 'localStorage' || localStorage.getItem('token') || localStorage.getItem('Authorization')) {
169
- localStorage.setItem('token', response.headers.authorization);
170
- localStorage.setItem('Authorization', response.headers.authorization);
171
- } else {
172
- sessionStorage.setItem('token', response.headers.authorization);
173
- sessionStorage.setItem('Authorization', response.headers.authorization);
174
- }
175
- }
176
- if ((response.headers.ssId || response.headers.Ssid || response.headers.ssid) && (response.headers.ssId || response.headers.SsId || response.headers.ssid) !== getStorage('ssId')) {
177
- if (localStorage.getItem('storage') === 'localStorage' || localStorage.getItem('ssId')) {
178
- localStorage.setItem('ssId', response.headers.ssId || response.headers.SsId || response.headers.ssid);
179
- } else {
180
- sessionStorage.setItem('ssId', response.headers.ssId || response.headers.SsId || response.headers.ssid);
181
- }
182
- }
183
- if (response.status === 200) {
184
- if (response.data.rCode === 64 || response.data.rCode === 65 || response.data.rCode === 67 || response.data.rCode === 69) {
185
- removeStorage(['Authorization', 'token', 'ssId', 'userId', 'userName', 'deviceUnique', 'menus', 'useCaseCodes', 'mainConfig', 'jump', 'showLaunch']);
186
- var href = '';
125
+ var http = $_http;
126
+ if (!http) {
127
+ var baseURL = host === true ? getStorage('host') : host === false ? '' : host;
128
+ http = _axios2.default.create({
129
+ baseURL: baseURL,
130
+ timeout: 99000,
131
+ transformResponse: [function (data) {
187
132
  try {
188
- href = win.top.location.href;
189
- } catch (error) {
190
- href = win.location.href;
133
+ return JSONbigToString.parse(data);
134
+ } catch (err) {
135
+ return data;
191
136
  }
192
- if (href.indexOf('#/login') === -1 && href.indexOf('/login.html') === -1) {
193
- var remind = sessionStorage.getItem('remind');
194
- if (!remind) {
195
- clearTimeout(loginMsg);
196
- loginMsg = setTimeout(function () {
197
- sessionStorage.setItem('remind', 1);
198
- _eossElement.MessageBox.confirm(response.data.rCode === 69 ? '该账号在其他地方已登陆!' : '登录已过期,请重新登录!', '提示', response.data.rCode === 69 ? {
199
- confirmButtonText: '确定',
200
- closeOnClickModal: false,
201
- type: 'warning'
202
- } : {
203
- confirmButtonText: '确定',
204
- cancelButtonText: '取消',
205
- closeOnClickModal: false,
206
- type: 'warning'
207
- }).then(function () {
208
- try {
209
- var loginPage = getStorage('login') || getStorage('loginPage');
210
- if (loginPage) {
211
- var src = void 0;
212
- if (!startWith(loginPage, ['http', '/'], true)) {
213
- var pathname = win.top.location.pathname;
214
- if (pathname !== '/') {
215
- pathname = pathname.split('/');
216
- pathname.splice(pathname.length - 1);
217
- pathname = pathname.join('/');
218
- src = pathname + '/' + loginPage.replace('./', '');
137
+ }]
138
+ });
139
+ // 请求拦截
140
+ http.interceptors.request.use(function (config) {
141
+ config.headers.common = getStorage();
142
+ // 根据请求的信息(请求方式,url,请求get/post数据),产生map的key
143
+ // let requestKey = getRequestKey(config);
144
+ // // 判断请求是否重复
145
+ // if (pendingRequest.has(requestKey)) {
146
+ // // 取消上次请求
147
+ // let cancel = pendingRequest.get(requestKey);
148
+ // cancel();
149
+ // // 删除请求信息
150
+ // pendingRequest.delete(requestKey);
151
+ // }
152
+ // // 把请求信息,添加请求到map当中
153
+ // // 生成取消方法
154
+ // config.cancelToken =
155
+ // config.cancelToken ||
156
+ // new axios.CancelToken(cancel => {
157
+ // // 把取消方法添加到map
158
+ // if (!pendingRequest.has(requestKey)) {
159
+ // pendingRequest.set(requestKey, cancel);
160
+ // }
161
+ // });
162
+ return config;
163
+ }, function (err) {
164
+ return err;
165
+ });
166
+ // 响应拦截
167
+ http.interceptors.response.use(function (response) {
168
+ // delPendingRequest(response.config);
169
+ loading && loading.close();
170
+ if (response.headers.authorization && response.headers.authorization !== getStorage('token')) {
171
+ if (localStorage.getItem('storage') === 'localStorage' || localStorage.getItem('token') || localStorage.getItem('Authorization')) {
172
+ localStorage.setItem('token', response.headers.authorization);
173
+ localStorage.setItem('Authorization', response.headers.authorization);
174
+ } else {
175
+ sessionStorage.setItem('token', response.headers.authorization);
176
+ sessionStorage.setItem('Authorization', response.headers.authorization);
177
+ }
178
+ }
179
+ if ((response.headers.ssId || response.headers.Ssid || response.headers.ssid) && (response.headers.ssId || response.headers.SsId || response.headers.ssid) !== getStorage('ssId')) {
180
+ if (localStorage.getItem('storage') === 'localStorage' || localStorage.getItem('ssId')) {
181
+ localStorage.setItem('ssId', response.headers.ssId || response.headers.SsId || response.headers.ssid);
182
+ } else {
183
+ sessionStorage.setItem('ssId', response.headers.ssId || response.headers.SsId || response.headers.ssid);
184
+ }
185
+ }
186
+ if (response.status === 200) {
187
+ if (response.data.rCode === 64 || response.data.rCode === 65 || response.data.rCode === 67 || response.data.rCode === 69) {
188
+ removeStorage(['Authorization', 'token', 'ssId', 'userId', 'userName', 'deviceUnique', 'menus', 'useCaseCodes', 'mainConfig', 'jump', 'showLaunch']);
189
+ var href = '';
190
+ try {
191
+ href = win.top.location.href;
192
+ } catch (error) {
193
+ href = win.location.href;
194
+ }
195
+ if (href.indexOf('#/login') === -1 && href.indexOf('/login.html') === -1) {
196
+ var remind = sessionStorage.getItem('remind');
197
+ if (!remind) {
198
+ clearTimeout(loginMsg);
199
+ loginMsg = setTimeout(function () {
200
+ sessionStorage.setItem('remind', 1);
201
+ _eossElement.MessageBox.confirm(response.data.rCode === 69 ? '该账号在其他地方已登陆!' : '登录已过期,请重新登录!', '提示', response.data.rCode === 69 ? {
202
+ confirmButtonText: '确定',
203
+ closeOnClickModal: false,
204
+ type: 'warning'
205
+ } : {
206
+ confirmButtonText: '确定',
207
+ cancelButtonText: '取消',
208
+ closeOnClickModal: false,
209
+ type: 'warning'
210
+ }).then(function () {
211
+ try {
212
+ var loginPage = getStorage('login') || getStorage('loginPage');
213
+ if (loginPage) {
214
+ var src = void 0;
215
+ if (!startWith(loginPage, ['http', '/'], true)) {
216
+ var pathname = win.top.location.pathname;
217
+ if (pathname !== '/') {
218
+ pathname = pathname.split('/');
219
+ pathname.splice(pathname.length - 1);
220
+ pathname = pathname.join('/');
221
+ src = pathname + '/' + loginPage.replace('./', '');
222
+ } else {
223
+ src = pathname + loginPage.replace('./', '');
224
+ }
219
225
  } else {
220
- src = pathname + loginPage.replace('./', '');
226
+ src = loginPage;
221
227
  }
228
+ win.top.location.href = src;
229
+ } else if (win.top.location.href.indexOf('main.html') > -1) {
230
+ win.top.location.href = './login.html';
222
231
  } else {
223
- src = loginPage;
224
- }
225
- win.top.location.href = src;
226
- } else if (win.top.location.href.indexOf('main.html') > -1) {
227
- win.top.location.href = './login.html';
228
- } else {
229
- var hash = win.top.location.hash;
230
- if (hash) {
231
- var len = win.top.location.href.indexOf(hash);
232
- win.top.location.href = win.location.href.slice(0, len) + '#/login';
233
- } else {
234
- win.top.location.href = '/login.html';
232
+ var hash = win.top.location.hash;
233
+ if (hash) {
234
+ var len = win.top.location.href.indexOf(hash);
235
+ win.top.location.href = win.location.href.slice(0, len) + '#/login';
236
+ } else {
237
+ win.top.location.href = '/login.html';
238
+ }
235
239
  }
240
+ } catch (error) {
241
+ win.postMessage({ type: 1 }, '*');
236
242
  }
237
- } catch (error) {
238
- win.postMessage({ type: 1 }, '*');
239
- }
240
- }).catch(function (e) {
241
- sessionStorage.removeItem('remind');
242
- });
243
- }, 2000);
243
+ }).catch(function (e) {
244
+ sessionStorage.removeItem('remind');
245
+ });
246
+ }, 2000);
247
+ }
244
248
  }
249
+ } else if (response.data.rCode === 61) {
250
+ clearTimeout(initAuth);
251
+ initAuth = setTimeout(function () {
252
+ (0, _eossElement.MessageBox)({
253
+ title: '请进行二次鉴权',
254
+ closeOnClickModal: false,
255
+ closeOnPressEscape: false,
256
+ showConfirmButton: false,
257
+ dangerouslyUseHTMLString: true,
258
+ scroll: false,
259
+ customClass: 'es-retrial-auth-msg',
260
+ render: function render(h, msgBox) {
261
+ return h('es-retrial-auth', {
262
+ ref: 'auth',
263
+ props: {
264
+ reload: response.data.results.reload || response.data.results.refresh,
265
+ group: response.data.results.retrialAuthGroupIds,
266
+ type: response.data.results.retrialAuthType,
267
+ msgBox: msgBox
268
+ }
269
+ });
270
+ },
271
+ callback: function callback(res, obj) {
272
+ obj.$children.forEach(function (item) {
273
+ item.clearTimeouts && item.clearTimeouts();
274
+ return;
275
+ });
276
+ }
277
+ });
278
+ }, 1000);
245
279
  }
246
- } else if (response.data.rCode === 61) {
247
- clearTimeout(initAuth);
248
- initAuth = setTimeout(function () {
249
- (0, _eossElement.MessageBox)({
250
- title: '请进行二次鉴权',
251
- closeOnClickModal: false,
252
- closeOnPressEscape: false,
253
- showConfirmButton: false,
254
- dangerouslyUseHTMLString: true,
255
- scroll: false,
256
- customClass: 'es-retrial-auth-msg',
257
- render: function render(h, msgBox) {
258
- return h('es-retrial-auth', {
259
- ref: 'auth',
260
- props: {
261
- reload: response.data.results.reload || response.data.results.refresh,
262
- group: response.data.results.retrialAuthGroupIds,
263
- type: response.data.results.retrialAuthType,
264
- msgBox: msgBox
265
- }
266
- });
267
- },
268
- callback: function callback(res, obj) {
269
- obj.$children.forEach(function (item) {
270
- item.clearTimeouts && item.clearTimeouts();
271
- return;
272
- });
273
- }
274
- });
275
- }, 1000);
280
+ // eslint-disable-next-line no-undef
281
+ return Promise.resolve(JSON.parse(JSON.stringify(response.data)));
276
282
  }
277
- // eslint-disable-next-line no-undef
278
- return Promise.resolve(JSON.parse(JSON.stringify(response.data)));
279
- }
280
- }, function (error) {
281
- loading && loading.close();
282
- // if (!axios.isCancel(error)) {
283
- // delPendingRequest(error.config || {});
284
- // }
285
- if (error && error.response) {
286
- if (error.response.status) {
287
- switch (error.response.status) {
288
- case 400:
289
- error.message = '错误请求';
290
- break;
291
- case 401:
292
- error.message = '未授权,请重新登录';
293
- break;
294
- case 403:
295
- error.message = '服务器错误';
296
- break;
297
- case 404:
298
- error.message = '网络请求不存在';
299
- break;
300
- case 405:
301
- error.message = '请求方法错误';
302
- break;
303
- case 408:
304
- error.message = '请求超时';
305
- break;
306
- case 500:
307
- error.message = '服务器错误';
308
- break;
309
- case 501:
310
- error.message = '网络未实现';
311
- break;
312
- case 502:
313
- error.message = '网络错误';
314
- break;
315
- case 503:
316
- error.message = '服务不可用';
317
- break;
318
- case 504:
319
- error.message = '网络超时';
320
- break;
321
- case 505:
322
- error.message = 'http版本不支持该请求';
323
- break;
324
- default:
325
- error.message = '\u8FDE\u63A5\u9519\u8BEF' + error.response.status;
283
+ }, function (error) {
284
+ loading && loading.close();
285
+ // if (!axios.isCancel(error)) {
286
+ // delPendingRequest(error.config || {});
287
+ // }
288
+ if (error && error.response) {
289
+ if (error.response.status) {
290
+ switch (error.response.status) {
291
+ case 400:
292
+ error.message = '错误请求';
293
+ break;
294
+ case 401:
295
+ error.message = '未授权,请重新登录';
296
+ break;
297
+ case 403:
298
+ error.message = '服务器错误';
299
+ break;
300
+ case 404:
301
+ error.message = '网络请求不存在';
302
+ break;
303
+ case 405:
304
+ error.message = '请求方法错误';
305
+ break;
306
+ case 408:
307
+ error.message = '请求超时';
308
+ break;
309
+ case 500:
310
+ error.message = '服务器错误';
311
+ break;
312
+ case 501:
313
+ error.message = '网络未实现';
314
+ break;
315
+ case 502:
316
+ error.message = '网络错误';
317
+ break;
318
+ case 503:
319
+ error.message = '服务不可用';
320
+ break;
321
+ case 504:
322
+ error.message = '网络超时';
323
+ break;
324
+ case 505:
325
+ error.message = 'http版本不支持该请求';
326
+ break;
327
+ default:
328
+ error.message = '\u8FDE\u63A5\u9519\u8BEF' + error.response.status;
329
+ }
330
+ } else {
331
+ error.message = '无法请求,请联系管理员';
326
332
  }
327
- } else {
328
- error.message = '无法请求,请联系管理员';
329
333
  }
330
- }
331
- // eslint-disable-next-line no-undef
332
- return Promise.reject(error);
333
- });
334
+ // eslint-disable-next-line no-undef
335
+ return Promise.reject(error);
336
+ });
337
+ }
334
338
  var userId = getStorage('userId');
335
339
  if (!Object.prototype.hasOwnProperty.call(data, 'userId') && userId && defaults) {
336
340
  data.userId = userId;
@@ -421,7 +425,145 @@ var ajax = function ajax(_ref) {
421
425
  headers: header
422
426
  }, configs));
423
427
  };
428
+ /**
429
+ * ajaxStream
430
+ * @desc:ajax流式请求
431
+ * @author huangbo
432
+ * @date 2022年5月7日
433
+ * @param {Object} [controller] - controller
434
+ * @param {String} [method] - 请求类型
435
+ * @param {String} [url] - 请求地址
436
+ * @param {String} [host] - host
437
+ * @param {Object} [data] - 请求参数
438
+ * @param {Object} [params] - 请求参数
439
+ **/
440
+ var ajaxStream = function ajaxStream(_ref2) {
441
+ var controller = _ref2.controller,
442
+ _ref2$method = _ref2.method,
443
+ method = _ref2$method === undefined ? 'post' : _ref2$method,
444
+ host = _ref2.host,
445
+ url = _ref2.url,
446
+ data = _ref2.data,
447
+ params = _ref2.params,
448
+ progress = _ref2.progress,
449
+ success = _ref2.success,
450
+ fail = _ref2.fail,
451
+ final = _ref2.final,
452
+ configs = _objectWithoutProperties(_ref2, ['controller', 'method', 'host', 'url', 'data', 'params', 'progress', 'success', 'fail', 'final']);
424
453
 
454
+ try {
455
+ // 如果有正在进行的请求,取消它
456
+ if (controller) {
457
+ controller.abort();
458
+ }
459
+ controller = new AbortController();
460
+ var baseURL = host || getStorage('baseHost') || '';
461
+ var userId = getStorage('userId');
462
+ if (data && !Object.prototype.hasOwnProperty.call(data, 'userId') && userId) {
463
+ data.userId = userId;
464
+ }
465
+ if (params && !Object.prototype.hasOwnProperty.call(params, 'userId') && userId) {
466
+ params.userId = getStorage('userId');
467
+ }
468
+ var info = {};
469
+ var partialData = '';
470
+ var lastProcessedIndex = 0;
471
+ var done = false;
472
+ ajax(_extends({
473
+ timeout: 990000,
474
+ format: false,
475
+ method: method,
476
+ url: baseURL + url,
477
+ signal: controller.signal,
478
+ responseType: 'text',
479
+ data: data,
480
+ params: params
481
+ }, configs, {
482
+ onDownloadProgress: function onDownloadProgress(progressEvent) {
483
+ // 获取从上次处理后新增的数据
484
+ var currentResponse = (progressEvent.event || progressEvent).currentTarget.responseText;
485
+ var chunk = currentResponse.slice(lastProcessedIndex);
486
+
487
+ // 更新偏移量
488
+ lastProcessedIndex = currentResponse.length;
489
+
490
+ // 假设数据是以 'data:' 开头的 SSE 格式
491
+ partialData += chunk;
492
+ var lines = partialData.split('\n');
493
+ var remainingData = ''; // 用于保存未完整处理的部分数据
494
+ lines.forEach(function (line) {
495
+ if (line.startsWith('data:')) {
496
+ var _data = line.replace('data:', '').trim();
497
+ if (_data) {
498
+ try {
499
+ // 假设数据是 JSON 格式
500
+ var parsedData = JSON.parse(_data);
501
+ info.time = parsedData.time;
502
+ info.conversationId = parsedData.conversationId;
503
+
504
+ // 使用正则表达式匹配 <think> 标签
505
+ var thinkRegex = /<think>([\s\S]*?)<\/think>([\s\S]*)?/;
506
+ var match = parsedData.message.match(thinkRegex);
507
+ if (match) {
508
+ var thinkContent = match[1] ? match[1].trim() : ''; // <think> 标签内的数据
509
+ var content = match[2] ? match[2].trim() : ''; // <think> 标签后的数据
510
+ // 更新 AI 消息内容
511
+ info.thinkContent += thinkContent;
512
+ info.content += content;
513
+ } else {
514
+ // 如果没有 <think> 标签,直接将消息内容赋值到 content
515
+ info.content += parsedData.message;
516
+ }
517
+ done = parsedData.done;
518
+ } catch (parseError) {
519
+ console.error('解析数据出错:', parseError);
520
+ }
521
+ // Promise.resolve({message: info, controller});
522
+ }
523
+ } else {
524
+ // 保存未处理完的部分数据
525
+ remainingData += line + '\n';
526
+ }
527
+ });
528
+
529
+ // 将未完整处理的数据保留到 partialData 中
530
+ partialData = remainingData;
531
+ progress && progress({ message: info, controller: controller, done: done });
532
+ }
533
+ })).then(function () {
534
+ // 处理请求完成后的信息
535
+ var originalText = info.content;
536
+ var regex = /<think>([\s\S]*?)<\/think>([\s\S]*)/;
537
+ var match = originalText.match(regex);
538
+ if (match) {
539
+ info.thinkContent = match ? match[1].trim() : '';
540
+ info.content = match ? match[2].trim() : '';
541
+ }
542
+ success && success({ message: info, controller: controller });
543
+ }).catch(function () {
544
+ // 处理请求完成后的信息
545
+ var originalText = info.content || '';
546
+ var regex = /<think>([\s\S]*?)<\/think>([\s\S]*)/;
547
+ var match = originalText.match(regex);
548
+ if (match) {
549
+ info.thinkContent = match ? match[1].trim() : '';
550
+ info.content = match ? match[2].trim() : '';
551
+ }
552
+ fail && fail({ status: 1, message: info, controller: controller });
553
+ });
554
+ } catch (error) {
555
+ console.error('聊天请求出错:', error);
556
+ var errorMessage = '抱歉,发生了一个错误,请稍后再试。';
557
+ if (error.code === 'ERR_NETWORK') {
558
+ errorMessage = '网络连接错误,请检查服务器是否正在运行或网络连接是否正常。';
559
+ } else if (error.response) {
560
+ errorMessage = '\u670D\u52A1\u5668\u9519\u8BEF (' + error.response.status + '): ' + (error.response.data || '未知错误');
561
+ }
562
+ fail && fail({ status: 0, message: { role: 'assistant', content: errorMessage }, controller: controller });
563
+ } finally {
564
+ final && final({ status: -1, message: null, controller: controller });
565
+ }
566
+ };
425
567
  /**
426
568
  * arrUnique
427
569
  * @desc:数组元素对象去重
@@ -500,9 +642,9 @@ var browser = function browser() {
500
642
  **/
501
643
  var busEmit = function busEmit() {
502
644
  var vm = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : this;
503
- var _ref2 = arguments[1];
504
- var method = _ref2.method,
505
- args = _ref2.args;
645
+ var _ref3 = arguments[1];
646
+ var method = _ref3.method,
647
+ args = _ref3.args;
506
648
 
507
649
  var bus = win.$wujie ? win.$wujie.bus : vm.bus || vm.$root.Bus;
508
650
  bus && bus.$emit(method, args);
@@ -732,9 +874,9 @@ var debounce = function debounce(callback, wait) {
732
874
  * @param {String} [url] - url地址
733
875
  * @param {String,Array} [key] - 参数名
734
876
  **/
735
- var delUrlParam = function delUrlParam(_ref3) {
736
- var url = _ref3.url,
737
- key = _ref3.key;
877
+ var delUrlParam = function delUrlParam(_ref4) {
878
+ var url = _ref4.url,
879
+ key = _ref4.key;
738
880
 
739
881
  var pUrl = '';
740
882
  try {
@@ -860,10 +1002,10 @@ var esDecode = function esDecode(value) {
860
1002
  * @param {string} [data] - 被加密的字符串
861
1003
  * @param {string} [key] - 公钥
862
1004
  **/
863
- var esmEncrypt = function esmEncrypt(_ref4) {
864
- var data = _ref4.data,
865
- key = _ref4.key,
866
- mode = _ref4.mode;
1005
+ var esmEncrypt = function esmEncrypt(_ref5) {
1006
+ var data = _ref5.data,
1007
+ key = _ref5.key,
1008
+ mode = _ref5.mode;
867
1009
 
868
1010
  var cipherMode = mode ? mode : 1;
869
1011
  if (!new RegExp('^04').test(key)) {
@@ -881,10 +1023,10 @@ var esmEncrypt = function esmEncrypt(_ref4) {
881
1023
  * @param {string} [data] - 被解密的加密字符串
882
1024
  * @param {string} [key] - 私钥
883
1025
  **/
884
- var esmDecode = function esmDecode(_ref5) {
885
- var data = _ref5.data,
886
- key = _ref5.key,
887
- mode = _ref5.mode;
1026
+ var esmDecode = function esmDecode(_ref6) {
1027
+ var data = _ref6.data,
1028
+ key = _ref6.key,
1029
+ mode = _ref6.mode;
888
1030
 
889
1031
  var cipherMode = mode ? mode : 1;
890
1032
  if (new RegExp('^04').test(key)) {
@@ -901,10 +1043,10 @@ var esmDecode = function esmDecode(_ref5) {
901
1043
  * @date 2022年5月7日
902
1044
  * @param {String/Array} [attrs] - 要排除的属性
903
1045
  **/
904
- var exclAttribute = function exclAttribute(_ref6) {
905
- var _ref6$attrs = _ref6.attrs,
906
- attrs = _ref6$attrs === undefined ? 'value' : _ref6$attrs,
907
- data = _ref6.data;
1046
+ var exclAttribute = function exclAttribute(_ref7) {
1047
+ var _ref7$attrs = _ref7.attrs,
1048
+ attrs = _ref7$attrs === undefined ? 'value' : _ref7$attrs,
1049
+ data = _ref7.data;
908
1050
 
909
1051
  var obj = extend(true, {}, data);
910
1052
  if (Array.isArray(attrs)) {
@@ -929,14 +1071,14 @@ var exclAttribute = function exclAttribute(_ref6) {
929
1071
  * @param {name} [string] - 导出文件名
930
1072
  * @param {numbers} [boolean] - 序号
931
1073
  **/
932
- var exportXls = function exportXls(_ref7) {
933
- var _ref7$thead = _ref7.thead,
934
- thead = _ref7$thead === undefined ? [] : _ref7$thead,
935
- _ref7$data = _ref7.data,
936
- data = _ref7$data === undefined ? [] : _ref7$data,
937
- name = _ref7.name,
938
- numbers = _ref7.numbers,
939
- option = _ref7.option;
1074
+ var exportXls = function exportXls(_ref8) {
1075
+ var _ref8$thead = _ref8.thead,
1076
+ thead = _ref8$thead === undefined ? [] : _ref8$thead,
1077
+ _ref8$data = _ref8.data,
1078
+ data = _ref8$data === undefined ? [] : _ref8$data,
1079
+ name = _ref8.name,
1080
+ numbers = _ref8.numbers,
1081
+ option = _ref8.option;
940
1082
 
941
1083
  var tbody = '';
942
1084
  var aligns = [];
@@ -1936,11 +2078,11 @@ var hsvTorgb = function hsvTorgb($h, $s, $v) {
1936
2078
  * @param {value} [array] - 需要对比的值的数组集合
1937
2079
  * @param {callback} [function] - 回调函数
1938
2080
  **/
1939
- var identical = function identical(_ref8) {
1940
- var value = _ref8.value,
1941
- callback = _ref8.callback,
1942
- _ref8$msg = _ref8.msg,
1943
- msg = _ref8$msg === undefined ? ['请输入值', '请再次输入', '输入不一致!'] : _ref8$msg;
2081
+ var identical = function identical(_ref9) {
2082
+ var value = _ref9.value,
2083
+ callback = _ref9.callback,
2084
+ _ref9$msg = _ref9.msg,
2085
+ msg = _ref9$msg === undefined ? ['请输入值', '请再次输入', '输入不一致!'] : _ref9$msg;
1944
2086
 
1945
2087
  if (value && value.length > 1) {
1946
2088
  var val = value[0];
@@ -2077,15 +2219,15 @@ var isFunction = function isFunction(obj) {
2077
2219
  * @param {sting} [loginPage] - 第三方登录页面地址
2078
2220
  * @param {boolean} [redirect] - 是否重定向(用于新脚手架)
2079
2221
  **/
2080
- var isLogined = function isLogined(_ref9) {
2081
- var to = _ref9.to,
2082
- from = _ref9.from,
2083
- next = _ref9.next,
2084
- _ref9$exclude = _ref9.exclude,
2085
- exclude = _ref9$exclude === undefined ? [] : _ref9$exclude,
2086
- cookie = _ref9.cookie,
2087
- loginPage = _ref9.loginPage,
2088
- redirect = _ref9.redirect;
2222
+ var isLogined = function isLogined(_ref10) {
2223
+ var to = _ref10.to,
2224
+ from = _ref10.from,
2225
+ next = _ref10.next,
2226
+ _ref10$exclude = _ref10.exclude,
2227
+ exclude = _ref10$exclude === undefined ? [] : _ref10$exclude,
2228
+ cookie = _ref10.cookie,
2229
+ loginPage = _ref10.loginPage,
2230
+ redirect = _ref10.redirect;
2089
2231
 
2090
2232
  if (cookie === undefined) {
2091
2233
  cookie = getParams({ name: 'cookie' });
@@ -2300,9 +2442,9 @@ var isObjectEqual = function isObjectEqual(obj, _obj) {
2300
2442
  * @param {string/array} [url] - 地址
2301
2443
  * @param {boolean} [single] - 是否做js沙箱隔离
2302
2444
  **/
2303
- var jointUrl = function jointUrl(_ref10) {
2304
- var url = _ref10.url,
2305
- reg = _ref10.reg;
2445
+ var jointUrl = function jointUrl(_ref11) {
2446
+ var url = _ref11.url,
2447
+ reg = _ref11.reg;
2306
2448
 
2307
2449
  if (startWith(url, ['https', 'http', 'blob:'], true) || !reg || !reg.length) {
2308
2450
  return url;
@@ -2317,13 +2459,13 @@ var jointUrl = function jointUrl(_ref10) {
2317
2459
  return startWith(url, reg) ? url : reg + url;
2318
2460
  };
2319
2461
 
2320
- var loadJs = function loadJs(_ref11) {
2321
- var url = _ref11.url,
2322
- _ref11$type = _ref11.type,
2323
- type = _ref11$type === undefined ? 'text/javascript' : _ref11$type,
2324
- id = _ref11.id,
2325
- _ref11$single = _ref11.single,
2326
- single = _ref11$single === undefined ? true : _ref11$single;
2462
+ var loadJs = function loadJs(_ref12) {
2463
+ var url = _ref12.url,
2464
+ _ref12$type = _ref12.type,
2465
+ type = _ref12$type === undefined ? 'text/javascript' : _ref12$type,
2466
+ id = _ref12.id,
2467
+ _ref12$single = _ref12.single,
2468
+ single = _ref12$single === undefined ? true : _ref12$single;
2327
2469
 
2328
2470
  return new Promise(function (resolve, reject) {
2329
2471
  var script = document.getElementById(id) || document.createElement('script');
@@ -2458,11 +2600,11 @@ var queryParams = function queryParams(obj) {
2458
2600
  * @param {string} [url] - 消息源的 URI
2459
2601
  * @param {function} [callback] - 回调函数
2460
2602
  **/
2461
- var receiveMessage = function receiveMessage(_ref12) {
2462
- var _ref12$data = _ref12.data,
2463
- data = _ref12$data === undefined ? {} : _ref12$data,
2464
- url = _ref12.url,
2465
- callback = _ref12.callback;
2603
+ var receiveMessage = function receiveMessage(_ref13) {
2604
+ var _ref13$data = _ref13.data,
2605
+ data = _ref13$data === undefined ? {} : _ref13$data,
2606
+ url = _ref13.url,
2607
+ callback = _ref13.callback;
2466
2608
 
2467
2609
  win.addEventListener('message', function (e) {
2468
2610
  if (url !== undefined) {
@@ -2506,9 +2648,9 @@ var removeStorage = function removeStorage(key) {
2506
2648
  * @param {string、number} [data] - 数字或字符串型数字
2507
2649
  * @param {number} [precision] - 需要的小数位数
2508
2650
  **/
2509
- var replenish = function replenish(_ref13) {
2510
- var data = _ref13.data,
2511
- precision = _ref13.precision;
2651
+ var replenish = function replenish(_ref14) {
2652
+ var data = _ref14.data,
2653
+ precision = _ref14.precision;
2512
2654
 
2513
2655
  if (data && precision && precision > 0) {
2514
2656
  var power = Math.pow(10, precision);
@@ -2654,10 +2796,10 @@ var setScale = function setScale() {
2654
2796
  * @param {object} [data] - 数据---其中type必须表示操作类型
2655
2797
  * @param {string} [url] - 指定的消息发送URI地址
2656
2798
  **/
2657
- var sendMessage = function sendMessage(_ref14) {
2658
- var _ref14$data = _ref14.data,
2659
- data = _ref14$data === undefined ? {} : _ref14$data,
2660
- url = _ref14.url;
2799
+ var sendMessage = function sendMessage(_ref15) {
2800
+ var _ref15$data = _ref15.data,
2801
+ data = _ref15$data === undefined ? {} : _ref15$data,
2802
+ url = _ref15.url;
2661
2803
 
2662
2804
  var iframes = document.getElementsByTagName('iframe');
2663
2805
  for (var i = 0; i < iframes.length; i++) {
@@ -2701,10 +2843,10 @@ var setFavicon = function setFavicon(url) {
2701
2843
  * @param {String, Array, Object} [key] - 数据的名称,array类型表示多个key保存同一个value,object类型时对象的属性名称作为key属性值作为value
2702
2844
  * @param {String} [value] - 数据的值
2703
2845
  **/
2704
- var setStorage = function setStorage(_ref15) {
2705
- var type = _ref15.type,
2706
- key = _ref15.key,
2707
- value = _ref15.value;
2846
+ var setStorage = function setStorage(_ref16) {
2847
+ var type = _ref16.type,
2848
+ key = _ref16.key,
2849
+ value = _ref16.value;
2708
2850
 
2709
2851
  if (value && (typeof value === 'undefined' ? 'undefined' : _typeof(value)) === 'object') {
2710
2852
  value = JSON.stringify(value);
@@ -2998,10 +3140,10 @@ var upperCase = function upperCase(text) {
2998
3140
  * @param {Object} [url] - url地址
2999
3141
  * @param {Object} [param] - 被转换的对象
3000
3142
  **/
3001
- var urlJoinParams = function urlJoinParams(_ref16) {
3002
- var url = _ref16.url,
3003
- param = _ref16.param,
3004
- timestamp = _ref16.timestamp;
3143
+ var urlJoinParams = function urlJoinParams(_ref17) {
3144
+ var url = _ref17.url,
3145
+ param = _ref17.param,
3146
+ timestamp = _ref17.timestamp;
3005
3147
 
3006
3148
  var arry = decodeURI(url).split('?');
3007
3149
  var times = new Date().getTime();
@@ -3119,6 +3261,7 @@ var watermark = function watermark(option) {
3119
3261
 
3120
3262
  exports.default = {
3121
3263
  ajax: ajax,
3264
+ ajaxStream: ajaxStream,
3122
3265
  arrUnique: arrUnique,
3123
3266
  average: average,
3124
3267
  browser: browser,