eoss-ui 0.6.39 → 0.6.41
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/lib/button-group.js +48 -6
- package/lib/button.js +48 -6
- package/lib/checkbox-group.js +48 -6
- package/lib/data-table-form.js +48 -6
- package/lib/data-table.js +67 -22
- package/lib/date-picker.js +48 -6
- package/lib/dialog.js +48 -6
- package/lib/eoss-ui.common.js +1393 -955
- package/lib/flow-group.js +48 -6
- package/lib/flow-list.js +129 -87
- package/lib/flow.js +360 -321
- package/lib/form.js +48 -6
- package/lib/handle-user.js +48 -6
- package/lib/handler.js +195 -82
- package/lib/icon.js +48 -6
- package/lib/icons.js +1 -1
- package/lib/index.js +1 -1
- package/lib/input-number.js +48 -6
- package/lib/input.js +48 -6
- package/lib/login.js +291 -166
- package/lib/main.js +504 -251
- package/lib/nav.js +48 -6
- package/lib/page.js +48 -6
- package/lib/pagination.js +48 -6
- package/lib/player.js +48 -6
- package/lib/qr-code.js +61 -19
- package/lib/radio-group.js +48 -6
- package/lib/retrial-auth.js +48 -6
- package/lib/select-ganged.js +48 -6
- package/lib/select.js +48 -6
- package/lib/selector-panel.js +50 -9
- package/lib/selector.js +85 -11
- package/lib/sizer.js +48 -6
- package/lib/steps.js +48 -6
- package/lib/switch.js +48 -6
- package/lib/table-form.js +48 -6
- package/lib/tabs.js +48 -6
- package/lib/theme-chalk/base.css +1 -1
- package/lib/theme-chalk/fonts/iconfont.ttf +0 -0
- package/lib/theme-chalk/fonts/iconfont.woff +0 -0
- package/lib/theme-chalk/icon.css +1 -1
- package/lib/theme-chalk/index.css +1 -1
- package/lib/theme-chalk/login.css +1 -1
- package/lib/theme-chalk/main.css +1 -1
- package/lib/theme-chalk/menu.css +1 -1
- package/lib/theme-chalk/simplicity.css +1 -1
- package/lib/theme-chalk/sizer.css +1 -1
- package/lib/theme-chalk/upload.css +1 -1
- package/lib/tips.js +48 -6
- package/lib/tree-group.js +48 -6
- package/lib/tree.js +48 -6
- package/lib/upload.js +48 -6
- package/lib/utils/util.js +48 -6
- package/lib/wujie.js +48 -6
- package/lib/wxlogin.js +48 -6
- package/package.json +159 -159
- package/packages/.DS_Store +0 -0
- package/packages/button/index.js +5 -5
- package/packages/button/src/main.vue +418 -418
- package/packages/button-group/index.js +5 -5
- package/packages/button-group/src/main.vue +298 -298
- package/packages/calendar/index.js +5 -5
- package/packages/card/index.js +5 -5
- package/packages/card/src/main.vue +156 -156
- package/packages/cascader/index.js +5 -5
- package/packages/cascader/src/main.vue +168 -168
- package/packages/checkbox-group/index.js +5 -5
- package/packages/checkbox-group/src/main.vue +333 -333
- package/packages/clients/index.js +5 -5
- package/packages/clients/src/main.vue +144 -144
- package/packages/data-table/.DS_Store +0 -0
- package/packages/data-table/index.js +5 -5
- package/packages/data-table/src/children.vue +39 -39
- package/packages/data-table/src/column.vue +989 -983
- package/packages/data-table/src/main.vue +1822 -1820
- package/packages/data-table/src/sizer.vue +195 -195
- package/packages/data-table-form/.DS_Store +0 -0
- package/packages/data-table-form/index.js +5 -5
- package/packages/data-table-form/src/checkbox.vue +101 -101
- package/packages/data-table-form/src/colgroup.vue +17 -17
- package/packages/data-table-form/src/main.vue +181 -181
- package/packages/data-table-form/src/radio.vue +65 -65
- package/packages/data-table-form/src/table.vue +233 -233
- package/packages/data-table-form/src/tbody.vue +336 -336
- package/packages/data-table-form/src/thead.vue +68 -68
- package/packages/date-picker/index.js +5 -5
- package/packages/date-picker/src/main.vue +236 -236
- package/packages/dialog/index.js +5 -5
- package/packages/enterprise/index.js +5 -5
- package/packages/enterprise/src/main.vue +66 -66
- package/packages/error-page/.DS_Store +0 -0
- package/packages/error-page/index.js +5 -5
- package/packages/error-page/src/main.vue +44 -44
- package/packages/flow/.DS_Store +0 -0
- package/packages/flow/index.js +5 -5
- package/packages/flow/src/component/CommonOpinions.vue +345 -345
- package/packages/flow/src/component/CustomPreset.vue +322 -322
- package/packages/flow/src/component/FileList.vue +99 -99
- package/packages/flow/src/component/Preset.vue +255 -255
- package/packages/flow/src/component/SendMsg.vue +229 -229
- package/packages/flow/src/component/TimeLimit.vue +190 -190
- package/packages/flow/src/component/taskUnionExamine.vue +611 -603
- package/packages/flow/src/form.vue +121 -121
- package/packages/flow/src/freeStartFlow.vue +2843 -2843
- package/packages/flow/src/main.vue +2862 -2864
- package/packages/flow/src/processForm.vue +1018 -1007
- package/packages/flow/src/processReject.vue +293 -293
- package/packages/flow/src/reset.vue +899 -901
- package/packages/flow/src/startTaskRead.vue +596 -596
- package/packages/flow/src/table.vue +58 -58
- package/packages/flow-group/index.js +5 -5
- package/packages/flow-group/src/main.vue +688 -688
- package/packages/flow-list/index.js +5 -5
- package/packages/flow-list/src/main.vue +1172 -1172
- package/packages/form/.DS_Store +0 -0
- package/packages/form/index.js +5 -5
- package/packages/form/src/main.vue +3584 -3584
- package/packages/form/src/table.vue +1420 -1420
- package/packages/handle-user/index.js +5 -5
- package/packages/handle-user/src/main.vue +138 -138
- package/packages/handler/index.js +5 -5
- package/packages/handler/src/main.vue +474 -388
- package/packages/icon/index.js +5 -5
- package/packages/icon/src/main.vue +101 -101
- package/packages/icons/index.js +5 -5
- package/packages/icons/src/icon.json +1 -1
- package/packages/icons/src/main.vue +81 -81
- package/packages/input/index.js +5 -5
- package/packages/input/src/main.vue +356 -356
- package/packages/input-number/index.js +5 -5
- package/packages/input-number/src/main.vue +106 -106
- package/packages/label/index.js +5 -5
- package/packages/label/src/main.vue +457 -457
- package/packages/layout/index.js +5 -5
- package/packages/layout/src/item.vue +152 -152
- package/packages/layout/src/main.vue +31 -31
- package/packages/login/.DS_Store +0 -0
- package/packages/login/index.js +5 -5
- package/packages/login/src/main.vue +1935 -1892
- package/packages/login/src/resetPassword.vue +562 -562
- package/packages/main/.DS_Store +0 -0
- package/packages/main/index.js +5 -5
- package/packages/main/src/.DS_Store +0 -0
- package/packages/main/src/default/index.vue +32 -3
- package/packages/main/src/default/message.vue +249 -249
- package/packages/main/src/default/notice.vue +157 -157
- package/packages/main/src/default/userinfo.vue +505 -505
- package/packages/main/src/public/online.vue +89 -89
- package/packages/main/src/public/search.vue +461 -454
- package/packages/main/src/public/settings.vue +221 -221
- package/packages/main/src/simplicity/apps.vue +388 -388
- package/packages/main/src/simplicity/avatar.vue +82 -82
- package/packages/main/src/simplicity/handler.vue +259 -221
- package/packages/main/src/simplicity/index.vue +2047 -1993
- package/packages/main/src/simplicity/lists.vue +84 -84
- package/packages/main/src/simplicity/menu-list.vue +128 -128
- package/packages/main/src/simplicity/message.vue +259 -259
- package/packages/main/src/simplicity/notice.vue +190 -190
- package/packages/main/src/simplicity/router-page.vue +45 -45
- package/packages/main/src/simplicity/sub-menu.vue +241 -241
- package/packages/main/src/simplicity/user.vue +257 -257
- package/packages/main/src/simplicity/userinfo.vue +312 -312
- package/packages/menu/index.js +5 -5
- package/packages/menu/src/main.vue +536 -536
- package/packages/nav/index.js +5 -5
- package/packages/nav/src/main.vue +402 -402
- package/packages/notify/index.js +5 -5
- package/packages/notify/src/main.vue +538 -538
- package/packages/page/index.js +5 -5
- package/packages/page/src/main.vue +167 -167
- package/packages/pagination/index.js +5 -5
- package/packages/pagination/src/main.vue +96 -96
- package/packages/player/index.js +5 -5
- package/packages/player/src/main.vue +194 -194
- package/packages/qr-code/index.js +5 -5
- package/packages/qr-code/src/main.vue +170 -170
- package/packages/radio-group/index.js +6 -6
- package/packages/radio-group/src/main.vue +319 -319
- package/packages/retrial-auth/index.js +5 -5
- package/packages/retrial-auth/src/main.vue +280 -280
- package/packages/select/index.js +5 -5
- package/packages/select/src/main.vue +775 -775
- package/packages/select-ganged/index.js +5 -5
- package/packages/select-ganged/src/main.vue +724 -724
- package/packages/selector/.DS_Store +0 -0
- package/packages/selector/index.js +5 -5
- package/packages/selector/src/main.vue +689 -677
- package/packages/selector-panel/.DS_Store +0 -0
- package/packages/selector-panel/index.js +5 -5
- package/packages/selector-panel/src/main.vue +1027 -1028
- package/packages/selector-panel/src/selection.vue +177 -177
- package/packages/selector-panel/src/tree.vue +129 -129
- package/packages/sizer/.DS_Store +0 -0
- package/packages/sizer/index.js +5 -5
- package/packages/sizer/src/main.vue +254 -254
- package/packages/steps/index.js +5 -5
- package/packages/steps/src/main.vue +181 -181
- package/packages/switch/index.js +5 -5
- package/packages/switch/src/main.vue +154 -154
- package/packages/table-form/index.js +5 -5
- package/packages/tabs/.DS_Store +0 -0
- package/packages/tabs/index.js +5 -5
- package/packages/tabs/src/main.vue +788 -788
- package/packages/tabs-panel/index.js +5 -5
- package/packages/tabs-panel/src/main.vue +29 -29
- package/packages/theme-chalk/lib/base.css +1 -1
- package/packages/theme-chalk/lib/fonts/iconfont.ttf +0 -0
- package/packages/theme-chalk/lib/fonts/iconfont.woff +0 -0
- package/packages/theme-chalk/lib/icon.css +1 -1
- package/packages/theme-chalk/lib/index.css +1 -1
- package/packages/theme-chalk/lib/login.css +1 -1
- package/packages/theme-chalk/lib/main.css +1 -1
- package/packages/theme-chalk/lib/menu.css +1 -1
- package/packages/theme-chalk/lib/simplicity.css +1 -1
- package/packages/theme-chalk/lib/sizer.css +1 -1
- package/packages/theme-chalk/lib/upload.css +1 -1
- package/packages/theme-chalk/src/.DS_Store +0 -0
- package/packages/theme-chalk/src/base.scss +260 -260
- package/packages/theme-chalk/src/button-group.scss +175 -175
- package/packages/theme-chalk/src/button.scss +24 -24
- package/packages/theme-chalk/src/calendar.scss +113 -113
- package/packages/theme-chalk/src/card.scss +99 -99
- package/packages/theme-chalk/src/checkbox-group.scss +8 -8
- package/packages/theme-chalk/src/clients.scss +87 -87
- package/packages/theme-chalk/src/data-table-form.scss +67 -67
- package/packages/theme-chalk/src/data-table.scss +293 -293
- package/packages/theme-chalk/src/date-picker.scss +7 -7
- package/packages/theme-chalk/src/dialog.scss +77 -77
- package/packages/theme-chalk/src/enterprise.scss +5 -5
- package/packages/theme-chalk/src/error-page.scss +18 -18
- package/packages/theme-chalk/src/flow-group.scss +110 -110
- package/packages/theme-chalk/src/flow-list.scss +36 -36
- package/packages/theme-chalk/src/flow.scss +310 -310
- package/packages/theme-chalk/src/fonts/iconfont.ttf +0 -0
- package/packages/theme-chalk/src/fonts/iconfont.woff +0 -0
- package/packages/theme-chalk/src/form.scss +496 -496
- package/packages/theme-chalk/src/handle-user.scss +40 -40
- package/packages/theme-chalk/src/handler.scss +143 -143
- package/packages/theme-chalk/src/icon.scss +1789 -1760
- package/packages/theme-chalk/src/icons.scss +99 -99
- package/packages/theme-chalk/src/input.scss +9 -9
- package/packages/theme-chalk/src/label.scss +24 -24
- package/packages/theme-chalk/src/layout.scss +46 -46
- package/packages/theme-chalk/src/login.scss +947 -939
- package/packages/theme-chalk/src/main.scss +639 -632
- package/packages/theme-chalk/src/menu.scss +222 -222
- package/packages/theme-chalk/src/mixins/color.scss +117 -117
- package/packages/theme-chalk/src/nav.scss +125 -125
- package/packages/theme-chalk/src/page.scss +3 -3
- package/packages/theme-chalk/src/pagination.scss +29 -29
- package/packages/theme-chalk/src/player.scss +9 -9
- package/packages/theme-chalk/src/qr-code.scss +17 -17
- package/packages/theme-chalk/src/radio-group.scss +9 -9
- package/packages/theme-chalk/src/retrial-auth.scss +38 -38
- package/packages/theme-chalk/src/select-ganged.scss +8 -8
- package/packages/theme-chalk/src/select.scss +8 -8
- package/packages/theme-chalk/src/selector-panel.scss +204 -204
- package/packages/theme-chalk/src/selector.scss +91 -91
- package/packages/theme-chalk/src/simplicity.scss +1262 -1262
- package/packages/theme-chalk/src/sizer.scss +36 -36
- package/packages/theme-chalk/src/steps.scss +88 -88
- package/packages/theme-chalk/src/switch.scss +3 -3
- package/packages/theme-chalk/src/table-form.scss +1 -1
- package/packages/theme-chalk/src/tabs.scss +87 -87
- package/packages/theme-chalk/src/tips.scss +7 -7
- package/packages/theme-chalk/src/toolbar.scss +179 -179
- package/packages/theme-chalk/src/tree-group.scss +72 -72
- package/packages/theme-chalk/src/tree.scss +165 -165
- package/packages/theme-chalk/src/upload.scss +167 -167
- package/packages/theme-chalk/src/wxlogin.scss +3 -3
- package/packages/tips/index.js +5 -5
- package/packages/tips/src/main.vue +141 -141
- package/packages/toolbar/index.js +5 -5
- package/packages/toolbar/src/main.vue +430 -430
- package/packages/tree/index.js +5 -5
- package/packages/tree-group/index.js +5 -5
- package/packages/upload/.DS_Store +0 -0
- package/packages/upload/index.js +5 -5
- package/packages/upload/src/main.vue +1334 -1334
- package/packages/upload/src/picture.js +15 -15
- package/packages/wujie/index.js +5 -5
- package/packages/wujie/src/main.vue +145 -145
- package/packages/wxlogin/index.js +5 -5
- package/packages/wxlogin/src/main.vue +128 -128
- package/src/.DS_Store +0 -0
- package/src/config/api.js +248 -248
- package/src/config/image.js +2 -2
- package/src/index.js +157 -157
- package/src/utils/bus.js +3 -3
- package/src/utils/date-util.js +312 -312
- package/src/utils/http.js +50 -50
- package/src/utils/rules.js +18 -18
- package/src/utils/store.js +21 -21
- package/src/utils/util.js +146 -106
- package/src/utils/webSocket.js +107 -107
package/lib/login.js
CHANGED
|
@@ -547,10 +547,19 @@ var ajaxStream = function ajaxStream(_ref2) {
|
|
|
547
547
|
if (params && !Object.prototype.hasOwnProperty.call(params, 'userId') && userId) {
|
|
548
548
|
params.userId = getStorage('userId');
|
|
549
549
|
}
|
|
550
|
-
var info = {
|
|
550
|
+
var info = {
|
|
551
|
+
time: 0,
|
|
552
|
+
conversationId: '',
|
|
553
|
+
content: '',
|
|
554
|
+
thinkContent: '',
|
|
555
|
+
primeval: '',
|
|
556
|
+
chunk: ''
|
|
557
|
+
};
|
|
551
558
|
var partialData = '';
|
|
552
559
|
var lastProcessedIndex = 0;
|
|
553
560
|
var done = false;
|
|
561
|
+
var finishThink = false;
|
|
562
|
+
var hasThink = false;
|
|
554
563
|
ajax(_extends({
|
|
555
564
|
timeout: 990000,
|
|
556
565
|
format: false,
|
|
@@ -565,6 +574,9 @@ var ajaxStream = function ajaxStream(_ref2) {
|
|
|
565
574
|
// 获取从上次处理后新增的数据
|
|
566
575
|
var currentResponse = (progressEvent.event || progressEvent).currentTarget.responseText;
|
|
567
576
|
var chunk = currentResponse.slice(lastProcessedIndex);
|
|
577
|
+
if (chunk === 'data:') {
|
|
578
|
+
return;
|
|
579
|
+
}
|
|
568
580
|
|
|
569
581
|
// 更新偏移量
|
|
570
582
|
lastProcessedIndex = currentResponse.length;
|
|
@@ -573,7 +585,12 @@ var ajaxStream = function ajaxStream(_ref2) {
|
|
|
573
585
|
partialData += chunk;
|
|
574
586
|
var lines = partialData.split('\n');
|
|
575
587
|
var remainingData = ''; // 用于保存未完整处理的部分数据
|
|
588
|
+
var primeval = '';
|
|
589
|
+
var chunks = '';
|
|
576
590
|
lines.forEach(function (line) {
|
|
591
|
+
if (line === '') {
|
|
592
|
+
return;
|
|
593
|
+
}
|
|
577
594
|
if (line.startsWith('data:')) {
|
|
578
595
|
var _data = line.replace('data:', '').trim();
|
|
579
596
|
if (_data) {
|
|
@@ -582,8 +599,6 @@ var ajaxStream = function ajaxStream(_ref2) {
|
|
|
582
599
|
var parsedData = JSON.parse(_data);
|
|
583
600
|
info.time = parsedData.time;
|
|
584
601
|
info.conversationId = parsedData.conversationId;
|
|
585
|
-
|
|
586
|
-
// 使用正则表达式匹配 <think> 标签
|
|
587
602
|
var thinkRegex = /<think>([\s\S]*?)<\/think>([\s\S]*)?/;
|
|
588
603
|
var match = parsedData.message.match(thinkRegex);
|
|
589
604
|
if (match) {
|
|
@@ -593,20 +608,47 @@ var ajaxStream = function ajaxStream(_ref2) {
|
|
|
593
608
|
info.thinkContent += thinkContent;
|
|
594
609
|
info.content += content;
|
|
595
610
|
} else {
|
|
596
|
-
|
|
597
|
-
|
|
611
|
+
var startRegex = /<think>([\s\S]*)/;
|
|
612
|
+
var endRegex = /([\s\S]*?)<\/think>([\s\S]*)?/;
|
|
613
|
+
var start = parsedData.message.match(startRegex);
|
|
614
|
+
var end = parsedData.message.match(endRegex);
|
|
615
|
+
if (start) {
|
|
616
|
+
hasThink = true;
|
|
617
|
+
var _thinkContent = start[1] ? start[1].trim() : ''; // <think> 标签内的数据
|
|
618
|
+
info.thinkContent += _thinkContent;
|
|
619
|
+
} else if (hasThink === false) {
|
|
620
|
+
info.content += parsedData.message;
|
|
621
|
+
chunks += parsedData.message;
|
|
622
|
+
} else {
|
|
623
|
+
if (end) {
|
|
624
|
+
finishThink = true;
|
|
625
|
+
var _thinkContent2 = end[1] ? end[1].trim() : ''; // <think> 标签后的数据
|
|
626
|
+
var _content = end[2] ? end[2].trim() : '';
|
|
627
|
+
// 更新 AI 消息内容
|
|
628
|
+
info.thinkContent += _thinkContent2;
|
|
629
|
+
info.content += _content;
|
|
630
|
+
chunks += _content;
|
|
631
|
+
} else if (finishThink) {
|
|
632
|
+
info.content += parsedData.message;
|
|
633
|
+
chunks += parsedData.message;
|
|
634
|
+
} else {
|
|
635
|
+
info.thinkContent += parsedData.message;
|
|
636
|
+
}
|
|
637
|
+
}
|
|
598
638
|
}
|
|
639
|
+
primeval += parsedData.message;
|
|
599
640
|
done = parsedData.done;
|
|
600
641
|
} catch (parseError) {
|
|
601
642
|
console.error('解析数据出错:', parseError);
|
|
602
643
|
}
|
|
603
|
-
// Promise.resolve({message: info, controller});
|
|
604
644
|
}
|
|
605
645
|
} else {
|
|
606
646
|
// 保存未处理完的部分数据
|
|
607
647
|
remainingData += line + '\n';
|
|
608
648
|
}
|
|
609
649
|
});
|
|
650
|
+
info.primeval = primeval;
|
|
651
|
+
info.chunk = chunks;
|
|
610
652
|
|
|
611
653
|
// 将未完整处理的数据保留到 partialData 中
|
|
612
654
|
partialData = remainingData;
|
|
@@ -4198,7 +4240,7 @@ var nightImg = 'data:image/jpeg;base64,/9j/2wCEAAEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBA
|
|
|
4198
4240
|
// ESM COMPAT FLAG
|
|
4199
4241
|
__webpack_require__.r(__webpack_exports__);
|
|
4200
4242
|
|
|
4201
|
-
// CONCATENATED MODULE: ./node_modules/vue-loader/lib/loaders/templateLoader.js??vue-loader-options!./node_modules/vue-loader/lib??vue-loader-options!./packages/login/src/main.vue?vue&type=template&id=
|
|
4243
|
+
// CONCATENATED MODULE: ./node_modules/vue-loader/lib/loaders/templateLoader.js??vue-loader-options!./node_modules/vue-loader/lib??vue-loader-options!./packages/login/src/main.vue?vue&type=template&id=68362bbf&
|
|
4202
4244
|
var render = function () {
|
|
4203
4245
|
var _vm = this
|
|
4204
4246
|
var _h = _vm.$createElement
|
|
@@ -4295,7 +4337,8 @@ var render = function () {
|
|
|
4295
4337
|
},
|
|
4296
4338
|
},
|
|
4297
4339
|
[
|
|
4298
|
-
this.mode == "complex"
|
|
4340
|
+
this.mode == "complex" &&
|
|
4341
|
+
_vm.loginModel.indexOf("3") > -1
|
|
4299
4342
|
? [
|
|
4300
4343
|
_vm._l(_vm.switchs, function (item) {
|
|
4301
4344
|
return [
|
|
@@ -4307,9 +4350,10 @@ var render = function () {
|
|
|
4307
4350
|
{
|
|
4308
4351
|
name: "show",
|
|
4309
4352
|
rawName: "v-show",
|
|
4310
|
-
value:
|
|
4353
|
+
value:
|
|
4354
|
+
_vm.switchActive != item.type,
|
|
4311
4355
|
expression:
|
|
4312
|
-
"
|
|
4356
|
+
"switchActive != item.type",
|
|
4313
4357
|
},
|
|
4314
4358
|
],
|
|
4315
4359
|
key: item.type + "_0",
|
|
@@ -4363,42 +4407,76 @@ var render = function () {
|
|
|
4363
4407
|
]
|
|
4364
4408
|
}),
|
|
4365
4409
|
]
|
|
4366
|
-
:
|
|
4367
|
-
|
|
4368
|
-
|
|
4369
|
-
|
|
4370
|
-
|
|
4410
|
+
: [
|
|
4411
|
+
_vm._l(_vm.icons, function (item) {
|
|
4412
|
+
return [
|
|
4413
|
+
_c(
|
|
4414
|
+
"div",
|
|
4371
4415
|
{
|
|
4372
|
-
|
|
4373
|
-
|
|
4374
|
-
|
|
4375
|
-
|
|
4376
|
-
|
|
4377
|
-
|
|
4378
|
-
|
|
4416
|
+
directives: [
|
|
4417
|
+
{
|
|
4418
|
+
name: "show",
|
|
4419
|
+
rawName: "v-show",
|
|
4420
|
+
value:
|
|
4421
|
+
_vm.modelLength == 2 &&
|
|
4422
|
+
_vm.active != item.type &&
|
|
4423
|
+
_vm.modelTips,
|
|
4424
|
+
expression:
|
|
4425
|
+
"modelLength == 2 && active != item.type && modelTips",
|
|
4426
|
+
},
|
|
4427
|
+
],
|
|
4428
|
+
key: item.type,
|
|
4429
|
+
staticClass: "es-login-model-item-tips",
|
|
4379
4430
|
},
|
|
4380
|
-
|
|
4381
|
-
|
|
4382
|
-
|
|
4383
|
-
|
|
4431
|
+
[
|
|
4432
|
+
_vm._v(
|
|
4433
|
+
"\n " +
|
|
4434
|
+
_vm._s(item.name) +
|
|
4435
|
+
"点这里"
|
|
4436
|
+
),
|
|
4437
|
+
_c("i", {
|
|
4438
|
+
staticClass: "es-icon-zhixiangyou",
|
|
4439
|
+
}),
|
|
4440
|
+
]
|
|
4441
|
+
),
|
|
4442
|
+
_c(
|
|
4443
|
+
"span",
|
|
4384
4444
|
{
|
|
4385
|
-
|
|
4386
|
-
|
|
4387
|
-
|
|
4388
|
-
|
|
4389
|
-
|
|
4390
|
-
|
|
4391
|
-
|
|
4392
|
-
|
|
4393
|
-
|
|
4394
|
-
|
|
4395
|
-
|
|
4445
|
+
directives: [
|
|
4446
|
+
{
|
|
4447
|
+
name: "show",
|
|
4448
|
+
rawName: "v-show",
|
|
4449
|
+
value:
|
|
4450
|
+
_vm.modelLength > 2 ||
|
|
4451
|
+
_vm.active != item.type,
|
|
4452
|
+
expression:
|
|
4453
|
+
"modelLength > 2 || active != item.type",
|
|
4454
|
+
},
|
|
4455
|
+
],
|
|
4456
|
+
key: item.name,
|
|
4457
|
+
staticClass: "es-icon-box",
|
|
4458
|
+
class: [
|
|
4459
|
+
{
|
|
4460
|
+
"es-icon-active":
|
|
4461
|
+
_vm.active == item.type,
|
|
4462
|
+
},
|
|
4463
|
+
],
|
|
4464
|
+
attrs: { title: item.name },
|
|
4465
|
+
on: {
|
|
4466
|
+
click: function ($event) {
|
|
4467
|
+
_vm.switchLogin(item)
|
|
4468
|
+
},
|
|
4469
|
+
},
|
|
4396
4470
|
},
|
|
4397
|
-
|
|
4398
|
-
|
|
4399
|
-
|
|
4400
|
-
|
|
4401
|
-
|
|
4471
|
+
[
|
|
4472
|
+
_c("i", {
|
|
4473
|
+
class: [item.icon, "es-icon"],
|
|
4474
|
+
}),
|
|
4475
|
+
]
|
|
4476
|
+
),
|
|
4477
|
+
]
|
|
4478
|
+
}),
|
|
4479
|
+
],
|
|
4402
4480
|
],
|
|
4403
4481
|
2
|
|
4404
4482
|
)
|
|
@@ -4919,7 +4997,9 @@ var render = function () {
|
|
|
4919
4997
|
]
|
|
4920
4998
|
)
|
|
4921
4999
|
: _vm._e(),
|
|
4922
|
-
_vm.active == 3 &&
|
|
5000
|
+
_vm.active == 3 &&
|
|
5001
|
+
_vm.loginModel.indexOf("0") > -1 &&
|
|
5002
|
+
_vm.mode == "complex"
|
|
4923
5003
|
? _c("div", { staticClass: "es-to-login" }, [
|
|
4924
5004
|
_c(
|
|
4925
5005
|
"span",
|
|
@@ -5350,7 +5430,7 @@ var staticRenderFns = [
|
|
|
5350
5430
|
render._withStripped = true
|
|
5351
5431
|
|
|
5352
5432
|
|
|
5353
|
-
// CONCATENATED MODULE: ./packages/login/src/main.vue?vue&type=template&id=
|
|
5433
|
+
// CONCATENATED MODULE: ./packages/login/src/main.vue?vue&type=template&id=68362bbf&
|
|
5354
5434
|
|
|
5355
5435
|
// EXTERNAL MODULE: external "babel-runtime/regenerator"
|
|
5356
5436
|
var regenerator_ = __webpack_require__(14);
|
|
@@ -6396,6 +6476,23 @@ function _asyncToGenerator(fn) { return function () { var gen = fn.apply(this, a
|
|
|
6396
6476
|
//
|
|
6397
6477
|
//
|
|
6398
6478
|
//
|
|
6479
|
+
//
|
|
6480
|
+
//
|
|
6481
|
+
//
|
|
6482
|
+
//
|
|
6483
|
+
//
|
|
6484
|
+
//
|
|
6485
|
+
//
|
|
6486
|
+
//
|
|
6487
|
+
//
|
|
6488
|
+
//
|
|
6489
|
+
//
|
|
6490
|
+
//
|
|
6491
|
+
//
|
|
6492
|
+
//
|
|
6493
|
+
//
|
|
6494
|
+
//
|
|
6495
|
+
//
|
|
6399
6496
|
|
|
6400
6497
|
|
|
6401
6498
|
|
|
@@ -6463,6 +6560,7 @@ var ceshi = util["a" /* default */].getParams('ceshi');
|
|
|
6463
6560
|
type: Boolean,
|
|
6464
6561
|
default: true
|
|
6465
6562
|
},
|
|
6563
|
+
modelTips: Boolean,
|
|
6466
6564
|
model: {
|
|
6467
6565
|
type: Object,
|
|
6468
6566
|
default: function _default() {
|
|
@@ -6709,10 +6807,14 @@ var ceshi = util["a" /* default */].getParams('ceshi');
|
|
|
6709
6807
|
0: { type: '0', icon: 'es-icon-zhanghaodenglu', name: '账号登录' },
|
|
6710
6808
|
1: { type: '1', icon: 'es-icon-ca', name: '证书登录' },
|
|
6711
6809
|
3: { type: '3', icon: 'es-icon-saomadenglu', name: '扫码登录' },
|
|
6712
|
-
6: { type: '6', icon: 'es-icon-
|
|
6810
|
+
6: { type: '6', icon: 'es-icon-duanxindenglu', name: '短信登录' },
|
|
6713
6811
|
7: { type: '7', icon: 'es-icon-dingding', name: '钉钉扫码登录' },
|
|
6714
6812
|
9: { type: '9', icon: 'es-icon-weixin', name: '微信扫码登录' },
|
|
6715
|
-
11: {
|
|
6813
|
+
11: {
|
|
6814
|
+
type: '11',
|
|
6815
|
+
icon: 'es-icon-youxiangdenglu',
|
|
6816
|
+
name: '邮箱登录'
|
|
6817
|
+
},
|
|
6716
6818
|
12: { type: '12', icon: 'es-icon-zhanghaodenglu', name: '账号登录' //双因素
|
|
6717
6819
|
} };
|
|
6718
6820
|
},
|
|
@@ -6747,8 +6849,16 @@ var ceshi = util["a" /* default */].getParams('ceshi');
|
|
|
6747
6849
|
loginModel: {
|
|
6748
6850
|
immediate: true,
|
|
6749
6851
|
handler: function handler(val) {
|
|
6852
|
+
var _this2 = this;
|
|
6853
|
+
|
|
6750
6854
|
this.active = val.split(',')[0];
|
|
6751
6855
|
this.title = this.iconfonts[this.active].name;
|
|
6856
|
+
this.switchs.forEach(function (item) {
|
|
6857
|
+
if (item.type == _this2.active) {
|
|
6858
|
+
_this2.switchActive = item.type;
|
|
6859
|
+
return;
|
|
6860
|
+
}
|
|
6861
|
+
});
|
|
6752
6862
|
}
|
|
6753
6863
|
},
|
|
6754
6864
|
active: {
|
|
@@ -6914,7 +7024,7 @@ var ceshi = util["a" /* default */].getParams('ceshi');
|
|
|
6914
7024
|
loginBoxAlign && (this.align = loginBoxAlign);
|
|
6915
7025
|
},
|
|
6916
7026
|
doWechatLogin: function doWechatLogin(code) {
|
|
6917
|
-
var
|
|
7027
|
+
var _this3 = this;
|
|
6918
7028
|
|
|
6919
7029
|
util["a" /* default */].ajax({
|
|
6920
7030
|
method: 'post',
|
|
@@ -6923,10 +7033,10 @@ var ceshi = util["a" /* default */].getParams('ceshi');
|
|
|
6923
7033
|
}).then(function (res) {
|
|
6924
7034
|
if (res.rCode == 0) {
|
|
6925
7035
|
var results = res.results;
|
|
6926
|
-
|
|
7036
|
+
_this3.handleResults(results);
|
|
6927
7037
|
} else {
|
|
6928
7038
|
var msg = res.results && res.results.msg ? res.results.msg : res.msg;
|
|
6929
|
-
|
|
7039
|
+
_this3.$message({
|
|
6930
7040
|
message: msg || '系统错误,请联系管理员!',
|
|
6931
7041
|
type: 'error',
|
|
6932
7042
|
duration: 1500,
|
|
@@ -6940,7 +7050,7 @@ var ceshi = util["a" /* default */].getParams('ceshi');
|
|
|
6940
7050
|
}
|
|
6941
7051
|
}).catch(function (err) {
|
|
6942
7052
|
if (err.message && err.message !== 'canceled') {
|
|
6943
|
-
|
|
7053
|
+
_this3.$message.error(err.message);
|
|
6944
7054
|
}
|
|
6945
7055
|
});
|
|
6946
7056
|
},
|
|
@@ -7069,7 +7179,7 @@ var ceshi = util["a" /* default */].getParams('ceshi');
|
|
|
7069
7179
|
}
|
|
7070
7180
|
},
|
|
7071
7181
|
switchLogin: function switchLogin(res) {
|
|
7072
|
-
var
|
|
7182
|
+
var _this4 = this;
|
|
7073
7183
|
|
|
7074
7184
|
if (res != 1) {
|
|
7075
7185
|
this.active = res.type;
|
|
@@ -7079,18 +7189,33 @@ var ceshi = util["a" /* default */].getParams('ceshi');
|
|
|
7079
7189
|
this.countdown = 0;
|
|
7080
7190
|
this.$emit('change-type', res, this.identifyingId);
|
|
7081
7191
|
this.$nextTick(function () {
|
|
7082
|
-
var ref = 'login' +
|
|
7083
|
-
|
|
7192
|
+
var ref = 'login' + _this4.active;
|
|
7193
|
+
_this4.$refs[ref] && _this4.$refs[ref].clearValidate();
|
|
7084
7194
|
});
|
|
7085
7195
|
},
|
|
7086
7196
|
switchLoginType: function switchLoginType(res) {
|
|
7087
|
-
var
|
|
7197
|
+
var _this5 = this;
|
|
7088
7198
|
|
|
7089
7199
|
this.countdown = 0;
|
|
7090
7200
|
if (res) {
|
|
7091
|
-
this.active = res.type;
|
|
7092
|
-
this.title = res.name || '';
|
|
7093
7201
|
this.switchActive = res.type;
|
|
7202
|
+
this.title = res.name || '';
|
|
7203
|
+
if (this.loginModel.indexOf(res.type) > -1) {
|
|
7204
|
+
this.active = res.type;
|
|
7205
|
+
} else {
|
|
7206
|
+
var other = this.switchs.filter(function (item) {
|
|
7207
|
+
return item.type != res.type;
|
|
7208
|
+
})[0];
|
|
7209
|
+
var model = this.loginModel.split(',').filter(function (item) {
|
|
7210
|
+
return item != res.type && item != other.type;
|
|
7211
|
+
})[0];
|
|
7212
|
+
if (model) {
|
|
7213
|
+
this.active = model;
|
|
7214
|
+
this.title = this.iconfonts[model].name;
|
|
7215
|
+
} else {
|
|
7216
|
+
console.error('complex风格的登录方式,loginModel配置错误!');
|
|
7217
|
+
}
|
|
7218
|
+
}
|
|
7094
7219
|
} else {
|
|
7095
7220
|
this.active = this.switchs[0].type;
|
|
7096
7221
|
this.title = '';
|
|
@@ -7098,15 +7223,15 @@ var ceshi = util["a" /* default */].getParams('ceshi');
|
|
|
7098
7223
|
}
|
|
7099
7224
|
this.$emit('change-type', res, this.identifyingId);
|
|
7100
7225
|
this.$nextTick(function () {
|
|
7101
|
-
var ref = 'login' +
|
|
7102
|
-
|
|
7226
|
+
var ref = 'login' + _this5.active;
|
|
7227
|
+
_this5.$refs[ref] && _this5.$refs[ref].clearValidate();
|
|
7103
7228
|
});
|
|
7104
7229
|
},
|
|
7105
7230
|
isShow: function isShow(res) {
|
|
7106
7231
|
return this.loginModel.indexOf(res) > -1;
|
|
7107
7232
|
},
|
|
7108
7233
|
getLogin: function getLogin() {
|
|
7109
|
-
var
|
|
7234
|
+
var _this6 = this;
|
|
7110
7235
|
|
|
7111
7236
|
return _asyncToGenerator( /*#__PURE__*/regenerator_default.a.mark(function _callee() {
|
|
7112
7237
|
var config;
|
|
@@ -7117,10 +7242,10 @@ var ceshi = util["a" /* default */].getParams('ceshi');
|
|
|
7117
7242
|
config = util["a" /* default */].getStorage('initLogin');
|
|
7118
7243
|
|
|
7119
7244
|
if (config) {
|
|
7120
|
-
|
|
7245
|
+
_this6.setConfig(JSON.parse(config));
|
|
7121
7246
|
}
|
|
7122
7247
|
_context.next = 4;
|
|
7123
|
-
return util["a" /* default */].ajax({ url:
|
|
7248
|
+
return util["a" /* default */].ajax({ url: _this6.initLogin }).then(function (res) {
|
|
7124
7249
|
if (res && res.rCode === 0) {
|
|
7125
7250
|
store["a" /* default */].set('initLogin', res.results);
|
|
7126
7251
|
util["a" /* default */].setStorage({
|
|
@@ -7128,10 +7253,10 @@ var ceshi = util["a" /* default */].getParams('ceshi');
|
|
|
7128
7253
|
key: 'initLogin',
|
|
7129
7254
|
value: JSON.stringify(res.results)
|
|
7130
7255
|
});
|
|
7131
|
-
|
|
7132
|
-
|
|
7256
|
+
_this6.$emit('initLogin', res.results);
|
|
7257
|
+
_this6.setConfig(res.results);
|
|
7133
7258
|
} else {
|
|
7134
|
-
|
|
7259
|
+
_this6.$message({
|
|
7135
7260
|
message: res.msg || '系统错误,请联系管理员!',
|
|
7136
7261
|
type: 'error',
|
|
7137
7262
|
duration: 2000
|
|
@@ -7139,7 +7264,7 @@ var ceshi = util["a" /* default */].getParams('ceshi');
|
|
|
7139
7264
|
}
|
|
7140
7265
|
}).catch(function (err) {
|
|
7141
7266
|
if (err.message && err.message !== 'canceled') {
|
|
7142
|
-
|
|
7267
|
+
_this6.$message.error(err.message);
|
|
7143
7268
|
}
|
|
7144
7269
|
});
|
|
7145
7270
|
|
|
@@ -7148,7 +7273,7 @@ var ceshi = util["a" /* default */].getParams('ceshi');
|
|
|
7148
7273
|
return _context.stop();
|
|
7149
7274
|
}
|
|
7150
7275
|
}
|
|
7151
|
-
}, _callee,
|
|
7276
|
+
}, _callee, _this6);
|
|
7152
7277
|
}))();
|
|
7153
7278
|
},
|
|
7154
7279
|
setConfig: function setConfig(res) {
|
|
@@ -7283,7 +7408,7 @@ var ceshi = util["a" /* default */].getParams('ceshi');
|
|
|
7283
7408
|
return this.imageCode;
|
|
7284
7409
|
},
|
|
7285
7410
|
getCode: function getCode() {
|
|
7286
|
-
var
|
|
7411
|
+
var _this7 = this;
|
|
7287
7412
|
|
|
7288
7413
|
if (this.countdown) {
|
|
7289
7414
|
return false;
|
|
@@ -7325,14 +7450,14 @@ var ceshi = util["a" /* default */].getParams('ceshi');
|
|
|
7325
7450
|
}
|
|
7326
7451
|
this.countdown = 60;
|
|
7327
7452
|
this.timer = setInterval(function () {
|
|
7328
|
-
if (
|
|
7329
|
-
|
|
7330
|
-
|
|
7331
|
-
|
|
7453
|
+
if (_this7.countdown > 0) {
|
|
7454
|
+
_this7.countdown--;
|
|
7455
|
+
_this7.disabled = true;
|
|
7456
|
+
_this7.btnText = '重新获取' + _this7.countdown + 's';
|
|
7332
7457
|
} else {
|
|
7333
|
-
|
|
7334
|
-
|
|
7335
|
-
|
|
7458
|
+
_this7.btnText = '重新获取';
|
|
7459
|
+
_this7.disabled = false;
|
|
7460
|
+
_this7.submit = false;
|
|
7336
7461
|
}
|
|
7337
7462
|
}, 1000);
|
|
7338
7463
|
util["a" /* default */].ajax({
|
|
@@ -7340,26 +7465,26 @@ var ceshi = util["a" /* default */].getParams('ceshi');
|
|
|
7340
7465
|
url: this.active == 12 ? this.getTwoFactorLoginCode : this.getLoginCode,
|
|
7341
7466
|
data: data
|
|
7342
7467
|
}).then(function (res) {
|
|
7343
|
-
|
|
7468
|
+
_this7.$message({
|
|
7344
7469
|
message: res.msg,
|
|
7345
7470
|
duration: 2000,
|
|
7346
7471
|
type: res.rCode == 0 ? 'success' : 'error'
|
|
7347
7472
|
});
|
|
7348
7473
|
|
|
7349
7474
|
if (res.rCode === 2) {
|
|
7350
|
-
|
|
7351
|
-
|
|
7352
|
-
|
|
7353
|
-
clearInterval(
|
|
7475
|
+
_this7.btnText = '获取验证码';
|
|
7476
|
+
_this7.disabled = false;
|
|
7477
|
+
_this7.countdown = 0;
|
|
7478
|
+
clearInterval(_this7.timer);
|
|
7354
7479
|
}
|
|
7355
7480
|
}).catch(function (err) {
|
|
7356
7481
|
if (err.message && err.message !== 'canceled') {
|
|
7357
|
-
|
|
7482
|
+
_this7.$message.error(err.message);
|
|
7358
7483
|
}
|
|
7359
7484
|
});
|
|
7360
7485
|
},
|
|
7361
7486
|
handleLogin: function handleLogin() {
|
|
7362
|
-
var
|
|
7487
|
+
var _this8 = this;
|
|
7363
7488
|
|
|
7364
7489
|
if (this.submit) {
|
|
7365
7490
|
return false;
|
|
@@ -7367,40 +7492,40 @@ var ceshi = util["a" /* default */].getParams('ceshi');
|
|
|
7367
7492
|
var ref = 'login' + this.active;
|
|
7368
7493
|
this.$refs[ref].validate(function (valid) {
|
|
7369
7494
|
if (valid) {
|
|
7370
|
-
|
|
7495
|
+
_this8.submit = true;
|
|
7371
7496
|
var param = util["a" /* default */].getParams() || {};
|
|
7372
|
-
var data =
|
|
7373
|
-
username:
|
|
7374
|
-
password:
|
|
7375
|
-
data:
|
|
7376
|
-
key:
|
|
7377
|
-
}) :
|
|
7378
|
-
identifyingCode:
|
|
7379
|
-
identifyingId:
|
|
7380
|
-
} :
|
|
7381
|
-
username:
|
|
7382
|
-
password:
|
|
7383
|
-
data:
|
|
7384
|
-
key:
|
|
7385
|
-
}) :
|
|
7386
|
-
targetType:
|
|
7387
|
-
verificationCode:
|
|
7497
|
+
var data = _this8.active == '0' ? {
|
|
7498
|
+
username: _this8.formData.username,
|
|
7499
|
+
password: _this8.secret && _this8.isEncrypt ? util["a" /* default */].esmEncrypt({
|
|
7500
|
+
data: _this8.formData.password,
|
|
7501
|
+
key: _this8.secret
|
|
7502
|
+
}) : _this8.formData.password,
|
|
7503
|
+
identifyingCode: _this8.formData.identifyingCode,
|
|
7504
|
+
identifyingId: _this8.identifyingId
|
|
7505
|
+
} : _this8.active == '12' ? {
|
|
7506
|
+
username: _this8.formData.username,
|
|
7507
|
+
password: _this8.secret && _this8.isEncrypt ? util["a" /* default */].esmEncrypt({
|
|
7508
|
+
data: _this8.formData.password,
|
|
7509
|
+
key: _this8.secret
|
|
7510
|
+
}) : _this8.formData.password,
|
|
7511
|
+
targetType: _this8.passModifyModel.indexOf('11') > -1 ? 'EMAIL' : 'SMS',
|
|
7512
|
+
verificationCode: _this8.formData.identifyingCode
|
|
7388
7513
|
} : {
|
|
7389
|
-
target:
|
|
7390
|
-
verificationCode:
|
|
7391
|
-
targetType:
|
|
7514
|
+
target: _this8.formData.target,
|
|
7515
|
+
verificationCode: _this8.formData.verificationCode,
|
|
7516
|
+
targetType: _this8.active == '6' ? 'SMS' : 'EMAIL'
|
|
7392
7517
|
};
|
|
7393
|
-
if (
|
|
7394
|
-
if (
|
|
7395
|
-
|
|
7518
|
+
if (_this8.onLogin) {
|
|
7519
|
+
if (_this8.active == '0') {
|
|
7520
|
+
_this8.onLogin(mainvue_type_script_lang_js_extends({}, param, data), _this8.getImgCode, _this8.handleRemember);
|
|
7396
7521
|
} else {
|
|
7397
|
-
|
|
7522
|
+
_this8.onLogin(mainvue_type_script_lang_js_extends({}, param, data));
|
|
7398
7523
|
}
|
|
7399
7524
|
} else {
|
|
7400
|
-
|
|
7525
|
+
_this8.handleUserLogin(mainvue_type_script_lang_js_extends({}, param, _this8.param, data));
|
|
7401
7526
|
}
|
|
7402
7527
|
} else {
|
|
7403
|
-
|
|
7528
|
+
_this8.submit = false;
|
|
7404
7529
|
return false;
|
|
7405
7530
|
}
|
|
7406
7531
|
});
|
|
@@ -7416,7 +7541,7 @@ var ceshi = util["a" /* default */].getParams('ceshi');
|
|
|
7416
7541
|
}
|
|
7417
7542
|
},
|
|
7418
7543
|
handleUserLogin: function handleUserLogin(data) {
|
|
7419
|
-
var
|
|
7544
|
+
var _this9 = this;
|
|
7420
7545
|
|
|
7421
7546
|
var extUserBindHandleId = sessionStorage.getItem('extUserBindHandleId');
|
|
7422
7547
|
util["a" /* default */].ajax({
|
|
@@ -7424,68 +7549,68 @@ var ceshi = util["a" /* default */].getParams('ceshi');
|
|
|
7424
7549
|
url: this.active == '0' ? this.actionUrl : this.active == '12' ? this.doTwoFactorLogin : this.doCodeLogin,
|
|
7425
7550
|
data: extUserBindHandleId ? mainvue_type_script_lang_js_extends({}, data, { extUserBindHandleId: extUserBindHandleId }) : data
|
|
7426
7551
|
}).then(function (res) {
|
|
7427
|
-
|
|
7552
|
+
_this9.submit = false;
|
|
7428
7553
|
if (res.rCode == 0) {
|
|
7429
7554
|
util["a" /* default */].removeStorage('extUserBindHandleId');
|
|
7430
|
-
|
|
7555
|
+
_this9.handleRemember();
|
|
7431
7556
|
var results = res.results;
|
|
7432
|
-
|
|
7433
|
-
if (
|
|
7434
|
-
|
|
7557
|
+
_this9.handleResults(results);
|
|
7558
|
+
if (_this9.onSuccess) {
|
|
7559
|
+
_this9.onSuccess(res);
|
|
7435
7560
|
}
|
|
7436
7561
|
} else {
|
|
7437
7562
|
var msg = res.results && res.results.msg ? res.results.msg : res.msg;
|
|
7438
|
-
|
|
7563
|
+
_this9.$message({
|
|
7439
7564
|
message: msg || '系统错误,请联系管理员!',
|
|
7440
7565
|
type: 'error',
|
|
7441
7566
|
duration: 1500,
|
|
7442
7567
|
onClose: function onClose() {
|
|
7443
|
-
|
|
7444
|
-
|
|
7445
|
-
|
|
7446
|
-
clearInterval(
|
|
7447
|
-
|
|
7568
|
+
_this9.btnText = '获取验证码';
|
|
7569
|
+
_this9.disabled = false;
|
|
7570
|
+
_this9.countdown = 0;
|
|
7571
|
+
clearInterval(_this9.timer);
|
|
7572
|
+
_this9.getImgCode();
|
|
7448
7573
|
}
|
|
7449
7574
|
});
|
|
7450
|
-
|
|
7575
|
+
_this9.onError(res);
|
|
7451
7576
|
}
|
|
7452
7577
|
}).catch(function (err) {
|
|
7453
|
-
|
|
7578
|
+
_this9.submit = false;
|
|
7454
7579
|
if (err.message && err.message !== 'canceled') {
|
|
7455
|
-
|
|
7580
|
+
_this9.$message.error(err.message);
|
|
7456
7581
|
}
|
|
7457
7582
|
});
|
|
7458
7583
|
},
|
|
7459
7584
|
caLogin: function caLogin(signedData) {
|
|
7460
|
-
var
|
|
7585
|
+
var _this10 = this;
|
|
7461
7586
|
|
|
7462
7587
|
util["a" /* default */].ajax({
|
|
7463
7588
|
method: 'post',
|
|
7464
7589
|
url: this.caAction,
|
|
7465
7590
|
data: { identifyingId: this.identifyingId, signedData: signedData }
|
|
7466
7591
|
}).then(function (res) {
|
|
7467
|
-
|
|
7592
|
+
_this10.submit = false;
|
|
7468
7593
|
if (res.rCode == 0) {
|
|
7469
7594
|
var results = res.results;
|
|
7470
|
-
|
|
7471
|
-
if (
|
|
7472
|
-
|
|
7595
|
+
_this10.handleResults(results);
|
|
7596
|
+
if (_this10.onSuccess) {
|
|
7597
|
+
_this10.onSuccess(res);
|
|
7473
7598
|
}
|
|
7474
7599
|
} else {
|
|
7475
7600
|
var msg = res.results && res.results.msg ? res.results.msg : res.msg;
|
|
7476
|
-
|
|
7601
|
+
_this10.$message({
|
|
7477
7602
|
message: msg || '系统错误,请联系管理员!',
|
|
7478
7603
|
type: 'error',
|
|
7479
7604
|
duration: 1500,
|
|
7480
7605
|
onClose: function onClose() {
|
|
7481
|
-
|
|
7606
|
+
_this10.getImgCode();
|
|
7482
7607
|
}
|
|
7483
7608
|
});
|
|
7484
|
-
|
|
7609
|
+
_this10.onError(res);
|
|
7485
7610
|
}
|
|
7486
7611
|
}).catch(function (err) {
|
|
7487
7612
|
if (err.message && err.message !== 'canceled') {
|
|
7488
|
-
|
|
7613
|
+
_this10.$message.error(err.message);
|
|
7489
7614
|
}
|
|
7490
7615
|
});
|
|
7491
7616
|
},
|
|
@@ -7502,17 +7627,17 @@ var ceshi = util["a" /* default */].getParams('ceshi');
|
|
|
7502
7627
|
|
|
7503
7628
|
//获取app登录信息
|
|
7504
7629
|
loginInfo: function loginInfo(res) {
|
|
7505
|
-
var
|
|
7630
|
+
var _this11 = this;
|
|
7506
7631
|
|
|
7507
7632
|
clearTimeout(this.interval);
|
|
7508
7633
|
if (res) {
|
|
7509
7634
|
this.interval = setTimeout(function () {
|
|
7510
|
-
|
|
7635
|
+
_this11.initRequestLoginInfo();
|
|
7511
7636
|
}, this.scanIntervalTime);
|
|
7512
7637
|
}
|
|
7513
7638
|
},
|
|
7514
7639
|
initRequestLoginInfo: function initRequestLoginInfo() {
|
|
7515
|
-
var
|
|
7640
|
+
var _this12 = this;
|
|
7516
7641
|
|
|
7517
7642
|
if (this.identifyingId == '') {
|
|
7518
7643
|
return false;
|
|
@@ -7527,21 +7652,21 @@ var ceshi = util["a" /* default */].getParams('ceshi');
|
|
|
7527
7652
|
if (res.rCode === 0) {
|
|
7528
7653
|
var results = res.results;
|
|
7529
7654
|
if (results.statusCode === 0) {
|
|
7530
|
-
clearTimeout(
|
|
7531
|
-
|
|
7655
|
+
clearTimeout(_this12.interval);
|
|
7656
|
+
_this12.handleResults(results, 3);
|
|
7532
7657
|
} else {
|
|
7533
|
-
|
|
7658
|
+
_this12.loginInfo(true);
|
|
7534
7659
|
}
|
|
7535
7660
|
}
|
|
7536
7661
|
}).catch(function (err) {
|
|
7537
|
-
clearTimeout(
|
|
7662
|
+
clearTimeout(_this12.interval);
|
|
7538
7663
|
if (err.message && err.message !== 'canceled') {
|
|
7539
|
-
|
|
7664
|
+
_this12.$message.error(err.message);
|
|
7540
7665
|
}
|
|
7541
7666
|
});
|
|
7542
7667
|
},
|
|
7543
7668
|
handleResults: function handleResults(results, type) {
|
|
7544
|
-
var
|
|
7669
|
+
var _this13 = this;
|
|
7545
7670
|
|
|
7546
7671
|
switch (results.statusCode) {
|
|
7547
7672
|
case 0:
|
|
@@ -7566,9 +7691,9 @@ var ceshi = util["a" /* default */].getParams('ceshi');
|
|
|
7566
7691
|
});
|
|
7567
7692
|
this.showLaunch = true;
|
|
7568
7693
|
setTimeout(function () {
|
|
7569
|
-
if (
|
|
7570
|
-
window.location.href =
|
|
7571
|
-
} else if (results.doorIndex &&
|
|
7694
|
+
if (_this13.toUrl) {
|
|
7695
|
+
window.location.href = _this13.toUrl;
|
|
7696
|
+
} else if (results.doorIndex && _this13.doorIndex) {
|
|
7572
7697
|
sessionStorage.setItem('doorIndex', results.doorIndex);
|
|
7573
7698
|
localStorage.setItem('isLogined', true);
|
|
7574
7699
|
window.location.href = results.doorIndex;
|
|
@@ -7576,9 +7701,9 @@ var ceshi = util["a" /* default */].getParams('ceshi');
|
|
|
7576
7701
|
if (window.location.href.indexOf('login.html') > -1) {
|
|
7577
7702
|
window.location.href = './main.html';
|
|
7578
7703
|
} else {
|
|
7579
|
-
|
|
7580
|
-
|
|
7581
|
-
|
|
7704
|
+
_this13.$router.push({ name: 'main' });
|
|
7705
|
+
_this13.$nextTick(function () {
|
|
7706
|
+
_this13.showLaunch = false;
|
|
7582
7707
|
});
|
|
7583
7708
|
}
|
|
7584
7709
|
}
|
|
@@ -7589,9 +7714,9 @@ var ceshi = util["a" /* default */].getParams('ceshi');
|
|
|
7589
7714
|
type: 'success',
|
|
7590
7715
|
duration: 1500,
|
|
7591
7716
|
onClose: function onClose() {
|
|
7592
|
-
if (
|
|
7593
|
-
window.location.href =
|
|
7594
|
-
} else if (results.doorIndex &&
|
|
7717
|
+
if (_this13.toUrl) {
|
|
7718
|
+
window.location.href = _this13.toUrl;
|
|
7719
|
+
} else if (results.doorIndex && _this13.doorIndex) {
|
|
7595
7720
|
sessionStorage.setItem('doorIndex', results.doorIndex);
|
|
7596
7721
|
localStorage.setItem('isLogined', true);
|
|
7597
7722
|
window.location.href = results.doorIndex;
|
|
@@ -7599,7 +7724,7 @@ var ceshi = util["a" /* default */].getParams('ceshi');
|
|
|
7599
7724
|
if (window.location.href.indexOf('login.html') > -1) {
|
|
7600
7725
|
window.location.href = './main.html';
|
|
7601
7726
|
} else {
|
|
7602
|
-
|
|
7727
|
+
_this13.$router.push({ name: 'main' });
|
|
7603
7728
|
}
|
|
7604
7729
|
}
|
|
7605
7730
|
}
|
|
@@ -7612,11 +7737,11 @@ var ceshi = util["a" /* default */].getParams('ceshi');
|
|
|
7612
7737
|
//cancelButtonText: '取消',
|
|
7613
7738
|
type: 'warning'
|
|
7614
7739
|
}).then(function () {
|
|
7615
|
-
|
|
7616
|
-
if (typeof
|
|
7617
|
-
util["a" /* default */].win.open(
|
|
7740
|
+
_this13.operationCheckCode = results.checkCode;
|
|
7741
|
+
if (typeof _this13.forgetUrl === 'string') {
|
|
7742
|
+
util["a" /* default */].win.open(_this13.forgetUrl);
|
|
7618
7743
|
} else {
|
|
7619
|
-
|
|
7744
|
+
_this13.showResetPassword = true;
|
|
7620
7745
|
}
|
|
7621
7746
|
}).catch(function (e) {});
|
|
7622
7747
|
break;
|
|
@@ -7657,13 +7782,13 @@ var ceshi = util["a" /* default */].getParams('ceshi');
|
|
|
7657
7782
|
type: 'error',
|
|
7658
7783
|
duration: 1500,
|
|
7659
7784
|
onClose: function onClose() {
|
|
7660
|
-
if (
|
|
7785
|
+
if (_this13.code) {
|
|
7661
7786
|
window.location.href = util["a" /* default */].delUrlParam({ key: 'code' });
|
|
7662
7787
|
if (window.location.hash) {
|
|
7663
7788
|
location.reload();
|
|
7664
7789
|
}
|
|
7665
7790
|
} else {
|
|
7666
|
-
|
|
7791
|
+
_this13.getImgCode();
|
|
7667
7792
|
}
|
|
7668
7793
|
}
|
|
7669
7794
|
});
|
|
@@ -7673,15 +7798,15 @@ var ceshi = util["a" /* default */].getParams('ceshi');
|
|
|
7673
7798
|
}
|
|
7674
7799
|
},
|
|
7675
7800
|
handleAssistance: function handleAssistance(data) {
|
|
7676
|
-
var
|
|
7801
|
+
var _this14 = this;
|
|
7677
7802
|
|
|
7678
7803
|
clearTimeout(this.doAssistance);
|
|
7679
7804
|
this.doAssistance = setTimeout(function () {
|
|
7680
|
-
|
|
7805
|
+
_this14.doAssistanceLogin(data);
|
|
7681
7806
|
}, this.scanIntervalTime);
|
|
7682
7807
|
},
|
|
7683
7808
|
doAssistanceLogin: function doAssistanceLogin(data) {
|
|
7684
|
-
var
|
|
7809
|
+
var _this15 = this;
|
|
7685
7810
|
|
|
7686
7811
|
util["a" /* default */].ajax({
|
|
7687
7812
|
method: 'post',
|
|
@@ -7691,19 +7816,19 @@ var ceshi = util["a" /* default */].getParams('ceshi');
|
|
|
7691
7816
|
if (res.rCode === 0) {
|
|
7692
7817
|
var results = res.results;
|
|
7693
7818
|
if (results.statusCode === 0) {
|
|
7694
|
-
clearTimeout(
|
|
7695
|
-
|
|
7819
|
+
clearTimeout(_this15.doAssistance);
|
|
7820
|
+
_this15.handleResults(results, 3);
|
|
7696
7821
|
} else {
|
|
7697
|
-
|
|
7822
|
+
_this15.handleAssistance(data);
|
|
7698
7823
|
}
|
|
7699
7824
|
} else {
|
|
7700
|
-
clearTimeout(
|
|
7701
|
-
|
|
7825
|
+
clearTimeout(_this15.doAssistance);
|
|
7826
|
+
_this15.$message.error(res.msg);
|
|
7702
7827
|
}
|
|
7703
7828
|
}).catch(function (err) {
|
|
7704
|
-
clearTimeout(
|
|
7829
|
+
clearTimeout(_this15.doAssistance);
|
|
7705
7830
|
if (err.message && err.message !== 'canceled') {
|
|
7706
|
-
|
|
7831
|
+
_this15.$message.error(err.message);
|
|
7707
7832
|
}
|
|
7708
7833
|
});
|
|
7709
7834
|
},
|