customerService.vue 20 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704
  1. <template>
  2. <view class="customer-service-page">
  3. <!-- 顶部栏 -->
  4. <!-- 顶部导航栏 -->
  5. <view class="custom-navbar">
  6. <view class="navbar-left">
  7. <text class="fa fa-angle-left" @click="goBack"></text>
  8. <view class="navbar-title one-omit">
  9. 时间是一种解药时间是一种解药时间是一种解药时间是一种解药时间是一种解药
  10. </view>
  11. </view>
  12. <view class="navbar-right" @click="showActionSheet">
  13. <image src="@/static/icon/more2.png" style="width: 64rpx;height: 64rpx; margin-top: 15rpx;"
  14. mode="widthFix"></image>
  15. </view>
  16. </view>
  17. <!-- 聊天内容区 -->
  18. <scroll-view class="cs-chat-list" :scroll-y="true" :scroll-with-animation="true"
  19. :scroll-into-view="scrollToView"
  20. :style="{ paddingBottom: (keyboardHeight ? keyboardHeight + 100 : 100) + 'rpx' }">
  21. <view v-for="(msg, idx) in chatList" :key="msg.id">
  22. <view v-if="shouldShowTime(idx)" class="cs-time-bar">
  23. <view class="cs-time-inner">{{ formatTime(msg.time) }}</view>
  24. </view>
  25. <template v-if="msg.type === 'orderCard'">
  26. <view class="cs-msg-order-card">
  27. <image class="order-card-img" :src="msg.order.img" mode="aspectFill" />
  28. <view class="order-card-info">
  29. <view class="order-card-title">{{ msg.order.title }}</view>
  30. <view class="order-card-row">
  31. <text class="order-card-label">订单编号</text>
  32. <text class="order-card-value">{{ msg.order.orderNo }}</text>
  33. </view>
  34. <view class="order-card-row">
  35. <text class="order-card-label">下单时间</text>
  36. <text class="order-card-value">{{ msg.order.orderTime }}</text>
  37. </view>
  38. <view class="order-card-btn-box">
  39. <button class="order-card-btn">查看详情</button>
  40. </view>
  41. </view>
  42. <image class="order-card-avatar" :src="msg.avatar" />
  43. </view>
  44. </template>
  45. <template v-else>
  46. <view :id="'msg-' + msg.id"
  47. :class="['cs-msg-item', msg.type === 'user' ? 'cs-msg-self' : 'cs-msg-other']">
  48. <image class="cs-avatar" :src="msg.avatar" />
  49. <view class="cs-msg-bubble">{{ msg.content }}</view>
  50. </view>
  51. </template>
  52. </view>
  53. <view :id="'bottom-anchor'"></view>
  54. <view v-if="adShow" :style="{ height: orderCardHeight + 'rpx' }"></view>
  55. </scroll-view>
  56. <!-- 底部输入栏 -->
  57. <view class="cs-input-bar" :style="{ bottom: keyboardHeight + 'rpx' }">
  58. <!-- 广告条 -->
  59. <view class="order-card" v-if="adShow">
  60. <view class="order-card-header">
  61. <image class="order-card-img" src="/static/crowdFunding/top-img.png" mode="aspectFill" />
  62. <view class="order-card-info">
  63. <view class="order-card-title one-omit">【Woh】灯塔 塔罗牌 治愈风泛伟特系</view>
  64. <view class="order-card-btn-box">
  65. <button class="order-card-btn" @click="sendOrderCardMsg()">发给客服</button></view>
  66. </view>
  67. <image class="order-card-close" @click="closeOrderCard" src="@/static/icon/wd_icon_guanbi.png" mode="widthFix"></image>
  68. </view>
  69. <view class="order-card-row">
  70. <text class="order-card-label">订单编号</text>
  71. <text class="order-card-value">12201544521215415415415</text>
  72. </view>
  73. <view class="order-card-row">
  74. <text class="order-card-label">下单时间</text>
  75. <text class="order-card-value">2025-05-27 09:35:30</text>
  76. </view>
  77. </view>
  78. <view class="cs-input-area">
  79. <textarea
  80. class="cs-textarea"
  81. v-model="inputValue"
  82. placeholder="在这里输入新消息"
  83. :focus="inputFocused"
  84. :adjust-position="false"
  85. @focus="onInputFocus"
  86. @blur="onInputBlur"
  87. @keyboardheightchange="onKeyboardHeightChange"
  88. maxlength="300"
  89. auto-height
  90. :style="{ 'max-height': '120rpx', 'overflow-y': 'auto' }"
  91. ></textarea>
  92. <view class="emoji-trigger" @tap="toggleEmojiPanel">
  93. <text class="fa fa-smile-o"></text>
  94. </view>
  95. <view class="send_btn" @tap="sendMsg">发送</view>
  96. </view>
  97. </view>
  98. <view class="emoji-panel" :class="{ show: showEmojiPanel }" v-if="showEmojiPanel">
  99. <view class="emoji-grid">
  100. <view class="emoji-item" v-for="(emoji, index) in emojiList" :key="index" @tap="selectEmoji(emoji)">
  101. {{ emoji }}
  102. </view>
  103. </view>
  104. </view>
  105. </view>
  106. </template>
  107. <script>
  108. export default {
  109. data() {
  110. return {
  111. chatList: [
  112. { id: 1, content: '哈哈哈哈哈哈哈哈红红火火恍恍惚惚', type: 'customerService', avatar: '/static/home/avator.png', time: '2025-05-21 20:01' },
  113. { id: 2, content: '哈哈哈哈哈哈哈哈红红火火恍恍惚惚', type: 'customerService', avatar: '/static/home/avator.png', time: '2025-05-21 20:05' },
  114. { id: 3, content: '你好请问可以怎么帮助你', type: 'user', avatar: '/static/makedetail/characterProfilePicture.png', time: '2025-05-21 20:10' }, { id: 4, content: '哈哈哈哈哈哈哈哈红红火火恍恍惚惚哈哈哈哈哈哈哈哈红红火火恍恍惚惚哈哈哈哈哈哈哈哈红红火火恍恍惚惚哈哈哈哈哈哈哈哈红红火火恍恍惚惚哈哈哈哈哈哈哈哈红红火火恍恍惚惚哈哈哈哈哈哈哈哈红红火火恍恍惚惚哈哈哈哈哈哈哈哈红红火火恍恍惚惚哈哈哈哈哈哈哈哈红红火火恍恍惚惚哈哈哈哈哈哈哈哈红红火火恍恍惚惚哈哈哈哈哈哈哈哈红红火火恍恍惚惚哈哈哈哈哈哈哈哈红红火火恍恍惚惚', type: 'user', avatar: '/static/makedetail/characterProfilePicture.png', time: '2025-05-21 20:10' },
  115. { id: 5, content: '哈哈哈哈哈哈哈哈红红火火恍恍惚惚', type: 'customerService', avatar: '/static/home/avator.png', time: '2025-05-21 20:01' },
  116. { id: 6, content: '哈哈哈哈哈哈哈哈红红火火恍恍惚惚', type: 'customerService', avatar: '/static/home/avator.png', time: '2025-05-21 20:05' },
  117. { id: 7, content: '哈哈哈哈哈哈哈哈红红火火恍恍惚惚', type: 'customerService', avatar: '/static/home/avator.png', time: '2025-05-21 20:01' },
  118. { id: 8, content: '哈哈哈哈哈哈哈哈红红火火恍恍惚惚哈哈哈哈哈哈哈哈红红火火恍恍惚惚哈哈哈哈哈哈哈哈红红火火恍恍惚惚哈哈哈哈哈哈哈哈红红火火恍恍惚惚哈哈哈哈哈哈哈哈红红火火恍恍惚惚哈哈哈哈哈哈哈哈红红火火恍恍惚惚哈哈哈哈哈哈哈哈红红火火恍恍惚惚哈哈哈哈哈哈哈哈红红火火恍恍惚惚哈哈哈哈哈哈哈哈红红火火恍恍惚惚哈哈哈哈哈哈哈哈红红火火恍恍惚惚哈哈哈哈哈哈哈哈红红火火恍恍惚惚', type: 'customerService', avatar: '/static/home/avator.png', time: '2025-05-21 20:05' },
  119. { id:9, content: '你好请问可以怎么帮助你', type: 'user', avatar: '/static/makedetail/characterProfilePicture.png', time: '2025-05-21 21:10' }, { id: 13, content: '你好请问可以怎么帮助你', type: 'user', avatar: '/static/makedetail/characterProfilePicture.png', time: '2025-05-21 20:10' },
  120. { id: 10, content: '哈哈哈哈哈哈哈哈红红火火恍恍惚惚', type: 'customerService', avatar: '/static/home/avator.png', time: '2025-05-21 20:01' },
  121. { id: 11, content: '哈哈哈哈哈哈哈哈红红火火恍恍惚惚', type: 'customerService', avatar: '/static/home/avator.png', time: '2025-05-21 23:05' }
  122. ],
  123. inputValue: '',
  124. pollTimer: null,
  125. scrollToView: 'bottom-anchor',
  126. adShow: true,
  127. keyboardHeight: 0,
  128. inputFocused: false,
  129. orderCardHeight: 260, // rpx,实际高度可根据广告条内容微调
  130. showEmojiPanel: false,
  131. emojiList: [
  132. '😀','😁','😂','🤣','😃','😄','😅','😆','😉','😊','😋','😎','😍','😘','🥰','😗','😙','😚','🙂','🤗',
  133. '🤩','🤔','🤨','😐','😑','😶','🙄','😏','😣','😥','😮','🤐','😯','😪','😫','🥱','😴','😌','😛','😜',
  134. '😝','🤤','😒','😓','😔','😕','🙃','🤑','😲','☹️','🙁','😖','😞','😟','😤','😢','😭','😦','😧','😨',
  135. '😩','🤯','😬','😰','😱','🥵','🥶','😳','🤪','😵','😡','😠','🤬','😷','🤒','🤕','🤢','🤮','🥴','😇',
  136. '🥳','🥺','🤠','😈','👿','👹','👺','💀','👻','👽','🤖','💩','😺','😸','😹','😻','😼','😽','🙀','😿',
  137. '😾','🙈','🙉','🙊','💋','💌','💘','💝','💖','💗','💓','💞','💕','💟','❣️','💔','❤️','🧡','💛','💚',
  138. '💙','💜','🤎','🖤','🤍','💯','💢','💥','💫','💦','💨','🕳️','💣','💬','👋','🤚','🖐️','✋','🖖','👌',
  139. '🤏','✌️','🤞','🤟','🤘','🤙','👈','👉','👆','🖕','👇','☝️','👍','👎','✊','👊','🤛','🤜','👏','🙌',
  140. '👐','🤲','🙏','✍️','💅','🤳','💪','🦾','🦵','🦶','👂','👃','🧠','🦷','🦴','👀','👁️','👅','👄'
  141. ],
  142. }
  143. },
  144. onShow() {
  145. this.startPolling();
  146. },
  147. onHide() {
  148. this.clearPolling();
  149. },
  150. onUnload() {
  151. this.clearPolling();
  152. },
  153. methods: {
  154. goBack() {
  155. uni.navigateBack();
  156. },
  157. // 轮询获取消息
  158. startPolling() {
  159. this.clearPolling();
  160. this.pollTimer = setInterval(this.fetchMessages, 30000);
  161. this.fetchMessages();
  162. },
  163. clearPolling() {
  164. if (this.pollTimer) {
  165. clearInterval(this.pollTimer);
  166. this.pollTimer = null;
  167. }
  168. },
  169. fetchMessages() {
  170. // TODO: 替换为实际接口获取消息的接口
  171. // uni.request({ ... })
  172. // 假设新消息加入chatList
  173. // this.chatList.push(...)
  174. // 滚动到底部
  175. this.$nextTick(() => {
  176. this.scrollToView = 'bottom-anchor';
  177. });
  178. },
  179. sendMsg() {
  180. if (!this.inputValue.trim()) return;
  181. this.chatList.push({
  182. id: Date.now(),
  183. content: this.inputValue,
  184. type: 'user',
  185. avatar: '/static/avatar/cs2.png'
  186. });
  187. this.inputValue = '';
  188. this.$nextTick(() => {
  189. this.scrollToView = 'bottom-anchor';
  190. });
  191. // TODO: 发送消息到后端接口
  192. },
  193. closeOrderCard() {
  194. this.adShow = false;
  195. },
  196. shouldShowTime(idx) {
  197. if (idx === 0) return true;
  198. // 找到上一个显示时间条的消息
  199. let lastShowIdx = -1;
  200. for (let i = idx - 1; i >= 0; i--) {
  201. if (this.shouldShowTime(i)) {
  202. lastShowIdx = i;
  203. break;
  204. }
  205. }
  206. if (lastShowIdx === -1) return true;
  207. const curTime = new Date(this.chatList[idx].time.replace(/-/g, '/')).getTime();
  208. const lastTime = new Date(this.chatList[lastShowIdx].time.replace(/-/g, '/')).getTime();
  209. // 20分钟 = 20*60*1000 毫秒
  210. return (curTime - lastTime) > 20 * 60 * 1000;
  211. },
  212. formatTime(timeStr) {
  213. // 例:'2025-05-21 20:01' => '05月21日 20:01'
  214. if (!timeStr) return '';
  215. const d = new Date(timeStr.replace(/-/g, '/'));
  216. const MM = String(d.getMonth() + 1).padStart(2, '0');
  217. const DD = String(d.getDate()).padStart(2, '0');
  218. const hhmm = timeStr.slice(11, 16);
  219. return `${MM}月${DD}日 ${hhmm}`;
  220. },
  221. onInputFocus(e) {
  222. this.inputFocused = true;
  223. },
  224. onInputBlur(e) {
  225. this.inputFocused = false;
  226. this.keyboardHeight = 0;
  227. },
  228. px2rpx(px) {
  229. // 以750设计稿为例,1rpx = 屏幕宽度/750
  230. const screenWidth = uni.getSystemInfoSync().windowWidth;
  231. return px * 750 / screenWidth;
  232. },
  233. onKeyboardHeightChange(e) {
  234. let pxHeight = e.detail ? e.detail.height : (e.height || 0);
  235. // #ifdef H5 || APP-PLUS
  236. this.keyboardHeight = this.px2rpx(pxHeight);
  237. // #endif
  238. // #ifdef MP-WEIXIN
  239. this.keyboardHeight = pxHeight; // 小程序下直接用rpx
  240. // #endif
  241. },
  242. toggleEmojiPanel() {
  243. this.inputFocused = false;
  244. setTimeout(() => {
  245. this.showEmojiPanel = !this.showEmojiPanel;
  246. }, 100);
  247. },
  248. selectEmoji(emoji) {
  249. this.inputValue += emoji;
  250. this.showEmojiPanel = false;
  251. },
  252. sendOrderCardMsg() {
  253. this.chatList.push({
  254. id: Date.now(),
  255. type: 'orderCard',
  256. avatar: '/static/makedetail/characterProfilePicture.png', // 用户头像
  257. order: {
  258. img: '/static/crowdFunding/top-img.png',
  259. title: '【Woh】灯塔 塔罗牌 治愈风泛伟特系',
  260. orderNo: '12201544521215415415415',
  261. orderTime: '2025-05-27 09:35:30'
  262. },
  263. time: this.getNowTime()
  264. });
  265. this.$nextTick(() => {
  266. this.scrollToView = 'bottom-anchor';
  267. });
  268. },
  269. getNowTime() {
  270. const d = new Date();
  271. const pad = n => n < 10 ? '0' + n : n;
  272. return `${d.getFullYear()}-${pad(d.getMonth()+1)}-${pad(d.getDate())} ${pad(d.getHours())}:${pad(d.getMinutes())}`;
  273. },
  274. }
  275. }
  276. </script>
  277. <style lang="scss">
  278. .customer-service-page {
  279. min-height: 100vh;
  280. background: #f2f6f2;
  281. display: flex;
  282. flex-direction: column;
  283. position: relative;
  284. .custom-navbar {
  285. display: flex;
  286. flex-direction: row;
  287. align-items: center;
  288. justify-content: space-between;
  289. height: 90rpx;
  290. padding: 0 20rpx;
  291. padding-top: var(--status-bar-height);
  292. background-color: #ffffff;
  293. position: sticky;
  294. top: 0;
  295. height: calc(90rpx + var(--status-bar-height));
  296. z-index: 100;
  297. .navbar-left {
  298. height: 80rpx;
  299. display: flex;
  300. align-items: center;
  301. justify-content: center;
  302. .fa-angle-left {
  303. font-size: 48rpx;
  304. color: #333;
  305. }
  306. .navbar-title {
  307. max-width: 450rpx;
  308. font-family: 'PingFang SC-Bold';
  309. font-weight: 400;
  310. font-size: 32rpx;
  311. color: #1f1f1f;
  312. padding-left: 20rpx;
  313. }
  314. }
  315. .navbar-right {
  316. width: 80rpx;
  317. height: 80rpx;
  318. display: flex;
  319. justify-content: center;
  320. align-items: center;
  321. .fa-ellipsis-h {
  322. font-size: 36rpx;
  323. color: #333;
  324. }
  325. }
  326. }
  327. .cs-chat-list {
  328. flex: 1;
  329. padding: 24rpx 0 0 0;
  330. overflow-y: auto;
  331. background: #f6f7f9;
  332. .cs-msg-item {
  333. display: flex;
  334. align-items: flex-end;
  335. margin-bottom: 18rpx;
  336. padding: 0 24rpx;
  337. &.cs-msg-other {
  338. flex-direction: row;
  339. .cs-avatar {
  340. margin-right: 12rpx;
  341. }
  342. .cs-msg-bubble {
  343. background: #fff;
  344. color: #1f1f1f;
  345. border-top-left-radius: 0;
  346. border-top-right-radius: 12rpx;
  347. border-bottom-left-radius: 12rpx;
  348. border-bottom-right-radius: 12rpx;
  349. }
  350. }
  351. &.cs-msg-self {
  352. flex-direction: row-reverse;
  353. .cs-avatar {
  354. margin-left: 12rpx;
  355. }
  356. .cs-msg-bubble {
  357. background: #e6f6d9;
  358. color: #1f1f1f;
  359. border-top-right-radius: 0;
  360. border-top-left-radius: 12rpx;
  361. border-bottom-left-radius: 12rpx;
  362. border-bottom-right-radius: 12rpx;
  363. }
  364. }
  365. .cs-avatar {
  366. width: 64rpx;
  367. height: 64rpx;
  368. border-radius: 50%;
  369. }
  370. .cs-msg-bubble {
  371. max-width: 70vw;
  372. min-height: 40rpx;
  373. font-size: 28rpx;
  374. padding: 18rpx 24rpx;
  375. word-break: break-all;
  376. box-shadow: 0 2rpx 8rpx rgba(0, 0, 0, 0.04);
  377. margin-bottom: 2rpx;
  378. display: flex;
  379. align-items: center;
  380. }
  381. }
  382. .cs-time-bar {
  383. display: flex;
  384. justify-content: center;
  385. align-items: center;
  386. margin: 18rpx 0 12rpx 0;
  387. .cs-time-inner {
  388. background: #fff;
  389. color: #b2b2b2;
  390. font-size: 24rpx;
  391. border-radius: 16rpx;
  392. padding: 8rpx 24rpx;
  393. box-shadow: 0 2rpx 8rpx rgba(0, 0, 0, 0.04);
  394. display: inline-block;
  395. }
  396. }
  397. }
  398. .order-card {
  399. background: #fff;
  400. border-radius: 20rpx;
  401. box-shadow: 0 2rpx 8rpx rgba(0, 0, 0, 0.04);
  402. padding: 24rpx 24rpx 18rpx 24rpx;
  403. margin: 24rpx;
  404. position: absolute;
  405. top: -280rpx;
  406. font-size: 28rpx;
  407. width: 670rpx;
  408. .order-card-header {
  409. display: flex;
  410. align-items: flex-start;
  411. position: relative;
  412. .order-card-img {
  413. width: 100rpx;
  414. height: 100rpx;
  415. border-radius: 12rpx;
  416. margin-right: 18rpx;
  417. flex-shrink: 0;
  418. }
  419. .order-card-info {
  420. flex: 1;
  421. display: flex;
  422. flex-direction: column;
  423. justify-content: flex-start;
  424. .order-card-title {
  425. font-size: 30rpx;
  426. color: #1f1f1f;
  427. font-weight: 500;
  428. margin-bottom: 18rpx;
  429. margin-top: 2rpx;
  430. line-height: 1.3;
  431. max-width: 450rpx;
  432. }
  433. .order-card-btn-box {
  434. display: flex;
  435. align-items: center;
  436. justify-content: flex-end;
  437. .order-card-btn {
  438. font-family: 'PingFang SC-Bold';
  439. font-weight: 400;
  440. font-size: 24rpx;
  441. color: #ACF934;
  442. background: #1F1F1F;
  443. border-radius: 128rpx;
  444. padding: 8rpx 14rpx;
  445. line-height: 1.2;
  446. margin: 0;
  447. }
  448. }
  449. }
  450. .order-card-close {
  451. position: absolute;
  452. right: -10rpx;
  453. top:-10rpx;
  454. font-size: 36rpx;
  455. color: #1f1f1f;
  456. background: #fff;
  457. border-radius: 50%;
  458. width: 34rpx;
  459. height: 34rpx;
  460. display: flex;
  461. align-items: center;
  462. justify-content: center;
  463. z-index: 2;
  464. }
  465. }
  466. .order-card-row {
  467. display: flex;
  468. align-items: center;
  469. margin-top: 12rpx;
  470. .order-card-label {
  471. color: #b2b2b2;
  472. font-size: 26rpx;
  473. width: 140rpx;
  474. flex-shrink: 0;
  475. }
  476. .order-card-value {
  477. color: #1f1f1f;
  478. font-size: 26rpx;
  479. margin-left: 12rpx;
  480. word-break: break-all;
  481. }
  482. }
  483. }
  484. .cs-input-bar {
  485. display: flex;
  486. align-items: center;
  487. background: #fff;
  488. padding: 12rpx 16rpx;
  489. border-top: 1rpx solid #ededed;
  490. position: fixed;
  491. left: 0;
  492. right: 0;
  493. bottom: 0;
  494. z-index: 10;
  495. .cs-input-area {
  496. display: flex;
  497. align-items: flex-end;
  498. background: #fff;
  499. border-radius: 32rpx;
  500. padding: 8rpx 12rpx;
  501. flex: 1;
  502. .cs-textarea {
  503. flex: 1;
  504. min-height: 64rpx;
  505. max-height: 120rpx;
  506. overflow-y: auto;
  507. border: none;
  508. font-size: 28rpx;
  509. background: #f6f7f9;
  510. border-radius: 24rpx;
  511. padding: 12rpx 20rpx;
  512. resize: none;
  513. }
  514. .emoji-trigger {
  515. margin: 0 12rpx;
  516. font-size: 36rpx;
  517. color: #999;
  518. display: flex;
  519. align-items: center;
  520. }
  521. .send_btn {
  522. background: #A6E22E;
  523. color: #fff;
  524. border-radius: 32rpx;
  525. font-size: 28rpx;
  526. padding: 0 32rpx;
  527. height: 64rpx;
  528. line-height: 64rpx;
  529. margin-left: 8rpx;
  530. }
  531. }
  532. }
  533. .emoji-panel {
  534. position: fixed;
  535. left: 0;
  536. right: 0;
  537. bottom: 0;
  538. max-height: 50vh;
  539. width: 100vw;
  540. background: #fff;
  541. padding: 12rpx 0 0 0;
  542. border-top: 1rpx solid #ededed;
  543. z-index: 1000;
  544. box-shadow: 0 -4rpx 24rpx rgba(0,0,0,0.08);
  545. overflow-y: auto;
  546. transform: translateY(100%);
  547. transition: transform 0.25s cubic-bezier(0.4,0,0.2,1);
  548. border-top: 20rpx solid #fff;
  549. &.show {
  550. transform: translateY(0);
  551. }
  552. .emoji-grid {
  553. display: flex;
  554. flex-wrap: wrap;
  555. justify-content: center;
  556. padding-bottom: 24rpx;
  557. .emoji-item {
  558. width: 60rpx;
  559. height: 60rpx;
  560. display: flex;
  561. align-items: center;
  562. justify-content: center;
  563. font-size: 36rpx;
  564. color: #333;
  565. margin: 8rpx;
  566. border-radius: 8rpx;
  567. padding: 8rpx;
  568. }
  569. }
  570. }
  571. .cs-msg-order-card {
  572. position: relative;
  573. display: flex;
  574. flex-direction: row;
  575. align-items: flex-start;
  576. background: #fff;
  577. border-radius: 20rpx;
  578. box-shadow: 0 2rpx 8rpx rgba(0,0,0,0.04);
  579. padding: 24rpx 24rpx 18rpx 24rpx;
  580. margin: 24rpx 0 0 0;
  581. width: 600rpx;
  582. min-height: 160rpx;
  583. .order-card-img {
  584. width: 100rpx;
  585. height: 100rpx;
  586. border-radius: 12rpx;
  587. margin-right: 18rpx;
  588. flex-shrink: 0;
  589. }
  590. .order-card-info {
  591. flex: 1;
  592. display: flex;
  593. flex-direction: column;
  594. justify-content: flex-start;
  595. .order-card-title {
  596. font-size: 30rpx;
  597. color: #1f1f1f;
  598. font-weight: 500;
  599. margin-bottom: 18rpx;
  600. margin-top: 2rpx;
  601. line-height: 1.3;
  602. max-width: 350rpx;
  603. word-break: break-all;
  604. }
  605. .order-card-btn-box {
  606. display: flex;
  607. align-items: center;
  608. justify-content: flex-end;
  609. margin-top: 12rpx;
  610. .order-card-btn {
  611. font-family: 'PingFang SC-Bold';
  612. font-weight: 400;
  613. font-size: 24rpx;
  614. color: #1F1F1F;
  615. background: #ACF934;
  616. border-radius: 128rpx;
  617. padding: 8rpx 24rpx;
  618. line-height: 1.2;
  619. margin: 0;
  620. }
  621. }
  622. }
  623. .order-card-row {
  624. display: flex;
  625. align-items: center;
  626. margin-top: 8rpx;
  627. .order-card-label {
  628. color: #b2b2b2;
  629. font-size: 26rpx;
  630. width: 140rpx;
  631. flex-shrink: 0;
  632. }
  633. .order-card-value {
  634. color: #1f1f1f;
  635. font-size: 26rpx;
  636. margin-left: 12rpx;
  637. word-break: break-all;
  638. }
  639. }
  640. .order-card-avatar {
  641. position: absolute;
  642. top: -32rpx;
  643. right: -32rpx;
  644. width: 64rpx;
  645. height: 64rpx;
  646. border-radius: 50%;
  647. box-shadow: 0 2rpx 8rpx rgba(0,0,0,0.08);
  648. background: #fff;
  649. }
  650. }
  651. }
  652. </style>