diff --git a/jiuyi2/api/news.js b/jiuyi2/api/news.js index fa7ac454..2d9c258e 100644 --- a/jiuyi2/api/news.js +++ b/jiuyi2/api/news.js @@ -217,6 +217,17 @@ export const news = { method: 'GET' }) }, + + + // 客服发消息 + sendCusomterService(param) { + return util.request({ + url: `/user/chat/sendMsgToPlatformService`, + query: param.query, + data: param.data, + method: 'POST', + }) + }, } export default news \ No newline at end of file diff --git a/jiuyi2/api/shop.js b/jiuyi2/api/shop.js index 36402503..78776834 100644 --- a/jiuyi2/api/shop.js +++ b/jiuyi2/api/shop.js @@ -437,6 +437,18 @@ const shop = { method: 'GET', }) }, + + /** + * 获取店铺客服信息 + * @param {Object} param + */ + getCustomerService(param) { + return util.request({ + url: `/user/MCustomerService/random`, + method: 'GET', + query: param, + }) + }, } export default shop \ No newline at end of file diff --git a/jiuyi2/common/js/util.js b/jiuyi2/common/js/util.js index 0a05460f..62c310c5 100644 --- a/jiuyi2/common/js/util.js +++ b/jiuyi2/common/js/util.js @@ -213,7 +213,7 @@ const util = { responseType: params.responseType || 'text', // 请求成功返回 success: res => { - // console.log('request success', url, res, params.data ? params.data : '') + console.log('request success', url, res, params.data ? params.data : '') // 关闭加载效果 if (params.load) { uni.hideLoading() diff --git a/jiuyi2/components/shop/detail/footerMenu.vue b/jiuyi2/components/shop/detail/footerMenu.vue index 6be46c0e..ba7139bd 100644 --- a/jiuyi2/components/shop/detail/footerMenu.vue +++ b/jiuyi2/components/shop/detail/footerMenu.vue @@ -1,90 +1,121 @@ \ No newline at end of file diff --git a/jiuyi2/pages.json b/jiuyi2/pages.json index afb9b5e0..7b1e2cfc 100644 --- a/jiuyi2/pages.json +++ b/jiuyi2/pages.json @@ -1,6 +1,5 @@ { "pages": [ - { "path": "pages/index/index", "style": { @@ -92,12 +91,24 @@ "navigationBarTitleText": "问答页" } }, + { + "path": "pages/news/chat/customeChat", + "style": { + "navigationBarTitleText": "客服聊天" + } + }, { "path": "pages/news/red-envelope/index", "style": { "navigationBarTitleText": "红包详情" } }, + { + "path": "pages/news/goodsList/index", + "style": { + "navigationBarTitleText": "商品列表" + } + }, { "path": "pages/mine/mine", "style": { @@ -219,7 +230,6 @@ "navigationBarTitleText": "我的分享" } }, - { "path": "pages/index/deal", "style": { @@ -744,57 +754,59 @@ } } ], - - "subPackages": [{ - "root": "TUIKit", - "pages": [{ - "path": "components/TUIConversation/index", - "style": { - "navigationBarTitleText": "消息" + "subPackages": [ + { + "root": "TUIKit", + "pages": [ + { + "path": "components/TUIConversation/index", + "style": { + "navigationBarTitleText": "消息" + } + }, + { + "path": "components/TUIChat/index", + "style": { + "navigationBarTitleText": "消息" + } + }, + // 集成 chat 组件,必须配置该路径: 视频播放 + { + "path": "components/TUIChat/video-play", + "style": { + "navigationBarTitleText": "消息" + } + }, + { + "path": "components/TUIChat/web-view", + "style": { + "navigationBarTitleText": "消息" + } + }, + { + "path": "components/TUIContact/index", + "style": { + "navigationBarTitleText": "消息" + } + }, + { + "path": "components/TUIGroup/index", + "style": { + "navigationBarTitleText": "消息" + } + }, + { + "path": "components/TUISearch/index", + "style": { + "navigationBarTitleText": "聊天记录" + } } - }, - { - "path": "components/TUIChat/index", - "style": { - "navigationBarTitleText": "消息" - } - }, - // 集成 chat 组件,必须配置该路径: 视频播放 - { - "path": "components/TUIChat/video-play", - "style": { - "navigationBarTitleText": "消息" - } - }, - { - "path": "components/TUIChat/web-view", - "style": { - "navigationBarTitleText": "消息" - } - }, - { - "path": "components/TUIContact/index", - "style": { - "navigationBarTitleText": "消息" - } - }, - { - "path": "components/TUIGroup/index", - "style": { - "navigationBarTitleText": "消息" - } - }, - { - "path": "components/TUISearch/index", - "style": { - "navigationBarTitleText": "聊天记录" - } - } - ] - }], - + ] + } + ], "tabBar": { - "list": [{ + "list": [ + { "text": "视频", "pagePath": "pages/index/index" }, @@ -816,7 +828,6 @@ } ] }, - "globalStyle": { "navigationBarTextStyle": "black", "navigationBarTitleText": "九亿", @@ -826,14 +837,14 @@ "bounce": "none" //关闭窗口回弹效果 } }, - "condition": { "current": 0, - "list": [{ - "name": "test", - "path": "pages/index/index" - }] + "list": [ + { + "name": "test", + "path": "pages/index/index" + } + ] }, - "uniIdRouter": {} } \ No newline at end of file diff --git a/jiuyi2/pages/mine/homepage.vue b/jiuyi2/pages/mine/homepage.vue index 5310217a..d22444a0 100644 --- a/jiuyi2/pages/mine/homepage.vue +++ b/jiuyi2/pages/mine/homepage.vue @@ -187,14 +187,14 @@ proxy.$refs.menuRef.close() // util.logout(() => { + // #ifdef APP + plus.runtime.restart() + // #endif api.login.logout({ query: { phoneNumber: userinfo.phoneNumber, } }).then(rs => {}) - // #ifdef APP - plus.runtime.restart() - // #endif }) }) } diff --git a/jiuyi2/pages/news/chat/chat.vue b/jiuyi2/pages/news/chat/chat.vue index 6c9cc7a1..fd44076a 100644 --- a/jiuyi2/pages/news/chat/chat.vue +++ b/jiuyi2/pages/news/chat/chat.vue @@ -1,451 +1,458 @@