byt-lingxiao-ai 0.3.13 → 0.3.15

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/README.md CHANGED
@@ -43,24 +43,13 @@ yarn add byt-lingxiao-ai
43
43
  ### 基本用法
44
44
 
45
45
  ```javascript
46
- // 引入Vue
47
- import Vue from 'vue'
48
- import App from './App.vue'
49
-
50
- // 引入Element UI
51
- import ElementUI from 'element-ui'
52
- import 'element-ui/lib/theme-chalk/index.css'
53
-
54
- // 引入凌霄AI组件
46
+ // 接入智能AI
47
+ import 'byt-lingxiao-ai/dist/index.css'
55
48
  import ChatWindow from 'byt-lingxiao-ai'
56
-
57
- // 注册组件
58
- Vue.use(ElementUI)
59
- Vue.use(ChatWindow)
60
-
61
- new Vue({
62
- render: h => h(App)
63
- }).$mount('#app')
49
+ Vue.use(ChatWindow, {
50
+ router,
51
+ store
52
+ })
64
53
  ```
65
54
 
66
55
  ```html
@@ -4,7 +4,6 @@ export default {
4
4
  data() {
5
5
  return {
6
6
  ws: null,
7
- wsUrl: WS_URL,
8
7
  isConnected: false,
9
8
  reconnectCount: 0, // 重连尝试次数
10
9
  maxReconnectAttempts: 3 // 最大重连尝试次数
@@ -13,7 +12,9 @@ export default {
13
12
  methods: {
14
13
  initWebSocket() {
15
14
  try {
16
- this.ws = new WebSocket('ws://10.2.233.41:9999');
15
+ // this.ws = new WebSocket('ws://10.2.233.41:9999');
16
+ // 测试
17
+ this.ws = new WebSocket(WS_URL);
17
18
  this.ws.binaryType = 'arraybuffer';
18
19
 
19
20
  this.ws.onopen = async () => {
@@ -31305,7 +31305,6 @@ const TIME_JUMP_POINTS_URL = '/minio/lingxiaoai/timeJumpPoints.json'; // 语音u
31305
31305
  data() {
31306
31306
  return {
31307
31307
  ws: null,
31308
- wsUrl: WS_URL,
31309
31308
  isConnected: false,
31310
31309
  reconnectCount: 0,
31311
31310
  // 重连尝试次数
@@ -31315,7 +31314,9 @@ const TIME_JUMP_POINTS_URL = '/minio/lingxiaoai/timeJumpPoints.json'; // 语音u
31315
31314
  methods: {
31316
31315
  initWebSocket() {
31317
31316
  try {
31318
- this.ws = new WebSocket('ws://10.2.233.41:9999');
31317
+ // this.ws = new WebSocket('ws://10.2.233.41:9999');
31318
+ // 测试
31319
+ this.ws = new WebSocket(WS_URL);
31319
31320
  this.ws.binaryType = 'arraybuffer';
31320
31321
  this.ws.onopen = async () => {
31321
31322
  console.log('WebSocket 连接成功');