diff --git a/.env.production b/.env.production index 8a20062..eb7fce3 100644 --- a/.env.production +++ b/.env.production @@ -4,10 +4,19 @@ NODE_ENV = production # 标题 VUE_APP_TITLE = 象纬云科 -# 接口地址 +# 测试环境 VUE_APP_API_BASEURL = https://dev.api.linkwing.com/api/v1 VUE_APP_API_DEV = https://dev.api.linkwing.com/api/v1 -# WS地址 VUE_APP_WS_URL = wss://dev.api.linkwing.com/wss VUE_APP_WSS_URL = wss://dev.api.linkwing.com/wss + +# 线上环境 +# 接口地址 +# VUE_APP_API_BASEURL = https://prod.api.linkwing.com/api/v1 +# VUE_APP_API_DEV = https://prod.api.linkwing.com/api/v1 + +# WS地址 +# VUE_APP_WS_URL = wss://prod.api.linkwing.com/wss +# VUE_APP_WSS_URL = wss://prod.api.linkwing.com/wss + diff --git a/src/api/model/customer.js b/src/api/model/customer.js index 5b8eb2c..06e26a5 100644 --- a/src/api/model/customer.js +++ b/src/api/model/customer.js @@ -65,4 +65,5 @@ export default { return await http.post(this.url, data); } }, + } diff --git a/src/components/scCustomer/index.vue b/src/components/scCustomer/index.vue index 9f7a74a..1ca5b98 100644 --- a/src/components/scCustomer/index.vue +++ b/src/components/scCustomer/index.vue @@ -21,7 +21,11 @@
-
{{item.from_user && item.from_user.name?item.from_user.name:'匿名'}}
+
+ {{item.created_at}} + {{item.from_user && item.from_user.name?item.from_user.name:'匿名'}} + {{item.created_at}} +
@@ -37,7 +41,7 @@
@@ -136,6 +140,15 @@ export default { typeActive(item){ this.params.type = item.value; }, + + handleKeydown(event){ + if(event.key === 'Enter' && !event.shiftKey){ + event.preventDefault(); // 阻止输入框的默认行为 + this.sendCustomer(); + }else if(event.key === 'Enter' && event.shiftKey){ + this.params.to_message += ''; + } + }, async sendCustomer() { if(this.params.to_message =="") return const res = await this.$API.customer.send.post(this.params); @@ -180,7 +193,7 @@ export default { .customerBox{ position: absolute; right: 40px; - bottom: 40px; + bottom: 80px; z-index: 1000; .img{ width: 56px; @@ -240,7 +253,7 @@ export default { padding: 10px; .msgItem{ display: flex; - margin-bottom: 8px; + margin-bottom: 12px; .avatar{ padding-right: 10px; } @@ -248,11 +261,23 @@ export default { .msgTitle{ padding: 0 0 8px 0; color: #555; + .time{ + margin-left: 8px; + font-size: 12px; + color: #888; + } + .leftTime{ + margin-right: 8px; + font-size: 12px; + color: #888; + } } .textCom{ background: #f5f5f5; border-radius: 4px; padding: 10px; + display: inline-block; + text-align: left; } } } @@ -263,12 +288,14 @@ export default { padding-right: 0; } .msgText{ + text-align: right; .msgTitle{ text-align: right; } .textCom{ background: var(--el-color-primary); color: var(--el-color-white); + text-align: left; } } } diff --git a/src/layout/index.vue b/src/layout/index.vue index 8d28a10..4d4d20f 100644 --- a/src/layout/index.vue +++ b/src/layout/index.vue @@ -287,6 +287,7 @@ this.$store.commit("set_repair_count", res.data.list_repair_info.repair_count); } let apiMenu = tool.objCopy(tool.data.get("MENU")); + if(apiMenu.length<1) return apiMenu.forEach(item=>{ if(item.name == 'order'){ item.meta.tag = 0; diff --git a/src/utils/request.js b/src/utils/request.js index b4832ee..7637261 100644 --- a/src/utils/request.js +++ b/src/utils/request.js @@ -3,6 +3,7 @@ import { ElNotification, ElMessageBox, ElMessage } from 'element-plus'; import sysConfig from "@/config"; import tool from '@/utils/tool'; import router from '@/router'; +import {closeSock} from "@/utils/websocket" axios.defaults.baseURL = '' @@ -52,7 +53,8 @@ axios.interceptors.response.use( done(); }, }).then(() => { - // closeSock(true); + closeSock(true); + tool.data.clear(); tool.cookie.remove("TOKEN"); router.replace({ path: "/login" }); }) diff --git a/src/views/docsManager/fileType.vue b/src/views/docsManager/fileType.vue index 2c04024..ed3ad30 100644 --- a/src/views/docsManager/fileType.vue +++ b/src/views/docsManager/fileType.vue @@ -65,11 +65,15 @@ export default { fileType:{ type:String, default:'txt' + }, + size:{ + type:String, + default:'large' } }, data(){ return{ - size:'large' + } }, mounted() { diff --git a/src/views/service/components/attachmentUpload.vue b/src/views/service/components/attachmentUpload.vue new file mode 100644 index 0000000..9d8b2b5 --- /dev/null +++ b/src/views/service/components/attachmentUpload.vue @@ -0,0 +1,320 @@ + + + + + diff --git a/src/views/service/components/customerRecords.vue b/src/views/service/components/customerRecords.vue index b8c5203..8db09b6 100644 --- a/src/views/service/components/customerRecords.vue +++ b/src/views/service/components/customerRecords.vue @@ -1,10 +1,56 @@ diff --git a/src/views/service/components/recordsList.vue b/src/views/service/components/recordsList.vue new file mode 100644 index 0000000..475f03b --- /dev/null +++ b/src/views/service/components/recordsList.vue @@ -0,0 +1,34 @@ + + + + + diff --git a/src/views/service/faq.vue b/src/views/service/faq.vue index 0b2c7bd..eab2ab6 100644 --- a/src/views/service/faq.vue +++ b/src/views/service/faq.vue @@ -26,7 +26,7 @@
-
{{contactsInfo.to_user && contactsInfo.to_user.name?contactsInfo.to_user.name:"匿名"}}
+
{{contactsInfo.from_user && contactsInfo.from_user.name?contactsInfo.from_user.name:"匿名"}}
@@ -37,18 +37,22 @@
-
{{item.from_user && item.from_user.name?item.from_user.name:'匿名'}}
+
+ {{item.created_at}} + {{item.from_user && item.from_user.name?item.from_user.name:'匿名'}} + {{item.created_at}} +
-
+
- - 文件 ==== - - + + + +
@@ -63,12 +67,12 @@
-
-
+
+
- +
@@ -104,12 +108,23 @@ + + +