chat.vue 20 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645
  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. })
  338. uni.connectSocket({
  339. // url: 'wss://game.shengqianxiong.com.cn/wss/websocket/' + userId,
  340. // url: 'ws://74165o0188.uicp.fun/sqx_fast/websocket/' + userId,
  341. url: this.config("WSHOST") + userId,
  342. data() {
  343. return {
  344. msg: 'Hello'
  345. }
  346. },
  347. header: {
  348. 'content-type': 'application/json',
  349. 'token': token
  350. },
  351. method: 'GET',
  352. success(res) {
  353. // 这里是接口调用成功的回调,不是连接成功的回调,请注意
  354. },
  355. fail(err) {
  356. // 这里是接口调用失败的回调,不是连接失败的回调,请注意
  357. }
  358. })
  359. uni.onSocketOpen((res) => {
  360. this.connecting = false
  361. this.connected = true
  362. uni.hideLoading()
  363. // uni.showToast({
  364. // icon: 'none',
  365. // title: '连接成功'
  366. // })
  367. console.log('onOpen', res);
  368. })
  369. uni.onSocketError((err) => {
  370. this.connecting = false
  371. this.connected = false
  372. uni.hideLoading()
  373. uni.showModal({
  374. content: '网络较差,请稍后再试',
  375. showCancel: false
  376. })
  377. console.log('onError', err);
  378. })
  379. uni.onSocketMessage((res) => {
  380. // let that = this;
  381. // let datas = JSON.parse(res.data)
  382. // let data = {
  383. // chat: {
  384. // userHead: '../../static/logo.png'
  385. // },
  386. // content: datas.content,
  387. // type: datas.type,
  388. // sendType: datas.sendType
  389. // }
  390. // that.ListItem.push(data);
  391. this.getTimeOrListItem1();
  392. console.log('onMessage', res)
  393. })
  394. uni.onSocketClose((res) => {
  395. this.connected = false
  396. this.startRecive = false
  397. this.msg = false
  398. console.log('onClose', res)
  399. })
  400. },
  401. close() {
  402. uni.closeSocket()
  403. },
  404. getTimeOrListItem1() {
  405. this.$Request.getT('/app/chats/list?chatId=' + this.chatId).then(
  406. res => {
  407. this.ListItem = [];
  408. if (res.data) {
  409. var time = '';
  410. res.data.forEach(d => {
  411. d.createTime = this.getDateDiff(d.createTime);
  412. if (d.createTime === time) {
  413. d.createTime = '';
  414. } else {
  415. time = d.createTime;
  416. }
  417. if (!d.chat.userHead) {
  418. // d.chat.userHead = '../../static/logo.png';
  419. let avatar = this.$queue.getData('avatar');
  420. d.chat.userHead = avatar
  421. }
  422. if (d.type === 4) {
  423. let data = d.content.split(',');
  424. d.content = data;
  425. }
  426. if (d.type === 3) {
  427. let data = d.content.split(',');
  428. d.content = data;
  429. }
  430. this.ListItem.push(d);
  431. });
  432. setTimeout(() => {
  433. uni.pageScrollTo({
  434. scrollTop: 99999,
  435. duration: 0
  436. });
  437. }, 50);
  438. }
  439. uni.hideLoading();
  440. });
  441. },
  442. getChatSave() {
  443. let userId = this.$queue.getData('userId');
  444. let phone = this.$queue.getData('phone');
  445. let userName = this.$queue.getData('userName');
  446. if (!phone) {
  447. phone = this.$queue.getData('userName');
  448. }
  449. let avatar = this.$queue.getData('avatar');
  450. let data = {
  451. userId: userId,
  452. userHead: avatar,
  453. userName: userName,
  454. storeId: '0',
  455. storeHead: '码兄外卖',
  456. storeName: ''
  457. }
  458. this.$Request.postJson('/app/chats/save', data).then(res => {
  459. if (res.status === 0) {
  460. this.chatId = res.data.chatId;
  461. uni.showLoading({
  462. title: '加载中...'
  463. });
  464. this.getTimeOrListItem1();
  465. }
  466. });
  467. },
  468. setChatSave(type) {
  469. //type:1文字 2图片
  470. if (type === 1 && this.content == '') {
  471. this.$queue.showToast('请输入聊天内容');
  472. return;
  473. }
  474. if (this.chatId == '' || this.chatId == undefined) {
  475. this.$queue.showToast('网络较差,请稍后再试');
  476. return;
  477. }
  478. let userId = this.$queue.getData('userId');
  479. if (type === 4) {
  480. this.content = this.Shopimage + ',' + this.ShopTitle + ',' + this.Shopmoney + ',' + this.ShopordersId;
  481. }
  482. if (type === 3) {
  483. this.content = this.orderimage + ',' + this.orderTitle + ',' + this.ordersId + ',' + this.orderNum +
  484. ',' + this.orderCreateTime +
  485. ',' + this.ordermoney
  486. }
  487. let data = {
  488. userId: userId,
  489. content: this.content,
  490. chatId: this.chatId,
  491. type: type,
  492. storeId: '0',
  493. sendType: '1'
  494. }
  495. data = JSON.stringify(data);
  496. let that = this;
  497. uni.sendSocketMessage({
  498. data: data,
  499. success(res) {
  500. let avatar = that.$queue.getData('avatar');
  501. if (!avatar) {
  502. avatar = '../../static/logo.png';
  503. }
  504. setTimeout(() => {
  505. that.getTimeOrListItem1();
  506. }, 50);
  507. console.log(that.content);
  508. },
  509. fail(err) {
  510. console.log(err);
  511. }
  512. })
  513. this.content = '';
  514. },
  515. //发送图片
  516. chooseImage(sourceType) {
  517. uni.chooseImage({
  518. count: 1,
  519. sourceType: ['album', 'camera'],
  520. success: res => {
  521. for (let i = 0; i < res.tempFilePaths.length; i++) {
  522. this.$queue.showLoading("上传中...");
  523. uni.uploadFile({ // 上传接口
  524. url: this.config("APIHOST") + '/alioss/upload', //真实的接口地址
  525. filePath: res.tempFilePaths[i],
  526. name: 'file',
  527. success: (uploadFileRes) => {
  528. this.content = JSON.parse(uploadFileRes.data).data;
  529. this.setChatSave(2);
  530. uni.hideLoading();
  531. }
  532. });
  533. }
  534. }
  535. })
  536. },
  537. config: function(name) {
  538. var info = null;
  539. if (name) {
  540. var name2 = name.split("."); //字符分割
  541. if (name2.length > 1) {
  542. info = configdata[name2[0]][name2[1]] || null;
  543. } else {
  544. info = configdata[name] || null;
  545. }
  546. if (info == null) {
  547. // let web_config = cache.get("web_config");
  548. // if (web_config) {
  549. // if (name2.length > 1) {
  550. // info = web_config[name2[0]][name2[1]] || null;
  551. // } else {
  552. // info = web_config[name] || null;
  553. // }
  554. // }
  555. }
  556. }
  557. return info;
  558. },
  559. //查看大图
  560. viewImg(item) {
  561. let imgsArray = [];
  562. imgsArray[0] = item;
  563. uni.previewImage({
  564. current: 0,
  565. urls: imgsArray
  566. });
  567. },
  568. },
  569. };
  570. </script>
  571. <style>
  572. page {
  573. /* background: #1c1b20; */
  574. }
  575. .input-box {
  576. position: fixed;
  577. bottom: 0;
  578. left: 0;
  579. height: 100rpx;
  580. width: 100%;
  581. display: flex;
  582. box-sizing: content-box;
  583. z-index: 999;
  584. /* background-color: #ececec; */
  585. /* padding: 0 5rpx; */
  586. }
  587. .chat-listitem {
  588. display: flex;
  589. margin-top: 20rpx;
  590. padding: 10rpx;
  591. }
  592. .chat-listitem-text {
  593. color: #000000;
  594. background: #FFFFFF;
  595. margin-top: 10rpx;
  596. width: fit-content;
  597. padding: 15rpx;
  598. font-size: 30rpx;
  599. height: max-content;
  600. word-wrap: break-word;
  601. word-break: break-all;
  602. border-radius: 10rpx;
  603. }
  604. .chat-listitem-image-type4 {
  605. color: #000000;
  606. background: #FFFFFF;
  607. width: fit-content;
  608. font-size: 30rpx;
  609. height: max-content;
  610. word-wrap: break-word;
  611. word-break: break-all;
  612. border-top-left-radius: 20rpx;
  613. border-top-right-radius: 20rpx;
  614. }
  615. .chat-listitem-image {
  616. margin-top: 5rpx;
  617. width: 75rpx;
  618. height: 75rpx;
  619. border-radius: 5rpx;
  620. }
  621. .save {
  622. width: 130rpx;
  623. text-align: center;
  624. border-radius: 10rpx;
  625. height: 70rpx;
  626. color: #FFF;
  627. background: #1789FD;
  628. margin: 5rpx 10rpx 0;
  629. line-height: 70rpx;
  630. }
  631. </style>