add.vue 26 KB

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