add.vue 27 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868
  1. <template>
  2. <div class="center">
  3. <div class="title">Create NFTs</div>
  4. <div class="content">
  5. <div class="l">
  6. <div class="name">Preview</div>
  7. <template v-if="configList.length">
  8. <div class="show">
  9. <div class="card" :class="selectItem.modelName">
  10. <div class="logo">
  11. <img v-if="tempUrl" :src="tempUrl" alt="">
  12. </div>
  13. <div class="member">{{ projectName === '' ? 'xxxx' : projectName }}</div>
  14. <div class="number">{{ projectNo === '' ? '0000' : projectNo }}</div>
  15. </div>
  16. <img class="bg" :src="selectItem.mainImagePath" />
  17. </div>
  18. <div class="list">
  19. <div
  20. class="item"
  21. :class="{ on: item.modelName === selectItem.modelName }"
  22. @click="select(item, index)"
  23. v-for="(item, index) in configList"
  24. :key="index">
  25. <img :src="item.previewImagePath" alt="" />
  26. </div>
  27. </div>
  28. </template>
  29. <div class="wait" v-else>
  30. <img width="30" src="../../static/img/icon-loading-gray.png" alt="" />
  31. </div>
  32. </div>
  33. <div class="r">
  34. <div class="name">Card face</div>
  35. <div class="face">
  36. <input type="file" class="file" @change="uploadImg" accept="image/png,image/jpg,image/jpeg" />
  37. <div class="on" v-if="tempUrl">
  38. <img src="../../static/img/icon-add-cover-on.svg" alt="" />
  39. <img class="img" :src="tempUrl" alt="" />
  40. </div>
  41. <div class="off" v-else>
  42. <img src="../../static/img/icon-add-cover-off.svg" alt="" />
  43. </div>
  44. </div>
  45. <div class="desc">Recommended size 500*500 or more</div>
  46. <div class="name">Project Name</div>
  47. <div class="input"><input type="text" maxlength="30" v-model="projectName" placeholder="Your NFT Project Name" /></div>
  48. <div class="name">Project Description</div>
  49. <div class="textarea"><textarea placeholder="Your NFT Project Description" maxlength="250" v-model="projectDesc"></textarea></div>
  50. <div class="name">Collection Size</div>
  51. <div class="input"><input type="text" v-model="projectSize" placeholder="0" /></div>
  52. <div class="showNo" v-if="showNoStr">No.{{ projectNo === '' ? '0000' : projectNo }}~{{projectSize}}</div>
  53. <div class="name">NFTs Price</div>
  54. <div class="price">
  55. <div class="currency" @click="showCurrencyDialog" v-if="currencyItem">
  56. <img class="head" :src="currencyItem.iconPath" alt="" />
  57. <div class="font">{{currencyItem.tokenSymbol}}</div>
  58. <img class="arrow" src="../../static/img/icon-add-arrow.svg" alt="" />
  59. </div>
  60. <div class="no-select" @click="showCurrencyDialog" v-else>
  61. <div class="font">Select a reward</div>
  62. <img class="arrow" src="../../static/img/icon-add-arrow-white.svg" alt="" />
  63. </div>
  64. <div class="input">
  65. <div class="tips" v-if="showMinPrice">the price of each NFT must be above $0.1 USD</div>
  66. <input type="number" v-model="projectPrice" @input="changePrice" placeholder="0" />
  67. </div>
  68. <!-- 货币列表 -->
  69. <div class="currency-pop" v-if="currencyDialog">
  70. <currency-list @selectCurrencyItem="selectCurrencyItem"></currency-list>
  71. </div>
  72. </div>
  73. <div class="explain">
  74. <ul>
  75. <li class="special">The NFT colection is minted on BNB Smart Chain (BEP20)</li>
  76. <li>NFT will be released in blind box mode</li>
  77. <li>Users need to pay service fees when transferring NFTs</li>
  78. </ul>
  79. </div>
  80. <div class="footer"></div>
  81. </div>
  82. </div>
  83. <div class="create">
  84. <button class="on" v-if="isNext" @click="next">Create</button>
  85. <button class="off" v-else>Create</button>
  86. </div>
  87. </div>
  88. <div class="feedBack" @click="feedback">
  89. <a href="mailto:service@cybertogether.net">
  90. <div class="mail">
  91. <img src="../../static/img/icon-feedback.svg" alt="" />
  92. </div>
  93. <div class="font">Feedback</div>
  94. </a>
  95. </div>
  96. <div class="loading" v-if="showLoading">
  97. <img src="../../static/img/icon-add-loading.svg" alt="" />
  98. </div>
  99. <div class="succ" v-if="showSuccess">
  100. <img class="icon" src="../../static/img/icon-notice-succ.svg" alt="" />
  101. <div class="notic">We have created your NFT collection</div>
  102. <button class="btn" @click="jumpList">Done</button>
  103. </div>
  104. <div class="succ-bg" v-if="showSuccess"></div>
  105. <div class="mask-bg" v-if="currencyDialog" @click="hideCurrencyDialog"></div>
  106. </template>
  107. <script lang="ts" setup>
  108. import { ref, onMounted, watchEffect } from 'vue';
  109. import Api from '../../static/http/api';
  110. import { postRequest } from '../../static/http';
  111. import { uploadFile } from '../../static/utils/upload'
  112. import { Report } from '../../static/report'
  113. import { debounce } from '../../static/utils'
  114. import { businessType, pageSource, objectType } from '../../static/report/enum'
  115. import currencyList from '../../components/currency-list.vue';
  116. const isNext = ref(false);
  117. const showLoading = ref(false);
  118. const showSuccess = ref(false);
  119. const maxSize = ref(100000);
  120. const minUsdAmount = ref(0)
  121. const configList = ref([]);
  122. const selectItem = ref(null);
  123. const uploadItem = ref({});
  124. const currencyDialog = ref(false);
  125. const currencyItem = ref(null);
  126. const projectName = ref('');
  127. const projectDesc = ref('');
  128. const projectSize = ref('');
  129. const projectNo = ref('');
  130. const projectPrice = ref('');
  131. const showNoStr = ref(false);
  132. const showMinPrice = ref(false);
  133. const tempFile = ref('');
  134. const tempUrl = ref('');
  135. const buttonType = {
  136. feedback: 'feedback-button',
  137. create: 'create-button',
  138. }
  139. const getConfig = () => {
  140. postRequest(Api.createConfig).then(res => {
  141. let { code, data } = res;
  142. if ( code === 0 ) {
  143. configList.value = data.itemModels;
  144. maxSize.value = data.maxCollectionSize;
  145. selectItem.value = data.itemModels[0];
  146. minUsdAmount.value = data.sellMinUsdAmount;
  147. // 预加载图片
  148. if (data.itemModels) {
  149. data.itemModels.forEach(item => {
  150. let img = new Image()
  151. img.src = item.previewImagePath;
  152. })
  153. }
  154. }
  155. })
  156. }
  157. const next = () => {
  158. // show loading
  159. showLoading.value = true;
  160. uploadFile(tempFile.value).then(res => {
  161. // @ts-ignore
  162. uploadItem.value = res;
  163. // post
  164. postRequest(Api.userNftAdd, {
  165. params: {
  166. // 项目图标
  167. cardFaceImagePath: uploadItem.value && uploadItem.value.objectKey || '',
  168. // 发行数量
  169. nftCollectionSize: projectSize.value || '',
  170. // 选中的模版id
  171. nftItemImageModel: selectItem.value && selectItem.value.modelName || '',
  172. // 项目描述
  173. nftProjectDescription: projectDesc.value.trim() || '',
  174. // 项目名称
  175. nftProjectName: projectName.value.trim() || '',
  176. // 销售价格
  177. saleCurrencyAmount: projectPrice.value || '',
  178. // 销售的货币code
  179. saleCurrencyCode: currencyItem.value && currencyItem.value.currencyCode || '',
  180. }
  181. }).then(res => {
  182. if (res.code === 0) {
  183. showSuccess.value = true;
  184. }
  185. }).finally(() => {
  186. showLoading.value = false;
  187. })
  188. // Report
  189. Report({
  190. baseInfo: {
  191. pageSource: pageSource.creatorPage,
  192. },
  193. params: {
  194. eventData: {
  195. businessType: businessType.buttonClick,
  196. objectType: buttonType.create,
  197. }
  198. }
  199. })
  200. }).catch(() => {
  201. showLoading.value = false;
  202. })
  203. }
  204. const select = (item: any, index: number) => {
  205. selectItem.value = item;
  206. let objectType;
  207. switch(index) {
  208. case 0:
  209. objectType = `first-NFT-selection-button`;
  210. break;
  211. case 1:
  212. objectType = `second-NFT-selection-button`;
  213. break;
  214. case 2:
  215. objectType = `third-NFT-selection-button`;
  216. break;
  217. case 3:
  218. objectType = `forth-NFT-selection-button`;
  219. break;
  220. }
  221. // Report
  222. Report({
  223. baseInfo: {
  224. pageSource: pageSource.creatorPage,
  225. },
  226. params: {
  227. eventData: {
  228. businessType: businessType.buttonClick,
  229. objectType: objectType,
  230. }
  231. }
  232. })
  233. }
  234. const showCurrencyDialog = () => {
  235. currencyDialog.value = true;
  236. }
  237. const hideCurrencyDialog = () => {
  238. currencyDialog.value = false;
  239. }
  240. const selectCurrencyItem = (data: any) => {
  241. currencyItem.value = data;
  242. hideCurrencyDialog();
  243. }
  244. const uploadImg = (e: any) => {
  245. let file = e.target.files[0];
  246. // 清空file
  247. e.target.value = '';
  248. // 预览
  249. tempFile.value = file;
  250. tempUrl.value = URL.createObjectURL(file);
  251. }
  252. const hideSuccess = () => {
  253. showSuccess.value = false;
  254. }
  255. const jumpList = () => {
  256. location.href = `/nft/list`
  257. }
  258. const changePrice = debounce((e: any) => {
  259. projectPrice.value = String(Math.abs(e.target.value))
  260. }, 500)
  261. const feedback = () => {
  262. // Report
  263. Report({
  264. baseInfo: {
  265. pageSource: pageSource.creatorPage,
  266. },
  267. params: {
  268. eventData: {
  269. businessType: businessType.buttonClick,
  270. objectType: buttonType.feedback,
  271. }
  272. }
  273. })
  274. }
  275. let timer = ref(0);
  276. watchEffect(() => {
  277. let emojiReg = /[\uD83C|\uD83D|\uD83E][\uDC00-\uDFFF][\u200D|\uFE0F]|[\uD83C|\uD83D|\uD83E][\uDC00-\uDFFF]|[0-9|*|#]\uFE0F\u20E3|[0-9|#]\u20E3|[\u203C-\u3299]\uFE0F\u200D|[\u203C-\u3299]\uFE0F|[\u2122-\u2B55]|\u303D|[\A9|\AE]\u3030|\uA9|\uAE|\u3030/gi;
  278. // 数量
  279. let num = projectSize.value;
  280. num = num.replace(/\D/g, '');
  281. if (Number(num) > maxSize.value) {
  282. num = String(maxSize.value);
  283. }
  284. if (num) {
  285. projectSize.value = String(Number(num));
  286. } else {
  287. projectSize.value = '';
  288. }
  289. // 编号
  290. if (projectSize.value !== '') {
  291. projectNo.value = String(1).padStart(String(projectSize.value).length, '0')
  292. } else {
  293. projectNo.value = ''
  294. }
  295. showNoStr.value = projectNo.value != '';
  296. // 是否可以创建
  297. let ifUpload = tempUrl.value != '' || false;
  298. let ifName = projectName.value !== '';
  299. let ifDesc = projectDesc.value !== '';
  300. let ifSize = projectSize.value !== '' && Number(projectSize.value) > 0;
  301. let ifCurrency = currencyItem.value && currencyItem.value.currencyCode;
  302. let ifPrice = projectPrice.value && projectPrice.value !== '' && Number(projectPrice.value) > 0;
  303. // setTimeout
  304. clearTimeout(timer.value);
  305. timer.value = setTimeout(() => {
  306. projectName.value = projectName.value.replace(emojiReg, '');
  307. // 最低金额
  308. if (ifCurrency && ifPrice) {
  309. let usdPrice = currencyItem.value && currencyItem.value.usdPrice;
  310. if (Number(usdPrice) * Number(projectPrice.value) < Number(minUsdAmount.value)) {
  311. showMinPrice.value = true;
  312. } else {
  313. showMinPrice.value = false;
  314. }
  315. }
  316. // show next
  317. isNext.value = ifUpload && ifName && ifDesc && ifSize && ifCurrency && ifPrice && !showMinPrice.value;
  318. }, 400)
  319. })
  320. onMounted(() => {
  321. // config
  322. getConfig()
  323. // Report
  324. Report({
  325. baseInfo: {
  326. pageSource: pageSource.creatorPage,
  327. },
  328. params: {
  329. eventData: {
  330. businessType: businessType.pageView,
  331. }
  332. }
  333. })
  334. })
  335. </script>
  336. <style lang="less" scoped>
  337. .center {
  338. overflow-y: auto;
  339. padding: 0 50px;
  340. width: 1100px;
  341. margin: 10px auto 0;
  342. box-sizing: border-box;
  343. height: calc(100% - 10px);
  344. background-color: #fff;
  345. border-radius: 20px 20px 0 0;
  346. &::-webkit-scrollbar {
  347. width: 0 !important;
  348. }
  349. .title {
  350. padding: 22px 0;
  351. font-size: 20px;
  352. font-weight: 600;
  353. line-height: 24px;
  354. }
  355. .content {
  356. width: 100%;
  357. clear: both;
  358. display: flex;
  359. justify-content: space-between;
  360. .name {
  361. height: 24px;
  362. font-size: 12px;
  363. color: #939393;
  364. }
  365. .showNo {
  366. color: #939393;
  367. font-size: 12px;
  368. margin-top: -10px;
  369. margin-bottom: 24px;
  370. }
  371. .l {
  372. width: 400px;
  373. .wait {
  374. padding: 200px 0;
  375. text-align: center;
  376. img {
  377. opacity: .6;
  378. animation: rotate 1s infinite linear;
  379. }
  380. }
  381. .show {
  382. position: relative;
  383. overflow: hidden;
  384. width: 400px;
  385. height: 400px;
  386. border-radius: 10px;
  387. .card {
  388. position: absolute;
  389. left: 53px;
  390. top: 103px;
  391. width: 294px;
  392. height: 186px;
  393. .logo {
  394. position: absolute;
  395. top: 50%;
  396. left: 50%;
  397. transform: translate(-50%, -50%);
  398. width: 100px;
  399. height: 100px;
  400. border-radius: 50%;
  401. background-color: #fff;
  402. img {
  403. width: 100%;
  404. height: 100%;
  405. border-radius: 50%;
  406. object-fit: cover;
  407. }
  408. }
  409. .member {
  410. position: absolute;
  411. top: 11px;
  412. left: 11px;
  413. width: 228px;
  414. font-size: 12px;
  415. text-align: left;
  416. font-weight: 800;
  417. line-height: 13px;
  418. }
  419. .number {
  420. position: absolute;
  421. top: 11px;
  422. right: 10px;
  423. font-size: 12px;
  424. font-weight: 800;
  425. line-height: 13px;
  426. letter-spacing: 1px;
  427. }
  428. &.s1 {
  429. .member, .number {
  430. color: #ffffff;
  431. }
  432. }
  433. &.s2 {
  434. .member, .number {
  435. color: #4AC3E1;
  436. }
  437. }
  438. &.s3 {
  439. .member, .number {
  440. color: #606C94;
  441. }
  442. }
  443. &.s4 {
  444. .member, .number {
  445. color: #504215;
  446. }
  447. }
  448. }
  449. .bg {
  450. width: 100%;
  451. height: 100%;
  452. }
  453. }
  454. .list {
  455. margin-top: 20px;
  456. display: flex;
  457. .item {
  458. width: calc(100% / 4);
  459. cursor: pointer;
  460. overflow: hidden;
  461. margin-right: 13px;
  462. border-radius: 5px;
  463. img {
  464. width: 100%;
  465. border-radius: 5px;
  466. }
  467. &:last-child {
  468. margin: 0;
  469. }
  470. &.on {
  471. position: relative;
  472. &::before {
  473. position: absolute;
  474. display: block;
  475. top: 0;
  476. right: 0;
  477. content: '';
  478. width: 44px;
  479. height: 44px;
  480. background-size: 100%;
  481. background-image: url('../../static/img/icon-add-select.svg');
  482. }
  483. }
  484. }
  485. }
  486. }
  487. .r {
  488. width: 520px;
  489. .face {
  490. position: relative;
  491. width: 80px;
  492. margin-bottom: 10px;
  493. .file {
  494. position: absolute;
  495. z-index: 2;
  496. width: 100%;
  497. height: 100%;
  498. opacity: 0;
  499. cursor: pointer;
  500. }
  501. .off {
  502. display: flex;
  503. align-items: center;
  504. justify-content: center;
  505. cursor: pointer;
  506. width: 80px;
  507. height: 80px;
  508. border-radius: 100px;
  509. border: 1px dashed #D0D0D0;
  510. background: rgba(0, 0, 0, 0.02);
  511. }
  512. .on {
  513. position: relative;
  514. display: flex;
  515. align-items: center;
  516. justify-content: center;
  517. cursor: pointer;
  518. width: 80px;
  519. height: 80px;
  520. overflow: hidden;
  521. border-radius: 100px;
  522. background: #353535;
  523. .img {
  524. position: absolute;
  525. opacity: .4;
  526. width: 100%;
  527. height: 100%;
  528. border-radius: 100px;
  529. }
  530. }
  531. }
  532. .desc {
  533. color: #B4B4B4;
  534. font-size: 12px;
  535. font-weight: 400;
  536. line-height: 16px;
  537. margin-bottom: 22px;
  538. }
  539. .input {
  540. position: relative;
  541. display: flex;
  542. align-items: center;
  543. justify-content: center;
  544. height: 41px;
  545. margin-bottom: 22px;
  546. border-radius: 5px;
  547. background: #FFFFFF;
  548. border: 1px solid #E0E0E0;
  549. input {
  550. border: 0;
  551. outline: none;
  552. padding: 3px 0;
  553. color: #777;
  554. font-size: 16px;
  555. font-weight: 500;
  556. letter-spacing: 0.3px;
  557. width: calc(100% - 24px);
  558. &::placeholder {
  559. color: rgba(0, 0, 0, .3);
  560. }
  561. }
  562. .tips {
  563. position: absolute;
  564. left: 0;
  565. top: -22px;
  566. font-size: 12px;
  567. color: #E29015;
  568. }
  569. }
  570. .textarea {
  571. display: flex;
  572. align-items: center;
  573. justify-content: center;
  574. height: 72px;
  575. margin-bottom: 22px;
  576. border-radius: 5px;
  577. background: #FFFFFF;
  578. border: 1px solid #E0E0E0;
  579. textarea {
  580. resize: none;
  581. border: 0;
  582. height: 52px;
  583. outline: none;
  584. color: #777;
  585. font-size: 16px;
  586. font-weight: 500;
  587. letter-spacing: 0.3px;
  588. width: calc(100% - 24px);
  589. font-family: "Segoe UI", Helvetica, Arial, sans-serif;
  590. &::placeholder {
  591. color: rgba(0, 0, 0, .3);
  592. }
  593. }
  594. }
  595. .price {
  596. position: relative;
  597. display: flex;
  598. justify-content: space-between;
  599. .currency {
  600. display: flex;
  601. align-items: center;
  602. justify-content: center;
  603. flex-direction: row;
  604. cursor: pointer;
  605. height: 43px;
  606. padding: 0 14px;
  607. margin-right: 13px;
  608. border-radius: 25px;
  609. background: #F4F4F4;
  610. .head {
  611. overflow: hidden;
  612. width: 20px;
  613. height: 20px;
  614. margin-right: 8px;
  615. border-radius: 50%;
  616. background-color: #999;
  617. }
  618. .font {
  619. max-width: 250px;
  620. font-size: 15px;
  621. font-weight: 500;
  622. white-space: nowrap;
  623. overflow: hidden;
  624. text-overflow: ellipsis;
  625. }
  626. .arrow {
  627. margin-left: 8px
  628. }
  629. }
  630. .no-select {
  631. display: flex;
  632. align-items: center;
  633. justify-content: center;
  634. flex-direction: row;
  635. cursor: pointer;
  636. height: 43px;
  637. padding: 0 14px;
  638. margin-right: 13px;
  639. border-radius: 25px;
  640. background: #1d9bf0;
  641. .font {
  642. max-width: 250px;
  643. color: #fff;
  644. font-size: 15px;
  645. font-weight: 500;
  646. white-space: nowrap;
  647. overflow: hidden;
  648. text-overflow: ellipsis;
  649. }
  650. .arrow {
  651. margin-left: 8px
  652. }
  653. }
  654. .input {
  655. flex: 1;
  656. margin-bottom: 0;
  657. }
  658. .currency-pop {
  659. position: absolute;
  660. overflow: hidden;
  661. z-index: 3;
  662. left: 0;
  663. bottom: 50px;
  664. width: 375px;
  665. max-height: 420px;
  666. border-radius: 20px;
  667. background-color: #fff;
  668. box-shadow: 0px 4px 20px rgba(0, 0, 0, 0.25);
  669. }
  670. }
  671. .explain {
  672. color: #B4B4B4;
  673. font-size: 12px;
  674. font-weight: 400;
  675. line-height: 18px;
  676. ul {
  677. padding: 0;
  678. margin-left: 14px;
  679. }
  680. .special {
  681. color: #E29015;
  682. }
  683. }
  684. .footer {
  685. height: 80px;
  686. }
  687. }
  688. }
  689. .create {
  690. position: fixed;
  691. left: 50%;
  692. bottom: 0;
  693. width: 1100px;
  694. text-align: right;
  695. padding: 15px 30px;
  696. transform: translateX(-50%);
  697. box-sizing: border-box;
  698. background-color: #fff;
  699. border-top: solid 1px #ECECEC;
  700. .on {
  701. border: 0;
  702. height: 50px;
  703. color: #FFFFFF;
  704. cursor: pointer;
  705. padding: 0 50px;
  706. font-size: 18px;
  707. font-weight: 700;
  708. letter-spacing: 0.3px;
  709. border-radius: 25px;
  710. background: #1D9BF0;
  711. }
  712. .off {
  713. border: 0;
  714. height: 50px;
  715. color: #FFFFFF;
  716. cursor: pointer;
  717. padding: 0 50px;
  718. font-size: 18px;
  719. font-weight: 700;
  720. letter-spacing: 0.3px;
  721. border-radius: 25px;
  722. background: #E4E4E4;
  723. }
  724. }
  725. }
  726. .feedBack {
  727. position: absolute;
  728. right: 44px;
  729. bottom: 88px;
  730. cursor: pointer;
  731. font-size: 12px;
  732. text-align: center;
  733. a:link, a:visited {
  734. color: #A8A8A8;
  735. text-decoration: none;
  736. }
  737. .mail {
  738. display: flex;
  739. align-items: center;
  740. justify-content: center;
  741. margin: auto;
  742. width: 50px;
  743. height: 50px;
  744. margin-bottom: 10px;
  745. border-radius: 50%;
  746. background-color: #fff;
  747. }
  748. .font {
  749. opacity: 0.7;
  750. color: #A8A8A8;
  751. letter-spacing: 0.3px;
  752. }
  753. }
  754. .loading {
  755. display: flex;
  756. align-items: center;
  757. justify-content: center;
  758. position: absolute;
  759. top: 0;
  760. left: 0;
  761. z-index: 2;
  762. width: 100%;
  763. height: 100%;
  764. background: rgba(255, 255, 255, .8);
  765. img {
  766. width: 100px;
  767. animation: rotate 1s linear infinite;
  768. }
  769. }
  770. @keyframes rotate {
  771. 0% {
  772. transform: rotate(0);
  773. }
  774. 100% {
  775. transform: rotate(360deg);
  776. }
  777. }
  778. .succ {
  779. position: absolute;
  780. z-index: 2;
  781. top: 50%;
  782. left: 50%;
  783. width: 500px;
  784. height: 400px;
  785. border-radius: 20px;
  786. background-color: #fff;
  787. transform: translate(-50%, -50%);
  788. .icon {
  789. display: block;
  790. width: 120px;
  791. height: 120px;
  792. margin: 78px auto 27px auto;
  793. }
  794. .notic {
  795. font-size: 20px;
  796. font-weight: 700;
  797. text-align: center;
  798. line-height: 24px;
  799. }
  800. .btn {
  801. display: block;
  802. border: 0;
  803. cursor: pointer;
  804. width: 440px;
  805. height: 50px;
  806. color: #fff;
  807. font-size: 18px;
  808. font-weight: 700;
  809. margin: 70px auto 0;
  810. border-radius: 50px;
  811. background: #1D9BF0;
  812. }
  813. }
  814. .succ-bg {
  815. position: absolute;
  816. top: 0;
  817. left: 0;
  818. width: 100%;
  819. height: 100%;
  820. background: rgba(0, 0, 0, .8);
  821. }
  822. .mask-bg {
  823. position: absolute;
  824. top: 0;
  825. left: 0;
  826. z-index: 2;
  827. width: 100%;
  828. height: 100%;
  829. }
  830. </style>