index.vue 22 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851
  1. <template>
  2. <s-layout class="chat-wrap" title="客服" navbar="inner">
  3. <div class="status">
  4. {{ socketState.isConnect ? customerServiceInfo.title : '网络已断开,请检查网络后刷新重试' }}
  5. </div>
  6. <div class="page-bg" :style="{ height: sys_navBar + 'px' }"></div>
  7. <view class="chat-box" :style="{ height: pageHeight + 'px' }">
  8. <scroll-view
  9. :style="{ height: pageHeight + 'px' }"
  10. scroll-y="true"
  11. :scroll-with-animation="false"
  12. :enable-back-to-top="true"
  13. :scroll-into-view="chat.scrollInto"
  14. >
  15. <button
  16. class="loadmore-btn ss-reset-button"
  17. v-if="
  18. chatList.length &&
  19. chatHistoryPagination.lastPage > 1 &&
  20. loadingMap[chatHistoryPagination.loadStatus].title
  21. "
  22. @click="onLoadMore"
  23. >
  24. {{ loadingMap[chatHistoryPagination.loadStatus].title }}
  25. <i
  26. class="loadmore-icon sa-m-l-6"
  27. :class="loadingMap[chatHistoryPagination.loadStatus].icon"
  28. ></i>
  29. </button>
  30. <view class="message-item ss-flex-col" v-for="(item, index) in chatList" :key="index">
  31. <view class="ss-flex ss-row-center ss-col-center">
  32. <!-- 日期 -->
  33. <view v-if="item.from !== 'system' && showTime(item, index)" class="date-message">
  34. {{ formatTime(item.date) }}
  35. </view>
  36. <!-- 系统消息 -->
  37. <view v-if="item.from === 'system'" class="system-message">
  38. {{ item.content.text }}
  39. </view>
  40. </view>
  41. <!-- 常见问题 -->
  42. <view v-if="item.mode === 'template' && item.content.list.length" class="template-wrap">
  43. <view class="title">猜你想问</view>
  44. <view
  45. class="item"
  46. v-for="(item, index) in item.content.list"
  47. :key="index"
  48. @click="onTemplateList(item)"
  49. >
  50. * {{ item.title }}
  51. </view>
  52. </view>
  53. <view
  54. v-if="
  55. (item.from === 'customer_service' && item.mode !== 'template') ||
  56. item.from === 'customer'
  57. "
  58. class="ss-flex ss-col-top"
  59. :class="[
  60. item.from === 'customer_service'
  61. ? `ss-row-left`
  62. : item.from === 'customer'
  63. ? `ss-row-right`
  64. : '',
  65. ]"
  66. >
  67. <!-- 客服头像 -->
  68. <image
  69. v-show="item.from === 'customer_service'"
  70. class="chat-avatar ss-m-r-24"
  71. :src="
  72. sheep.$url.cdn(item?.sender?.avatar) ||
  73. sheep.$url.static('/static/img/shop/chat/default.png')
  74. "
  75. mode="aspectFill"
  76. ></image>
  77. <!-- 发送状态 -->
  78. <span
  79. v-if="
  80. item.from === 'customer' &&
  81. index == chatData.chatList.length - 1 &&
  82. chatData.isSendSucces !== 0
  83. "
  84. class="send-status"
  85. >
  86. <image
  87. v-if="chatData.isSendSucces == -1"
  88. class="loading"
  89. :src="sheep.$url.static('/static/img/shop/chat/loading.png')"
  90. mode="aspectFill"
  91. ></image>
  92. <image
  93. v-if="chatData.isSendSucces == 1"
  94. class="warning"
  95. :src="sheep.$url.static('/static/img/shop/chat/warning.png')"
  96. mode="aspectFill"
  97. @click="onAgainSendMessage(item)"
  98. ></image>
  99. </span>
  100. <!-- 内容 -->
  101. <template v-if="item.mode === 'text'">
  102. <view class="message-box" :class="[item.from]">
  103. <div
  104. class="message-text ss-flex"
  105. @click="onRichtext"
  106. v-html="replaceEmoji(item.content.text)"
  107. ></div>
  108. </view>
  109. </template>
  110. <template v-if="item.mode === 'image'">
  111. <view class="message-box" :class="[item.from]" :style="{ width: '200rpx' }">
  112. <su-image
  113. class="message-img"
  114. isPreview
  115. :previewList="[sheep.$url.cdn(item.content.url)]"
  116. :current="0"
  117. :src="sheep.$url.cdn(item.content.url)"
  118. :height="200"
  119. mode="scaleToFill"
  120. ></su-image>
  121. </view>
  122. </template>
  123. <template v-if="item.mode === 'goods'">
  124. <GoodsItem
  125. :goodsData="item.content.item"
  126. @tap="
  127. sheep.$router.go('/pages/goods/index', {
  128. id: item.content.item.id,
  129. })
  130. "
  131. />
  132. </template>
  133. <template v-if="item.mode === 'order'">
  134. <OrderItem
  135. from="msg"
  136. :orderData="item.content.item"
  137. @tap="
  138. sheep.$router.go('/pages/order/detail', {
  139. id: item.content.item.id,
  140. })
  141. "
  142. />
  143. </template>
  144. <!-- user头像 -->
  145. <image
  146. v-show="item.from === 'customer'"
  147. class="chat-avatar ss-m-l-24"
  148. :src="sheep.$url.cdn(customerUserInfo.avatar)"
  149. mode="aspectFill"
  150. >
  151. </image>
  152. </view>
  153. </view>
  154. <view id="scrollBottom"></view>
  155. </scroll-view>
  156. </view>
  157. <su-fixed bottom>
  158. <view class="send-wrap ss-flex">
  159. <view class="left ss-flex ss-flex-1">
  160. <uni-easyinput
  161. class="ss-flex-1 ss-p-l-22"
  162. :inputBorder="false"
  163. :clearable="false"
  164. v-model="chat.msg"
  165. placeholder="请输入你要咨询的问题"
  166. ></uni-easyinput>
  167. </view>
  168. <text class="sicon-basic bq" @tap.stop="onTools('emoji')"></text>
  169. <text
  170. v-if="!chat.msg"
  171. class="sicon-edit"
  172. :class="{ 'is-active': chat.toolsMode == 'tools' }"
  173. @tap.stop="onTools('tools')"
  174. ></text>
  175. <button v-if="chat.msg" class="ss-reset-button send-btn" @tap="onSendMessage">
  176. 发送
  177. </button>
  178. </view>
  179. </su-fixed>
  180. <su-popup
  181. :show="chat.showTools"
  182. @close="
  183. chat.showTools = false;
  184. chat.toolsMode = '';
  185. "
  186. >
  187. <view class="ss-modal-box ss-flex-col">
  188. <view class="send-wrap ss-flex">
  189. <view class="left ss-flex ss-flex-1">
  190. <uni-easyinput
  191. class="ss-flex-1 ss-p-l-22"
  192. :inputBorder="false"
  193. :clearable="false"
  194. v-model="chat.msg"
  195. placeholder="请输入你要咨询的问题"
  196. ></uni-easyinput>
  197. </view>
  198. <text class="sicon-basic bq" @tap.stop="onTools('emoji')"></text>
  199. <text></text>
  200. <text
  201. v-if="!chat.msg"
  202. class="sicon-edit"
  203. :class="{ 'is-active': chat.toolsMode == 'tools' }"
  204. @tap.stop="onTools('tools')"
  205. ></text>
  206. <button v-if="chat.msg" class="ss-reset-button send-btn" @tap="onSendMessage">
  207. 发送
  208. </button>
  209. </view>
  210. <view class="content ss-flex ss-flex-1">
  211. <template v-if="chat.toolsMode == 'emoji'">
  212. <swiper
  213. class="emoji-swiper"
  214. :indicator-dots="true"
  215. circular
  216. indicator-active-color="#7063D2"
  217. indicator-color="rgba(235, 231, 255, 1)"
  218. :autoplay="false"
  219. :interval="3000"
  220. :duration="1000"
  221. >
  222. <swiper-item v-for="emoji in emojiPage" :key="emoji">
  223. <view class="ss-flex ss-flex-wrap">
  224. <template v-for="item in emoji" :key="item">
  225. <image
  226. class="emoji-img"
  227. :src="sheep.$url.cdn(`/static/img/chat/emoji/${item.file}`)"
  228. @tap="onEmoji(item)"
  229. >
  230. </image>
  231. </template>
  232. </view>
  233. </swiper-item>
  234. </swiper>
  235. </template>
  236. <template v-else>
  237. <view class="image">
  238. <s-uploader
  239. file-mediatype="image"
  240. :imageStyles="{ width: 50, height: 50, border: false }"
  241. @select="onSelect({ type: 'image', data: $event })"
  242. >
  243. <image
  244. class="icon"
  245. :src="sheep.$url.static('/static/img/shop/chat/image.png')"
  246. mode="aspectFill"
  247. ></image>
  248. </s-uploader>
  249. <view>图片</view>
  250. </view>
  251. <view class="goods" @tap="onShowSelect('goods')">
  252. <image
  253. class="icon"
  254. :src="sheep.$url.static('/static/img/shop/chat/goods.png')"
  255. mode="aspectFill"
  256. ></image>
  257. <view>商品</view>
  258. </view>
  259. <view class="order" @tap="onShowSelect('order')">
  260. <image
  261. class="icon"
  262. :src="sheep.$url.static('/static/img/shop/chat/order.png')"
  263. mode="aspectFill"
  264. ></image>
  265. <view>订单</view>
  266. </view>
  267. </template>
  268. </view>
  269. </view>
  270. </su-popup>
  271. <SelectPopup
  272. :mode="chat.selectMode"
  273. :show="chat.showSelect"
  274. @select="onSelect"
  275. @close="chat.showSelect = false"
  276. />
  277. </s-layout>
  278. </template>
  279. <script setup>
  280. import sheep from '@/sheep';
  281. import { computed, reactive, toRefs } from 'vue';
  282. import { onLoad } from '@dcloudio/uni-app';
  283. import { emojiList, emojiPage } from './emoji.js';
  284. import SelectPopup from './components/select-popup.vue';
  285. import GoodsItem from './components/goods.vue';
  286. import OrderItem from './components/order.vue';
  287. import { useChatWebSocket } from './socket';
  288. const {
  289. socketInit,
  290. state: chatData,
  291. socketSendMsg,
  292. formatChatInput,
  293. socketHistoryList,
  294. onDrop,
  295. onPaste,
  296. getFocus,
  297. // upload,
  298. getUserToken,
  299. // socketTest,
  300. showTime,
  301. formatTime,
  302. } = useChatWebSocket();
  303. const chatList = toRefs(chatData).chatList;
  304. const customerServiceInfo = toRefs(chatData).customerServerInfo;
  305. const chatHistoryPagination = toRefs(chatData).chatHistoryPagination;
  306. const customerUserInfo = toRefs(chatData).customerUserInfo;
  307. const socketState = toRefs(chatData).socketState;
  308. const sys_navBar = sheep.$platform.navbar;
  309. const chatConfig = computed(() => sheep.$store('app').chat);
  310. const { screenHeight, safeAreaInsets, safeArea, screenWidth } = sheep.$platform.device;
  311. const pageHeight = safeArea.height - 44 - 35 - 50;
  312. const chatStatus = {
  313. online: {
  314. text: '在线',
  315. colorVariate: '#46c55f',
  316. },
  317. offline: {
  318. text: '离线',
  319. colorVariate: '#b5b5b5',
  320. },
  321. busy: {
  322. text: '忙碌',
  323. colorVariate: '#ff0e1b',
  324. },
  325. };
  326. // 加载更多
  327. const loadingMap = {
  328. loadmore: {
  329. title: '查看更多',
  330. icon: 'el-icon-d-arrow-left',
  331. },
  332. nomore: {
  333. title: '没有更多了',
  334. icon: '',
  335. },
  336. loading: {
  337. title: '加载中... ',
  338. icon: 'el-icon-loading',
  339. },
  340. };
  341. const onLoadMore = () => {
  342. chatHistoryPagination.value.page < chatHistoryPagination.value.lastPage && socketHistoryList();
  343. };
  344. const chat = reactive({
  345. msg: '',
  346. scrollInto: '',
  347. showTools: false,
  348. toolsMode: '',
  349. showSelect: false,
  350. selectMode: '',
  351. chatStyle: {
  352. mode: 'inner',
  353. color: '#F8270F',
  354. type: 'color',
  355. alwaysShow: 1,
  356. src: '',
  357. list: {},
  358. },
  359. });
  360. // 点击工具栏开关
  361. function onTools(mode) {
  362. if (!socketState.value.isConnect) {
  363. sheep.$helper.toast(socketState.value.tip || '您已掉线!请返回重试');
  364. return;
  365. }
  366. if (!chat.toolsMode || chat.toolsMode === mode) {
  367. chat.showTools = !chat.showTools;
  368. }
  369. chat.toolsMode = mode;
  370. if (!chat.showTools) {
  371. chat.toolsMode = '';
  372. }
  373. }
  374. function onShowSelect(mode) {
  375. chat.showTools = false;
  376. chat.showSelect = true;
  377. chat.selectMode = mode;
  378. }
  379. async function onSelect({ type, data }) {
  380. let msg = '';
  381. switch (type) {
  382. case 'image':
  383. const { path, fullurl } = await sheep.$api.app.upload(data.tempFiles[0].path, 'default');
  384. msg = {
  385. from: 'customer',
  386. mode: 'image',
  387. date: new Date().getTime(),
  388. content: {
  389. url: fullurl,
  390. path: path,
  391. },
  392. };
  393. break;
  394. case 'goods':
  395. msg = {
  396. from: 'customer',
  397. mode: 'goods',
  398. date: new Date().getTime(),
  399. content: {
  400. item: {
  401. id: data.goods.id,
  402. title: data.goods.title,
  403. image: data.goods.image,
  404. price: data.goods.price,
  405. stock: data.goods.stock,
  406. },
  407. },
  408. };
  409. break;
  410. case 'order':
  411. msg = {
  412. from: 'customer',
  413. mode: 'order',
  414. date: new Date().getTime(),
  415. content: {
  416. item: {
  417. id: data.id,
  418. order_sn: data.order_sn,
  419. create_time: data.create_time,
  420. pay_fee: data.pay_fee,
  421. items: data.items.filter((item) => ({
  422. goods_id: item.goods_id,
  423. goods_title: item.goods_title,
  424. goods_image: item.goods_image,
  425. goods_price: item.goods_price,
  426. })),
  427. status_text: data.status_text,
  428. },
  429. },
  430. };
  431. break;
  432. }
  433. if (msg) {
  434. socketSendMsg(msg, () => {
  435. scrollBottom();
  436. });
  437. // scrollBottom();
  438. chat.showTools = false;
  439. chat.showSelect = false;
  440. chat.selectMode = '';
  441. }
  442. }
  443. function onAgainSendMessage(item) {
  444. if (!socketState.value.isConnect) {
  445. sheep.$helper.toast(socketState.value.tip || '您已掉线!请返回重试');
  446. return;
  447. }
  448. if (!item) return;
  449. const data = {
  450. from: 'customer',
  451. mode: 'text',
  452. date: new Date().getTime(),
  453. content: item.content,
  454. };
  455. socketSendMsg(data, () => {
  456. scrollBottom();
  457. });
  458. }
  459. function onSendMessage() {
  460. if (!socketState.value.isConnect) {
  461. sheep.$helper.toast(socketState.value.tip || '您已掉线!请返回重试');
  462. return;
  463. }
  464. if (!chat.msg) return;
  465. const data = {
  466. from: 'customer',
  467. mode: 'text',
  468. date: new Date().getTime(),
  469. content: {
  470. text: chat.msg,
  471. },
  472. };
  473. socketSendMsg(data, () => {
  474. scrollBottom();
  475. });
  476. chat.showTools = false;
  477. // scrollBottom();
  478. chat.msg = '';
  479. }
  480. // 点击猜你想问
  481. function onTemplateList(e) {
  482. if (!socketState.value.isConnect) {
  483. sheep.$helper.toast(socketState.value.tip || '您已掉线!请返回重试');
  484. return;
  485. }
  486. const data = {
  487. from: 'customer',
  488. mode: 'text',
  489. date: new Date().getTime(),
  490. content: {
  491. text: e.title,
  492. },
  493. customData: {
  494. question_id: e.id,
  495. },
  496. };
  497. socketSendMsg(data, () => {
  498. scrollBottom();
  499. });
  500. // scrollBottom();
  501. }
  502. function onEmoji(item) {
  503. chat.msg += item.name;
  504. }
  505. function selEmojiFile(name) {
  506. for (let index in emojiList) {
  507. if (emojiList[index].name === name) {
  508. return emojiList[index].file;
  509. }
  510. }
  511. return false;
  512. }
  513. function replaceEmoji(data) {
  514. let newData = data;
  515. if (typeof newData !== 'object') {
  516. let reg = /\[(.+?)\]/g; // [] 中括号
  517. let zhEmojiName = newData.match(reg);
  518. if (zhEmojiName) {
  519. zhEmojiName.forEach((item) => {
  520. let emojiFile = selEmojiFile(item);
  521. newData = newData.replace(
  522. item,
  523. `<img class="chat-img" style="width:25px;height:25px;margin:0 3px" src="${sheep.$url.cdn(
  524. '/static/img/chat/emoji/' + emojiFile,
  525. )}"/>`,
  526. );
  527. });
  528. }
  529. }
  530. return newData;
  531. }
  532. function scrollBottom() {
  533. let timeout = null;
  534. chat.scrollInto = '';
  535. clearTimeout(timeout);
  536. timeout = setTimeout(() => {
  537. chat.scrollInto = 'scrollBottom';
  538. }, 100);
  539. }
  540. onLoad(async () => {
  541. const { error } = await getUserToken();
  542. if (error === 0) {
  543. socketInit(chatConfig.value, () => {
  544. scrollBottom();
  545. });
  546. } else {
  547. socketState.value.isConnect = false;
  548. }
  549. });
  550. </script>
  551. <style lang="scss" scoped>
  552. .page-bg {
  553. width: 100%;
  554. position: absolute;
  555. top: 0;
  556. left: 0;
  557. background: linear-gradient(90deg, var(--ui-BG-Main), var(--ui-BG-Main-gradient));
  558. background-size: 750rpx 100%;
  559. z-index: 1;
  560. }
  561. .chat-wrap {
  562. // :deep() {
  563. // .ui-navbar-box {
  564. // background: linear-gradient(90deg, var(--ui-BG-Main), var(--ui-BG-Main-gradient));
  565. // }
  566. // }
  567. .status {
  568. position: relative;
  569. box-sizing: border-box;
  570. z-index: 3;
  571. height: 70rpx;
  572. padding: 0 30rpx;
  573. background: var(--ui-BG-Main-opacity-1);
  574. display: flex;
  575. align-items: center;
  576. font-size: 30rpx;
  577. font-weight: 400;
  578. color: var(--ui-BG-Main);
  579. }
  580. .chat-box {
  581. padding: 0 20rpx 0;
  582. .loadmore-btn {
  583. width: 98%;
  584. height: 40px;
  585. font-size: 12px;
  586. color: #8c8c8c;
  587. .loadmore-icon {
  588. transform: rotate(90deg);
  589. }
  590. }
  591. .message-item {
  592. margin-bottom: 33rpx;
  593. }
  594. .date-message,
  595. .system-message {
  596. width: fit-content;
  597. border-radius: 12rpx;
  598. padding: 8rpx 16rpx;
  599. margin-bottom: 16rpx;
  600. background-color: var(--ui-BG-3);
  601. color: #999;
  602. font-size: 24rpx;
  603. }
  604. .chat-avatar {
  605. width: 70rpx;
  606. height: 70rpx;
  607. border-radius: 50%;
  608. }
  609. .send-status {
  610. color: #333;
  611. height: 80rpx;
  612. margin-right: 8rpx;
  613. display: flex;
  614. align-items: center;
  615. .loading {
  616. width: 32rpx;
  617. height: 32rpx;
  618. -webkit-animation: rotating 2s linear infinite;
  619. animation: rotating 2s linear infinite;
  620. @-webkit-keyframes rotating {
  621. 0% {
  622. transform: rotateZ(0);
  623. }
  624. 100% {
  625. transform: rotateZ(360deg);
  626. }
  627. }
  628. @keyframes rotating {
  629. 0% {
  630. transform: rotateZ(0);
  631. }
  632. 100% {
  633. transform: rotateZ(360deg);
  634. }
  635. }
  636. }
  637. .warning {
  638. width: 32rpx;
  639. height: 32rpx;
  640. color: #ff3000;
  641. }
  642. }
  643. .message-box {
  644. max-width: 50%;
  645. font-size: 16px;
  646. line-height: 20px;
  647. // max-width: 500rpx;
  648. white-space: normal;
  649. word-break: break-all;
  650. word-wrap: break-word;
  651. padding: 20rpx;
  652. border-radius: 10rpx;
  653. color: #fff;
  654. background: linear-gradient(90deg, var(--ui-BG-Main), var(--ui-BG-Main-gradient));
  655. &.customer_service {
  656. background: #fff;
  657. color: #333;
  658. }
  659. :deep() {
  660. .imgred {
  661. width: 100%;
  662. }
  663. .imgred,
  664. img {
  665. width: 100%;
  666. }
  667. }
  668. }
  669. :deep() {
  670. .goods,
  671. .order {
  672. max-width: 500rpx;
  673. }
  674. }
  675. .message-img {
  676. width: 100px;
  677. height: 100px;
  678. border-radius: 6rpx;
  679. }
  680. .template-wrap {
  681. // width: 100%;
  682. padding: 20rpx 24rpx;
  683. background: #fff;
  684. border-radius: 10rpx;
  685. .title {
  686. font-size: 26rpx;
  687. font-weight: 500;
  688. color: #333;
  689. margin-bottom: 29rpx;
  690. }
  691. .item {
  692. font-size: 24rpx;
  693. color: var(--ui-BG-Main);
  694. margin-bottom: 16rpx;
  695. &:last-of-type {
  696. margin-bottom: 0;
  697. }
  698. }
  699. }
  700. .error-img {
  701. width: 400rpx;
  702. height: 400rpx;
  703. }
  704. #scrollBottom {
  705. height: 120rpx;
  706. }
  707. }
  708. .send-wrap {
  709. padding: 18rpx 20rpx;
  710. background: #fff;
  711. .left {
  712. height: 64rpx;
  713. border-radius: 32rpx;
  714. background: var(--ui-BG-1);
  715. }
  716. .bq {
  717. font-size: 50rpx;
  718. margin-left: 10rpx;
  719. }
  720. .sicon-edit {
  721. font-size: 50rpx;
  722. margin-left: 10rpx;
  723. transform: rotate(0deg);
  724. transition: all linear 0.2s;
  725. &.is-active {
  726. transform: rotate(45deg);
  727. }
  728. }
  729. .send-btn {
  730. width: 100rpx;
  731. height: 60rpx;
  732. line-height: 60rpx;
  733. border-radius: 30rpx;
  734. background: linear-gradient(90deg, var(--ui-BG-Main), var(--ui-BG-Main-gradient));
  735. font-size: 26rpx;
  736. color: #fff;
  737. margin-left: 11rpx;
  738. }
  739. }
  740. }
  741. .content {
  742. width: 100%;
  743. align-content: space-around;
  744. border-top: 1px solid #dfdfdf;
  745. padding: 20rpx 0 0;
  746. .emoji-swiper {
  747. width: 100%;
  748. height: 280rpx;
  749. padding: 0 20rpx;
  750. .emoji-img {
  751. width: 50rpx;
  752. height: 50rpx;
  753. display: inline-block;
  754. margin: 10rpx;
  755. }
  756. }
  757. .image,
  758. .goods,
  759. .order {
  760. width: 33.3%;
  761. height: 280rpx;
  762. text-align: center;
  763. font-size: 24rpx;
  764. color: #333;
  765. display: flex;
  766. flex-direction: column;
  767. align-items: center;
  768. justify-content: center;
  769. .icon {
  770. width: 50rpx;
  771. height: 50rpx;
  772. margin-bottom: 21rpx;
  773. }
  774. }
  775. :deep() {
  776. .uni-file-picker__container {
  777. justify-content: center;
  778. }
  779. .file-picker__box {
  780. display: none;
  781. &:last-of-type {
  782. display: flex;
  783. }
  784. }
  785. }
  786. }
  787. </style>