index.vue 28 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820
  1. <template>
  2. <div class="message-wrapper">
  3. <div class="tab-content" ref="pageWrapperDom" @scroll="pageScroll">
  4. <div class="list-wrapper" ref="pageGiveListDom">
  5. <div class="give-list" v-if="currentTabIndex == 0">
  6. <template v-if="giveList.length">
  7. <div class="cell" :class="{ 'cell-center': item.type == 1 || item.type == 3 || item.type == 5 }"
  8. v-for="(item, index) in giveList" :key="index" @click="clickListItem(item, index)">
  9. <red-dot class="red-dots" v-if="item.unReadMsgCount > 0 && isReadMsg"></red-dot>
  10. <div class="img-wrapper">
  11. <!-- 收到红包 -->
  12. <template v-if="item.type == 1 || item.type == 3 || item.type == 5">
  13. <img class="icon-avatar" :src="item.userInfo.avatarUrl" />
  14. <img class="icon-give" v-if="item.type == 5" :src="require('@/assets/svg/icon-small-treasure.svg')" />
  15. <img class="icon-give" v-else :src="require('@/assets/svg/icon-get-giveaways-s.svg')" />
  16. </template>
  17. <!-- 发出去红包 -->
  18. <template v-else-if="item.type == 2">
  19. <template v-if="item.postTaskLuckdrop.luckdropType === PlayType.treasure">
  20. <img class="icon-big-give" :src="require('@/assets/svg/icon-big-treasure.svg')" />
  21. <img class="icon-mark-give" :src="require('@/assets/svg/icon-send-giveaways-mark.svg')" />
  22. </template>
  23. <template v-else>
  24. <img class="icon-big-give" :src="require('@/assets/svg/icon-send-giveaways-s.svg')" />
  25. <img class="icon-mark-give" :src="require('@/assets/svg/icon-send-giveaways-mark.svg')" />
  26. </template>
  27. </template>
  28. <!-- 转出NFT记录 -->
  29. <template v-else-if="item.type == 4">
  30. <img v-if="item.nftItemVO?.imagePath" class="icon-big-give" :src="item.nftItemVO?.imagePath" />
  31. <div v-else style="margin-top: 12px;">
  32. <nft-card :nftItemId="item.nftItemId" :item="item.nftItemVO.createImageInfo" :width="34">
  33. </nft-card>
  34. </div>
  35. </template>
  36. </div>
  37. <div class="info-wrapper" :class="{ 'info-center': item.type == 1 || item.type == 5 }">
  38. <div class="left">
  39. <div class="nickname">
  40. <template v-if="item.type == 1">
  41. Get Giveaway
  42. </template>
  43. <template v-else-if="item.type == 2">
  44. <template v-if="item.postTaskLuckdrop.luckdropType === PlayType.common">
  45. Send Giveaway
  46. </template>
  47. <template v-else-if="item.postTaskLuckdrop.luckdropType === PlayType.lottery">
  48. Lottery Giveaway
  49. </template>
  50. <template v-else-if="item.postTaskLuckdrop.luckdropType === PlayType.treasure">
  51. Treasure Hunt
  52. </template>
  53. </template>
  54. <template v-else-if="item.type == 3">
  55. Lottery
  56. </template>
  57. <template v-else-if="item.type == 4">
  58. Transfer NFT
  59. </template>
  60. <template v-else-if="item.type == 5">
  61. Treasure Hunt
  62. </template>
  63. </div>
  64. <div class="time">
  65. {{ moment(item.timestamp).format("MM-DD HH:mm:ss") }}
  66. </div>
  67. </div>
  68. <div class="right">
  69. <div class="msg">
  70. <div class="bold" :class="{
  71. 'align-content':
  72. (item.type == 2 ||
  73. (item.type == 1 && item.status == 1 || item.type == 5 && item.status == 1)) &&
  74. item?.amount?.length + item?.currencySymbol?.length > 12,
  75. 'custom-bold': item.rewardType === RewardType.custom
  76. }">
  77. <!-- 领取的普通红包 -->
  78. <template v-if="item.type == 1">
  79. <!-- 进行中-->
  80. <template v-if="item.status == 0">
  81. In Progress
  82. </template>
  83. <!-- 已完成 -->
  84. <template v-else-if="item.status == 1">
  85. <!-- 已中奖-货币型奖品展示 -->
  86. <template v-if="item.rewardType === RewardType.money">
  87. <span class="blance">
  88. <a-tooltip :title="item.amount">
  89. {{ getBit(item.amount) }}</a-tooltip>
  90. </span>
  91. <div class="coin-type-wrapper">
  92. <span class="coin-type">{{
  93. item.currencySymbol || ""
  94. }}</span>
  95. <img :src="item.currencyIconPath" alt="" />
  96. </div>
  97. </template>
  98. <!-- 已中奖-通用型奖品展示 -->
  99. <template v-else>
  100. <span class="blance cuntom-prize">{{ item.customizedReward }}</span>
  101. </template>
  102. </template>
  103. <!-- 已过期 -->
  104. <template v-else-if="item.status == 2">
  105. Timeout
  106. </template>
  107. </template>
  108. <!-- 发出去的 -->
  109. <template v-else-if="item.type == 2">
  110. <!-- 已中奖-货币型奖品展示 -->
  111. <template v-if="item.rewardType === RewardType.money">
  112. <span class="blance">
  113. <a-tooltip :title="'-' + item.amount">
  114. -{{ getBit(item.amount) }}
  115. </a-tooltip>
  116. </span>
  117. <div class="coin-type-wrapper">
  118. <span class="coin-type">{{
  119. item.currencySymbol || ""
  120. }}</span>
  121. <img :src="item.currencyIconPath" alt="" />
  122. </div>
  123. </template>
  124. <!-- 已中奖-通用型奖品展示 -->
  125. <template v-else>
  126. <span class="blance cuntom-prize">
  127. {{ item.customizedReward || '' }}<span class="cuntom-prize-icon">X</span>
  128. <span class="cuntom-prize-total">{{ item?.postTaskLuckdrop?.totalCount || '' }}</span>
  129. </span>
  130. </template>
  131. </template>
  132. <!-- 抽奖 -->
  133. <template v-else-if="item.type == 3">
  134. <template v-if="item.status == 1">In Progress</template>
  135. <template v-else-if="item.status == 2">
  136. Open in {{ item.downTime || '' }}
  137. </template>
  138. <template v-else-if="item.status == 3">
  139. Unfinished
  140. </template>
  141. <template v-else-if="item.status == 4">
  142. <!-- 已中奖-货币型奖品展示 -->
  143. <template v-if="item.rewardType === RewardType.money">
  144. <span class="blance">
  145. <a-tooltip :title="item.amount">
  146. +{{ getBit(item.amount) }}
  147. </a-tooltip>
  148. </span>
  149. <div class="coin-type-wrapper">
  150. <span class="coin-type">{{
  151. item.currencySymbol || ""
  152. }}</span>
  153. <img :src="item.currencyIconPath" alt="" />
  154. </div>
  155. </template>
  156. <!-- 已中奖-通用型奖品展示 -->
  157. <template v-else>
  158. <span class="blance cuntom-prize">{{ item.customizedReward }}</span>
  159. </template>
  160. </template>
  161. <template v-else-if="item.status == 5">
  162. Didn't win
  163. </template>
  164. <template v-else-if="item.status == 6">
  165. Giveaway Expired
  166. </template>
  167. </template>
  168. <!-- NFT 转出记录 -->
  169. <template v-else-if="item.type == 4">
  170. <template v-if="item.status == 0 || item.status == 1">Transferring</template>
  171. <template v-else-if="item.status == 2">Successful</template>
  172. <template v-else-if="item.status == 3">Transfe Failed</template>
  173. </template>
  174. <!-- 领取的夺宝红包 -->
  175. <template v-else-if="item.type == 5">
  176. <!-- 进行中-->
  177. <template v-if="item.status == 0">
  178. In Progress
  179. </template>
  180. <!-- 已完成 -->
  181. <template v-else-if="item.status == 2">
  182. <span class="blance">
  183. <a-tooltip :title="item.amount">
  184. {{ getBit(item.amount) }}</a-tooltip>
  185. </span>
  186. <div class="coin-type-wrapper">
  187. <span class="coin-type">{{
  188. item.currencySymbol || ""
  189. }}</span>
  190. <img :src="item.currencyIconPath" alt="" />
  191. </div>
  192. </template>
  193. <!-- 已过期 -->
  194. <template v-else-if="item.status == 3">
  195. Giveaway Expired
  196. </template>
  197. </template>
  198. </div>
  199. <!-- 发出的红包显示 -->
  200. <div class="desc" v-if="item.type == 2">
  201. <!-- 未发送-->
  202. <template v-if="item.postTaskLuckdrop.reSendAvailable">
  203. Unpublished
  204. </template>
  205. <!-- 进行中 -->
  206. <template v-else-if="item.status == 1">
  207. <template
  208. v-if="item.postTaskLuckdrop && item.postTaskLuckdrop.luckdropType == PlayType.lottery">
  209. {{ item.downTime || '' }}
  210. </template>
  211. <template v-else-if="item.postTaskLuckdrop.luckdropType != PlayType.treasure">
  212. {{ item.postTaskLuckdrop.receivedCount }}/{{
  213. item.postTaskLuckdrop.totalCount
  214. }}
  215. </template>
  216. </template>
  217. <!-- 2:已结束; 3:提前终止-->
  218. <template v-else-if="item.status == 2 || item.status == 3">
  219. <!-- 普通红包 -->
  220. <template
  221. v-if="item.postTaskLuckdrop.luckdropType == PlayType.common || item.postTaskLuckdrop.luckdropType == PlayType.treasure">
  222. <template v-if="item.status == 2">
  223. {{ item.postTaskLuckdrop.luckdropType == PlayType.common ? '(Time expired)' : 'Complete' }}
  224. </template>
  225. <template v-if="item.status == 3">
  226. {{ item.srcContentId && item.postTaskLuckdrop.luckdropType != PlayType.treasure ?
  227. '(Termination)' : 'Termination'
  228. }}
  229. </template>
  230. <template
  231. v-if="(item.status == 2 || item.status == 3) && item.srcContentId && item.postTaskLuckdrop.luckdropType != PlayType.treasure">
  232. {{ item.postTaskLuckdrop.receivedCount }}/{{
  233. item.postTaskLuckdrop.totalCount
  234. }}
  235. </template>
  236. </template>
  237. <!-- 抽奖红包 -->
  238. <template v-else>
  239. <!-- 自定义奖品类型 结束时显示 Complete -->
  240. {{ item.rewardType === RewardType.custom && item.status == 2 ? 'Complete' : 'Termination' }}
  241. </template>
  242. </template>
  243. <!-- 红包提前终止/退款(进行中)显示-->
  244. <template v-if="item.status == 4">
  245. {{ item.postTaskLuckdrop && item.postTaskLuckdrop.luckdropType == 1 ? 'Terminating' : 'Open in '
  246. + item.downTime || ''
  247. }}
  248. </template>
  249. <!-- 进行中或者未发送成功时显示 -->
  250. <div class="desc-bottom-bar">
  251. <!-- 没有终止红包时显示 -->
  252. <div v-if="item.postTaskLuckdrop.terminatedAvailable" class="btn"
  253. @click.stop="terminaHandler(item, index)">
  254. Termination
  255. </div>
  256. <!-- 红包未发出显示 -->
  257. <div class="btn send-btn" v-if="item.postTaskLuckdrop.reSendAvailable"
  258. @click.stop="sendTwitter(item)">
  259. Send
  260. </div>
  261. <div v-else-if="item.srcContentId" class="btn detail-btn"
  262. @click.stop="clickListItem(item, index)">
  263. details
  264. </div>
  265. </div>
  266. </div>
  267. </div>
  268. <!-- 发红包—— 未发出、进行中 隐藏 -->
  269. <img v-if="item.type != 2 && item.type != 4" class="icon"
  270. :src="require('@/assets/svg/icon-cell-arrow-right.svg')" />
  271. </div>
  272. </div>
  273. </div>
  274. </template>
  275. <template v-else>
  276. <img class="icon-empty" :src="require('@/assets/svg/icon-empty-list.svg')" />
  277. </template>
  278. </div>
  279. </div>
  280. </div>
  281. <modal :visible="modalVisible" :title="modalTitle" :content="modalContent" cancelText="Termination"
  282. confirmText="Cancel" @cancel="modalCancel" @confirm="modalConfirm" />
  283. </div>
  284. </template>
  285. <script setup>
  286. import { ref, onMounted } from "vue";
  287. import modal from "@/components/modal-layer.vue";
  288. import redDot from "@/components/red-dot.vue";
  289. import nftCard from '@/components/nft-card.vue';
  290. import { getBit, formatSecondsAsDaysOrTime } from "@/uilts/help";
  291. import { getMineLuckdropRecords } from "@/http/account";
  292. import { terminatedLuckdrop } from "@/http/redPacket";
  293. import { readAllMsgByType, getAllMessageInfo } from "@/http/messageApi"
  294. import { getChromeStorageFromExtension } from "@/uilts/chromeExtension";
  295. import messageCenter from "@/uilts/messageCenter";
  296. import MESSAGE_ENUM from "@/uilts/messageCenter/messageEnum";
  297. import { PlayType, RewardType } from '@/types';
  298. var moment = require("moment");
  299. let currentTabIndex = ref(0);
  300. let userInfo = ref({});
  301. let pageWrapperDom = ref(null);
  302. let pageGiveListDom = ref(null);
  303. let modalVisible = ref(false);
  304. let modalTitle = ref('');
  305. let modalContent = ref('');
  306. let terminaTask = {};
  307. let giveList = ref([]);
  308. let giveReqParams = {
  309. params: {
  310. pageNum: 1,
  311. pageSize: 20,
  312. },
  313. loadMore: false,
  314. };
  315. let isReadMsg = ref(true);
  316. /**
  317. * 获取红包列表
  318. */
  319. const getLuckdropRecordsList = () => {
  320. getMineLuckdropRecords({
  321. params: giveReqParams.params,
  322. }).then((res) => {
  323. messageCenter.send({
  324. actionType: MESSAGE_ENUM.IFRAME_RUNTIME_CONNECT_POPUP,
  325. data: {}
  326. })
  327. if (res.data && res.data.length) {
  328. if (giveReqParams.params.pageNum < 2) {
  329. giveList.value = res.data;
  330. } else {
  331. let data = giveList.value;
  332. data = data.concat(res.data);
  333. giveList.value = data;
  334. }
  335. downTimeBegin()
  336. giveReqParams.loadMore = false;
  337. }
  338. });
  339. };
  340. const getCurrentList = () => {
  341. getMineLuckdropRecords({
  342. params: {
  343. pageNum: 1,
  344. pageSize: giveList.value.length || 20,
  345. }
  346. }).then((res) => {
  347. if (res.data && res.data.length) {
  348. giveList.value = res.data;
  349. }
  350. })
  351. }
  352. /**
  353. * 点击列表跳转到推文
  354. */
  355. const clickListItem = (params) => {
  356. if (!params.srcContentId) {
  357. return;
  358. }
  359. let twitterUrl = "https://twitter.com/";
  360. let nickName = "";
  361. if (params.type == 2) {
  362. nickName = userInfo.value.nickName;
  363. } else {
  364. nickName = params.userInfo.nickName;
  365. }
  366. let url = twitterUrl + nickName + "/status/" + params.srcContentId;
  367. messageCenter.send({
  368. actionType: MESSAGE_ENUM.IFRAME_MESSAGE_PAGE_CREATE_TAB,
  369. data: {
  370. url
  371. }
  372. })
  373. };
  374. const pageScroll = (e) => {
  375. let wrapperHeight = pageWrapperDom.value.offsetHeight;
  376. let pageGiveListHeight = pageGiveListDom.value.offsetHeight;
  377. let scrollTop = e.target.scrollTop || 0;
  378. if (currentTabIndex.value != 0) {
  379. return;
  380. }
  381. if (
  382. giveReqParams.loadMore === false &&
  383. wrapperHeight + scrollTop >= pageGiveListHeight - 60
  384. ) {
  385. giveReqParams.loadMore = true;
  386. giveReqParams.params.pageNum++;
  387. getLuckdropRecordsList();
  388. }
  389. };
  390. /**
  391. * 点击发送,去发推
  392. */
  393. const sendTwitter = (params) => {
  394. messageCenter.send({
  395. actionType: MESSAGE_ENUM.IFRAME_MESSAGE_PAGE_PUBLISH_TWITTER,
  396. data: {
  397. srcContent: params.postTaskLuckdrop.srcContent,
  398. postId: params.postTaskLuckdrop.postId,
  399. }
  400. })
  401. };
  402. const terminaHandler = (params, index) => {
  403. terminaTask = params;
  404. terminaTask.index = index;
  405. // set font
  406. if (params && params.postTaskLuckdrop) {
  407. if (params.postTaskLuckdrop.luckdropType == PlayType.lottery) {
  408. modalTitle.value = `Early Termination of Lottery?`
  409. modalContent.value = `This operation will terminate the lottery process and refund the lottery prizes.`
  410. } else if (params.postTaskLuckdrop.luckdropType == PlayType.treasure) {
  411. modalTitle.value = `Early Termination of treasure Hunt?`
  412. modalContent.value = `This operation will stop the treasure hunt and refund the remaining amount within 2 days`
  413. } else {
  414. modalTitle.value = `Early termination of Giveaway?`
  415. modalContent.value = `The remaining amount will be returned to your wallet within 1 day.`
  416. }
  417. } else {
  418. modalTitle.value = `Early termination of Giveaway?`
  419. modalContent.value = `The remaining amount will be returned to your wallet within 1 day.`
  420. }
  421. modalVisible.value = true;
  422. };
  423. const modalCancel = () => {
  424. //请求终止接口 id terminaTask.id 、 刷新当前列表、 关闭
  425. modalVisible.value = false;
  426. let index = terminaTask.index;
  427. terminatedLuckdrop({
  428. params: {
  429. luckdropId: terminaTask.id,
  430. },
  431. }).then((res) => {
  432. if (res.code == 0) {
  433. giveList.value[index]["status"] = res.data.status;
  434. giveList.value[index]["postTaskLuckdrop"]["reSendAvailable"] = false;
  435. giveList.value[index]["postTaskLuckdrop"]["terminatedAvailable"] = false;
  436. // 重新拉取
  437. getCurrentList()
  438. }
  439. });
  440. terminaTask = {};
  441. };
  442. const modalConfirm = () => {
  443. modalVisible.value = false;
  444. terminaTask = {};
  445. };
  446. const readAllMsg = ({ msgType }, cb) => {
  447. readAllMsgByType({
  448. params: {
  449. msgType
  450. }
  451. }).then(() => {
  452. cb && cb();
  453. })
  454. };
  455. const setMessageCount = () => {
  456. getAllMessageInfo({
  457. params: {
  458. }
  459. }).then(res => {
  460. if (res.code == 0) {
  461. let { unReadCountTotal = 0 } = res.data;
  462. if (unReadCountTotal > 0) {
  463. let text = unReadCountTotal > 99 ? '99+' : unReadCountTotal + '';
  464. messageCenter.send({
  465. actionType: MESSAGE_ENUM.IFRAME_MESSAGE_PAGE_SETBADGEINFO,
  466. data: { text }
  467. })
  468. } else {
  469. messageCenter.send({
  470. actionType: MESSAGE_ENUM.IFRAME_MESSAGE_PAGE_HIDEBADGE,
  471. data: {}
  472. })
  473. }
  474. }
  475. });
  476. }
  477. const getUserInfo = async () => {
  478. const res = await getChromeStorageFromExtension("userInfo");
  479. if (res && res.accessToken) {
  480. userInfo.value = res;
  481. } else {
  482. userInfo.value = {};
  483. }
  484. };
  485. const init = () => {
  486. getUserInfo();
  487. getLuckdropRecordsList();
  488. setMessageCount();
  489. setTimeout(() => {
  490. isReadMsg.value = false;
  491. readAllMsg({ msgType: 1 }, () => {
  492. setMessageCount();
  493. });
  494. }, 2000);
  495. }
  496. const onMessage = () => {
  497. messageCenter.listen(MESSAGE_ENUM.CONTENT_POPUP_PAGE_SHOW, () => {
  498. init();
  499. })
  500. }
  501. // 倒计时
  502. const downTimeBegin = () => {
  503. let list = giveList.value || []
  504. let ifDown = false
  505. list.forEach((item) => {
  506. if (item.endTimestamp) {
  507. let time = moment(new Date().getTime())
  508. let endTime = moment(item.endTimestamp + 5000)
  509. let downTime = (endTime - time) || 0
  510. if (downTime > 0) {
  511. item.downTime = formatSecondsAsDaysOrTime(downTime / 1000, false);
  512. ifDown = true;
  513. }
  514. if (item && item.downTime && item.downTime == '00:00:00') {
  515. getCurrentList()
  516. }
  517. }
  518. })
  519. if (ifDown) {
  520. setTimeout(() => {
  521. downTimeBegin()
  522. }, 1000)
  523. }
  524. }
  525. onMounted(() => {
  526. onMessage();
  527. init();
  528. });
  529. </script>
  530. <style scoped lang="scss">
  531. .message-wrapper {
  532. width: 100%;
  533. height: 100%;
  534. margin-top: 1px;
  535. .tab-bar {
  536. display: flex;
  537. align-items: center;
  538. background-color: #fff;
  539. box-shadow: 0px 0.5px 0px #d1d9dd;
  540. .tab-item {
  541. display: flex;
  542. align-items: center;
  543. justify-content: center;
  544. padding: 14px 0px;
  545. box-sizing: border-box;
  546. border-bottom: 2px solid #fff;
  547. margin: 0 12px;
  548. font-size: 14px;
  549. color: #949494;
  550. cursor: pointer;
  551. }
  552. .active {
  553. border-bottom: 2px solid #1d9bf0;
  554. font-weight: 500;
  555. color: #000;
  556. }
  557. }
  558. .tab-content {
  559. height: 100%;
  560. overflow-y: auto;
  561. .list-wrapper {
  562. min-height: 202px;
  563. .give-list {
  564. min-height: 202px;
  565. position: relative;
  566. .cell {
  567. display: flex;
  568. justify-content: space-between;
  569. min-height: 76px;
  570. box-sizing: border-box;
  571. padding-left: 14px;
  572. position: relative;
  573. cursor: pointer;
  574. .red-dots {
  575. position: absolute;
  576. right: 4px;
  577. top: 4px;
  578. }
  579. .img-wrapper {
  580. position: relative;
  581. width: 38px;
  582. margin-right: 16px;
  583. box-sizing: border-box;
  584. .icon-avatar {
  585. width: 34px;
  586. height: 34px;
  587. border-radius: 50%;
  588. margin-right: 8px;
  589. }
  590. .icon-give {
  591. position: absolute;
  592. right: 1px;
  593. bottom: -1px;
  594. width: 18px;
  595. height: 18px;
  596. }
  597. .icon-big-give {
  598. margin-top: 12px;
  599. width: 34px;
  600. }
  601. .icon-mark-give {
  602. position: absolute;
  603. right: -2px;
  604. top: 31px;
  605. width: 16px;
  606. height: 16px;
  607. }
  608. }
  609. .info-wrapper {
  610. flex: 1;
  611. height: 100%;
  612. display: flex;
  613. justify-content: space-between;
  614. box-sizing: border-box;
  615. padding: 10px 14px 10px 0;
  616. .left {
  617. .nickname {
  618. font-weight: 500;
  619. font-size: 13px;
  620. margin-bottom: 5px;
  621. max-width: 132px;
  622. word-break: break-all;
  623. }
  624. .time {
  625. font-size: 12px;
  626. color: #b0b0b0;
  627. }
  628. }
  629. .right {
  630. display: flex;
  631. align-items: center;
  632. cursor: pointer;
  633. .msg {
  634. display: flex;
  635. align-items: flex-end;
  636. flex-direction: column;
  637. .bold {
  638. font-weight: 500;
  639. font-size: 13px;
  640. text-align: right;
  641. display: flex;
  642. justify-content: flex-end;
  643. align-items: center;
  644. max-width: 140px;
  645. .blance {
  646. margin-left: 3px;
  647. display: inline-block;
  648. max-width: 80px;
  649. word-break: break-all;
  650. line-height: 18px;
  651. color: #e86f00;
  652. }
  653. .cuntom-prize {
  654. max-width: 130px;
  655. word-break: break-word;
  656. text-align: left;
  657. }
  658. .cuntom-prize-icon {
  659. color: #000;
  660. }
  661. .cuntom-prize-total {
  662. color: #000;
  663. word-break: break-word;
  664. }
  665. .coin-type-wrapper {
  666. display: flex;
  667. align-items: center;
  668. }
  669. .coin-type {
  670. margin-left: 3px;
  671. word-break: break-all;
  672. }
  673. img {
  674. margin-left: 4px;
  675. width: 14px;
  676. height: 14px;
  677. }
  678. }
  679. .align-content {
  680. flex-direction: column;
  681. align-items: flex-end;
  682. .blance {
  683. max-width: 130px;
  684. }
  685. }
  686. .desc {
  687. font-size: 12px;
  688. color: #b6b6b6;
  689. margin-top: 5px;
  690. text-align: right;
  691. .desc-bottom-bar {
  692. display: flex;
  693. align-items: center;
  694. justify-content: flex-end;
  695. margin-top: 10px;
  696. .btn {
  697. min-width: 80px;
  698. height: 29px;
  699. padding: 0 8px;
  700. box-sizing: border-box;
  701. font-weight: 400;
  702. font-size: 14px;
  703. cursor: pointer;
  704. text-align: center;
  705. border-radius: 100px;
  706. color: #5e5e5e;
  707. border: 1px solid #dfdfdf;
  708. display: flex;
  709. align-items: center;
  710. justify-content: center;
  711. }
  712. .send-btn {
  713. border: 1px solid #1d9bf0;
  714. color: #1d9bf0;
  715. }
  716. .detail-btn,
  717. .send-btn {
  718. margin-left: 8px;
  719. }
  720. }
  721. }
  722. }
  723. .icon {
  724. width: 18px;
  725. height: 24px;
  726. margin-left: 4px;
  727. margin-right: -5px;
  728. }
  729. }
  730. }
  731. .info-center {
  732. align-items: center;
  733. }
  734. }
  735. .cell-center {
  736. align-items: center;
  737. }
  738. .icon-empty {
  739. position: absolute;
  740. left: 50%;
  741. top: 50%;
  742. transform: translate(-50%, -50%);
  743. }
  744. }
  745. }
  746. }
  747. }
  748. </style>