ai-error-assistant-mobile 0.0.4 → 0.0.5
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/components/demo/src/chat.vue +10 -0
- package/components/demo/src/main.vue +21 -9
- package/components/demo/utils/config.js +11 -11
- package/dist/ai-error-assistant-mobile.common.js +46 -35
- package/dist/ai-error-assistant-mobile.common.js.map +1 -1
- package/dist/ai-error-assistant-mobile.css +1 -1
- package/dist/ai-error-assistant-mobile.umd.js +46 -35
- package/dist/ai-error-assistant-mobile.umd.js.map +1 -1
- package/dist/ai-error-assistant-mobile.umd.min.js +2 -2
- package/dist/ai-error-assistant-mobile.umd.min.js.map +1 -1
- package/package.json +1 -1
|
@@ -1,5 +1,9 @@
|
|
|
1
1
|
<template>
|
|
2
2
|
<div class="ai-contain" v-if="visible">
|
|
3
|
+
<div
|
|
4
|
+
class="nav-top-space"
|
|
5
|
+
:style="`height: ${navTopHeight}px`"
|
|
6
|
+
></div>
|
|
3
7
|
<div class="ai-contain-header">
|
|
4
8
|
<div class="header-left">
|
|
5
9
|
<i class="el-icon-back" @click="closeMessage"></i>
|
|
@@ -62,7 +66,7 @@ import Chat from './chat.vue';
|
|
|
62
66
|
import Feedback from './feedback.vue';
|
|
63
67
|
import Cookies from "js-cookie";
|
|
64
68
|
import {getUserInfo} from '../utils/config';
|
|
65
|
-
import {checkCourseIdIsExist, queryCallWord} from '../api/index';
|
|
69
|
+
import {checkCourseIdIsExist, queryCallWord, ssoAuth} from '../api/index';
|
|
66
70
|
import cache from "../plugins/cache";
|
|
67
71
|
|
|
68
72
|
export default {
|
|
@@ -77,6 +81,10 @@ export default {
|
|
|
77
81
|
businessSource: {
|
|
78
82
|
type: String,
|
|
79
83
|
default: ''
|
|
84
|
+
},
|
|
85
|
+
navTopHeight: {
|
|
86
|
+
type: Number,
|
|
87
|
+
default: 0
|
|
80
88
|
}
|
|
81
89
|
},
|
|
82
90
|
computed: {
|
|
@@ -114,17 +122,21 @@ export default {
|
|
|
114
122
|
showFeedback: false,
|
|
115
123
|
}
|
|
116
124
|
},
|
|
117
|
-
mounted() {
|
|
125
|
+
async mounted() {
|
|
118
126
|
if (!Cookies.get("token")) {
|
|
119
127
|
return this.$message.warning('未获取到登录信息,请重新登录');
|
|
120
128
|
}
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
129
|
+
await ssoAuth(Cookies.get("token"), this.businessSource).then(async (ssoRes) => {
|
|
130
|
+
if (ssoRes) {
|
|
131
|
+
const wordRes = await queryCallWord(this.resId);
|
|
132
|
+
if (!wordRes) return;
|
|
133
|
+
const {showMoreQA, isShowFile} = wordRes;
|
|
134
|
+
this.showMoreQA = showMoreQA;
|
|
135
|
+
this.showFile = !!isShowFile;
|
|
136
|
+
if (ssoRes?.avatarUrl) {
|
|
137
|
+
this.avatarUrl = ssoRes.avatarUrl;
|
|
138
|
+
}
|
|
139
|
+
}
|
|
128
140
|
});
|
|
129
141
|
},
|
|
130
142
|
methods: {
|
|
@@ -86,14 +86,14 @@ export const cacheMessageList = [
|
|
|
86
86
|
// });
|
|
87
87
|
// cache.session.setJSON('SRKJ_TOKEN_CACHE', userRes);
|
|
88
88
|
// }
|
|
89
|
-
export const getUserInfo = async (token, businessSource, fn) => {
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
}
|
|
89
|
+
// export const getUserInfo = async (token, businessSource, fn) => {
|
|
90
|
+
// await ssoAuth(token, businessSource).then(async (ssoRes) => {
|
|
91
|
+
// if (ssoRes?.avatarUrl){
|
|
92
|
+
// cache.session.setJSON('USER_AVATAR_URL', ssoRes.avatarUrl);
|
|
93
|
+
// }else{
|
|
94
|
+
// cache.session.setJSON('USER_AVATAR_URL', '');
|
|
95
|
+
// }
|
|
96
|
+
// });
|
|
97
|
+
// cache.session.setJSON('SRKJ_TOKEN_CACHE', token);
|
|
98
|
+
// if (fn) fn();
|
|
99
|
+
// }
|
|
@@ -6554,13 +6554,16 @@ if (typeof window !== 'undefined') {
|
|
|
6554
6554
|
// Indicate to webpack that this file can be concatenated
|
|
6555
6555
|
/* harmony default export */ var setPublicPath = (null);
|
|
6556
6556
|
|
|
6557
|
-
;// CONCATENATED MODULE: ./node_modules/thread-loader/dist/cjs.js!./node_modules/babel-loader/lib/index.js??clonedRuleSet-40.use[1]!./node_modules/@vue/vue-loader-v15/lib/loaders/templateLoader.js??ruleSet[1].rules[3]!./node_modules/@vue/vue-loader-v15/lib/index.js??vue-loader-options!./components/demo/src/main.vue?vue&type=template&id=
|
|
6557
|
+
;// CONCATENATED MODULE: ./node_modules/thread-loader/dist/cjs.js!./node_modules/babel-loader/lib/index.js??clonedRuleSet-40.use[1]!./node_modules/@vue/vue-loader-v15/lib/loaders/templateLoader.js??ruleSet[1].rules[3]!./node_modules/@vue/vue-loader-v15/lib/index.js??vue-loader-options!./components/demo/src/main.vue?vue&type=template&id=a9eef3b4&scoped=true
|
|
6558
6558
|
var render = function render() {
|
|
6559
6559
|
var _vm = this,
|
|
6560
6560
|
_c = _vm._self._c;
|
|
6561
6561
|
return _vm.visible ? _c('div', {
|
|
6562
6562
|
staticClass: "ai-contain"
|
|
6563
6563
|
}, [_c('div', {
|
|
6564
|
+
staticClass: "nav-top-space",
|
|
6565
|
+
style: `height: ${_vm.navTopHeight}px`
|
|
6566
|
+
}), _c('div', {
|
|
6564
6567
|
staticClass: "ai-contain-header"
|
|
6565
6568
|
}, [_c('div', {
|
|
6566
6569
|
staticClass: "header-left"
|
|
@@ -6686,10 +6689,10 @@ var render = function render() {
|
|
|
6686
6689
|
};
|
|
6687
6690
|
var staticRenderFns = [];
|
|
6688
6691
|
|
|
6689
|
-
;// CONCATENATED MODULE: ./components/demo/src/main.vue?vue&type=template&id=
|
|
6692
|
+
;// CONCATENATED MODULE: ./components/demo/src/main.vue?vue&type=template&id=a9eef3b4&scoped=true
|
|
6690
6693
|
|
|
6691
|
-
;// CONCATENATED MODULE: ./node_modules/thread-loader/dist/cjs.js!./node_modules/babel-loader/lib/index.js??clonedRuleSet-40.use[1]!./node_modules/@vue/vue-loader-v15/lib/loaders/templateLoader.js??ruleSet[1].rules[3]!./node_modules/@vue/vue-loader-v15/lib/index.js??vue-loader-options!./components/demo/src/chat.vue?vue&type=template&id=
|
|
6692
|
-
var
|
|
6694
|
+
;// CONCATENATED MODULE: ./node_modules/thread-loader/dist/cjs.js!./node_modules/babel-loader/lib/index.js??clonedRuleSet-40.use[1]!./node_modules/@vue/vue-loader-v15/lib/loaders/templateLoader.js??ruleSet[1].rules[3]!./node_modules/@vue/vue-loader-v15/lib/index.js??vue-loader-options!./components/demo/src/chat.vue?vue&type=template&id=5ba393d7&scoped=true
|
|
6695
|
+
var chatvue_type_template_id_5ba393d7_scoped_true_render = function render() {
|
|
6693
6696
|
var _vm = this,
|
|
6694
6697
|
_c = _vm._self._c;
|
|
6695
6698
|
return _c('div', {
|
|
@@ -6799,7 +6802,7 @@ var chatvue_type_template_id_3850420e_scoped_true_render = function render() {
|
|
|
6799
6802
|
}) : _vm._e()], 1)]);
|
|
6800
6803
|
})], 2);
|
|
6801
6804
|
};
|
|
6802
|
-
var
|
|
6805
|
+
var chatvue_type_template_id_5ba393d7_scoped_true_staticRenderFns = [];
|
|
6803
6806
|
|
|
6804
6807
|
;// CONCATENATED MODULE: ./node_modules/axios/lib/helpers/bind.js
|
|
6805
6808
|
|
|
@@ -11137,17 +11140,17 @@ const cacheMessageList = [{
|
|
|
11137
11140
|
// });
|
|
11138
11141
|
// cache.session.setJSON('SRKJ_TOKEN_CACHE', userRes);
|
|
11139
11142
|
// }
|
|
11140
|
-
const getUserInfo = async (token, businessSource, fn) => {
|
|
11141
|
-
|
|
11142
|
-
|
|
11143
|
-
|
|
11144
|
-
|
|
11145
|
-
|
|
11146
|
-
|
|
11147
|
-
|
|
11148
|
-
|
|
11149
|
-
|
|
11150
|
-
}
|
|
11143
|
+
// export const getUserInfo = async (token, businessSource, fn) => {
|
|
11144
|
+
// await ssoAuth(token, businessSource).then(async (ssoRes) => {
|
|
11145
|
+
// if (ssoRes?.avatarUrl){
|
|
11146
|
+
// cache.session.setJSON('USER_AVATAR_URL', ssoRes.avatarUrl);
|
|
11147
|
+
// }else{
|
|
11148
|
+
// cache.session.setJSON('USER_AVATAR_URL', '');
|
|
11149
|
+
// }
|
|
11150
|
+
// });
|
|
11151
|
+
// cache.session.setJSON('SRKJ_TOKEN_CACHE', token);
|
|
11152
|
+
// if (fn) fn();
|
|
11153
|
+
// }
|
|
11151
11154
|
;// CONCATENATED MODULE: ./node_modules/thread-loader/dist/cjs.js!./node_modules/babel-loader/lib/index.js??clonedRuleSet-40.use[1]!./node_modules/@vue/vue-loader-v15/lib/loaders/templateLoader.js??ruleSet[1].rules[3]!./node_modules/@vue/vue-loader-v15/lib/index.js??vue-loader-options!./components/demo/src/chat-tools.vue?vue&type=template&id=7c882bfc&scoped=true
|
|
11152
11155
|
var chat_toolsvue_type_template_id_7c882bfc_scoped_true_render = function render() {
|
|
11153
11156
|
var _vm = this,
|
|
@@ -14642,10 +14645,10 @@ const signal = controller.signal;
|
|
|
14642
14645
|
});
|
|
14643
14646
|
;// CONCATENATED MODULE: ./components/demo/src/chat.vue?vue&type=script&lang=js
|
|
14644
14647
|
/* harmony default export */ var src_chatvue_type_script_lang_js = (chatvue_type_script_lang_js);
|
|
14645
|
-
;// CONCATENATED MODULE: ./node_modules/mini-css-extract-plugin/dist/loader.js??clonedRuleSet-22.use[0]!./node_modules/css-loader/dist/cjs.js??clonedRuleSet-22.use[1]!./node_modules/@vue/vue-loader-v15/lib/loaders/stylePostLoader.js!./node_modules/postcss-loader/dist/cjs.js??clonedRuleSet-22.use[2]!./node_modules/sass-loader/dist/cjs.js??clonedRuleSet-22.use[3]!./node_modules/@vue/vue-loader-v15/lib/index.js??vue-loader-options!./components/demo/src/chat.vue?vue&type=style&index=0&id=
|
|
14648
|
+
;// CONCATENATED MODULE: ./node_modules/mini-css-extract-plugin/dist/loader.js??clonedRuleSet-22.use[0]!./node_modules/css-loader/dist/cjs.js??clonedRuleSet-22.use[1]!./node_modules/@vue/vue-loader-v15/lib/loaders/stylePostLoader.js!./node_modules/postcss-loader/dist/cjs.js??clonedRuleSet-22.use[2]!./node_modules/sass-loader/dist/cjs.js??clonedRuleSet-22.use[3]!./node_modules/@vue/vue-loader-v15/lib/index.js??vue-loader-options!./components/demo/src/chat.vue?vue&type=style&index=0&id=5ba393d7&prod&lang=scss&scoped=true
|
|
14646
14649
|
// extracted by mini-css-extract-plugin
|
|
14647
14650
|
|
|
14648
|
-
;// CONCATENATED MODULE: ./components/demo/src/chat.vue?vue&type=style&index=0&id=
|
|
14651
|
+
;// CONCATENATED MODULE: ./components/demo/src/chat.vue?vue&type=style&index=0&id=5ba393d7&prod&lang=scss&scoped=true
|
|
14649
14652
|
|
|
14650
14653
|
;// CONCATENATED MODULE: ./components/demo/src/chat.vue
|
|
14651
14654
|
|
|
@@ -14658,11 +14661,11 @@ const signal = controller.signal;
|
|
|
14658
14661
|
|
|
14659
14662
|
var chat_component = normalizeComponent(
|
|
14660
14663
|
src_chatvue_type_script_lang_js,
|
|
14661
|
-
|
|
14662
|
-
|
|
14664
|
+
chatvue_type_template_id_5ba393d7_scoped_true_render,
|
|
14665
|
+
chatvue_type_template_id_5ba393d7_scoped_true_staticRenderFns,
|
|
14663
14666
|
false,
|
|
14664
14667
|
null,
|
|
14665
|
-
"
|
|
14668
|
+
"5ba393d7",
|
|
14666
14669
|
null
|
|
14667
14670
|
|
|
14668
14671
|
)
|
|
@@ -15092,6 +15095,10 @@ var api = init(defaultConverter, { path: '/' });
|
|
|
15092
15095
|
businessSource: {
|
|
15093
15096
|
type: String,
|
|
15094
15097
|
default: ''
|
|
15098
|
+
},
|
|
15099
|
+
navTopHeight: {
|
|
15100
|
+
type: Number,
|
|
15101
|
+
default: 0
|
|
15095
15102
|
}
|
|
15096
15103
|
},
|
|
15097
15104
|
computed: {
|
|
@@ -15131,20 +15138,24 @@ var api = init(defaultConverter, { path: '/' });
|
|
|
15131
15138
|
showFeedback: false
|
|
15132
15139
|
};
|
|
15133
15140
|
},
|
|
15134
|
-
mounted() {
|
|
15141
|
+
async mounted() {
|
|
15135
15142
|
if (!api.get("token")) {
|
|
15136
15143
|
return this.$message.warning('未获取到登录信息,请重新登录');
|
|
15137
15144
|
}
|
|
15138
|
-
|
|
15139
|
-
|
|
15140
|
-
|
|
15141
|
-
|
|
15142
|
-
|
|
15143
|
-
|
|
15144
|
-
|
|
15145
|
-
|
|
15146
|
-
|
|
15147
|
-
|
|
15145
|
+
await ssoAuth(api.get("token"), this.businessSource).then(async ssoRes => {
|
|
15146
|
+
if (ssoRes) {
|
|
15147
|
+
const wordRes = await queryCallWord(this.resId);
|
|
15148
|
+
if (!wordRes) return;
|
|
15149
|
+
const {
|
|
15150
|
+
showMoreQA,
|
|
15151
|
+
isShowFile
|
|
15152
|
+
} = wordRes;
|
|
15153
|
+
this.showMoreQA = showMoreQA;
|
|
15154
|
+
this.showFile = !!isShowFile;
|
|
15155
|
+
if (ssoRes !== null && ssoRes !== void 0 && ssoRes.avatarUrl) {
|
|
15156
|
+
this.avatarUrl = ssoRes.avatarUrl;
|
|
15157
|
+
}
|
|
15158
|
+
}
|
|
15148
15159
|
});
|
|
15149
15160
|
},
|
|
15150
15161
|
methods: {
|
|
@@ -15201,10 +15212,10 @@ var api = init(defaultConverter, { path: '/' });
|
|
|
15201
15212
|
});
|
|
15202
15213
|
;// CONCATENATED MODULE: ./components/demo/src/main.vue?vue&type=script&lang=js
|
|
15203
15214
|
/* harmony default export */ var src_mainvue_type_script_lang_js = (mainvue_type_script_lang_js);
|
|
15204
|
-
;// CONCATENATED MODULE: ./node_modules/mini-css-extract-plugin/dist/loader.js??clonedRuleSet-22.use[0]!./node_modules/css-loader/dist/cjs.js??clonedRuleSet-22.use[1]!./node_modules/@vue/vue-loader-v15/lib/loaders/stylePostLoader.js!./node_modules/postcss-loader/dist/cjs.js??clonedRuleSet-22.use[2]!./node_modules/sass-loader/dist/cjs.js??clonedRuleSet-22.use[3]!./node_modules/@vue/vue-loader-v15/lib/index.js??vue-loader-options!./components/demo/src/main.vue?vue&type=style&index=0&id=
|
|
15215
|
+
;// CONCATENATED MODULE: ./node_modules/mini-css-extract-plugin/dist/loader.js??clonedRuleSet-22.use[0]!./node_modules/css-loader/dist/cjs.js??clonedRuleSet-22.use[1]!./node_modules/@vue/vue-loader-v15/lib/loaders/stylePostLoader.js!./node_modules/postcss-loader/dist/cjs.js??clonedRuleSet-22.use[2]!./node_modules/sass-loader/dist/cjs.js??clonedRuleSet-22.use[3]!./node_modules/@vue/vue-loader-v15/lib/index.js??vue-loader-options!./components/demo/src/main.vue?vue&type=style&index=0&id=a9eef3b4&prod&lang=scss&scoped=true
|
|
15205
15216
|
// extracted by mini-css-extract-plugin
|
|
15206
15217
|
|
|
15207
|
-
;// CONCATENATED MODULE: ./components/demo/src/main.vue?vue&type=style&index=0&id=
|
|
15218
|
+
;// CONCATENATED MODULE: ./components/demo/src/main.vue?vue&type=style&index=0&id=a9eef3b4&prod&lang=scss&scoped=true
|
|
15208
15219
|
|
|
15209
15220
|
;// CONCATENATED MODULE: ./components/demo/src/main.vue
|
|
15210
15221
|
|
|
@@ -15221,7 +15232,7 @@ var main_component = normalizeComponent(
|
|
|
15221
15232
|
staticRenderFns,
|
|
15222
15233
|
false,
|
|
15223
15234
|
null,
|
|
15224
|
-
"
|
|
15235
|
+
"a9eef3b4",
|
|
15225
15236
|
null
|
|
15226
15237
|
|
|
15227
15238
|
)
|