index.vue 28 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855
  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 v-if="item.postTaskLuckdrop && item.postTaskLuckdrop.luckdropType == PlayType.lottery">
  208. {{ item.downTime || '' }}
  209. </template>
  210. <template v-else>
  211. {{ item.postTaskLuckdrop.receivedCount }}/{{
  212. item.postTaskLuckdrop.totalCount
  213. }}
  214. </template>
  215. </template>
  216. <!-- 2:已结束; 3:提前终止-->
  217. <template v-else-if="item.status == 2 || item.status == 3">
  218. <!-- 普通红包 -->
  219. <template v-if="item.postTaskLuckdrop.luckdropType == PlayType.common || item.postTaskLuckdrop.luckdropType == PlayType.treasure">
  220. <template v-if="item.status == 2">
  221. {{item.postTaskLuckdrop.luckdropType == PlayType.common ? '(Time expired)': 'Complete'}}
  222. </template>
  223. <template v-if="item.status == 3">
  224. {{ item.srcContentId && item.postTaskLuckdrop.luckdropType != PlayType.treasure ? '(Termination)' : 'Termination' }}
  225. </template>
  226. <template v-if="(item.status == 2 || item.status == 3) && item.srcContentId && item.postTaskLuckdrop.luckdropType != PlayType.treasure">
  227. {{ item.postTaskLuckdrop.receivedCount }}/{{
  228. item.postTaskLuckdrop.totalCount
  229. }}
  230. </template>
  231. </template>
  232. <!-- 抽奖红包 -->
  233. <template v-else>
  234. <!-- 自定义奖品类型 结束时显示 Complete -->
  235. {{ item.rewardType === RewardType.custom && item.status == 2 ? 'Complete' : 'Termination' }}
  236. </template>
  237. </template>
  238. <!-- 红包提前终止/退款(进行中)显示-->
  239. <template v-if="item.status == 4">
  240. {{ item.postTaskLuckdrop && item.postTaskLuckdrop.luckdropType == 1 ? 'Terminating' : 'Open in '
  241. + item.downTime || ''
  242. }}
  243. </template>
  244. <!-- 进行中或者未发送成功时显示 -->
  245. <div class="desc-bottom-bar">
  246. <!-- 没有终止红包时显示 -->
  247. <div v-if="item.postTaskLuckdrop.terminatedAvailable" class="btn"
  248. @click.stop="terminaHandler(item, index)">
  249. Termination
  250. </div>
  251. <!-- 红包未发出显示 -->
  252. <div class="btn send-btn" v-if="item.postTaskLuckdrop.reSendAvailable"
  253. @click.stop="sendTwitter(item)">
  254. Send
  255. </div>
  256. <div v-else-if="item.srcContentId" class="btn detail-btn"
  257. @click.stop="clickListItem(item, index)">
  258. details
  259. </div>
  260. </div>
  261. </div>
  262. </div>
  263. <!-- 发红包—— 未发出、进行中 隐藏 -->
  264. <img v-if="item.type != 2 && item.type != 4" class="icon"
  265. :src="require('@/assets/svg/icon-cell-arrow-right.svg')" />
  266. </div>
  267. </div>
  268. </div>
  269. </template>
  270. <template v-else>
  271. <img class="icon-empty" :src="require('@/assets/svg/icon-empty-list.svg')" />
  272. </template>
  273. </div>
  274. </div>
  275. </div>
  276. <modal :visible="modalVisible" :title="modalTitle" :content="modalContent" cancelText="Termination"
  277. confirmText="Cancel" @cancel="modalCancel" @confirm="modalConfirm" />
  278. </div>
  279. </template>
  280. <script setup>
  281. import { ref, onMounted, inject, onBeforeUnmount } from "vue";
  282. import modal from "@/view/popup/components/modal.vue";
  283. import redDot from "@/view/components/red-dot.vue";
  284. import nftCard from '@/view/components/nft-card.vue'
  285. import { getBit, formatSecondsAsDaysOrTime } from "@/uilts/help";
  286. import { getMineLuckdropRecords } from "@/http/account";
  287. import { terminatedLuckdrop } from "@/http/redPacket";
  288. import { readAllMsgByType, getAllMessageInfo } from "@/http/messageApi"
  289. import { setBadgeInfo, hideBadge } from "@/logic/background/twitter";
  290. import { getChromeStorage } from "@/uilts/chromeExtension";
  291. import { PlayType, RewardType } from '@/types';
  292. var moment = require("moment");
  293. let currentTabIndex = ref(0);
  294. let userInfo = ref({});
  295. let tabList = ref([
  296. {
  297. label: "ALL",
  298. },
  299. {
  300. label: "Giveaway",
  301. },
  302. {
  303. label: "NFT",
  304. },
  305. ]);
  306. let pageWrapperDom = ref(null);
  307. let pageGiveListDom = ref(null);
  308. let modalVisible = ref(false);
  309. let modalTitle = ref('');
  310. let modalContent = ref('');
  311. let terminaTask = {};
  312. let giveList = ref([]);
  313. let giveReqParams = {
  314. params: {
  315. pageNum: 1,
  316. pageSize: 20,
  317. },
  318. loadMore: false,
  319. };
  320. let isReadMsg = ref(true);
  321. const clickTab = (params, index) => {
  322. currentTabIndex.value = index;
  323. };
  324. /**
  325. * 获取红包列表
  326. */
  327. const getLuckdropRecordsList = () => {
  328. getMineLuckdropRecords({
  329. params: giveReqParams.params,
  330. }).then((res) => {
  331. chrome.runtime.connect({ name: "popup" });
  332. if (res.data && res.data.length) {
  333. if (giveReqParams.params.pageNum < 2) {
  334. giveList.value = res.data;
  335. } else {
  336. let data = giveList.value;
  337. data = data.concat(res.data);
  338. giveList.value = data;
  339. }
  340. downTimeBegin()
  341. giveReqParams.loadMore = false;
  342. }
  343. });
  344. };
  345. const getCurrentList = () => {
  346. getMineLuckdropRecords({
  347. params: {
  348. pageNum: 1,
  349. pageSize: giveList.value.length || 20,
  350. }
  351. }).then((res) => {
  352. if (res.data && res.data.length) {
  353. giveList.value = res.data;
  354. }
  355. })
  356. }
  357. /**
  358. * 点击列表跳转到推文
  359. */
  360. const clickListItem = (params) => {
  361. if (!params.srcContentId) {
  362. return;
  363. }
  364. let twitterUrl = "https://twitter.com/";
  365. let nickName = "";
  366. if (params.type == 2) {
  367. nickName = userInfo.value.nickName;
  368. } else {
  369. nickName = params.userInfo.nickName;
  370. }
  371. let url = twitterUrl + nickName + "/status/" + params.srcContentId;
  372. chrome.tabs.create({
  373. url,
  374. });
  375. };
  376. const pageScroll = (e) => {
  377. let wrapperHeight = pageWrapperDom.value.offsetHeight;
  378. let pageGiveListHeight = pageGiveListDom.value.offsetHeight;
  379. let scrollTop = e.target.scrollTop || 0;
  380. if (currentTabIndex.value != 0) {
  381. return;
  382. }
  383. if (
  384. giveReqParams.loadMore === false &&
  385. wrapperHeight + scrollTop >= pageGiveListHeight - 60
  386. ) {
  387. giveReqParams.loadMore = true;
  388. giveReqParams.params.pageNum++;
  389. getLuckdropRecordsList();
  390. }
  391. };
  392. /**
  393. * 点击发送,去发推
  394. */
  395. const sendTwitter = (params) => {
  396. console.log(params);
  397. callEventPageMethod(
  398. "POPUP_PUBLISH_TWITTER_RED_PACK",
  399. {
  400. srcContent: params.postTaskLuckdrop.srcContent,
  401. postId: params.postTaskLuckdrop.postId,
  402. },
  403. function (response) {
  404. console.log("res", response);
  405. }
  406. );
  407. };
  408. /**
  409. * sendMessage
  410. */
  411. const callEventPageMethod = (actionType, data, callback) => {
  412. chrome.runtime.sendMessage(
  413. {
  414. actionType: actionType,
  415. data: data,
  416. },
  417. function (response) {
  418. if (typeof callback === "function") callback(response);
  419. }
  420. );
  421. };
  422. const terminaHandler = (params, index) => {
  423. terminaTask = params;
  424. terminaTask.index = index;
  425. // set font
  426. if(params && params.postTaskLuckdrop) {
  427. if (params.postTaskLuckdrop.luckdropType == PlayType.lottery) {
  428. modalTitle.value = `Early Termination of Lottery?`
  429. modalContent.value = `This operation will terminate the lottery process and refund the lottery prizes.`
  430. } else if(params.postTaskLuckdrop.luckdropType == PlayType.treasure) {
  431. modalTitle.value = `Early Termination of treasure Hunt?`
  432. modalContent.value = `This operation will stop the treasure hunt and refund the remaining amount within 2 days`
  433. } else{
  434. modalTitle.value = `Early termination of Giveaway?`
  435. modalContent.value = `The remaining amount will be returned to your wallet within 1 day.`
  436. }
  437. } else {
  438. modalTitle.value = `Early termination of Giveaway?`
  439. modalContent.value = `The remaining amount will be returned to your wallet within 1 day.`
  440. }
  441. modalVisible.value = true;
  442. };
  443. const modalCancel = () => {
  444. //请求终止接口 id terminaTask.id 、 刷新当前列表、 关闭
  445. modalVisible.value = false;
  446. let index = terminaTask.index;
  447. terminatedLuckdrop({
  448. params: {
  449. luckdropId: terminaTask.id,
  450. },
  451. }).then((res) => {
  452. if (res.code == 0) {
  453. giveList.value[index]["status"] = res.data.status;
  454. giveList.value[index]["postTaskLuckdrop"]["reSendAvailable"] = false;
  455. giveList.value[index]["postTaskLuckdrop"]["terminatedAvailable"] = false;
  456. // 重新拉取
  457. getCurrentList()
  458. }
  459. });
  460. terminaTask = {};
  461. };
  462. const modalConfirm = () => {
  463. modalVisible.value = false;
  464. terminaTask = {};
  465. };
  466. const readAllMsg = ({ msgType }, cb) => {
  467. readAllMsgByType({
  468. params: {
  469. msgType
  470. }
  471. }).then(res => {
  472. cb && cb();
  473. })
  474. };
  475. const setMessageCount = () => {
  476. getAllMessageInfo({
  477. params: {
  478. }
  479. }).then(res => {
  480. if (res.code == 0) {
  481. let { unReadCountTotal = 0, unReadCountWalletDetail = 0, unReadCountTaskLuckdrop = 0 } = res.data;
  482. if (unReadCountTotal > 0) {
  483. let text = unReadCountTotal > 99 ? '99+' : unReadCountTotal + '';
  484. setBadgeInfo({ data: { text } });
  485. } else {
  486. hideBadge();
  487. }
  488. }
  489. });
  490. }
  491. const getUserInfo = (cb) => {
  492. getChromeStorage("userInfo", (res) => {
  493. if (res && res.accessToken) {
  494. userInfo.value = res;
  495. } else {
  496. userInfo.value = {};
  497. }
  498. cb && cb(res);
  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. chrome.runtime.onMessage.addListener(msgListener)
  514. }
  515. const msgListener = (req, sender, sendResponse) => {
  516. switch (req.actionType) {
  517. case 'CONTENT_POPUP_PAGE_SHOW':
  518. init();
  519. break;
  520. }
  521. }
  522. // 倒计时
  523. const downTimeBegin = () => {
  524. let list = giveList.value || []
  525. let ifDown = false
  526. list.forEach((item) => {
  527. if (item.endTimestamp) {
  528. let time = moment(new Date().getTime())
  529. let endTime = moment(item.endTimestamp + 5000)
  530. let downTime = (endTime - time) || 0
  531. if (downTime > 0) {
  532. item.downTime = formatSecondsAsDaysOrTime(downTime / 1000, false);
  533. ifDown = true;
  534. }
  535. if (item && item.downTime && item.downTime == '00:00:00') {
  536. getCurrentList()
  537. }
  538. }
  539. })
  540. if (ifDown) {
  541. setTimeout(() => {
  542. downTimeBegin()
  543. }, 1000)
  544. }
  545. }
  546. onMounted(() => {
  547. onMessage();
  548. init();
  549. });
  550. onBeforeUnmount(() => {
  551. chrome.runtime.onMessage.removeListener(msgListener);
  552. })
  553. </script>
  554. <style scoped lang="scss">
  555. .message-wrapper {
  556. width: 100%;
  557. height: 100%;
  558. margin-top: 1px;
  559. .tab-bar {
  560. display: flex;
  561. align-items: center;
  562. background-color: #fff;
  563. box-shadow: 0px 0.5px 0px #d1d9dd;
  564. .tab-item {
  565. display: flex;
  566. align-items: center;
  567. justify-content: center;
  568. padding: 14px 0px;
  569. box-sizing: border-box;
  570. border-bottom: 2px solid #fff;
  571. margin: 0 12px;
  572. font-size: 14px;
  573. color: #949494;
  574. cursor: pointer;
  575. }
  576. .active {
  577. border-bottom: 2px solid #1d9bf0;
  578. font-weight: 500;
  579. color: #000;
  580. }
  581. }
  582. .tab-content {
  583. height: 100%;
  584. overflow-y: auto;
  585. .list-wrapper {
  586. min-height: 202px;
  587. .give-list {
  588. min-height: 202px;
  589. position: relative;
  590. .cell {
  591. display: flex;
  592. justify-content: space-between;
  593. min-height: 76px;
  594. box-sizing: border-box;
  595. padding-left: 14px;
  596. position: relative;
  597. cursor: pointer;
  598. .red-dots {
  599. position: absolute;
  600. right: 4px;
  601. top: 4px;
  602. }
  603. .img-wrapper {
  604. position: relative;
  605. width: 38px;
  606. margin-right: 16px;
  607. box-sizing: border-box;
  608. .icon-avatar {
  609. width: 34px;
  610. height: 34px;
  611. border-radius: 50%;
  612. margin-right: 8px;
  613. }
  614. .icon-give {
  615. position: absolute;
  616. right: 1px;
  617. bottom: -1px;
  618. width: 18px;
  619. height: 18px;
  620. }
  621. .icon-big-give {
  622. margin-top: 12px;
  623. width: 34px;
  624. }
  625. .icon-mark-give {
  626. position: absolute;
  627. right: -2px;
  628. top: 31px;
  629. width: 16px;
  630. height: 16px;
  631. }
  632. }
  633. .info-wrapper {
  634. flex: 1;
  635. height: 100%;
  636. display: flex;
  637. justify-content: space-between;
  638. box-sizing: border-box;
  639. padding: 10px 14px 10px 0;
  640. .left {
  641. .nickname {
  642. font-weight: 500;
  643. font-size: 13px;
  644. margin-bottom: 5px;
  645. max-width: 132px;
  646. word-break: break-all;
  647. }
  648. .time {
  649. font-size: 12px;
  650. color: #b0b0b0;
  651. }
  652. }
  653. .right {
  654. display: flex;
  655. align-items: center;
  656. cursor: pointer;
  657. .msg {
  658. display: flex;
  659. align-items: flex-end;
  660. flex-direction: column;
  661. .bold {
  662. font-weight: 500;
  663. font-size: 13px;
  664. text-align: right;
  665. display: flex;
  666. justify-content: flex-end;
  667. align-items: center;
  668. max-width: 140px;
  669. .blance {
  670. margin-left: 3px;
  671. display: inline-block;
  672. max-width: 80px;
  673. word-break: break-all;
  674. line-height: 18px;
  675. color: #e86f00;
  676. }
  677. .cuntom-prize {
  678. max-width: 130px;
  679. word-break: break-word;
  680. text-align: left;
  681. }
  682. .cuntom-prize-icon {
  683. color: #000;
  684. }
  685. .cuntom-prize-total {
  686. color: #000;
  687. word-break: break-word;
  688. }
  689. .coin-type-wrapper {
  690. display: flex;
  691. align-items: center;
  692. }
  693. .coin-type {
  694. margin-left: 3px;
  695. word-break: break-all;
  696. }
  697. img {
  698. margin-left: 4px;
  699. width: 14px;
  700. height: 14px;
  701. }
  702. }
  703. .align-content {
  704. flex-direction: column;
  705. align-items: flex-end;
  706. .blance {
  707. max-width: 130px;
  708. }
  709. }
  710. .desc {
  711. font-size: 12px;
  712. color: #b6b6b6;
  713. margin-top: 5px;
  714. text-align: right;
  715. .desc-bottom-bar {
  716. display: flex;
  717. align-items: center;
  718. justify-content: flex-end;
  719. margin-top: 10px;
  720. .btn {
  721. min-width: 80px;
  722. height: 29px;
  723. padding: 0 8px;
  724. box-sizing: border-box;
  725. font-weight: 400;
  726. font-size: 14px;
  727. cursor: pointer;
  728. text-align: center;
  729. border-radius: 100px;
  730. color: #5e5e5e;
  731. border: 1px solid #dfdfdf;
  732. display: flex;
  733. align-items: center;
  734. justify-content: center;
  735. }
  736. .send-btn {
  737. border: 1px solid #1d9bf0;
  738. color: #1d9bf0;
  739. }
  740. .detail-btn,
  741. .send-btn {
  742. margin-left: 8px;
  743. }
  744. }
  745. }
  746. }
  747. .icon {
  748. width: 18px;
  749. height: 24px;
  750. margin-left: 4px;
  751. margin-right: -5px;
  752. }
  753. }
  754. }
  755. .info-center {
  756. align-items: center;
  757. }
  758. }
  759. .cell-center {
  760. align-items: center;
  761. }
  762. .icon-empty {
  763. position: absolute;
  764. left: 50%;
  765. top: 50%;
  766. transform: translate(-50%, -50%);
  767. }
  768. }
  769. }
  770. }
  771. }
  772. </style>