ai-error-assistant-mobile 0.0.4 → 0.0.6

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.
@@ -587,6 +587,16 @@ export default {
587
587
  }
588
588
  }
589
589
 
590
+ :deep {
591
+ .robot-message {
592
+ ol,ul{
593
+ font-size: 14px;
594
+ margin: 0;
595
+ padding: 0;
596
+ }
597
+ }
598
+ }
599
+
590
600
  @media screen and (min-width: 768px) {
591
601
  .chat-contain {
592
602
  padding: 1rem;
@@ -1,5 +1,6 @@
1
1
  <template>
2
2
  <div class="ai-contain" v-if="visible">
3
+ <div class="nav-top-space" :style="{ height: (navTopHeight || 0) + 'px' }"></div>
3
4
  <div class="ai-contain-header">
4
5
  <div class="header-left">
5
6
  <i class="el-icon-back" @click="closeMessage"></i>
@@ -62,7 +63,7 @@ import Chat from './chat.vue';
62
63
  import Feedback from './feedback.vue';
63
64
  import Cookies from "js-cookie";
64
65
  import {getUserInfo} from '../utils/config';
65
- import {checkCourseIdIsExist, queryCallWord} from '../api/index';
66
+ import {checkCourseIdIsExist, queryCallWord, ssoAuth} from '../api/index';
66
67
  import cache from "../plugins/cache";
67
68
 
68
69
  export default {
@@ -77,6 +78,10 @@ export default {
77
78
  businessSource: {
78
79
  type: String,
79
80
  default: ''
81
+ },
82
+ navTopHeight: {
83
+ type: Number,
84
+ default: 0
80
85
  }
81
86
  },
82
87
  computed: {
@@ -114,17 +119,21 @@ export default {
114
119
  showFeedback: false,
115
120
  }
116
121
  },
117
- mounted() {
122
+ async mounted() {
118
123
  if (!Cookies.get("token")) {
119
124
  return this.$message.warning('未获取到登录信息,请重新登录');
120
125
  }
121
- getUserInfo(Cookies.get("token"), this.businessSource, async () => {
122
- const wordRes = await queryCallWord(this.resId);
123
- if (!wordRes) return;
124
- const {showMoreQA, isShowFile} = wordRes;
125
- this.showMoreQA = showMoreQA;
126
- this.showFile = !!isShowFile;
127
- this.avatarUrl = cache.session.getJSON('USER_AVATAR_URL');
126
+ await ssoAuth(Cookies.get("token"), this.businessSource).then(async (ssoRes) => {
127
+ if (ssoRes) {
128
+ const wordRes = await queryCallWord(this.resId);
129
+ if (!wordRes) return;
130
+ const {showMoreQA, isShowFile} = wordRes;
131
+ this.showMoreQA = showMoreQA;
132
+ this.showFile = !!isShowFile;
133
+ if (ssoRes?.avatarUrl) {
134
+ this.avatarUrl = ssoRes.avatarUrl;
135
+ }
136
+ }
128
137
  });
129
138
  },
130
139
  methods: {
@@ -460,4 +469,11 @@ export default {
460
469
  overflow: auto;
461
470
  }
462
471
  }
472
+
473
+ .nav-top-space {
474
+ width: 100%;
475
+ background: transparent;
476
+ flex-shrink: 0;
477
+ }
478
+
463
479
  </style>
@@ -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
- 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
- }
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,18 @@ 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=c24193c6&scoped=true
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=43d95346&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: {
6566
+ height: (_vm.navTopHeight || 0) + 'px'
6567
+ }
6568
+ }), _c('div', {
6564
6569
  staticClass: "ai-contain-header"
6565
6570
  }, [_c('div', {
6566
6571
  staticClass: "header-left"
@@ -6686,10 +6691,10 @@ var render = function render() {
6686
6691
  };
6687
6692
  var staticRenderFns = [];
6688
6693
 
6689
- ;// CONCATENATED MODULE: ./components/demo/src/main.vue?vue&type=template&id=c24193c6&scoped=true
6694
+ ;// CONCATENATED MODULE: ./components/demo/src/main.vue?vue&type=template&id=43d95346&scoped=true
6690
6695
 
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=3850420e&scoped=true
6692
- var chatvue_type_template_id_3850420e_scoped_true_render = function render() {
6696
+ ;// 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
6697
+ var chatvue_type_template_id_5ba393d7_scoped_true_render = function render() {
6693
6698
  var _vm = this,
6694
6699
  _c = _vm._self._c;
6695
6700
  return _c('div', {
@@ -6799,7 +6804,7 @@ var chatvue_type_template_id_3850420e_scoped_true_render = function render() {
6799
6804
  }) : _vm._e()], 1)]);
6800
6805
  })], 2);
6801
6806
  };
6802
- var chatvue_type_template_id_3850420e_scoped_true_staticRenderFns = [];
6807
+ var chatvue_type_template_id_5ba393d7_scoped_true_staticRenderFns = [];
6803
6808
 
6804
6809
  ;// CONCATENATED MODULE: ./node_modules/axios/lib/helpers/bind.js
6805
6810
 
@@ -11137,17 +11142,17 @@ const cacheMessageList = [{
11137
11142
  // });
11138
11143
  // cache.session.setJSON('SRKJ_TOKEN_CACHE', userRes);
11139
11144
  // }
11140
- const getUserInfo = async (token, businessSource, fn) => {
11141
- await ssoAuth(token, businessSource).then(async ssoRes => {
11142
- if (ssoRes !== null && ssoRes !== void 0 && ssoRes.avatarUrl) {
11143
- cache.session.setJSON('USER_AVATAR_URL', ssoRes.avatarUrl);
11144
- } else {
11145
- cache.session.setJSON('USER_AVATAR_URL', '');
11146
- }
11147
- });
11148
- cache.session.setJSON('SRKJ_TOKEN_CACHE', token);
11149
- if (fn) fn();
11150
- };
11145
+ // export const getUserInfo = async (token, businessSource, fn) => {
11146
+ // await ssoAuth(token, businessSource).then(async (ssoRes) => {
11147
+ // if (ssoRes?.avatarUrl){
11148
+ // cache.session.setJSON('USER_AVATAR_URL', ssoRes.avatarUrl);
11149
+ // }else{
11150
+ // cache.session.setJSON('USER_AVATAR_URL', '');
11151
+ // }
11152
+ // });
11153
+ // cache.session.setJSON('SRKJ_TOKEN_CACHE', token);
11154
+ // if (fn) fn();
11155
+ // }
11151
11156
  ;// 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
11157
  var chat_toolsvue_type_template_id_7c882bfc_scoped_true_render = function render() {
11153
11158
  var _vm = this,
@@ -14642,10 +14647,10 @@ const signal = controller.signal;
14642
14647
  });
14643
14648
  ;// CONCATENATED MODULE: ./components/demo/src/chat.vue?vue&type=script&lang=js
14644
14649
  /* 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=3850420e&prod&lang=scss&scoped=true
14650
+ ;// 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
14651
  // extracted by mini-css-extract-plugin
14647
14652
 
14648
- ;// CONCATENATED MODULE: ./components/demo/src/chat.vue?vue&type=style&index=0&id=3850420e&prod&lang=scss&scoped=true
14653
+ ;// CONCATENATED MODULE: ./components/demo/src/chat.vue?vue&type=style&index=0&id=5ba393d7&prod&lang=scss&scoped=true
14649
14654
 
14650
14655
  ;// CONCATENATED MODULE: ./components/demo/src/chat.vue
14651
14656
 
@@ -14658,11 +14663,11 @@ const signal = controller.signal;
14658
14663
 
14659
14664
  var chat_component = normalizeComponent(
14660
14665
  src_chatvue_type_script_lang_js,
14661
- chatvue_type_template_id_3850420e_scoped_true_render,
14662
- chatvue_type_template_id_3850420e_scoped_true_staticRenderFns,
14666
+ chatvue_type_template_id_5ba393d7_scoped_true_render,
14667
+ chatvue_type_template_id_5ba393d7_scoped_true_staticRenderFns,
14663
14668
  false,
14664
14669
  null,
14665
- "3850420e",
14670
+ "5ba393d7",
14666
14671
  null
14667
14672
 
14668
14673
  )
@@ -15092,6 +15097,10 @@ var api = init(defaultConverter, { path: '/' });
15092
15097
  businessSource: {
15093
15098
  type: String,
15094
15099
  default: ''
15100
+ },
15101
+ navTopHeight: {
15102
+ type: Number,
15103
+ default: 0
15095
15104
  }
15096
15105
  },
15097
15106
  computed: {
@@ -15131,20 +15140,24 @@ var api = init(defaultConverter, { path: '/' });
15131
15140
  showFeedback: false
15132
15141
  };
15133
15142
  },
15134
- mounted() {
15143
+ async mounted() {
15135
15144
  if (!api.get("token")) {
15136
15145
  return this.$message.warning('未获取到登录信息,请重新登录');
15137
15146
  }
15138
- getUserInfo(api.get("token"), this.businessSource, async () => {
15139
- const wordRes = await queryCallWord(this.resId);
15140
- if (!wordRes) return;
15141
- const {
15142
- showMoreQA,
15143
- isShowFile
15144
- } = wordRes;
15145
- this.showMoreQA = showMoreQA;
15146
- this.showFile = !!isShowFile;
15147
- this.avatarUrl = cache.session.getJSON('USER_AVATAR_URL');
15147
+ await ssoAuth(api.get("token"), this.businessSource).then(async ssoRes => {
15148
+ if (ssoRes) {
15149
+ const wordRes = await queryCallWord(this.resId);
15150
+ if (!wordRes) return;
15151
+ const {
15152
+ showMoreQA,
15153
+ isShowFile
15154
+ } = wordRes;
15155
+ this.showMoreQA = showMoreQA;
15156
+ this.showFile = !!isShowFile;
15157
+ if (ssoRes !== null && ssoRes !== void 0 && ssoRes.avatarUrl) {
15158
+ this.avatarUrl = ssoRes.avatarUrl;
15159
+ }
15160
+ }
15148
15161
  });
15149
15162
  },
15150
15163
  methods: {
@@ -15201,10 +15214,10 @@ var api = init(defaultConverter, { path: '/' });
15201
15214
  });
15202
15215
  ;// CONCATENATED MODULE: ./components/demo/src/main.vue?vue&type=script&lang=js
15203
15216
  /* 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=c24193c6&prod&lang=scss&scoped=true
15217
+ ;// 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=43d95346&prod&lang=scss&scoped=true
15205
15218
  // extracted by mini-css-extract-plugin
15206
15219
 
15207
- ;// CONCATENATED MODULE: ./components/demo/src/main.vue?vue&type=style&index=0&id=c24193c6&prod&lang=scss&scoped=true
15220
+ ;// CONCATENATED MODULE: ./components/demo/src/main.vue?vue&type=style&index=0&id=43d95346&prod&lang=scss&scoped=true
15208
15221
 
15209
15222
  ;// CONCATENATED MODULE: ./components/demo/src/main.vue
15210
15223
 
@@ -15221,7 +15234,7 @@ var main_component = normalizeComponent(
15221
15234
  staticRenderFns,
15222
15235
  false,
15223
15236
  null,
15224
- "c24193c6",
15237
+ "43d95346",
15225
15238
  null
15226
15239
 
15227
15240
  )