You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
1 lines
41 KiB
1 lines
41 KiB
{"version":3,"sources":["uni-app:///main.js","webpack:///C:/Users/liudan/Desktop/git/huajucanyin/pages/user/service.vue?2222","webpack:///C:/Users/liudan/Desktop/git/huajucanyin/pages/user/service.vue?cec8","webpack:///C:/Users/liudan/Desktop/git/huajucanyin/pages/user/service.vue?03b8","webpack:///C:/Users/liudan/Desktop/git/huajucanyin/pages/user/service.vue?3686","uni-app:///pages/user/service.vue","webpack:///C:/Users/liudan/Desktop/git/huajucanyin/pages/user/service.vue?18c1","webpack:///C:/Users/liudan/Desktop/git/huajucanyin/pages/user/service.vue?d837"],"names":["wx","__webpack_require_UNI_MP_PLUGIN__","__webpack_require__","createPage","Page","data","user_id","avatar","nickname","to_id","textMsg","scrollAnimation","scrollTop","scrollToView","msgList","msgImgList","emptybottom","RECORDER","isVoice","voiceTis","recordTis","recording","willStop","initPoint","identifier","Y","recordTimer","recordLength","AUDIO","playMsgid","VoiceTimer","popupLayerClass","hideMore","TabCur","hideEmoji","emojiList","QnUrl","onLoad","uni","onShow","methods","loadData","url","id","type","form_id","sendMsg","lastid","form","name","message","content","createtime","onChat","msg","addListMsg","addArticleMsg","addTextMsg","addVoiceMsg","addImgMsg","chooseImage","camera","getImage","sourceType","sizeType","success","src","filePath","formData","w","h","sendText","text","aiSend","showPic","indicator","current","urls","playVoice","voiceBegin","format","recordBegin","voiceCancel","voiceIng","voiceEnd","recordEnd","clearInterval","length","console","switchVoice","emojiData","categories","map","emotions","groups","replaceEmoji","tabSelect","setPicSize","showMore","openDrawer","hideDrawer","setTimeout","chooseEmoji","addEmoji","textareaFocus","textareaBlur","discard"],"mappings":";;;;;;;;;;;;;AAAA;AAGA;AACA;AAHA;AACAA,EAAE,CAACC,iCAAiC,GAAGC,mBAAmB;AAG1DC,UAAU,CAACC,gBAAI,CAAC,C;;;;;;;;;;;;;ACLhB;AAAA;AAAA;AAAA;AAAA;AAAA;AAAoH;AACpH;AAC2D;AACL;AACa;;;AAGnE;AACqK;AACrK,gBAAgB,+KAAU;AAC1B,EAAE,6EAAM;AACR,EAAE,kFAAM;AACR,EAAE,2FAAe;AACjB;AACA;AACA;AACA;AACA;AACA,EAAE,sFAAU;AACZ;AACA;;AAEA;AACe,gF;;;;;;;;;;;;ACvBf;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;;;;;;;;;;;;;ACAA;AAAA;AAAA;AAAA;AAAA;AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,GAAG;AACH;AACA,MAAM;AACN;AACA;AACA;AACA,OAAO;AACP;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;;;;ACxDA;AAAA;AAAA;AAAA;AAA8mB,CAAgB,2nBAAG,EAAC,C;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;ACkLloB;AAAA,eACA;EACAC;IACA;MACAC;MACAC;MACAC;MACAC;MACAC;MAAA;MACAC;MACAC;MACAC;MACAC;MACAC;MACA;MACAC;MACA;;MAEA;MACAC;MAEAC;MACAC;MACAC;MACAC;MACAC;MACAC;QAAAC;QAAAC;MAAA;MACAC;MACAC;MACA;MACAC;MACAC;MACAC;MACA;MACAC;MACA;MACAC;MACA;MACA;MACAC;MACAC;MACAC;MACAC;IACA;EACA;EACAC;IAAA;IACA;IACA;IACA;MACA;IACA;;IAEA;IACA;MACA;IACA;IACA;IACA;MACA;IACA;;IAEA;IACAC;EACA;EACAC;IACA;EACA;EACAC;IACA;IACAC;MAAA;MAAA;QAAA;UAAA;YAAA;cAAA;gBACA;kBACAC;kBACArC;oBACAsC;oBACAC;oBACAC;kBACA;gBACA;cAAA;cAAA;gBAAA;YAAA;UAAA;QAAA;MAAA;IACA;IACA;IACAC;MACA;MACA;QACAC;QACAA;MACA;MACA;QACAJ;QACAC;QACAnC;QACAuC;UACAL;UAAA;UACApC;UACA0C;QACA;QACAC;UACAN;UACAO;QACA;QACAC;MACA;MACA;MACA;MACA;MACA;QACAV;QACArC;MACA;IACA;IAEA;IACAgD;MAAA;MACA;QACA;QACAC;MACA;MACA;QACA;MACA;MACA;QACA;MACA;MACA;QACA;MACA;MACA;QACA;MACA;MACA;QACA;MACA;MACA;QACA;MACA;MACA;MACA;QACA;MACA;IACA;IAEA;IACAC;MACA;IACA;IACA;IACAC;MACA;IACA;IACA;IACAC;MACAH;MACA;IACA;IACA;IACAI;MACA;IACA;IACA;IACAC;MACAL;MACA;MACA;IACA;IAEA;IACAM;MACA;IACA;IACA;IACAC;MACA;IACA;IACA;IACAC;MAAA;MACA;MACAxB;QACAyB;QACAC;QAAA;QACAC;UACA;YACAvB;YACAuB;cACA;gBACA;gBACA3B;kBACA4B;kBACAD;oBACA;sBACAvB;sBACAyB;sBACAlB;sBACAmB;sBACAH;wBACA;0BAAAvB;0BAAA2B;0BAAAC;wBAAA;sBACA;oBACA;kBACA;gBACA;cACA;YACA;UACA;QACA;MACA;IACA;IACA;IACAC;MACA;MACA;QACA;MACA;MACA;QAAAC;MAAA;MACA;MACA;IACA;IACA;IACAC;MACA;QAAAD;MAAA;IACA;IACA;IACAE;MACApC;QACAqC;QACAC;QACAC;MACA;IACA;IACA;IACAC;MAAA;MACA;MACA;MACA;QACA;MACA;IACA;IACA;IACAC;MACA;QACA;MACA;MACA;MACA;MACA;QAAAC;MAAA;IACA;IACA;IACAC;MAAA;MACA;MACA;MACA;MACA;QACA;MACA;IACA;IACA;IACAC;MACA;MACA;MACA;MACA;MACA;IACA;IACA;IACAC;MACA;QACA;MACA;MACA;MACA;MACA;QACA;QACA;MACA;QACA;QACA;MACA;IACA;IACA;IACAC;MACA;QACA;MACA;MACA;MACA;MACA;MACA;IACA;IACA;IACAC;MAAA;MACAC;MACA;QACA;UACA5C;UACAuB;YACA;cACAvB;cACAyB;cACAlB;cACAmB;cACAH;gBACA;kBAAAsB;kBAAA7C;gBAAA;gBACAY;gBACA;kBACA;gBACA;cACA;YACA;UACA;QACA;QACAkC;MACA;QACAA;MACA;MACA;IACA;IACA;IACAC;MACA;MACA;IACA;IAEA;IACAC;MACA;QACAC;QACAC;MACAC;QACA;QACA;UACAC;UACAH;QACA;QACAG;QACAF;MACA;MACA;QAAAE;QAAAH;QAAAC;MAAA;IACA;IACA;IACAG;MAAA;MACA;MACA;QACA;MACA;MACA;IACA;IACA;IACAC;MACA;IACA;IACA;IACAC;MACA;MACA;MACA;MACA;QACA;QACA9C;QACAA;MACA;MACA;IACA;IACA;IACA+C;MACA;MACA;MACA;QACA;QACA;MACA;QACA;MACA;IACA;IACA;IACAC;MACA;MACA;IACA;IACA;IACAC;MAAA;MACA;MACA;MACAC;QACA;QACA;MACA;IACA;IACA;IACAC;MACA;MACA;QACA;QACA;MACA;QACA;MACA;IACA;IACA;IACAC;MACA;IACA;IAEA;IACAC;MACA;MACA;QACA;MACA;IACA;IACA;IACAC;MACA;IACA;IACA;IACAC;MACA;IACA;EACA;AACA;AAAA,2B;;;;;;;;;;;;;ACjlBA;AAAA;AAAA;AAAA;AAAq4B,CAAgB,o3BAAG,EAAC,C;;;;;;;;;;;ACAz5B;AACA,OAAO,KAAU,EAAE,kBAKd","file":"pages/user/service.js","sourcesContent":["import 'uni-pages';\n// @ts-ignore\nwx.__webpack_require_UNI_MP_PLUGIN__ = __webpack_require__;\nimport Vue from 'vue'\nimport Page from './pages/user/service.vue'\ncreatePage(Page)","import { render, staticRenderFns, recyclableRender, components } from \"./service.vue?vue&type=template&id=318b2e2c&\"\nvar renderjs\nimport script from \"./service.vue?vue&type=script&lang=js&\"\nexport * from \"./service.vue?vue&type=script&lang=js&\"\nimport style0 from \"./service.vue?vue&type=style&index=0&lang=css&\"\n\n\n/* normalize component */\nimport normalizer from \"!../../../../k/HBuilderX/plugins/uniapp-cli/node_modules/@dcloudio/vue-cli-plugin-uni/packages/vue-loader/lib/runtime/componentNormalizer.js\"\nvar component = normalizer(\n script,\n render,\n staticRenderFns,\n false,\n null,\n null,\n null,\n false,\n components,\n renderjs\n)\n\ncomponent.options.__file = \"pages/user/service.vue\"\nexport default component.exports","export * from \"-!../../../../k/HBuilderX/plugins/uniapp-cli/node_modules/@dcloudio/vue-cli-plugin-uni/packages/vue-loader/lib/loaders/templateLoader.js??vue-loader-options!../../../../k/HBuilderX/plugins/uniapp-cli/node_modules/@dcloudio/vue-cli-plugin-uni/packages/webpack-preprocess-loader/index.js??ref--17-0!../../../../k/HBuilderX/plugins/uniapp-cli/node_modules/@dcloudio/webpack-uni-mp-loader/lib/template.js!../../../../k/HBuilderX/plugins/uniapp-cli/node_modules/@dcloudio/vue-cli-plugin-uni/packages/webpack-uni-app-loader/page-meta.js!../../../../k/HBuilderX/plugins/uniapp-cli/node_modules/@dcloudio/vue-cli-plugin-uni/packages/vue-loader/lib/index.js??vue-loader-options!../../../../k/HBuilderX/plugins/uniapp-cli/node_modules/@dcloudio/webpack-uni-mp-loader/lib/style.js!./service.vue?vue&type=template&id=318b2e2c&\"","var components\nvar render = function () {\n var _vm = this\n var _h = _vm.$createElement\n var _c = _vm._self._c || _h\n var l0 = _vm.__map(_vm.msgList, function (row, index) {\n var $orig = _vm.__get_orig(row)\n var g0 =\n row.form.id == _vm.user_id && row.message.type == \"voice\"\n ? row.message.content.length\n : null\n var g1 =\n row.form.id == _vm.user_id && row.message.type == \"voice\"\n ? row.message.content.length\n : null\n var g2 =\n row.form.id == _vm.user_id\n ? _vm.$wanlshop.oss(row.form.avatar, 44, 44, 2, \"avatar\")\n : null\n var g3 =\n !(row.form.id == _vm.user_id) && row.form.avatar\n ? _vm.$wanlshop.oss(row.form.avatar)\n : null\n var g4 =\n !(row.form.id == _vm.user_id) && !row.form.avatar\n ? _vm.$wanlshop.appstc(\"/common/logo.png\")\n : null\n var g5 =\n !(row.form.id == _vm.user_id) && row.message.type == \"list\"\n ? row.message.content.length\n : null\n var g6 = !(row.form.id == _vm.user_id)\n ? _vm.$wanlshop.timeToChat(row.createtime)\n : null\n return {\n $orig: $orig,\n g0: g0,\n g1: g1,\n g2: g2,\n g3: g3,\n g4: g4,\n g5: g5,\n g6: g6,\n }\n })\n _vm.$mp.data = Object.assign(\n {},\n {\n $root: {\n l0: l0,\n },\n }\n )\n}\nvar recyclableRender = false\nvar staticRenderFns = []\nrender._withStripped = true\n\nexport { render, staticRenderFns, recyclableRender, components }","import mod from \"-!../../../../k/HBuilderX/plugins/uniapp-cli/node_modules/babel-loader/lib/index.js!../../../../k/HBuilderX/plugins/uniapp-cli/node_modules/@dcloudio/vue-cli-plugin-uni/packages/webpack-preprocess-loader/index.js??ref--13-1!../../../../k/HBuilderX/plugins/uniapp-cli/node_modules/@dcloudio/webpack-uni-mp-loader/lib/script.js!../../../../k/HBuilderX/plugins/uniapp-cli/node_modules/@dcloudio/vue-cli-plugin-uni/packages/vue-loader/lib/index.js??vue-loader-options!../../../../k/HBuilderX/plugins/uniapp-cli/node_modules/@dcloudio/webpack-uni-mp-loader/lib/style.js!./service.vue?vue&type=script&lang=js&\"; export default mod; export * from \"-!../../../../k/HBuilderX/plugins/uniapp-cli/node_modules/babel-loader/lib/index.js!../../../../k/HBuilderX/plugins/uniapp-cli/node_modules/@dcloudio/vue-cli-plugin-uni/packages/webpack-preprocess-loader/index.js??ref--13-1!../../../../k/HBuilderX/plugins/uniapp-cli/node_modules/@dcloudio/webpack-uni-mp-loader/lib/script.js!../../../../k/HBuilderX/plugins/uniapp-cli/node_modules/@dcloudio/vue-cli-plugin-uni/packages/vue-loader/lib/index.js??vue-loader-options!../../../../k/HBuilderX/plugins/uniapp-cli/node_modules/@dcloudio/webpack-uni-mp-loader/lib/style.js!./service.vue?vue&type=script&lang=js&\"","<template>\r\n\t<view class=\"wanl-chat\">\r\n\t\t<view @touchstart=\"hideDrawer\">\r\n\t\t\t<scroll-view\r\n\t\t\t\tclass=\"cu-chat\"\r\n\t\t\t\tscroll-y=\"true\"\r\n\t\t\t\t:scroll-with-animation=\"scrollAnimation\"\r\n\t\t\t\t:scroll-top=\"scrollTop\"\r\n\t\t\t\t:scroll-into-view=\"scrollToView\"\r\n\t\t\t\tupper-threshold=\"50\"\r\n\t\t\t>\r\n\t\t\t\t<view v-for=\"(row, index) in msgList\" :key=\"index\" :id=\"'msg' + row.id\">\r\n\t\t\t\t\t<view class=\"cu-item self\" v-if=\"row.form.id == user_id\">\r\n\t\t\t\t\t\t<view class=\"main\" v-if=\"row.message.type == 'text'\">\r\n\t\t\t\t\t\t\t<view class=\"content bg-green\"><rich-text :nodes=\"row.message.content.text\"></rich-text></view>\r\n\t\t\t\t\t\t</view>\r\n\t\t\t\t\t\t<!-- 图片消息 -->\r\n\t\t\t\t\t\t<view class=\"main\" v-if=\"row.message.type == 'img'\">\r\n\t\t\t\t\t\t\t<image\r\n\t\t\t\t\t\t\t\t:src=\"row.message.content.url\"\r\n\t\t\t\t\t\t\t\t@tap=\"showPic(row.message)\"\r\n\t\t\t\t\t\t\t\t:style=\"{ width: row.message.content.w + 'px', height: row.message.content.h + 'px' }\"\r\n\t\t\t\t\t\t\t></image>\r\n\t\t\t\t\t\t</view>\r\n\t\t\t\t\t\t<!-- 语音消息 -->\r\n\t\t\t\t\t\t<view class=\"main\" v-if=\"row.message.type == 'voice'\" @tap=\"playVoice(row.message)\" :class=\"playMsgid == row.message.id ? 'play' : ''\">\r\n\t\t\t\t\t\t\t<view class=\"action text-bold text-grey\" style=\"padding-right: 2rpx;\">\r\n\t\t\t\t\t\t\t\t{{ row.message.content.length }}\r\n\t\t\t\t\t\t\t\t<text class=\"wlIcon-miao\"></text>\r\n\t\t\t\t\t\t\t</view>\r\n\t\t\t\t\t\t\t<view class=\"content bg-green\">\r\n\t\t\t\t\t\t\t\t<text :style=\"{ width: row.message.content.length * 6 + 'rpx' }\"></text>\r\n\t\t\t\t\t\t\t\t<text class=\"wlIcon-yuyinyou text-xxl padding-left-xl\"></text>\r\n\t\t\t\t\t\t\t</view>\r\n\t\t\t\t\t\t</view>\r\n\t\t\t\t\t\t<view class=\"cu-avatar round\" :style=\"{ backgroundImage: 'url(' + $wanlshop.oss(row.form.avatar, 44, 44, 2, 'avatar') + ')' }\"></view>\r\n\t\t\t\t\t</view>\r\n\r\n\t\t\t\t\t<view class=\"cu-item\" v-else>\r\n\t\t\t\t\t\t<view class=\"cu-avatar round\" :style=\"{backgroundImage: 'url('+ $wanlshop.oss(row.form.avatar) +')'}\" v-if=\"row.form.avatar\"></view>\r\n\t\t\t\t\t\t<view class=\"cu-avatar round\" :style=\"{backgroundImage: 'url('+ $wanlshop.appstc('/common/logo.png') +')'}\" v-else></view>\r\n\t\t\t\t\t\t<!-- 文字消息 -->\r\n\t\t\t\t\t\t<view class=\"main\" v-if=\"row.message.type == 'text'\">\r\n\t\t\t\t\t\t\t<view class=\"content\"><rich-text :nodes=\"row.message.content.text\"></rich-text></view>\r\n\t\t\t\t\t\t</view>\r\n\t\t\t\t\t\t<!-- 列表消息 -->\r\n\t\t\t\t\t\t<view class=\"main\" v-if=\"row.message.type == 'list'\">\r\n\t\t\t\t\t\t\t<view class=\"content\">\r\n\t\t\t\t\t\t\t\t<view class=\"list\">\r\n\t\t\t\t\t\t\t\t\t<view v-if=\"row.message.content.length > 0\">\r\n\t\t\t\t\t\t\t\t\t\t<view>\r\n\t\t\t\t\t\t\t\t\t\t\t您是否想问 ?\r\n\t\t\t\t\t\t\t\t\t\t\t<view class=\"ai solid-top solid-bottom\">\r\n\t\t\t\t\t\t\t\t\t\t\t\t<view v-for=\"(item, index) in row.message.content\" :key=\"item.id\" @tap=\"aiSend(item.keywords?item.keywords:'未设置关键字')\" class=\"text-cut\"><text>{{item.title}}</text></view>\r\n\t\t\t\t\t\t\t\t\t\t\t</view>\r\n\t\t\t\t\t\t\t\t\t\t</view>\r\n\t\t\t\t\t\t\t\t\t\t<view>\r\n\t\t\t\t\t\t\t\t\t\t\t都不是?您可以 <text @tap=\"aiSend('人工客服')\">点击此处</text> ,或者回复人工\r\n\t\t\t\t\t\t\t\t\t\t</view>\r\n\t\t\t\t\t\t\t\t\t</view>\r\n\t\t\t\t\t\t\t\t\t<view v-else>\r\n\t\t\t\t\t\t\t\t\t\t没有任何相关帮助内容,<text @tap=\"aiSend('人工客服')\">点击此处</text> 或者回复人工\r\n\t\t\t\t\t\t\t\t\t</view>\r\n\t\t\t\t\t\t\t\t</view>\r\n\t\t\t\t\t\t\t</view>\r\n\t\t\t\t\t\t</view>\r\n\t\t\t\t\t\t<!-- 文章消息 -->\r\n\t\t\t\t\t\t<view class=\"main\" v-if=\"row.message.type == 'article'\" @tap=\"onDetails(row.message.content.id, row.message.content.title)\">\r\n\t\t\t\t\t\t\t<view class=\"content\">\r\n\t\t\t\t\t\t\t\t<view style=\"width: 100%;\">\r\n\t\t\t\t\t\t\t\t\t<view>\r\n\t\t\t\t\t\t\t\t\t\t{{row.message.content.title}}\r\n\t\t\t\t\t\t\t\t\t</view>\r\n\t\t\t\t\t\t\t\t\t<view class=\"article solid-top\">\r\n\t\t\t\t\t\t\t\t\t\t<rich-text :nodes=\"row.message.content.content\"></rich-text>\r\n\t\t\t\t\t\t\t\t\t</view>\r\n\t\t\t\t\t\t\t\t</view>\r\n\t\t\t\t\t\t\t</view>\r\n\t\t\t\t\t\t</view>\r\n\t\t\t\t\t\t<!-- 图片消息 -->\r\n\t\t\t\t\t\t<view class=\"main\" v-if=\"row.message.type == 'img'\">\r\n\t\t\t\t\t\t\t<image\r\n\t\t\t\t\t\t\t\t:src=\"row.message.content.url\"\r\n\t\t\t\t\t\t\t\t@tap=\"showPic(row.message)\"\r\n\t\t\t\t\t\t\t\t:style=\"{ width: row.message.content.w + 'px', height: row.message.content.h + 'px' }\"\r\n\t\t\t\t\t\t\t></image>\r\n\t\t\t\t\t\t</view>\r\n\t\t\t\t\t\t<view class=\"date\">{{$wanlshop.timeToChat(row.createtime)}} </view>\r\n\t\t\t\t\t</view>\r\n\t\t\t\t</view>\r\n\t\t\t</scroll-view>\r\n\t\t</view>\r\n\t\t<!-- 抽屉栏 -->\r\n\t\t<view class=\"popup-layer\" :class=\"{showLayer: popupLayerClass}\" @touchmove.stop.prevent=\"discard\">\r\n\t\t\t<!-- 表情 -->\r\n\t\t\t<view :class=\"{ hidden: hideEmoji }\">\r\n\t\t\t\t<view class=\"emoji\">\r\n\t\t\t\t\t<scroll-view class=\"emojinav\" scroll-x scroll-with-animation>\r\n\t\t\t\t\t\t<view class=\"item\">\r\n\t\t\t\t\t\t\t<view\r\n\t\t\t\t\t\t\t\t:class=\"item == TabCur ? 'emojibg' : ''\"\r\n\t\t\t\t\t\t\t\tv-for=\"(item, index) in emojiList.categories\"\r\n\t\t\t\t\t\t\t\t:key=\"index\"\r\n\t\t\t\t\t\t\t\t@tap=\"tabSelect\"\r\n\t\t\t\t\t\t\t\t:data-id=\"item\"\r\n\t\t\t\t\t\t\t\t:style=\"{ backgroundImage: 'url(' + emojiList.groups[item][0].url + ')' }\"\r\n\t\t\t\t\t\t\t></view>\r\n\t\t\t\t\t\t</view>\r\n\t\t\t\t\t</scroll-view>\r\n\t\t\t\t\t<!-- 列表 -->\r\n\t\t\t\t\t<scroll-view v-for=\"(emoji, groups) in emojiList.groups\" :key=\"groups\" v-if=\"TabCur == groups\" class=\"subject\" scroll-y scroll-with-animation>\r\n\t\t\t\t\t\t<view class=\"item grid margin-bottom text-center col-5\">\r\n\t\t\t\t\t\t\t<view v-for=\"(item, index) in emoji\" :key=\"index\" @tap=\"addEmoji(item.value)\" :style=\"{ backgroundImage: 'url(' + item.url + ')' }\"></view>\r\n\t\t\t\t\t\t</view>\r\n\t\t\t\t\t</scroll-view>\r\n\t\t\t\t</view>\r\n\t\t\t</view>\r\n\t\t\t<!-- 更多功能-->\r\n\t\t\t<view class=\"solid-top\" :class=\"{ hidden: hideMore }\">\r\n\t\t\t\t<view class=\"opmenu solid-top\">\r\n\t\t\t\t\t<view class=\"box\" @tap=\"chooseImage\">\r\n\t\t\t\t\t\t<view class=\"icon\"><text class=\"wlIcon-tupian1\"></text></view>\r\n\t\t\t\t\t\t<text class=\"text-sm\">照片</text>\r\n\t\t\t\t\t</view>\r\n\t\t\t\t\t<!-- #ifndef H5 -->\r\n\t\t\t\t\t<view class=\"box\" @tap=\"camera\">\r\n\t\t\t\t\t\t<view class=\"icon\"><text class=\"wlIcon-31paishexuanzhong\"></text></view>\r\n\t\t\t\t\t\t<text class=\"text-sm\">拍摄</text>\r\n\t\t\t\t\t</view>\r\n\t\t\t\t\t<!-- #endif -->\r\n\t\t\t\t</view>\r\n\t\t\t</view>\r\n\t\t</view>\r\n\t\t<!-- 底部输入栏 -->\r\n\t\t<view class=\"input-box\" :class=\"{ emptybottom: emptybottom, showLayer: popupLayerClass}\" @touchmove.stop.prevent=\"discard\">\r\n\t\t\t<!-- H5下不能录音,输入栏布局改动一下 -->\r\n\t\t\t<!-- #ifndef H5 -->\r\n\t\t\t<view class=\"voice\"><view :class=\"isVoice ? 'wlIcon-jianpanqiehuan' : 'wlIcon-yuyin'\" @tap=\"switchVoice\"></view></view>\r\n\t\t\t<!-- #endif -->\r\n\r\n\t\t\t<!-- #ifdef H5 -->\r\n\t\t\t<view class=\"more\" @tap=\"showMore\"><view class=\"wlIcon-yuanquanjiahao\"></view></view>\r\n\t\t\t<!-- #endif -->\r\n\t\t\t<view class=\"textbox\">\r\n\t\t\t\t<view\r\n\t\t\t\t\tclass=\"voice-mode\"\r\n\t\t\t\t\t:class=\"[isVoice ? '' : 'hidden', recording ? 'recording' : '']\"\r\n\t\t\t\t\t@touchstart=\"voiceBegin\"\r\n\t\t\t\t\t@touchmove.stop.prevent=\"voiceIng\"\r\n\t\t\t\t\t@touchend=\"voiceEnd\"\r\n\t\t\t\t\t@touchcancel=\"voiceCancel\"\r\n\t\t\t\t>\r\n\t\t\t\t\t{{ voiceTis }}\r\n\t\t\t\t</view>\r\n\t\t\t\t<view class=\"text-mode\" :class=\"isVoice ? 'hidden' : ''\">\r\n\t\t\t\t\t<view class=\"box\">\r\n\t\t\t\t\t\t<textarea auto-height=\"true\" maxlength=\"300\" :show-confirm-bar=\"false\" cursor-spacing=\"90\" v-model=\"textMsg\" @focus=\"textareaFocus\" @blur=\"textareaBlur\" @confirm=\"sendText\" />\r\n\t\t\t\t\t</view>\r\n\t\t\t\t\t<view class=\"em\" @tap=\"chooseEmoji\"><view class=\"wlIcon-biaoqing2\"></view></view>\r\n\t\t\t\t</view>\r\n\t\t\t</view>\r\n\t\t\t<!-- #ifndef H5 -->\r\n\t\t\t<view class=\"more\" @tap=\"showMore\" style=\"margin-right: -12rpx;\"><view class=\"wlIcon-yuanquanjiahao\"></view></view>\r\n\t\t\t<!-- #endif -->\r\n\t\t\t<view class=\"send\" :class=\"isVoice ? 'hidden' : ''\" @tap=\"sendText\">\r\n\t\t\t\t<text class=\"wlIcon-zhifeiji\" v-if=\"textMsg\"></text>\r\n\t\t\t\t<text class=\"wlIcon-fasong\" v-else></text>\r\n\t\t\t</view>\r\n\t\t</view>\r\n\t\t<!-- 录音UI效果 -->\r\n\t\t<view class=\"record\" :class=\"recording ? '' : 'hidden'\">\r\n\t\t\t<view class=\"ing\" :class=\"willStop ? 'hidden' : ''\"><view class=\"wlIcon-huatong01\"></view></view>\r\n\t\t\t<view class=\"cancel\" :class=\"willStop ? '' : 'hidden'\"><view class=\"wlIcon-shanchu2\"></view></view>\r\n\t\t\t<view class=\"tis\" :class=\"willStop ? 'change' : ''\">{{ recordTis }}</view>\r\n\t\t</view>\r\n\t</view>\r\n</template>\r\n<script>\r\nconst emotions = require('@/static/json/emotions.json');\r\nexport default {\r\n\tdata() {\r\n\t\treturn {\r\n\t\t\tuser_id: this.$store.state.user.id,\r\n\t\t\tavatar: this.$store.state.user.avatar,\r\n\t\t\tnickname: this.$store.state.user.nickname,\r\n\t\t\tto_id: 0,\r\n\t\t\ttextMsg: '', //文字消息\r\n\t\t\tscrollAnimation: false,\r\n\t\t\tscrollTop: 0,\r\n\t\t\tscrollToView: '',\r\n\t\t\tmsgList: [],\r\n\t\t\tmsgImgList: [],\r\n\t\t\t// 取消底部\r\n\t\t\temptybottom: false,\r\n\t\t\t//录音相关参数\r\n\t\t\t// #ifndef H5\r\n\t\t\t//H5不能录音\r\n\t\t\tRECORDER: uni.getRecorderManager(),\r\n\t\t\t// #endif\r\n\t\t\tisVoice: false,\r\n\t\t\tvoiceTis: '按住 说话',\r\n\t\t\trecordTis: '手指上滑 取消发送',\r\n\t\t\trecording: false,\r\n\t\t\twillStop: false,\r\n\t\t\tinitPoint: { identifier: 0, Y: 0 },\r\n\t\t\trecordTimer: null,\r\n\t\t\trecordLength: 0,\r\n\t\t\t//播放语音相关参数\r\n\t\t\tAUDIO: uni.createInnerAudioContext(),\r\n\t\t\tplayMsgid: null,\r\n\t\t\tVoiceTimer: null,\r\n\t\t\t// 抽屉参数\r\n\t\t\tpopupLayerClass: false,\r\n\t\t\t// more参数\r\n\t\t\thideMore: true,\r\n\t\t\t//表情定义\r\n\t\t\t//表情\r\n\t\t\tTabCur: '默认',\r\n\t\t\thideEmoji: true,\r\n\t\t\temojiList: this.emojiData(),\r\n\t\t\tQnUrl: ''\r\n\t\t};\r\n\t},\r\n\tonLoad(option) {\r\n\t\tthis.loadData();\r\n\t\t//语音自然播放结束\r\n\t\tthis.AUDIO.onEnded(res => {\r\n\t\t\tthis.playMsgid = null;\r\n\t\t});\r\n\t\t// #ifndef H5\r\n\t\t//录音开始事件\r\n\t\tthis.RECORDER.onStart(e => {\r\n\t\t\tthis.recordBegin(e);\r\n\t\t});\r\n\t\t//录音结束事件\r\n\t\tthis.RECORDER.onStop(e => {\r\n\t\t\tthis.recordEnd(e);\r\n\t\t});\r\n\t\t// #endif\r\n\t\t// 监听服务消息\r\n\t\tuni.$on('onService', this.onChat);\r\n\t},\r\n\tonShow() {\r\n\t\tthis.scrollTop = 9999999;\r\n\t},\r\n\tmethods: {\r\n\t\t// 自动回复\r\n\t\tasync loadData() {\r\n\t\t\tthis.$api.post({\r\n\t\t\t\turl: '/wanlshop/chat/hello',\r\n\t\t\t\tdata: {\r\n\t\t\t\t\tid: 1,\r\n\t\t\t\t\ttype: 'service',\r\n\t\t\t\t\tform_id: this.user_id\r\n\t\t\t\t}\r\n\t\t\t});\r\n\t\t},\r\n\t\t// 发送消息\r\n\t\tsendMsg(content, type) {\r\n\t\t\tlet lastid = 2;\r\n\t\t\tif (this.msgList.length) {\r\n\t\t\t\tlastid = this.msgList[this.msgList.length - 1].id;\r\n\t\t\t\tlastid++;\r\n\t\t\t}\r\n\t\t\tlet data = {\r\n\t\t\t\tid: lastid,\r\n\t\t\t\ttype: 'service',\r\n\t\t\t\tto_id: this.to_id,\r\n\t\t\t\tform: {\r\n\t\t\t\t\tid: this.user_id, //本人\r\n\t\t\t\t\tavatar: this.avatar,\r\n\t\t\t\t\tname: this.nickname\r\n\t\t\t\t},\r\n\t\t\t\tmessage: {\r\n\t\t\t\t\ttype: type,\r\n\t\t\t\t\tcontent: content\r\n\t\t\t\t},\r\n\t\t\t\tcreatetime: parseInt(new Date().getTime() / 1000)\r\n\t\t\t};\r\n\t\t\t// 深拷贝移除数据绑定\r\n\t\t\tthis.onChat(JSON.parse(JSON.stringify(data)), true);\r\n\t\t\t// 发送给服务器\r\n\t\t\tthis.$api.post({\r\n\t\t\t\turl: '/wanlshop/chat/service',\r\n\t\t\t\tdata: data\r\n\t\t\t});\r\n\t\t},\r\n\r\n\t\t// 接收服务器和本地消息\r\n\t\tonChat(msg, type) {\r\n\t\t\tif (!type) {\r\n\t\t\t\tthis.to_id = msg.form.id;\r\n\t\t\t\tmsg.form.hasOwnProperty('name')?this.$wanlshop.title(msg.form.name):'';\r\n\t\t\t}\r\n\t\t\tif (msg.message.type == 'list') {\r\n\t\t\t\tthis.addListMsg(msg);\r\n\t\t\t}\r\n\t\t\tif (msg.message.type == 'article') {\r\n\t\t\t\tthis.addArticleMsg(msg);\r\n\t\t\t}\r\n\t\t\tif (msg.message.type == 'text') {\r\n\t\t\t\tthis.addTextMsg(msg);\r\n\t\t\t}\r\n\t\t\tif (msg.message.type == 'voice') {\r\n\t\t\t\tthis.addVoiceMsg(msg);\r\n\t\t\t}\r\n\t\t\tif (msg.message.type == 'img') {\r\n\t\t\t\tthis.addImgMsg(msg);\r\n\t\t\t}\r\n\t\t\tif (msg.message.type == 'end') {\r\n\t\t\t\tthis.$wanlshop.msg(msg.message.content);\r\n\t\t\t}\r\n\t\t\t// 滚动到底\r\n\t\t\tthis.$nextTick(() => {\r\n\t\t\t\tthis.scrollToView = 'msg' + msg.id;\r\n\t\t\t});\r\n\t\t},\r\n\t\t\r\n\t\t// 添加语音消息到列表\r\n\t\taddListMsg(msg) {\r\n\t\t\tthis.msgList.push(msg);\r\n\t\t},\r\n\t\t// 添加语音消息到列表\r\n\t\taddArticleMsg(msg) {\r\n\t\t\tthis.msgList.push(msg);\r\n\t\t},\r\n\t\t// 添加文字消息到列表\r\n\t\taddTextMsg(msg) {\r\n\t\t\tmsg.message.content.text = this.replaceEmoji(msg.message.content.text);\r\n\t\t\tthis.msgList.push(msg);\r\n\t\t},\r\n\t\t// 添加语音消息到列表\r\n\t\taddVoiceMsg(msg) {\r\n\t\t\tthis.msgList.push(msg);\r\n\t\t},\r\n\t\t// 添加图片消息到列表\r\n\t\taddImgMsg(msg) {\r\n\t\t\tmsg.message.content = this.setPicSize(msg.message.content);\r\n\t\t\tthis.msgImgList.push(msg.message.content.url);\r\n\t\t\tthis.msgList.push(msg);\r\n\t\t},\r\n\r\n\t\t// 选择图片发送\r\n\t\tchooseImage() {\r\n\t\t\tthis.getImage('album');\r\n\t\t},\r\n\t\t//拍照发送\r\n\t\tcamera() {\r\n\t\t\tthis.getImage('camera');\r\n\t\t},\r\n\t\t//选照片 or 拍照\r\n\t\tgetImage(type) {\r\n\t\t\tthis.hideDrawer();\r\n\t\t\tuni.chooseImage({\r\n\t\t\t\tsourceType: [type],\r\n\t\t\t\tsizeType: ['original', 'compressed'], //可以指定是原图还是压缩图,默认二者都有\r\n\t\t\t\tsuccess: res => {\r\n\t\t\t\t\tthis.$api.get({\r\n\t\t\t\t\t\turl: '/wanlshop/common/uploadData',\r\n\t\t\t\t\t\tsuccess: updata => {\r\n\t\t\t\t\t\t\tfor (let i = 0; i < res.tempFilePaths.length; i++) {\r\n\t\t\t\t\t\t\t\t// 读取图片宽高\r\n\t\t\t\t\t\t\t\tuni.getImageInfo({\r\n\t\t\t\t\t\t\t\t\tsrc: res.tempFilePaths[i],\r\n\t\t\t\t\t\t\t\t\tsuccess: image => {\r\n\t\t\t\t\t\t\t\t\t\tthis.$api.upload({\r\n\t\t\t\t\t\t\t\t\t\t\turl: updata.uploadurl,\r\n\t\t\t\t\t\t\t\t\t\t\tfilePath: image.path,\r\n\t\t\t\t\t\t\t\t\t\t\tname: 'file',\r\n\t\t\t\t\t\t\t\t\t\t\tformData: updata.storage == 'local' ? null : updata.multipart,\r\n\t\t\t\t\t\t\t\t\t\t\tsuccess: data => {\r\n\t\t\t\t\t\t\t\t\t\t\t\tthis.sendMsg({ url: data.fullurl, w: image.width, h: image.height }, 'img');\r\n\t\t\t\t\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\t\t\t\t});\r\n\t\t\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\t\t});\r\n\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t});\r\n\t\t\t\t}\r\n\t\t\t});\r\n\t\t},\r\n\t\t// 发送文字消息\r\n\t\tsendText() {\r\n\t\t\tthis.hideDrawer(); //隐藏抽屉\r\n\t\t\tif (!this.textMsg) {\r\n\t\t\t\treturn;\r\n\t\t\t}\r\n\t\t\tlet msg = { text: this.textMsg };\r\n\t\t\tthis.sendMsg(msg, 'text');\r\n\t\t\tthis.textMsg = ''; //清空输入框\r\n\t\t},\r\n\t\t// AI发送\r\n\t\taiSend(text) {\r\n\t\t\tthis.sendMsg({ text: text }, 'text');\r\n\t\t},\r\n\t\t// 预览图片\r\n\t\tshowPic(message) {\r\n\t\t\tuni.previewImage({\r\n\t\t\t\tindicator: 'none',\r\n\t\t\t\tcurrent: message.content.url,\r\n\t\t\t\turls: this.msgImgList\r\n\t\t\t});\r\n\t\t},\r\n\t\t// 播放语音\r\n\t\tplayVoice(message) {\r\n\t\t\tthis.playMsgid = message.id;\r\n\t\t\tthis.AUDIO.src = message.content.url;\r\n\t\t\tthis.$nextTick(() => {\r\n\t\t\t\tthis.AUDIO.play();\r\n\t\t\t});\r\n\t\t},\r\n\t\t// 录音开始\r\n\t\tvoiceBegin(e) {\r\n\t\t\tif (e.touches.length > 1) {\r\n\t\t\t\treturn;\r\n\t\t\t}\r\n\t\t\tthis.initPoint.Y = e.touches[0].clientY;\r\n\t\t\tthis.initPoint.identifier = e.touches[0].identifier;\r\n\t\t\tthis.RECORDER.start({ format: 'mp3' }); //录音开始,\r\n\t\t},\r\n\t\t//录音开始UI效果\r\n\t\trecordBegin(e) {\r\n\t\t\tthis.recording = true;\r\n\t\t\tthis.voiceTis = '松开 结束';\r\n\t\t\tthis.recordLength = 0;\r\n\t\t\tthis.recordTimer = setInterval(() => {\r\n\t\t\t\tthis.recordLength++;\r\n\t\t\t}, 1000);\r\n\t\t},\r\n\t\t// 录音被打断\r\n\t\tvoiceCancel() {\r\n\t\t\tthis.recording = false;\r\n\t\t\tthis.voiceTis = '按住 说话';\r\n\t\t\tthis.recordTis = '手指上滑 取消发送';\r\n\t\t\tthis.willStop = true; //不发送录音\r\n\t\t\tthis.RECORDER.stop(); //录音结束\r\n\t\t},\r\n\t\t// 录音中(判断是否触发上滑取消发送)\r\n\t\tvoiceIng(e) {\r\n\t\t\tif (!this.recording) {\r\n\t\t\t\treturn;\r\n\t\t\t}\r\n\t\t\tlet touche = e.touches[0];\r\n\t\t\t//上滑一个导航栏的高度触发上滑取消发送\r\n\t\t\tif (this.initPoint.Y - touche.clientY >= uni.upx2px(200)) {\r\n\t\t\t\tthis.willStop = true;\r\n\t\t\t\tthis.recordTis = '松开手指 取消发送';\r\n\t\t\t} else {\r\n\t\t\t\tthis.willStop = false;\r\n\t\t\t\tthis.recordTis = '手指上滑 取消发送';\r\n\t\t\t}\r\n\t\t},\r\n\t\t// 结束录音\r\n\t\tvoiceEnd(e) {\r\n\t\t\tif (!this.recording) {\r\n\t\t\t\treturn;\r\n\t\t\t}\r\n\t\t\tthis.recording = false;\r\n\t\t\tthis.voiceTis = '按住 说话';\r\n\t\t\tthis.recordTis = '手指上滑 取消发送';\r\n\t\t\tthis.RECORDER.stop(); //录音结束\r\n\t\t},\r\n\t\t//录音结束(回调文件)\r\n\t\trecordEnd(e) {\r\n\t\t\tclearInterval(this.recordTimer);\r\n\t\t\tif (!this.willStop) {\r\n\t\t\t\tthis.$api.get({\r\n\t\t\t\t\turl: '/wanlshop/common/uploadData',\r\n\t\t\t\t\tsuccess: updata => {\r\n\t\t\t\t\t\tthis.$api.upload({\r\n\t\t\t\t\t\t\turl: updata.uploadurl,\r\n\t\t\t\t\t\t\tfilePath: e.tempFilePath,\r\n\t\t\t\t\t\t\tname: 'file',\r\n\t\t\t\t\t\t\tformData: updata.storage == 'local' ? null : updata.multipart,\r\n\t\t\t\t\t\t\tsuccess: data => {\r\n\t\t\t\t\t\t\t\tlet msg = {length: 0, url: data.fullurl};\r\n\t\t\t\t\t\t\t\tmsg.length = this.recordLength % 60;\r\n\t\t\t\t\t\t\t\tif (msg.length > 0) {\r\n\t\t\t\t\t\t\t\t\tthis.sendMsg(msg, 'voice');\r\n\t\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t});\r\n\t\t\t\t\t}\r\n\t\t\t\t});\r\n\t\t\t\tconsole.log('录音结束');\r\n\t\t\t} else {\r\n\t\t\t\tconsole.log('取消发送录音');\r\n\t\t\t}\r\n\t\t\tthis.willStop = false;\r\n\t\t},\r\n\t\t// 切换语音/文字输入\r\n\t\tswitchVoice() {\r\n\t\t\tthis.hideDrawer();\r\n\t\t\tthis.isVoice = this.isVoice ? false : true;\r\n\t\t},\r\n\r\n\t\t// 表情数据\r\n\t\temojiData() {\r\n\t\t\tvar groups = {},\r\n\t\t\t\tcategories = [],\r\n\t\t\t\tmap = {};\r\n\t\t\temotions.forEach(emotion => {\r\n\t\t\t\tvar cate = emotion.category.length > 0 ? emotion.category : '默认';\r\n\t\t\t\tif (!groups[cate]) {\r\n\t\t\t\t\tgroups[cate] = [];\r\n\t\t\t\t\tcategories.push(cate);\r\n\t\t\t\t}\r\n\t\t\t\tgroups[cate].push(emotion);\r\n\t\t\t\tmap[emotion.phrase] = emotion.icon;\r\n\t\t\t});\r\n\t\t\treturn { groups, categories, map };\r\n\t\t},\r\n\t\t//替换表情符号为图片\r\n\t\treplaceEmoji(str) {\r\n\t\t\t// 这里处理 链接 换行符\r\n\t\t\tlet replacedStr = str.replace(/\\[([^(\\]|\\[)]*)\\]/g, (item, index) => {\r\n\t\t\t\treturn '<img src=\"' + this.emojiList.map[item] + '\" width=\"18rpx\">';\r\n\t\t\t});\r\n\t\t\treturn replacedStr.replace(/(\\r\\n)|(\\n)/g, '<br>');\r\n\t\t},\r\n\t\t// 表情tab\r\n\t\ttabSelect(e) {\r\n\t\t\tthis.TabCur = e.currentTarget.dataset.id;\r\n\t\t},\r\n\t\t//处理图片尺寸,如果不处理宽高,新进入页面加载图片时候会闪\r\n\t\tsetPicSize(content) {\r\n\t\t\t// 让图片最长边等于设置的最大长度,短边等比例缩小,图片控件真实改变,区别于aspectFit方式。\r\n\t\t\tlet maxW = uni.upx2px(350); //350是定义消息图片最大宽度\r\n\t\t\tlet maxH = uni.upx2px(350); //350是定义消息图片最大高度\r\n\t\t\tif (content.w > maxW || content.h > maxH) {\r\n\t\t\t\tlet scale = content.w / content.h;\r\n\t\t\t\tcontent.w = scale > 1 ? maxW : maxH * scale;\r\n\t\t\t\tcontent.h = scale > 1 ? maxW / scale : maxH;\r\n\t\t\t}\r\n\t\t\treturn content;\r\n\t\t},\r\n\t\t//更多功能(点击+弹出)\r\n\t\tshowMore() {\r\n\t\t\tthis.isVoice = false;\r\n\t\t\tthis.hideEmoji = true;\r\n\t\t\tif (this.hideMore) {\r\n\t\t\t\tthis.hideMore = false;\r\n\t\t\t\tthis.openDrawer();\r\n\t\t\t} else {\r\n\t\t\t\tthis.hideDrawer();\r\n\t\t\t}\r\n\t\t},\r\n\t\t// 打开抽屉\r\n\t\topenDrawer() {\r\n\t\t\tthis.emptybottom = true;\r\n\t\t\tthis.popupLayerClass = true;\r\n\t\t},\r\n\t\t// 隐藏抽屉\r\n\t\thideDrawer() {\r\n\t\t\tthis.emptybottom = false;\r\n\t\t\tthis.popupLayerClass = false;\r\n\t\t\tsetTimeout(() => {\r\n\t\t\t\tthis.hideMore = true;\r\n\t\t\t\tthis.hideEmoji = true;\r\n\t\t\t}, 150);\r\n\t\t},\r\n\t\t// 选择表情\r\n\t\tchooseEmoji() {\r\n\t\t\tthis.hideMore = true;\r\n\t\t\tif (this.hideEmoji) {\r\n\t\t\t\tthis.hideEmoji = false;\r\n\t\t\t\tthis.openDrawer();\r\n\t\t\t} else {\r\n\t\t\t\tthis.hideDrawer();\r\n\t\t\t}\r\n\t\t},\r\n\t\t//添加表情\r\n\t\taddEmoji(em) {\r\n\t\t\tthis.textMsg += em;\r\n\t\t},\r\n\r\n\t\t//获取焦点,如果不是选表情ing,则关闭抽屉\r\n\t\ttextareaFocus() {\r\n\t\t\tthis.emptybottom = true;\r\n\t\t\tif (this.popupLayerClass && this.hideMore == false) {\r\n\t\t\t\tthis.hideDrawer();\r\n\t\t\t}\r\n\t\t},\r\n\t\t// 失去焦点\r\n\t\ttextareaBlur() {\r\n\t\t\tthis.emptybottom = false;\r\n\t\t},\r\n\t\t// 禁止滚动\r\n\t\tdiscard() {\r\n\t\t\treturn;\r\n\t\t}\r\n\t}\r\n};\r\n</script>\r\n<style>\r\n.cu-chat .cu-item>.main{\r\n\tmargin: 0 20rpx;\r\n}\r\n.cu-chat .cu-item > .main .content:after {\r\n\twidth: 0;\r\n\theight: 0;\r\n}\r\n.cu-chat .cu-item > .main .content {\r\n\tfont-size: 30rpx;\r\n\tborder-radius: 10rpx 30rpx 30rpx 30rpx;\r\n}\r\n.cu-chat .cu-item.self > .main .content {\r\n\tborder-radius: 30rpx 10rpx 30rpx 30rpx;\r\n}\r\n\r\n.cu-chat .cu-item > .main .content .article{\r\n\tmargin-top: 10rpx;\r\n\tpadding-top: 10rpx;\r\n\twidth: 100%;\r\n overflow: hidden;\r\n}\r\n\r\n.cu-chat .cu-item > .main .content .list{\r\n\twidth: 100%;\r\n\tfont-size: 28rpx;\r\n}\r\n.cu-chat .cu-item > .main .content .list text{\r\n\tcolor: #FF6A00;\r\n}\r\n.cu-chat .cu-item > .main .content .list .ai{\r\n\tpadding: 16rpx 0;\r\n\tmargin: 16rpx 0;\r\n\tline-height: 1.5;\r\n}\r\n\r\n\r\n\r\n\r\n.cu-chat .cu-item [class*='wlIcon-'] {\r\n\tfont-size: 34rpx;\r\n}\r\n\t\r\n\t\r\n.opmenu {\r\n\tdisplay: flex;\r\n\tmargin-top: 2rpx;\r\n\tcolor: #4c4c4c;\r\n}\r\n.opmenu .box {\r\n\tpadding-top: 35rpx;\r\n\tpadding-left: 50rpx;\r\n\ttext-align: center;\r\n}\r\n.opmenu .box .icon {\r\n\theight: 130rpx;\r\n\twidth: 130rpx;\r\n\tdisplay: flex;\r\n\talign-items: center;\r\n\tjustify-content: center;\r\n\tjustify-items: center;\r\n\tbackground-color: #ffffff;\r\n\tborder-radius: 20rpx;\r\n\tfont-size: 70rpx;\r\n\tmargin-bottom: 10rpx;\r\n}\r\n\r\n.hidden {\r\n\tdisplay: none !important;\r\n}\r\n\r\n\r\n.popup-layer {\r\n\ttransition: all 0.15s linear;\r\n\twidth: 100%;\r\n\theight: 480rpx;\r\n\tbackground-color: #f7f7fa;\r\n\tposition: fixed;\r\n\tz-index: 2000;\r\n\ttop: 100%;\r\n}\r\n.popup-layer.showLayer {\r\n\ttransform: translate3d(0, -480rpx, 0);\r\n}\r\n.popup-layer .emoji .emojinav {\r\n\tbackground-color: #f8f8f8;\r\n}\r\n.popup-layer .emoji .emojinav .item {\r\n\tdisplay: flex;\r\n\talign-items: center;\r\n\theight: 100rpx;\r\n\tpadding-left: 10rpx;\r\n}\r\n.popup-layer .emoji .emojinav .item .emojibg {\r\n\tbackground-color: #dedede;\r\n}\r\n.popup-layer .emoji .emojinav .item > view {\r\n\tmargin: 0 25rpx;\r\n\twidth: 60rpx;\r\n\theight: 60rpx;\r\n\tborder-radius: 18rpx;\r\n\tbackground-repeat: no-repeat;\r\n\tbackground-size: 80%;\r\n\tbackground-position: center;\r\n}\r\n\r\n.popup-layer .emoji .subject {\r\n\theight: 380rpx;\r\n\tbackground-color: #f1f1f1;\r\n}\r\n.popup-layer .emoji .subject .item {\r\n\tpadding: 25rpx;\r\n}\r\n\r\n.popup-layer .emoji .subject .item > view {\r\n\tbackground-repeat: no-repeat;\r\n\tbackground-size: 56%;\r\n\tbackground-position: center;\r\n\twidth: 12.5%;\r\n\theight: 100rpx;\r\n}\r\n\r\n.input-box {\r\n\twidth: 100%;\r\n\tmin-height: 100rpx;\r\n\tpadding-bottom: env(safe-area-inset-bottom);\r\n\tbackground-color: #f7f7fa;\r\n\tdisplay: flex;\r\n\talign-items: flex-end;\r\n\tposition: fixed;\r\n\tz-index: 2000;\r\n\tbottom: -2rpx;\r\n\ttransition: all 0.15s linear;\r\n}\r\n.input-box [class*='wlIcon-'] {\r\n\tfont-size: 50rpx;\r\n\tcolor: #4c4c4c;\r\n}\r\n\r\n.input-box .wlIcon-zhifeiji {\r\n\tcolor: #fe6600;\r\n}\r\n\r\n.input-box.showLayer {\r\n\ttransform: translate3d(0, -480rpx, 0);\r\n}\r\n.input-box .voice,\r\n.input-box .more {\r\n\tflex-shrink: 0;\r\n\twidth: 90rpx;\r\n\theight: 100rpx;\r\n\tdisplay: flex;\r\n\tjustify-content: center;\r\n\talign-items: center;\r\n}\r\n.input-box .send {\r\n\tflex-shrink: 0;\r\n\twidth: 90rpx;\r\n\theight: 100rpx;\r\n\tdisplay: flex;\r\n\tjustify-content: center;\r\n\talign-items: center;\r\n}\r\n.input-box .send .btn {\r\n\twidth: 110rpx;\r\n\theight: 70rpx;\r\n\tdisplay: flex;\r\n\tjustify-content: center;\r\n\talign-items: center;\r\n\tborder-radius: 16rpx;\r\n\tfont-size: 32rpx;\r\n}\r\n.input-box .textbox {\r\n\twidth: 100%;\r\n}\r\n.input-box .textbox .voice-mode {\r\n\twidth: calc(100% - 2upx);\r\n\theight: 80rpx;\r\n\tmargin: 10rpx 0;\r\n\tborder-radius: 16rpx;\r\n\tdisplay: flex;\r\n\tjustify-content: center;\r\n\talign-items: center;\r\n\tfont-size: 28rpx;\r\n\tbackground-color: #fff;\r\n\tcolor: #555;\r\n}\r\n.input-box .textbox .voice-mode.recording {\r\n\tbackground-color: #e5e5e5;\r\n}\r\n.input-box .textbox .text-mode {\r\n\twidth: 100%;\r\n\tmin-height: 80rpx;\r\n\tmargin: 10rpx 0;\r\n\tdisplay: flex;\r\n\tbackground-color: #ffffff;\r\n\tborder-radius: 16rpx;\r\n}\r\n.input-box .textbox .text-mode .box {\r\n\twidth: 100%;\r\n\tpadding-left: 30rpx;\r\n\tmin-height: 80rpx;\r\n\tdisplay: flex;\r\n\talign-items: center;\r\n}\r\n.input-box .textbox .text-mode .box textarea {\r\n\twidth: 100%;\r\n}\r\n.input-box .textbox .text-mode .em {\r\n\tflex-shrink: 0;\r\n\twidth: 80rpx;\r\n\tpadding-left: 10rpx;\r\n\theight: 80rpx;\r\n\tdisplay: flex;\r\n\tjustify-content: center;\r\n\talign-items: center;\r\n}\r\n\r\n.record {\r\n\twidth: 39vw;\r\n\theight: 39vw;\r\n\tposition: fixed;\r\n\ttop: 35%;\r\n\tleft: 30%;\r\n\tbackground-color: rgba(0, 0, 0, 0.8);\r\n\tborder-radius: 40rpx;\r\n}\r\n.record .ing {\r\n\twidth: 100%;\r\n\theight: 30vw;\r\n\tdisplay: flex;\r\n\tjustify-content: center;\r\n\talign-items: center;\r\n}\r\n@keyframes volatility {\r\n\t0% {\r\n\t\tbackground-position: 0% 130%;\r\n\t}\r\n\t20% {\r\n\t\tbackground-position: 0% 150%;\r\n\t}\r\n\t30% {\r\n\t\tbackground-position: 0% 155%;\r\n\t}\r\n\t40% {\r\n\t\tbackground-position: 0% 160%;\r\n\t}\r\n\t50% {\r\n\t\tbackground-position: 0% 145%;\r\n\t}\r\n\t70% {\r\n\t\tbackground-position: 0% 150%;\r\n\t}\r\n\t80% {\r\n\t\tbackground-position: 0% 170%;\r\n\t}\r\n\t90% {\r\n\t\tbackground-position: 0% 160%;\r\n\t}\r\n\t100% {\r\n\t\tbackground-position: 0% 135%;\r\n\t}\r\n}\r\n.record .ing [class*='wlIcon'] {\r\n\tbackground-image: linear-gradient(to bottom, #ffffff, #565656 50%);\r\n\tbackground-size: 100% 200%;\r\n\tanimation: volatility 1.5s ease-in-out -1.5s infinite alternate;\r\n\t-webkit-background-clip: text;\r\n\t-webkit-text-fill-color: transparent;\r\n\tfont-size: 140rpx;\r\n\tpadding-top: 40rpx;\r\n\tcolor: #f09b37;\r\n}\r\n.record .cancel {\r\n\twidth: 100%;\r\n\theight: 30vw;\r\n\tdisplay: flex;\r\n\tjustify-content: center;\r\n\talign-items: center;\r\n}\r\n.record .cancel [class*='wlIcon'] {\r\n\tcolor: #fff;\r\n\tfont-size: 150rpx;\r\n}\r\n.record .tis {\r\n\twidth: 100%;\r\n\theight: 10vw;\r\n\tdisplay: flex;\r\n\tjustify-content: center;\r\n\tfont-size: 24rpx;\r\n\tcolor: #fff;\r\n}\r\n.record .tis.change {\r\n\tcolor: #f09b37;\r\n}\r\n\r\n.content {\r\n\twidth: 100%;\r\n}\r\n.content .msg-list,\r\n.cu-chat {\r\n\tposition: absolute;\r\n\ttop: 0;\r\n\tbottom: 100rpx;\r\n\tbottom: calc(env(safe-area-inset-bottom) + 100rpx);\r\n}\r\n\r\n.loading {\r\n\tdisplay: flex;\r\n\tjustify-content: center;\r\n}\r\n@keyframes stretchdelay {\r\n\t0%,\r\n\t40%,\r\n\t100% {\r\n\t\ttransform: scaleY(0.6);\r\n\t}\r\n\t20% {\r\n\t\ttransform: scaleY(1);\r\n\t}\r\n}\r\n.loading .spinner {\r\n\tmargin: 20upx 0;\r\n\twidth: 60upx;\r\n\theight: 100upx;\r\n\tdisplay: flex;\r\n\talign-items: center;\r\n\tjustify-content: space-between;\r\n}\r\n.loading .spinner view {\r\n\tbackground-color: #dadada;\r\n\theight: 50upx;\r\n\twidth: 6upx;\r\n\tborder-radius: 6upx;\r\n\tanimation: stretchdelay 1.2s infinite ease-in-out;\r\n}\r\n.loading .spinner .rect2 {\r\n\tanimation-delay: -1.1s;\r\n}\r\n.loading .spinner .rect3 {\r\n\tanimation-delay: -1s;\r\n}\r\n.loading .spinner .rect4 {\r\n\tanimation-delay: -0.9s;\r\n}\r\n.loading .spinner .rect5 {\r\n\tanimation-delay: -0.8s;\r\n}\r\n\r\n.emptybottom{\r\n\tpadding-bottom: 0 !important;\r\n}\r\n\r\n</style>\r\n","import mod from \"-!../../../../k/HBuilderX/plugins/uniapp-cli/node_modules/mini-css-extract-plugin/dist/loader.js??ref--6-oneOf-1-0!../../../../k/HBuilderX/plugins/uniapp-cli/node_modules/css-loader/dist/cjs.js??ref--6-oneOf-1-1!../../../../k/HBuilderX/plugins/uniapp-cli/node_modules/@dcloudio/vue-cli-plugin-uni/packages/vue-loader/lib/loaders/stylePostLoader.js!../../../../k/HBuilderX/plugins/uniapp-cli/node_modules/@dcloudio/vue-cli-plugin-uni/packages/webpack-preprocess-loader/index.js??ref--6-oneOf-1-2!../../../../k/HBuilderX/plugins/uniapp-cli/node_modules/postcss-loader/src/index.js??ref--6-oneOf-1-3!../../../../k/HBuilderX/plugins/uniapp-cli/node_modules/@dcloudio/vue-cli-plugin-uni/packages/vue-loader/lib/index.js??vue-loader-options!../../../../k/HBuilderX/plugins/uniapp-cli/node_modules/@dcloudio/webpack-uni-mp-loader/lib/style.js!./service.vue?vue&type=style&index=0&lang=css&\"; export default mod; export * from \"-!../../../../k/HBuilderX/plugins/uniapp-cli/node_modules/mini-css-extract-plugin/dist/loader.js??ref--6-oneOf-1-0!../../../../k/HBuilderX/plugins/uniapp-cli/node_modules/css-loader/dist/cjs.js??ref--6-oneOf-1-1!../../../../k/HBuilderX/plugins/uniapp-cli/node_modules/@dcloudio/vue-cli-plugin-uni/packages/vue-loader/lib/loaders/stylePostLoader.js!../../../../k/HBuilderX/plugins/uniapp-cli/node_modules/@dcloudio/vue-cli-plugin-uni/packages/webpack-preprocess-loader/index.js??ref--6-oneOf-1-2!../../../../k/HBuilderX/plugins/uniapp-cli/node_modules/postcss-loader/src/index.js??ref--6-oneOf-1-3!../../../../k/HBuilderX/plugins/uniapp-cli/node_modules/@dcloudio/vue-cli-plugin-uni/packages/vue-loader/lib/index.js??vue-loader-options!../../../../k/HBuilderX/plugins/uniapp-cli/node_modules/@dcloudio/webpack-uni-mp-loader/lib/style.js!./service.vue?vue&type=style&index=0&lang=css&\"","// extracted by mini-css-extract-plugin\n if(module.hot) {\n // 1699839785521\n var cssReload = require(\"C:/Users/liudan/Desktop/k/HBuilderX/plugins/uniapp-cli/node_modules/mini-css-extract-plugin/dist/hmr/hotModuleReplacement.js\")(module.id, {\"hmr\":true,\"publicPath\":\"../../\",\"locals\":false});\n module.hot.dispose(cssReload);\n module.hot.accept(undefined, cssReload);\n }\n "],"sourceRoot":""} |