popup.vue 33 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881882883884885886887888889890891892893894895896897898899900901902903904905906907908909910911912913914915916917918919920921922923924925926927928929930931932933934935936937938939940941942943944945946947948949950951952953954955956957958959960961962963964965966967968969970971972973974975976977978979980981982983984985986987988989990991992993994995996997998999100010011002100310041005
  1. <template>
  2. <global-tip :type="'3'"></global-tip>
  3. <div class="page-wrapper" ref="pageWrapperDom" @scroll="pageScroll">
  4. <template v-if="isLogin && homeVisibility">
  5. <v-head :show_more="true" :show_state="'home'" :user_info="userInfo"></v-head>
  6. <div class="content">
  7. <div class="balance">
  8. <div class="wallet">
  9. <img :src="require('@/assets/svg/icon-home-wallet.svg')" />
  10. <font>Balance Valuation</font>
  11. </div>
  12. <div class="bill" @click="showTransactions">
  13. <red-dot class="red-dot" v-if="unReadCountWallet > 0"></red-dot>
  14. <img :src="require('@/assets/svg/icon-home-bill.svg')" />
  15. </div>
  16. </div>
  17. <div class="amount">
  18. <a-tooltip :title="'$'+canWithdrawBalance">
  19. ${{ getBit(canWithdrawBalance) }}
  20. </a-tooltip>
  21. </div>
  22. <div class="area-btn">
  23. <div class="withdraw-btn" @click="clickWithdraw">Withdraw</div>
  24. <div class="top-up-btn" @click="clickTopUp">Deposit</div>
  25. </div>
  26. </div>
  27. <div class="tab-bar">
  28. <div class="tab-item"
  29. :class="{ active: currentTabIndex == index }"
  30. v-for="(item, index) in tabList"
  31. :key="index"
  32. @click="clickTab(item, index)">
  33. <img :src="item.icon" class="icon" />
  34. {{ item.label }}
  35. </div>
  36. </div>
  37. <div class="list-wrapper" ref="pageGiveListDom">
  38. <div class="give-list" v-if="currentTabIndex == 0">
  39. <template v-if="giveList.length">
  40. <div class="cell"
  41. :class="{'cell-center': item.type == 1}"
  42. v-for="(item, index) in giveList"
  43. :key="index"
  44. @click="clickListItem(item, index)">
  45. <red-dot class="red-dots"
  46. v-if="item.unReadMsgCount > 0 && isReadMsg"></red-dot>
  47. <div class="img-wrapper">
  48. <!-- 收到红包 -->
  49. <template v-if="item.type == 1">
  50. <img class="icon-avatar" :src="item.userInfo.avatarUrl" />
  51. <img class="icon-give" :src="
  52. require('@/assets/svg/icon-giveaways.svg')
  53. " />
  54. </template>
  55. <!-- 发出去红包 -->
  56. <template v-else-if="2">
  57. <img
  58. class="icon-big-give"
  59. :src="
  60. require('@/assets/svg/icon-list-big-give.svg')
  61. " />
  62. </template>
  63. </div>
  64. <div class="info-wrapper"
  65. :class="{'info-center': item.type == 1}">
  66. <div class="left">
  67. <div class="nickname">
  68. {{
  69. item.type == 1
  70. ? item.userInfo.nickName
  71. : "Giveaways"
  72. }}
  73. </div>
  74. <div class="time">
  75. {{
  76. moment(item.timestamp).format(
  77. "MM-DD HH:mm:ss"
  78. )
  79. }}
  80. </div>
  81. </div>
  82. <div class="right">
  83. <div class="msg">
  84. <div class="bold">
  85. <!-- 收到的 -->
  86. <template v-if="item.type == 1">
  87. <!-- 进行中-->
  88. <template v-if="item.status == 0">
  89. in progress
  90. </template>
  91. <!-- 已完成 -->
  92. <template v-else-if="item.status == 1">
  93. <span class="blance">
  94. <a-tooltip :title="item.amount">
  95. {{ getBit(item.amount) }}</a-tooltip>
  96. </span>
  97. <span class="coin-type">{{ item.currencySymbol || '' }}</span>
  98. <img :src="item.currencyIconPath" alt="">
  99. </template>
  100. <!-- 已过期 -->
  101. <template v-else-if="item.status == 2">
  102. Timeout
  103. </template>
  104. </template>
  105. <!-- 发出去的 -->
  106. <template v-else-if="item.type == 2">
  107. <span class="blance">
  108. <a-tooltip :title="'-' + item.amount">
  109. -{{ getBit(item.amount) }}
  110. </a-tooltip>
  111. </span>
  112. <span class="coin-type">{{ item.currencySymbol || '' }}</span>
  113. <img :src="item.currencyIconPath" alt="">
  114. </template>
  115. </div>
  116. <!-- 发出的红包显示 -->
  117. <div class="desc" v-if="item.type == 2">
  118. <!-- 未发送-->
  119. <template v-if="item.postTaskLuckdrop.reSendAvailable">
  120. Unpublished
  121. </template>
  122. <!-- 进行中 -->
  123. <template v-else-if="item.status == 1">
  124. {{item.postTaskLuckdrop.receivedCount}}/{{item.postTaskLuckdrop.totalCount}}
  125. </template>
  126. <!-- 2:已结束; 3:提前终止-->
  127. <template v-else-if="item.status == 2 || item.status == 3">
  128. ({{item.status == 2 ? 'Time expired' : 'Termination'}})
  129. {{
  130. item.postTaskLuckdrop
  131. .receivedCount
  132. }}/{{
  133. item.postTaskLuckdrop
  134. .totalCount
  135. }}
  136. </template>
  137. <!-- 红包提前终止/退款(进行中)显示-->
  138. <template v-if="item.status == 4">
  139. Terminating
  140. </template>
  141. <!-- 进行中或者未发送成功时显示
  142. v-if="item.status == 1 || item.postTaskLuckdrop.reSendAvailable"-->
  143. <div class="desc-bottom-bar">
  144. <!-- 没有终止红包时显示 -->
  145. <div v-if="item.postTaskLuckdrop.terminatedAvailable"
  146. class="btn"
  147. @click.stop="terminaHandler(item, index)">
  148. Termination
  149. </div>
  150. <!-- 红包未发出显示 -->
  151. <div class="btn send-btn"
  152. v-if="item.postTaskLuckdrop.reSendAvailable"
  153. @click.stop="sendTwitter(item)">
  154. Send
  155. </div>
  156. <div v-else-if="item.srcContentId"
  157. class="btn detail-btn"
  158. @click.stop="clickListItem(item, index)">details</div>
  159. </div>
  160. </div>
  161. </div>
  162. <!-- 发红包—— 未发出、进行中 隐藏 -->
  163. <img v-if="item.type != 2"
  164. class="icon"
  165. :src="require('@/assets/svg/icon-cell-arrow-right.svg')" />
  166. </div>
  167. </div>
  168. </div>
  169. </template>
  170. <template v-else>
  171. <img class="icon-empty" :src="require('@/assets/svg/icon-empty-list.svg')" />
  172. </template>
  173. </div>
  174. <div class="more-list" v-else>
  175. <div class="cell"
  176. v-for="(item, index) in moreTabList"
  177. :key="index"
  178. @click="moreItemHandle(item)">
  179. <img class="icon" :src="item.icon" />
  180. <div class="info-wrapper">
  181. <div class="left">
  182. {{ item.label }}
  183. </div>
  184. <div class="right">
  185. <img class="icon" :src="
  186. require('@/assets/svg/icon-cell-arrow-right.svg')
  187. " />
  188. </div>
  189. </div>
  190. </div>
  191. </div>
  192. </div>
  193. </template>
  194. <!-- login -->
  195. <popup-login v-if="!isLogin" @loginAction="loginAction" />
  196. <template v-if="isLogin && !homeVisibility">
  197. <!-- 交易列表 -->
  198. <popup-transactions v-if="transactionsVisibility" @back="transactionsBack" />
  199. <!-- 提现页 -->
  200. <popup-withdraw :amountValue="canWithdrawBalance" :walletWithdrawConfig="walletWithdrawConfig"
  201. v-if="withdrawVisibility" @back="withdrawBack" />
  202. </template>
  203. <modal :visible="modalVisible"
  204. title="Early termination of Giveaway?"
  205. content="The remaining amount will be returned to your wallet within 1 day."
  206. cancelText="Termination"
  207. confirmText="Cancel"
  208. @cancel="modalCancel"
  209. @confirm="modalConfirm" />
  210. </div>
  211. </template>
  212. <script setup>
  213. import { ref, onMounted, inject } from "vue";
  214. import popupLogin from "@/view/popup/components/login.vue";
  215. import popupTransactions from "@/view/components/popup-transactions";
  216. import popupWithdraw from "@/view/components/popup-withdraw.vue";
  217. import redDot from "@/view/components/red-dot.vue";
  218. import modal from "@/view/popup/components/modal.vue";
  219. import {
  220. getChromeStorage,
  221. } from "@/uilts/chromeExtension";
  222. import { getBalance, getMineLuckdropRecords } from "@/http/account";
  223. import { readAllMsgByType, getAllMessageInfo } from "@/http/messageApi"
  224. import { terminatedLuckdrop } from "@/http/redPacket";
  225. import { setBadgeInfo, hideBadge } from "@/logic/background/twitter";
  226. import Report from "@/log-center/log";
  227. import router from "@/router/popup.js";
  228. import { getBit } from "@/uilts/help";
  229. import GlobalTip from '@/view/components/global-tip.vue'
  230. import VHead from '@/view/popup/components/head.vue';
  231. let withdraw_info = inject('withdraw_info')
  232. withdraw_info.paypal = {}
  233. var moment = require("moment");
  234. let pageWrapperDom = ref(null);
  235. let pageGiveListDom = ref(null);
  236. let isLogin = ref(false);
  237. let homeVisibility = ref(false);
  238. let transactionsVisibility = ref(false);
  239. let withdrawVisibility = ref(false);
  240. let modalVisible = ref(false);
  241. let terminaTask = {};
  242. let userInfo = ref({});
  243. let canWithdrawBalance = ref(0);
  244. withdraw_info.paypal.amount_value = canWithdrawBalance
  245. withdraw_info.balance = 0
  246. let isRequestWithdrawBalance = ref(false);
  247. let currentTabIndex = ref(0);
  248. let giveList = ref([]);
  249. // 钱包未读数
  250. let unReadCountWallet = ref(0);
  251. let isReadMsg = ref(true);
  252. let giveReqParams = {
  253. params: {
  254. pageNum: 1,
  255. pageSize: 10,
  256. },
  257. loadMore: false,
  258. };
  259. let walletWithdrawConfig = ref({
  260. withdrawUSDPaypalFee: 0,
  261. withdrawUSDPreMinAmount: 100,
  262. withdrawUSDSwitch: "",
  263. withdrawUSDPaypalFeeDesc: ''
  264. });
  265. withdraw_info.paypal.wallet_withdraw_config = walletWithdrawConfig
  266. let moreTabList = ref([
  267. {
  268. icon: require("@/assets/svg/icon-website.svg"),
  269. label: "Website",
  270. href: 'https://denet.me'
  271. },
  272. {
  273. icon: require("@/assets/svg/icon-twitter.svg"),
  274. label: "Twitter",
  275. href: 'https://twitter.com/denet2022'
  276. },
  277. {
  278. icon: require("@/assets/svg/icon-discord.svg"),
  279. label: "Discord",
  280. href: 'https://discord.gg/wZSz9p8ddG'
  281. }
  282. // , {
  283. // icon: require("@/assets/svg/icon-telegram.svg"),
  284. // label: "Telegram",
  285. // href: 'https://t.me/denetpro'
  286. // }
  287. ]);
  288. let tabList = ref([
  289. {
  290. icon: require("@/assets/svg/icon-giveaways.svg"),
  291. label: "Giveaways",
  292. },
  293. {
  294. icon: require("@/assets/svg/icon-more.svg"),
  295. label: "More",
  296. },
  297. ]);
  298. onMounted(() => {
  299. checkLoginState(() => {
  300. if (isLogin.value) {
  301. getAccountBalance();
  302. getLuckdropRecordsList();
  303. chrome.runtime.connect({ name: "popup" });
  304. Report.reportLog({
  305. pageSource: Report.pageSource.denetHomePage,
  306. businessType: Report.businessType.pageView,
  307. },{
  308. type: window.location.href.indexOf('home.html') > -1 ? 'web' : 'extensions'
  309. });
  310. } else {
  311. Report.reportLog({
  312. pageSource: Report.pageSource.denetLogin,
  313. businessType: Report.businessType.pageView,
  314. });
  315. }
  316. });
  317. setMessageCount();
  318. setTimeout(() => {
  319. isReadMsg.value = false;
  320. readAllMsg({msgType: 1}, () => {
  321. setMessageCount();
  322. });
  323. }, 2000);
  324. });
  325. const readAllMsg = ({msgType}, cb) => {
  326. readAllMsgByType({
  327. params: {
  328. msgType
  329. }
  330. }).then(res => {
  331. cb && cb();
  332. })
  333. };
  334. const setMessageCount = () => {
  335. getAllMessageInfo({params: {
  336. }}).then(res => {
  337. if(res.code == 0) {
  338. let {unReadCountTotal = 0, unReadCountWalletDetail = 0, unReadCountTaskLuckdrop = 0} = res.data;
  339. unReadCountWallet.value = unReadCountWalletDetail;
  340. if(unReadCountTotal > 0) {
  341. let text = unReadCountTotal > 99 ? '99+' : unReadCountTotal+'';
  342. setBadgeInfo({data: {text}});
  343. } else {
  344. hideBadge();
  345. }
  346. }
  347. });
  348. }
  349. const moreItemHandle = (params) => {
  350. window.open(params.href);
  351. }
  352. /**
  353. * 获取账户余额
  354. */
  355. const getAccountBalance = () => {
  356. isRequestWithdrawBalance.value = false;
  357. getBalance({}).then((res) => {
  358. isRequestWithdrawBalance.value = true;
  359. if (res.code == 0) {
  360. if (res.data) {
  361. canWithdrawBalance.value = res.data.allAssetValuationUSD;
  362. withdraw_info.balance = res.data.allAssetValuationUSD || 0
  363. }
  364. }
  365. });
  366. };
  367. const getUserInfo = (cb) => {
  368. getChromeStorage("userInfo", (res) => {
  369. cb && cb(res);
  370. });
  371. };
  372. /**
  373. * 检查登录状态
  374. */
  375. const checkLoginState = (cb) => {
  376. getUserInfo((res) => {
  377. if (res && res.accessToken) {
  378. userInfo.value = res;
  379. isLogin.value = true;
  380. homeVisibility.value = true;
  381. } else {
  382. userInfo.value = {};
  383. isLogin.value = false;
  384. }
  385. cb && cb();
  386. });
  387. };
  388. const pageScroll = (e) => {
  389. let wrapperHeight = pageWrapperDom.value.offsetHeight;
  390. let pageGiveListHeight = pageGiveListDom.value.offsetHeight;
  391. let scrollTop = e.target.scrollTop || 0;
  392. if (currentTabIndex.value != 0) {
  393. return;
  394. }
  395. if (
  396. giveReqParams.loadMore === false &&
  397. wrapperHeight + scrollTop >= pageGiveListHeight
  398. ) {
  399. giveReqParams.loadMore = true;
  400. giveReqParams.params.pageNum++;
  401. getLuckdropRecordsList();
  402. }
  403. };
  404. /**
  405. * 获取红包列表
  406. */
  407. const getLuckdropRecordsList = () => {
  408. getMineLuckdropRecords({
  409. params: giveReqParams.params,
  410. }).then((res) => {
  411. if (res.data && res.data.length) {
  412. if (giveReqParams.params.pageNum < 2) {
  413. giveList.value = res.data;
  414. } else {
  415. let data = giveList.value;
  416. data = data.concat(res.data);
  417. giveList.value = data;
  418. }
  419. giveReqParams.loadMore = false;
  420. }
  421. });
  422. };
  423. const clickTab = (params, index) => {
  424. currentTabIndex.value = index;
  425. console.log(params, index);
  426. };
  427. /**
  428. * 点击列表跳转到推文
  429. */
  430. const clickListItem = (params) => {
  431. if (!params.srcContentId) {
  432. return;
  433. }
  434. let twitterUrl = "https://twitter.com/";
  435. let nickName = "";
  436. if (params.type == 1) {
  437. nickName = params.userInfo.nickName;
  438. } else if (params.type == 2) {
  439. nickName = userInfo.value.nickName;
  440. }
  441. let url = twitterUrl + nickName + "/status/" + params.srcContentId;
  442. chrome.tabs.create({
  443. url,
  444. });
  445. };
  446. /**
  447. * 交易列表返回
  448. */
  449. const transactionsBack = () => {
  450. if (!homeVisibility.value) {
  451. if (transactionsVisibility.value) {
  452. transactionsVisibility.value = false;
  453. }
  454. homeVisibility.value = true;
  455. }
  456. };
  457. /**
  458. * 提现返回
  459. */
  460. const withdrawBack = () => {
  461. if (!homeVisibility.value) {
  462. if (withdrawVisibility.value) {
  463. withdrawVisibility.value = false;
  464. }
  465. homeVisibility.value = true;
  466. getAccountBalance();
  467. giveReqParams.params.pageNum = 1;
  468. getLuckdropRecordsList();
  469. }
  470. };
  471. const showTransactions = () => {
  472. // // homeVisibility.value = false;
  473. // // transactionsVisibility.value = true;
  474. readAllMsg({msgType: 1});
  475. router.push('/transactions')
  476. };
  477. // const clickWithdraw = () => {
  478. // if (isRequestWithdrawBalance.value) {
  479. // homeVisibility.value = false;
  480. // withdrawVisibility.value = true;
  481. // }
  482. // };
  483. const loginAction = () => {
  484. Report.reportLog({
  485. pageSource: Report.pageSource.denetLogin,
  486. businessType: Report.businessType.buttonClick,
  487. objectType: Report.objectType.loginButton
  488. });
  489. login();
  490. };
  491. const login = () => {
  492. callEventPageMethod("POPUP_LOGIN", "", function (response) {
  493. console.log("res", response);
  494. });
  495. };
  496. /**
  497. * sendMessage
  498. */
  499. const callEventPageMethod = (actionType, data, callback) => {
  500. chrome.runtime.sendMessage(
  501. {
  502. actionType: actionType,
  503. data: data
  504. },
  505. function (response) {
  506. if (typeof callback === "function") callback(response);
  507. }
  508. );
  509. };
  510. /**
  511. * 点击发送,去发推
  512. */
  513. const sendTwitter = (params) => {
  514. console.log(params)
  515. callEventPageMethod(
  516. "POPUP_PUBLISH_TWITTER_RED_PACK",
  517. {
  518. srcContent: params.postTaskLuckdrop.srcContent,
  519. postId: params.postTaskLuckdrop.postId
  520. },
  521. function (response) {
  522. console.log("res", response);
  523. }
  524. );
  525. };
  526. // 点击提现
  527. const clickWithdraw = () => {
  528. Report.reportLog({
  529. pageSource: Report.pageSource.denetHomePage,
  530. businessType: Report.businessType.buttonClick,
  531. objectType: Report.objectType.withdrawButton
  532. });
  533. router.push('/withdraw/home');
  534. }
  535. const clickTopUp = () => {
  536. Report.reportLog({
  537. pageSource: Report.pageSource.denetHomePage,
  538. businessType: Report.businessType.buttonClick,
  539. objectType: Report.objectType.topupButton
  540. });
  541. router.push('/top-up/home');
  542. }
  543. const terminaHandler = (params, index) => {
  544. terminaTask = params;
  545. terminaTask.index = index;
  546. modalVisible.value = true;
  547. }
  548. const modalCancel = () => {
  549. //请求终止接口 id terminaTask.id 、 刷新当前列表、 关闭
  550. modalVisible.value = false;
  551. let index = terminaTask.index;
  552. terminatedLuckdrop({
  553. params: {
  554. luckdropId: terminaTask.id
  555. }
  556. }).then(res => {
  557. if(res.code == 0) {
  558. giveList.value[index]['status'] = res.data.status;
  559. giveList.value[index]['postTaskLuckdrop']['reSendAvailable'] = false;
  560. giveList.value[index]['postTaskLuckdrop']['terminatedAvailable'] = false;
  561. }
  562. });
  563. terminaTask = {};
  564. }
  565. const modalConfirm = () => {
  566. modalVisible.value = false;
  567. terminaTask = {};
  568. }
  569. </script>
  570. <style lang="scss" scoped>
  571. html,
  572. body {
  573. padding: 0 !important;
  574. margin: 0 !important;
  575. }
  576. .page-wrapper {
  577. width: 375px;
  578. height: 600px;
  579. box-sizing: border-box;
  580. overflow-y: scroll;
  581. .nav-bar {
  582. padding: 14px;
  583. box-sizing: border-box;
  584. display: flex;
  585. align-items: center;
  586. justify-content: space-between;
  587. .item {
  588. display: flex;
  589. align-items: center;
  590. font-size: 13px;
  591. cursor: pointer;
  592. img {
  593. width: 16px;
  594. height: 16px;
  595. margin-right: 4px;
  596. }
  597. }
  598. .left {
  599. font-weight: 500;
  600. }
  601. .right {
  602. color: #b6b6b6;
  603. }
  604. }
  605. .content {
  606. padding: 20px;
  607. background-color: #F0F8FE;
  608. .icon-money {
  609. width: 70px;
  610. height: 70px;
  611. }
  612. .balance {
  613. display: flex;
  614. justify-content: space-between;
  615. .wallet {
  616. img {
  617. width: 24px;
  618. height: 24px;
  619. margin-right: 6px;
  620. vertical-align: middle;
  621. }
  622. font {
  623. color: #000;
  624. font-size: 14px;
  625. font-weight: bold;
  626. }
  627. }
  628. .bill {
  629. position: relative;
  630. img {
  631. width: 24px;
  632. height: 24px;
  633. cursor: pointer;
  634. }
  635. .red-dot {
  636. position: absolute;
  637. right: 0px;
  638. top: -1px;
  639. }
  640. }
  641. }
  642. .amount {
  643. margin-top: 20px;
  644. margin-bottom: 20px;
  645. font-weight: 700;
  646. font-size: 36px;
  647. line-height: 43px;
  648. }
  649. .area-btn {
  650. display: flex;
  651. justify-content: space-between;
  652. font-weight: 600;
  653. font-size: 15px;
  654. .top-up-btn {
  655. cursor: pointer;
  656. border: 1px solid #1D9BF0;
  657. color: #fff;
  658. background: #1D9BF0;
  659. border-radius: 100px;
  660. width: 165px;
  661. height: 38px;
  662. text-align: center;
  663. margin-left: 8px;
  664. line-height: 36px;
  665. }
  666. .withdraw-btn {
  667. background: rgba(56, 154, 255, 0.01);
  668. border: 1px solid #1D9BF0;
  669. box-sizing: border-box;
  670. width: 165px;
  671. font-size: 15px;
  672. height: 38px;
  673. text-align: center;
  674. line-height: 36px;
  675. border-radius: 100px;
  676. color: #1D9BF0;
  677. display: inline-block;
  678. cursor: pointer;
  679. }
  680. }
  681. .msg {
  682. margin-top: 10px;
  683. font-size: 13px;
  684. color: #b6b6b6;
  685. }
  686. }
  687. .tab-bar {
  688. display: flex;
  689. align-items: center;
  690. position: sticky;
  691. position: -webkit-sticky;
  692. top: 0px;
  693. z-index: 1000;
  694. background-color: #fff;
  695. .tab-item {
  696. flex: 1;
  697. display: flex;
  698. align-items: center;
  699. justify-content: center;
  700. padding: 17px 0;
  701. box-sizing: border-box;
  702. border-bottom: 1px solid #ECECEC;
  703. cursor: pointer;
  704. .icon {
  705. width: 16px;
  706. height: 16px;
  707. margin-right: 5px;
  708. font-weight: 500;
  709. font-size: 16px;
  710. }
  711. }
  712. .active {
  713. border-bottom: 2px solid #000;
  714. }
  715. }
  716. .list-wrapper {
  717. min-height: 202px;
  718. .give-list {
  719. min-height: 202px;
  720. position: relative;
  721. .cell {
  722. display: flex;
  723. justify-content: space-between;
  724. min-height: 66px;
  725. box-sizing: border-box;
  726. padding-left: 14px;
  727. position: relative;
  728. cursor: pointer;
  729. .red-dots {
  730. position: absolute;
  731. right: 4px;
  732. top: 4px;
  733. }
  734. .img-wrapper {
  735. position: relative;
  736. margin-right: 16px;
  737. box-sizing: border-box;
  738. .icon-avatar {
  739. width: 34px;
  740. height: 34px;
  741. border-radius: 50%;
  742. }
  743. .icon-give {
  744. position: absolute;
  745. right: -4px;
  746. bottom: 2px;
  747. }
  748. .icon-big-give {
  749. margin-top: 14px;
  750. }
  751. }
  752. .info-wrapper {
  753. flex: 1;
  754. height: 100%;
  755. display: flex;
  756. justify-content: space-between;
  757. border-bottom: 1px solid #d1d1d1;
  758. box-sizing: border-box;
  759. padding: 10px 14px 10px 0;
  760. .left {
  761. .nickname {
  762. font-weight: 500;
  763. font-size: 14px;
  764. margin-bottom: 5px;
  765. max-width: 132px;
  766. word-break: break-all;
  767. }
  768. .time {
  769. font-size: 12px;
  770. color: #b6b6b6;
  771. }
  772. }
  773. .right {
  774. display: flex;
  775. align-items: center;
  776. cursor: pointer;
  777. .msg {
  778. .bold {
  779. font-weight: 500;
  780. font-size: 14px;
  781. text-align: right;
  782. display: flex;
  783. justify-content: flex-end;
  784. align-items: center;
  785. .blance {
  786. margin-left: 3px;
  787. display: inline-block;
  788. max-width: 80px;
  789. word-break: break-all;
  790. line-height: 18px;
  791. color: #E29A2E;
  792. }
  793. .coin-type {
  794. margin-left: 3px;
  795. }
  796. img {
  797. margin-left: 4px;
  798. width: 14px;
  799. height: 14px;
  800. }
  801. }
  802. .desc {
  803. font-size: 12px;
  804. color: #b6b6b6;
  805. margin-top: 5px;
  806. text-align: right;
  807. .desc-bottom-bar {
  808. display: flex;
  809. align-items: center;
  810. justify-content: end;
  811. margin-top: 10px;
  812. .btn {
  813. min-width: 80px;
  814. height: 29px;
  815. padding: 0 8px;
  816. box-sizing: border-box;
  817. font-weight: 400;
  818. font-size: 14px;
  819. cursor: pointer;
  820. text-align: center;
  821. border-radius: 100px;
  822. color: #5E5E5E;
  823. border: 1px solid #DFDFDF;
  824. display: flex;
  825. align-items: center;
  826. justify-content: center;
  827. }
  828. .send-btn {
  829. border: 1px solid #1D9BF0;
  830. color: #1D9BF0;
  831. }
  832. .detail-btn, .send-btn {
  833. margin-left: 8px;
  834. }
  835. }
  836. }
  837. }
  838. .icon {
  839. width: 18px;
  840. height: 24px;
  841. margin-left: 4px;
  842. margin-right: -5px;
  843. }
  844. }
  845. }
  846. .info-center {
  847. align-items: center;
  848. }
  849. }
  850. .cell-center {
  851. align-items: center;
  852. }
  853. .icon-empty {
  854. position: absolute;
  855. left: 50%;
  856. top: 50%;
  857. transform: translate(-50%, -50%);
  858. }
  859. }
  860. .more-list {
  861. .cell {
  862. cursor: pointer;
  863. display: flex;
  864. justify-content: space-between;
  865. align-items: center;
  866. height: 66px;
  867. box-sizing: border-box;
  868. padding-left: 20px;
  869. .icon {
  870. width: 42px;
  871. height: 42px;
  872. border-radius: 50%;
  873. }
  874. .info-wrapper {
  875. flex: 1;
  876. height: 100%;
  877. display: flex;
  878. justify-content: space-between;
  879. align-items: center;
  880. border-bottom: 1px solid #ECECEC;
  881. box-sizing: border-box;
  882. padding-right: 16px;
  883. .left {
  884. font-weight: 500;
  885. font-size: 16px;
  886. }
  887. .right {
  888. display: flex;
  889. align-items: center;
  890. cursor: pointer;
  891. .icon {
  892. width: 18px;
  893. height: 24px;
  894. }
  895. }
  896. }
  897. }
  898. }
  899. }
  900. }
  901. .page-wrapper::-webkit-scrollbar {
  902. display: none;
  903. }
  904. </style>