diff --git a/.env b/.env index b4ae1fd2..751991fd 100644 --- a/.env +++ b/.env @@ -5,12 +5,15 @@ SHOPRO_VERSION = v1.8.3 SHOPRO_BASE_URL = http://api-dashboard.yudao.iocoder.cn # 后端接口 - 测试环境(通过 process.env.NODE_ENV = development) -SHOPRO_DEV_BASE_URL = http://127.0.0.1:48080 +SHOPRO_DEV_BASE_URL = http://192.168.1.105:48080 ### SHOPRO_DEV_BASE_URL = http://yunai.natapp1.cc # 后端接口前缀(一般不建议调整) SHOPRO_API_PATH = /app-api +# 后端 websocket 接口前缀 +SHOPRO_WEBSOCKET_PATH = /infra/ws + # 开发环境运行端口 SHOPRO_DEV_PORT = 3000 diff --git a/pages/chat/components/chatBox.vue b/pages/chat/components/chatBox.vue new file mode 100644 index 00000000..5ca5980d --- /dev/null +++ b/pages/chat/components/chatBox.vue @@ -0,0 +1,456 @@ + + + + + diff --git a/pages/chat/components/constants.js b/pages/chat/components/constants.js new file mode 100644 index 00000000..0fd4e9ee --- /dev/null +++ b/pages/chat/components/constants.js @@ -0,0 +1,14 @@ +export const KeFuMessageContentTypeEnum = { + TEXT: 1, // 文本消息 + IMAGE: 2, // 图片消息 + VOICE: 3, // 语音消息 + VIDEO: 4, // 视频消息 + SYSTEM: 5, // 系统消息 + // ========== 商城特殊消息 ========== + PRODUCT: 10,// 商品消息 + ORDER: 11,// 订单消息" +}; +export const UserTypeEnum = { + MEMBER: 1, // 会员 面向 c 端,普通用户 + ADMIN: 2, // 管理员 面向 b 端,管理后台 +}; diff --git a/pages/chat/index.vue b/pages/chat/index.vue index 6c4bb1a3..ab27c44f 100644 --- a/pages/chat/index.vue +++ b/pages/chat/index.vue @@ -1,163 +1,14 @@