chat.vue 20 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650
  1. <template>
  2. <view>
  3. <view style="width: 100%;">
  4. <view style="display: flex;flex-direction: column;" v-for="(item,index) in ListItem" :key='index' >
  5. <view style="margin-top: 15rpx;width: 100%;text-align: center;font-size: 26rpx;color: #999999;">
  6. {{item.createTime}}</view>
  7. <view v-if="item.sendType === 2" style="width: 83%;margin-right: 15%;">
  8. <view class="chat-listitem" style="float: left;margin-left: 10rpx;">
  9. <view>
  10. <image src="../../../static/logo.png" class="chat-listitem-image"></image>
  11. </view>
  12. <view v-if="item.content && item.type === 1" class="chat-listitem-text"
  13. style="margin-left: 20rpx;">{{item.content}}</view>
  14. <image @tap="viewImg(item.content)" v-if="item.content && item.type === 2" :src="item.content"
  15. style="height: 200rpx;width: 200rpx;margin-left: 20rpx;"></image>
  16. </view>
  17. </view>
  18. <view v-if="item.sendType === 1" style="width: 83%;margin-left: 15%;">
  19. <view class="chat-listitem" style="float: right;">
  20. <view v-if="item.content && item.type === 1" @longpress="copy(item.content)"
  21. class="chat-listitem-text" style="margin-right: 20rpx;">{{item.content}}</view>
  22. <view v-if="item.content && item.type === 4" @click="goShop(item.content[3])"
  23. style="width: 400rpx;background: #FFFFFF;height: max-content;margin-right: 20rpx;margin-top: 10rpx;border-radius: 20rpx;">
  24. <image :src="item.content[0]" class="chat-listitem-image-type4"
  25. style="width: 400rpx;height: 350rpx;"></image>
  26. <view style="padding: 10rpx;padding-bottom: 20rpx;">
  27. <view style="color: #ed5732;font-size: 34rpx;"><text style="font-size: 22rpx;">¥ </text>
  28. {{item.content[2]}}</view>
  29. <view
  30. style="overflow: hidden;text-overflow: ellipsis;display: -webkit-box;-webkit-line-clamp: 2;-webkit-box-orient: vertical;width: 100%;height: 75upx;">
  31. {{item.content[1]}}</view>
  32. </view>
  33. </view>
  34. <view v-if="item.content && item.type === 3"
  35. style="width: 500rpx;background: #FFFFFF;height: max-content;margin-right: 20rpx;margin-top: 10rpx;border-radius: 20rpx;padding: 15rpx 10rpx;">
  36. <view style="color: #000000;font-weight: 600;margin-left: 10rpx;">你正在咨询的订单</view>
  37. <view style="display: flex;">
  38. <image :src="item.content[0]" class="chat-listitem-image-type4"
  39. style="margin-left: 7rpx;margin-top: 20rpx;width: 110rpx;height: 110rpx;"></image>
  40. <view
  41. style="margin-top: 15rpx;padding: 10rpx 0rpx 5rpx 10rpx;width: 75%;background: #f5f5f5;margin-left: 10rpx;">
  42. <view
  43. style="font-size: 28rpx;overflow: hidden;text-overflow: ellipsis;display: -webkit-box;-webkit-line-clamp: 2;-webkit-box-orient: vertical;height: 75upx;width: 100%;">
  44. {{item.content[1]}}</view>
  45. <view style="color: #ed5732;font-size: 28rpx;"><text style="font-size: 22rpx;">¥
  46. </text>{{item.content[5]}}
  47. </view>
  48. </view>
  49. </view>
  50. <view style="color: #999999;margin-top: 10rpx;margin-left: 12rpx;">
  51. <view>订单编号:{{item.content[3]}}</view>
  52. <view style="margin-top: 10rpx;">创建时间:{{item.content[4]}}</view>
  53. </view>
  54. <view
  55. style="float: right;margin-right: 10rpx;margin-top: 15rpx;background: #F9221D;color: #FFFFFF;border-radius: 50rpx;width: 150rpx;height: 50rpx;font-size: 24rpx;text-align: center;line-height: 50rpx;"
  56. @click="goDingdanDetail(item.content[2])">查看</view>
  57. </view>
  58. <image @tap="viewImg(item.content)" v-if="item.content && item.type === 2" :src="item.content"
  59. style="height: 200rpx;width: 200rpx;margin-right: 20rpx;"></image>
  60. <view>
  61. <image v-if="item.chat.userHead" :src="item.chat.userHead" class="chat-listitem-image">
  62. </image>
  63. <image v-else src="../../../static/logo.png" class="chat-listitem-image"></image>
  64. </view>
  65. </view>
  66. </view>
  67. <!-- <view v-if="item.sendType === 4" style="width: 83%;margin-left: 15%;">
  68. <view class="chat-listitem" style="float: right;">
  69. <view style="height: max-content;">
  70. <image :src="type4[0]" mode=""></image>
  71. </view>
  72. <image @tap="viewImg(item.content)" v-if="item.content && item.type === 2" :src="item.content" style="height: 200rpx;width: 170rpx;margin-right: 20rpx;"></image>
  73. <view>
  74. <image :src="item.chat.userHead" class="chat-listitem-image"></image>
  75. </view>
  76. </view>
  77. </view> -->
  78. </view>
  79. </view>
  80. <view v-if="ShopState"
  81. style="width: 95%;margin-left: 20rpx;height: 150upx;position: fixed;bottom: 120upx;z-index: 99;background-color: #FFFFFF;border-radius: 20rpx;">
  82. <view style="display: flex;width: 100%;color: #000000;padding: 20rpx;">
  83. <image :src="Shopimage" style="width: 110rpx;height: 110rpx;"></image>
  84. <view style="margin-left: 20rpx;width: 400rpx;">
  85. <view
  86. style="font-size: 34rpx;color: #000000;overflow: hidden;text-overflow: ellipsis;flex-wrap: nowrap;white-space: nowrap;width: 98%;">
  87. {{ShopTitle}}</view>
  88. <view style="margin-top: 20rpx;color: #ed5732;font-size: 34rpx;">¥{{Shopmoney}}</view>
  89. </view>
  90. <view style="text-align: right;">
  91. <image @click="ShopClose" src="../../../static/image/close.png"
  92. style="width: 30rpx;height: 30rpx;"></image>
  93. <view
  94. style="margin-top: 20rpx;background: #F9221D;color: #FFFFFF;border-radius: 50rpx;width: 150rpx;height: 50rpx;font-size: 24rpx;text-align: center;line-height: 50rpx;"
  95. @click="goMaijia">发送给商家</view>
  96. </view>
  97. </view>
  98. </view>
  99. <!-- <view v-if="orderState"
  100. style="width: 95%;margin-left: 20rpx;height: 150upx;position: fixed;bottom: 120upx;z-index: 99;background-color: #FFFFFF;border-radius: 20rpx;">
  101. <view style="display: flex;width: 100%;color: #000000;padding: 20rpx;">
  102. <image :src="orderimage" style="width: 110rpx;height: 110rpx;"></image>
  103. <view style="margin-left: 20rpx;width: 400rpx;">
  104. <view
  105. style="font-size: 34rpx;color: #000000;overflow: hidden;text-overflow: ellipsis;flex-wrap: nowrap;white-space: nowrap;width: 98%;">
  106. 你可能想咨询该订单</view>
  107. <view style="margin-top: 20rpx;color: #ed5732;font-size: 34rpx;">¥{{ordermoney}}</view>
  108. </view>
  109. <view style="text-align: right;">
  110. <image @click="orderClose" src="../../../static/image/close.png"
  111. style="width: 30rpx;height: 30rpx;"></image>
  112. <view
  113. style="margin-top: 20rpx;background: #F9221D;color: #000000;border-radius: 50rpx;width: 150rpx;height: 50rpx;font-size: 24rpx;text-align: center;line-height: 50rpx;"
  114. @click="goDingdan">发送订单</view>
  115. </view>
  116. </view>
  117. </view> -->
  118. <!-- 底部聊天输入框 -->
  119. <view class="input-box">
  120. <!-- <view class="justify-between padding-lr" style="display: flex;margin-top: 15rpx;width: 100%;background-color: #eee;padding-top: 4upx;">
  121. <image src="../../../static/image/add.png" @click="chooseImage(['album'])"
  122. style="width: 60rpx;height: 60rpx;margin-top: 8rpx;margin-right: 12rpx;"></image>
  123. <input confirm-type="send" @confirm='setChatSave(1)' type="text" v-model="content"
  124. style="width: 72%;height: 70rpx;background: #fff;margin: 4rpx 10rpx 0;border-radius: 70rpx;padding-left: 10rpx;color: #000000;" />
  125. <view class="save" @tap='setChatSave(1)'>发送</view>
  126. </view> -->
  127. <view class="justify-between padding-lr align-center"
  128. style="display: flex;width: 100%;background-color: #EEEEEE;">
  129. <image src="../../../static/image/add.png" @click="chooseImage(['album'])"
  130. style="width: 60rpx;height: 60rpx;margin-right: 12rpx;border-radius: 50upx;"></image>
  131. <input confirm-type="send" @confirm='setChatSave(1)' type="text" v-model="content"
  132. style="width: 72%;height: 70rpx;background: #fff;margin: 0 10rpx;border-radius: 5rpx;padding-left: 10rpx;" />
  133. <view class="save" @tap='setChatSave(1)'>发送</view>
  134. </view>
  135. </view>
  136. </view>
  137. </template>
  138. <script>
  139. import configdata from '../../../common/config.js';
  140. export default {
  141. data() {
  142. return {
  143. connected: false,
  144. connecting: false,
  145. msg: false,
  146. type4: [],
  147. listRight: {
  148. chat: {
  149. userHead: ""
  150. },
  151. content: "",
  152. sendType: 1,
  153. type: 1
  154. },
  155. content: '',
  156. chatId: '',
  157. type: 1,
  158. ListItem: [],
  159. ShopState: false,
  160. ShopordersId: '',
  161. Shopimage: '',
  162. Shopmoney: '',
  163. ShopTitle: '',
  164. orderState: false,
  165. ordersId: '',
  166. orderimage: '',
  167. orderNum: '',
  168. ordermoney: '',
  169. orderTitle: '',
  170. orderCreateTime: '',
  171. className: '',
  172. Shopsales: '',
  173. hand: 1,
  174. index: 0,
  175. page: 0,
  176. size: 1000,
  177. countDown: ''
  178. };
  179. },
  180. computed: {
  181. showMsg() {
  182. if (this.connected) {
  183. if (this.msg) {
  184. return '收到消息:' + this.msg
  185. } else {
  186. return '等待接收消息'
  187. }
  188. } else {
  189. return '尚未连接'
  190. }
  191. }
  192. },
  193. onUnload() {
  194. uni.closeSocket()
  195. uni.hideLoading()
  196. },
  197. onLoad(d) {
  198. if (d.className) {
  199. this.className = d.className;
  200. if (d.className === 'shop') {
  201. this.ShopState = true;
  202. this.ShopordersId = d.ordersId;
  203. this.Shopimage = d.image;
  204. this.Shopmoney = d.money;
  205. this.Shopsales = d.sales;
  206. this.ShopTitle = d.title;
  207. } else if (d.className === 'order') {
  208. this.orderState = true;
  209. this.ordersId = d.id;
  210. this.orderimage = d.image;
  211. this.ordermoney = d.money;
  212. this.orderTitle = d.title;
  213. this.orderNum = d.orderNum;
  214. this.orderCreateTime = d.createTime;
  215. }
  216. }
  217. this.getChatSave();
  218. this.connect();
  219. },
  220. onShow() {
  221. if (this.connected || this.connecting) {
  222. } else {
  223. this.connect();
  224. }
  225. },
  226. onHide() {
  227. uni.closeSocket()
  228. },
  229. methods: {
  230. copy(content) {
  231. uni.showModal({
  232. title: '温馨提示',
  233. content: '确认要复制此文字吗?',
  234. showCancel: true,
  235. cancelText: '取消',
  236. confirmText: '确认',
  237. success: res => {
  238. if (res.confirm) {
  239. uni.setClipboardData({
  240. data: content,
  241. success: r => {
  242. this.$queue.showToast('复制成功');
  243. }
  244. });
  245. }
  246. }
  247. });
  248. },
  249. h5Copy(content) {
  250. if (!document.queryCommandSupported('copy')) {
  251. // 不支持
  252. return false
  253. }
  254. let textarea = document.createElement("textarea")
  255. textarea.value = content
  256. textarea.readOnly = "readOnly"
  257. document.body.appendChild(textarea)
  258. textarea.select() // 选择对象
  259. textarea.setSelectionRange(0, content.length) //核心
  260. let result = document.execCommand("copy") // 执行浏览器复制命令
  261. textarea.remove()
  262. return result
  263. },
  264. getDateDiff(data) {
  265. // 传进来的data必须是日期格式,不能是时间戳
  266. //var str = data;
  267. //将字符串转换成时间格式
  268. var timePublish = new Date(data);
  269. var timeNow = new Date();
  270. var minute = 1000 * 60;
  271. var hour = minute * 60;
  272. var day = hour * 24;
  273. var month = day * 30;
  274. var result = "2";
  275. var diffValue = timeNow - timePublish;
  276. var diffMonth = diffValue / month;
  277. var diffWeek = diffValue / (7 * day);
  278. var diffDay = diffValue / day;
  279. var diffHour = diffValue / hour;
  280. var diffMinute = diffValue / minute;
  281. if (diffMonth > 3) {
  282. result = timePublish.getFullYear() + "-";
  283. result += timePublish.getMonth() + "-";
  284. result += timePublish.getDate();
  285. } else if (diffMonth > 1) { //月
  286. result = data.substring(0, 10);
  287. } else if (diffWeek > 1) { //周
  288. result = data.substring(0, 10);
  289. } else if (diffDay > 1) { //天
  290. result = data.substring(0, 10);
  291. } else if (diffHour > 1) { //小时
  292. result = parseInt(diffHour) + "小时前";
  293. } else if (diffMinute > 1) { //分钟
  294. result = parseInt(diffMinute) + "分钟前";
  295. } else {
  296. result = "刚刚";
  297. }
  298. return result;
  299. },
  300. goDingdanDetail(id) {
  301. uni.navigateTo({
  302. url: '../member/orderdetail?id=' + id
  303. });
  304. },
  305. goShop(ordersId) {
  306. uni.navigateTo({
  307. url: './commoditydetail?ordersId=' + ordersId
  308. });
  309. },
  310. ShopClose() {
  311. this.ShopState = false;
  312. },
  313. orderClose() {
  314. this.orderState = false;
  315. },
  316. goDingdan() {
  317. this.orderState = false;
  318. this.setChatSave(3);
  319. },
  320. goMaijia() {
  321. this.ShopState = false;
  322. this.setChatSave(4);
  323. },
  324. connect() {
  325. let userId = this.$queue.getData('userId');
  326. if (this.connected || this.connecting) {
  327. uni.showModal({
  328. content: '正在连接或者已经连接,请勿重复连接',
  329. showCancel: false
  330. })
  331. return false
  332. }
  333. let token = uni.getStorageSync('token')
  334. this.connecting = true
  335. uni.showLoading({
  336. title: '连接中...',
  337. mask: true, // 是否显示透明蒙层,防止触摸穿透
  338. })
  339. uni.connectSocket({
  340. // url: 'wss://game.shengqianxiong.com.cn/wss/websocket/' + userId,
  341. // url: 'ws://74165o0188.uicp.fun/sqx_fast/websocket/' + userId,
  342. url: this.config("WSHOST") + userId,
  343. data() {
  344. return {
  345. msg: 'Hello'
  346. }
  347. },
  348. header: {
  349. 'content-type': 'application/json',
  350. 'token': token
  351. },
  352. method: 'GET',
  353. success(res) {
  354. // 这里是接口调用成功的回调,不是连接成功的回调,请注意
  355. },
  356. fail(err) {
  357. // 这里是接口调用失败的回调,不是连接失败的回调,请注意
  358. }
  359. })
  360. uni.onSocketOpen((res) => {
  361. this.connecting = false
  362. this.connected = true
  363. uni.hideLoading()
  364. // uni.showToast({
  365. // icon: 'none',
  366. // title: '连接成功'
  367. // })
  368. console.log('onOpen', res);
  369. })
  370. uni.onSocketError((err) => {
  371. this.connecting = false
  372. this.connected = false
  373. uni.hideLoading()
  374. uni.showModal({
  375. content: '网络较差,请稍后再试',
  376. showCancel: false
  377. })
  378. console.log('onError', err);
  379. })
  380. uni.onSocketMessage((res) => {
  381. // let that = this;
  382. // let datas = JSON.parse(res.data)
  383. // let data = {
  384. // chat: {
  385. // userHead: '../../static/logo.png'
  386. // },
  387. // content: datas.content,
  388. // type: datas.type,
  389. // sendType: datas.sendType
  390. // }
  391. // that.ListItem.push(data);
  392. this.getTimeOrListItem1();
  393. console.log('onMessage', res)
  394. })
  395. uni.onSocketClose((res) => {
  396. this.connected = false
  397. this.startRecive = false
  398. this.msg = false
  399. console.log('onClose', res)
  400. })
  401. },
  402. close() {
  403. uni.closeSocket()
  404. },
  405. getTimeOrListItem1() {
  406. let data = {
  407. chatId:this.chatId
  408. };
  409. this.$Request.getT('/app/chats/list',data).then(
  410. res => {
  411. this.ListItem = [];
  412. if (res.data) {
  413. var time = '';
  414. res.data.forEach(d => {
  415. d.createTime = this.getDateDiff(d.createTime);
  416. if (d.createTime === time) {
  417. d.createTime = '';
  418. } else {
  419. time = d.createTime;
  420. }
  421. if (!d.chat.userHead) {
  422. // d.chat.userHead = '../../static/logo.png';
  423. let avatar = this.$queue.getData('avatar');
  424. d.chat.userHead = avatar
  425. }
  426. if (d.type === 4) {
  427. let data = d.content.split(',');
  428. d.content = data;
  429. }
  430. if (d.type === 3) {
  431. let data = d.content.split(',');
  432. d.content = data;
  433. }
  434. this.ListItem.push(d);
  435. });
  436. setTimeout(() => {
  437. uni.pageScrollTo({
  438. scrollTop: 99999,
  439. duration: 0
  440. });
  441. }, 50);
  442. }
  443. uni.hideLoading();
  444. });
  445. },
  446. getChatSave() {
  447. let userId = this.$queue.getData('userId');
  448. let phone = this.$queue.getData('phone');
  449. let userName = this.$queue.getData('userName');
  450. if (!phone) {
  451. phone = this.$queue.getData('userName');
  452. }
  453. let avatar = this.$queue.getData('avatar');
  454. let data = {
  455. userId: userId,
  456. userHead: avatar,
  457. userName: userName,
  458. storeId: '0',
  459. storeHead: '码兄外卖',
  460. storeName: ''
  461. }
  462. this.$Request.postJson('/app/chats/save', data).then(res => {
  463. if (res.status === 0) {
  464. this.chatId = res.data.chatId;
  465. uni.showLoading({
  466. title: '加载中...',
  467. mask: true, // 是否显示透明蒙层,防止触摸穿透
  468. });
  469. this.getTimeOrListItem1();
  470. }
  471. });
  472. },
  473. setChatSave(type) {
  474. //type:1文字 2图片
  475. if (type === 1 && this.content == '') {
  476. this.$queue.showToast('请输入聊天内容');
  477. return;
  478. }
  479. if (this.chatId == '' || this.chatId == undefined) {
  480. this.$queue.showToast('网络较差,请稍后再试');
  481. return;
  482. }
  483. let userId = this.$queue.getData('userId');
  484. if (type === 4) {
  485. this.content = this.Shopimage + ',' + this.ShopTitle + ',' + this.Shopmoney + ',' + this.ShopordersId;
  486. }
  487. if (type === 3) {
  488. this.content = this.orderimage + ',' + this.orderTitle + ',' + this.ordersId + ',' + this.orderNum +
  489. ',' + this.orderCreateTime +
  490. ',' + this.ordermoney
  491. }
  492. let data = {
  493. userId: userId,
  494. content: this.content,
  495. chatId: this.chatId,
  496. type: type,
  497. storeId: '0',
  498. sendType: '1'
  499. }
  500. data = JSON.stringify(data);
  501. let that = this;
  502. uni.sendSocketMessage({
  503. data: data,
  504. success(res) {
  505. let avatar = that.$queue.getData('avatar');
  506. if (!avatar) {
  507. avatar = '../../static/logo.png';
  508. }
  509. setTimeout(() => {
  510. that.getTimeOrListItem1();
  511. }, 50);
  512. console.log(that.content);
  513. },
  514. fail(err) {
  515. console.log(err);
  516. }
  517. })
  518. this.content = '';
  519. },
  520. //发送图片
  521. chooseImage(sourceType) {
  522. uni.chooseImage({
  523. count: 1,
  524. sourceType: ['album', 'camera'],
  525. success: res => {
  526. for (let i = 0; i < res.tempFilePaths.length; i++) {
  527. this.$queue.showLoading("上传中...");
  528. uni.uploadFile({ // 上传接口
  529. url: this.config("APIHOST") + '/alioss/upload', //真实的接口地址
  530. filePath: res.tempFilePaths[i],
  531. name: 'file',
  532. success: (uploadFileRes) => {
  533. this.content = JSON.parse(uploadFileRes.data).data;
  534. this.setChatSave(2);
  535. uni.hideLoading();
  536. }
  537. });
  538. }
  539. }
  540. })
  541. },
  542. config: function(name) {
  543. var info = null;
  544. if (name) {
  545. var name2 = name.split("."); //字符分割
  546. if (name2.length > 1) {
  547. info = configdata[name2[0]][name2[1]] || null;
  548. } else {
  549. info = configdata[name] || null;
  550. }
  551. if (info == null) {
  552. // let web_config = cache.get("web_config");
  553. // if (web_config) {
  554. // if (name2.length > 1) {
  555. // info = web_config[name2[0]][name2[1]] || null;
  556. // } else {
  557. // info = web_config[name] || null;
  558. // }
  559. // }
  560. }
  561. }
  562. return info;
  563. },
  564. //查看大图
  565. viewImg(item) {
  566. let imgsArray = [];
  567. imgsArray[0] = item;
  568. uni.previewImage({
  569. current: 0,
  570. urls: imgsArray
  571. });
  572. },
  573. },
  574. };
  575. </script>
  576. <style>
  577. page {
  578. /* background: #1c1b20; */
  579. }
  580. .input-box {
  581. position: fixed;
  582. bottom: 0;
  583. left: 0;
  584. height: 100rpx;
  585. width: 100%;
  586. display: flex;
  587. box-sizing: content-box;
  588. z-index: 999;
  589. /* background-color: #ececec; */
  590. /* padding: 0 5rpx; */
  591. }
  592. .chat-listitem {
  593. display: flex;
  594. margin-top: 20rpx;
  595. padding: 10rpx;
  596. }
  597. .chat-listitem-text {
  598. color: #000000;
  599. background: #FFFFFF;
  600. margin-top: 10rpx;
  601. width: fit-content;
  602. padding: 15rpx;
  603. font-size: 30rpx;
  604. height: max-content;
  605. word-wrap: break-word;
  606. word-break: break-all;
  607. border-radius: 10rpx;
  608. }
  609. .chat-listitem-image-type4 {
  610. color: #000000;
  611. background: #FFFFFF;
  612. width: fit-content;
  613. font-size: 30rpx;
  614. height: max-content;
  615. word-wrap: break-word;
  616. word-break: break-all;
  617. border-top-left-radius: 20rpx;
  618. border-top-right-radius: 20rpx;
  619. }
  620. .chat-listitem-image {
  621. margin-top: 5rpx;
  622. width: 75rpx;
  623. height: 75rpx;
  624. border-radius: 5rpx;
  625. }
  626. .save {
  627. width: 130rpx;
  628. text-align: center;
  629. border-radius: 10rpx;
  630. height: 70rpx;
  631. color: #FFF;
  632. background: #1789FD;
  633. margin: 5rpx 10rpx 0;
  634. line-height: 70rpx;
  635. }
  636. </style>