chat.vue 19 KB

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