index.vue 28 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836
  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. let iframeId = 'de-nav-message-page';
  317. /**
  318. * 获取红包列表
  319. */
  320. const getLuckdropRecordsList = () => {
  321. getMineLuckdropRecords({
  322. params: giveReqParams.params,
  323. }).then((res) => {
  324. messageCenter.send({
  325. info: {
  326. actionType: MESSAGE_ENUM.IFRAME_RUNTIME_CONNECT_POPUP,
  327. iframeId: iframeId,
  328. },
  329. data: {}
  330. })
  331. if (res.data && res.data.length) {
  332. if (giveReqParams.params.pageNum < 2) {
  333. giveList.value = res.data;
  334. } else {
  335. let data = giveList.value;
  336. data = data.concat(res.data);
  337. giveList.value = data;
  338. }
  339. downTimeBegin()
  340. giveReqParams.loadMore = false;
  341. }
  342. });
  343. };
  344. const getCurrentList = () => {
  345. getMineLuckdropRecords({
  346. params: {
  347. pageNum: 1,
  348. pageSize: giveList.value.length || 20,
  349. }
  350. }).then((res) => {
  351. if (res.data && res.data.length) {
  352. giveList.value = res.data;
  353. }
  354. })
  355. }
  356. /**
  357. * 点击列表跳转到推文
  358. */
  359. const clickListItem = (params) => {
  360. if (!params.srcContentId) {
  361. return;
  362. }
  363. let twitterUrl = "https://twitter.com/";
  364. let nickName = "";
  365. if (params.type == 2) {
  366. nickName = userInfo.value.nickName;
  367. } else {
  368. nickName = params.userInfo.nickName;
  369. }
  370. let url = twitterUrl + nickName + "/status/" + params.srcContentId;
  371. messageCenter.send({
  372. info: {
  373. actionType: MESSAGE_ENUM.IFRAME_MESSAGE_PAGE_CREATE_TAB,
  374. iframeId: iframeId,
  375. },
  376. data: {
  377. url
  378. }
  379. })
  380. };
  381. const pageScroll = (e) => {
  382. let wrapperHeight = pageWrapperDom.value.offsetHeight;
  383. let pageGiveListHeight = pageGiveListDom.value.offsetHeight;
  384. let scrollTop = e.target.scrollTop || 0;
  385. if (currentTabIndex.value != 0) {
  386. return;
  387. }
  388. if (
  389. giveReqParams.loadMore === false &&
  390. wrapperHeight + scrollTop >= pageGiveListHeight - 60
  391. ) {
  392. giveReqParams.loadMore = true;
  393. giveReqParams.params.pageNum++;
  394. getLuckdropRecordsList();
  395. }
  396. };
  397. /**
  398. * 点击发送,去发推
  399. */
  400. const sendTwitter = (params) => {
  401. messageCenter.send({
  402. info: {
  403. actionType: MESSAGE_ENUM.IFRAME_MESSAGE_PAGE_PUBLISH_TWITTER,
  404. iframeId: iframeId,
  405. },
  406. data: {
  407. srcContent: params.postTaskLuckdrop.srcContent,
  408. postId: params.postTaskLuckdrop.postId,
  409. }
  410. })
  411. };
  412. const terminaHandler = (params, index) => {
  413. terminaTask = params;
  414. terminaTask.index = index;
  415. // set font
  416. if (params && params.postTaskLuckdrop) {
  417. if (params.postTaskLuckdrop.luckdropType == PlayType.lottery) {
  418. modalTitle.value = `Early Termination of Lottery?`
  419. modalContent.value = `This operation will terminate the lottery process and refund the lottery prizes.`
  420. } else if (params.postTaskLuckdrop.luckdropType == PlayType.treasure) {
  421. modalTitle.value = `Early Termination of treasure Hunt?`
  422. modalContent.value = `This operation will stop the treasure hunt and refund the remaining amount within 2 days`
  423. } else {
  424. modalTitle.value = `Early termination of Giveaway?`
  425. modalContent.value = `The remaining amount will be returned to your wallet within 1 day.`
  426. }
  427. } else {
  428. modalTitle.value = `Early termination of Giveaway?`
  429. modalContent.value = `The remaining amount will be returned to your wallet within 1 day.`
  430. }
  431. modalVisible.value = true;
  432. };
  433. const modalCancel = () => {
  434. //请求终止接口 id terminaTask.id 、 刷新当前列表、 关闭
  435. modalVisible.value = false;
  436. let index = terminaTask.index;
  437. terminatedLuckdrop({
  438. params: {
  439. luckdropId: terminaTask.id,
  440. },
  441. }).then((res) => {
  442. if (res.code == 0) {
  443. giveList.value[index]["status"] = res.data.status;
  444. giveList.value[index]["postTaskLuckdrop"]["reSendAvailable"] = false;
  445. giveList.value[index]["postTaskLuckdrop"]["terminatedAvailable"] = false;
  446. // 重新拉取
  447. getCurrentList()
  448. }
  449. });
  450. terminaTask = {};
  451. };
  452. const modalConfirm = () => {
  453. modalVisible.value = false;
  454. terminaTask = {};
  455. };
  456. const readAllMsg = ({ msgType }, cb) => {
  457. readAllMsgByType({
  458. params: {
  459. msgType
  460. }
  461. }).then(() => {
  462. cb && cb();
  463. })
  464. };
  465. const setMessageCount = () => {
  466. getAllMessageInfo({
  467. params: {
  468. }
  469. }).then(res => {
  470. if (res.code == 0) {
  471. let { unReadCountTotal = 0 } = res.data;
  472. if (unReadCountTotal > 0) {
  473. let text = unReadCountTotal > 99 ? '99+' : unReadCountTotal + '';
  474. messageCenter.send({
  475. info: {
  476. actionType: MESSAGE_ENUM.IFRAME_MESSAGE_PAGE_SETBADGEINFO,
  477. iframeId: iframeId,
  478. },
  479. data: { text }
  480. })
  481. } else {
  482. messageCenter.send({
  483. info: {
  484. actionType: MESSAGE_ENUM.IFRAME_MESSAGE_PAGE_HIDEBADGE,
  485. iframeId: iframeId,
  486. },
  487. data: {}
  488. })
  489. }
  490. }
  491. });
  492. }
  493. const getUserInfo = async () => {
  494. const res = await getChromeStorageFromExtension("userInfo");
  495. if (res && res.accessToken) {
  496. userInfo.value = res;
  497. } else {
  498. userInfo.value = {};
  499. }
  500. };
  501. const init = () => {
  502. getUserInfo();
  503. getLuckdropRecordsList();
  504. setMessageCount();
  505. setTimeout(() => {
  506. isReadMsg.value = false;
  507. readAllMsg({ msgType: 1 }, () => {
  508. setMessageCount();
  509. });
  510. }, 2000);
  511. }
  512. const onMessage = () => {
  513. messageCenter.listen(MESSAGE_ENUM.CONTENT_POPUP_PAGE_SHOW, () => {
  514. init();
  515. })
  516. }
  517. // 倒计时
  518. const downTimeBegin = () => {
  519. let list = giveList.value || []
  520. let ifDown = false
  521. list.forEach((item) => {
  522. if (item.endTimestamp) {
  523. let time = moment(new Date().getTime())
  524. let endTime = moment(item.endTimestamp + 5000)
  525. let downTime = (endTime - time) || 0
  526. if (downTime > 0) {
  527. item.downTime = formatSecondsAsDaysOrTime(downTime / 1000, false);
  528. ifDown = true;
  529. }
  530. if (item && item.downTime && item.downTime == '00:00:00') {
  531. getCurrentList()
  532. }
  533. }
  534. })
  535. if (ifDown) {
  536. setTimeout(() => {
  537. downTimeBegin()
  538. }, 1000)
  539. }
  540. }
  541. onMounted(() => {
  542. onMessage();
  543. init();
  544. });
  545. </script>
  546. <style scoped lang="scss">
  547. .message-wrapper {
  548. width: 100%;
  549. height: 100%;
  550. margin-top: 1px;
  551. .tab-bar {
  552. display: flex;
  553. align-items: center;
  554. background-color: #fff;
  555. box-shadow: 0px 0.5px 0px #d1d9dd;
  556. .tab-item {
  557. display: flex;
  558. align-items: center;
  559. justify-content: center;
  560. padding: 14px 0px;
  561. box-sizing: border-box;
  562. border-bottom: 2px solid #fff;
  563. margin: 0 12px;
  564. font-size: 14px;
  565. color: #949494;
  566. cursor: pointer;
  567. }
  568. .active {
  569. border-bottom: 2px solid #1d9bf0;
  570. font-weight: 500;
  571. color: #000;
  572. }
  573. }
  574. .tab-content {
  575. height: 100%;
  576. overflow-y: auto;
  577. .list-wrapper {
  578. min-height: 202px;
  579. .give-list {
  580. min-height: 202px;
  581. position: relative;
  582. .cell {
  583. display: flex;
  584. justify-content: space-between;
  585. min-height: 76px;
  586. box-sizing: border-box;
  587. padding-left: 14px;
  588. position: relative;
  589. cursor: pointer;
  590. .red-dots {
  591. position: absolute;
  592. right: 4px;
  593. top: 4px;
  594. }
  595. .img-wrapper {
  596. position: relative;
  597. width: 38px;
  598. margin-right: 16px;
  599. box-sizing: border-box;
  600. .icon-avatar {
  601. width: 34px;
  602. height: 34px;
  603. border-radius: 50%;
  604. margin-right: 8px;
  605. }
  606. .icon-give {
  607. position: absolute;
  608. right: 1px;
  609. bottom: -1px;
  610. width: 18px;
  611. height: 18px;
  612. }
  613. .icon-big-give {
  614. margin-top: 12px;
  615. width: 34px;
  616. }
  617. .icon-mark-give {
  618. position: absolute;
  619. right: -2px;
  620. top: 31px;
  621. width: 16px;
  622. height: 16px;
  623. }
  624. }
  625. .info-wrapper {
  626. flex: 1;
  627. height: 100%;
  628. display: flex;
  629. justify-content: space-between;
  630. box-sizing: border-box;
  631. padding: 10px 14px 10px 0;
  632. .left {
  633. .nickname {
  634. font-weight: 500;
  635. font-size: 13px;
  636. margin-bottom: 5px;
  637. max-width: 132px;
  638. word-break: break-all;
  639. }
  640. .time {
  641. font-size: 12px;
  642. color: #b0b0b0;
  643. }
  644. }
  645. .right {
  646. display: flex;
  647. align-items: center;
  648. cursor: pointer;
  649. .msg {
  650. display: flex;
  651. align-items: flex-end;
  652. flex-direction: column;
  653. .bold {
  654. font-weight: 500;
  655. font-size: 13px;
  656. text-align: right;
  657. display: flex;
  658. justify-content: flex-end;
  659. align-items: center;
  660. max-width: 140px;
  661. .blance {
  662. margin-left: 3px;
  663. display: inline-block;
  664. max-width: 80px;
  665. word-break: break-all;
  666. line-height: 18px;
  667. color: #e86f00;
  668. }
  669. .cuntom-prize {
  670. max-width: 130px;
  671. word-break: break-word;
  672. text-align: left;
  673. }
  674. .cuntom-prize-icon {
  675. color: #000;
  676. }
  677. .cuntom-prize-total {
  678. color: #000;
  679. word-break: break-word;
  680. }
  681. .coin-type-wrapper {
  682. display: flex;
  683. align-items: center;
  684. }
  685. .coin-type {
  686. margin-left: 3px;
  687. word-break: break-all;
  688. }
  689. img {
  690. margin-left: 4px;
  691. width: 14px;
  692. height: 14px;
  693. }
  694. }
  695. .align-content {
  696. flex-direction: column;
  697. align-items: flex-end;
  698. .blance {
  699. max-width: 130px;
  700. }
  701. }
  702. .desc {
  703. font-size: 12px;
  704. color: #b6b6b6;
  705. margin-top: 5px;
  706. text-align: right;
  707. .desc-bottom-bar {
  708. display: flex;
  709. align-items: center;
  710. justify-content: flex-end;
  711. margin-top: 10px;
  712. .btn {
  713. min-width: 80px;
  714. height: 29px;
  715. padding: 0 8px;
  716. box-sizing: border-box;
  717. font-weight: 400;
  718. font-size: 14px;
  719. cursor: pointer;
  720. text-align: center;
  721. border-radius: 100px;
  722. color: #5e5e5e;
  723. border: 1px solid #dfdfdf;
  724. display: flex;
  725. align-items: center;
  726. justify-content: center;
  727. }
  728. .send-btn {
  729. border: 1px solid #1d9bf0;
  730. color: #1d9bf0;
  731. }
  732. .detail-btn,
  733. .send-btn {
  734. margin-left: 8px;
  735. }
  736. }
  737. }
  738. }
  739. .icon {
  740. width: 18px;
  741. height: 24px;
  742. margin-left: 4px;
  743. margin-right: -5px;
  744. }
  745. }
  746. }
  747. .info-center {
  748. align-items: center;
  749. }
  750. }
  751. .cell-center {
  752. align-items: center;
  753. }
  754. .icon-empty {
  755. position: absolute;
  756. left: 50%;
  757. top: 50%;
  758. transform: translate(-50%, -50%);
  759. }
  760. }
  761. }
  762. }
  763. }
  764. </style>