index.vue 22 KB

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