give-dialog.vue 38 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495969798991001011021031041051061071081091101111121131141151161171181191201211221231241251261271281291301311321331341351361371381391401411421431441451461471481491501511521531541551561571581591601611621631641651661671681691701711721731741751761771781791801811821831841851861871881891901911921931941951961971981992002012022032042052062072082092102112122132142152162172182192202212222232242252262272282292302312322332342352362372382392402412422432442452462472482492502512522532542552562572582592602612622632642652662672682692702712722732742752762772782792802812822832842852862872882892902912922932942952962972982993003013023033043053063073083093103113123133143153163173183193203213223233243253263273283293303313323333343353363373383393403413423433443453463473483493503513523533543553563573583593603613623633643653663673683693703713723733743753763773783793803813823833843853863873883893903913923933943953963973983994004014024034044054064074084094104114124134144154164174184194204214224234244254264274284294304314324334344354364374384394404414424434444454464474484494504514524534544554564574584594604614624634644654664674684694704714724734744754764774784794804814824834844854864874884894904914924934944954964974984995005015025035045055065075085095105115125135145155165175185195205215225235245255265275285295305315325335345355365375385395405415425435445455465475485495505515525535545555565575585595605615625635645655665675685695705715725735745755765775785795805815825835845855865875885895905915925935945955965975985996006016026036046056066076086096106116126136146156166176186196206216226236246256266276286296306316326336346356366376386396406416426436446456466476486496506516526536546556566576586596606616626636646656666676686696706716726736746756766776786796806816826836846856866876886896906916926936946956966976986997007017027037047057067077087097107117127137147157167177187197207217227237247257267277287297307317327337347357367377387397407417427437447457467477487497507517527537547557567577587597607617627637647657667677687697707717727737747757767777787797807817827837847857867877887897907917927937947957967977987998008018028038048058068078088098108118128138148158168178188198208218228238248258268278288298308318328338348358368378388398408418428438448458468478488498508518528538548558568578588598608618628638648658668678688698708718728738748758768778788798808818828838848858868878888898908918928938948958968978988999009019029039049059069079089099109119129139149159169179189199209219229239249259269279289299309319329339349359369379389399409419429439449459469479489499509519529539549559569579589599609619629639649659669679689699709719729739749759769779789799809819829839849859869879889899909919929939949959969979989991000100110021003100410051006100710081009101010111012101310141015101610171018101910201021102210231024102510261027102810291030103110321033103410351036103710381039104010411042104310441045104610471048104910501051105210531054105510561057105810591060106110621063106410651066106710681069107010711072107310741075107610771078107910801081108210831084108510861087108810891090109110921093109410951096109710981099110011011102110311041105110611071108110911101111111211131114111511161117111811191120112111221123112411251126112711281129113011311132113311341135113611371138113911401141114211431144
  1. <template>
  2. <div class="overlay" v-if="visible">
  3. <div
  4. class="content"
  5. :style="{
  6. height: dialogHeight + 'px',
  7. width: showComType != 'preview' ? '600px' : 'auto',
  8. }"
  9. >
  10. <div class="head" @click.self="showCurrencyPop = false">
  11. <div class="left">
  12. <div class="close-btn" @click="close">
  13. <img
  14. class="icon-close"
  15. v-if="showComType == 'default'"
  16. :src="require('../../assets/svg/icon-close.svg')"
  17. />
  18. <img
  19. class="icon-close"
  20. v-else
  21. :src="require('../../assets/svg/icon-back.svg')"
  22. />
  23. </div>
  24. <div class="title">
  25. {{ currentComData[showComType]["title"] }}
  26. </div>
  27. </div>
  28. <div class="right">
  29. <div class="transactions">
  30. <img
  31. :src="
  32. require('../../assets/svg/icon-option-list.svg')
  33. "
  34. />
  35. Transactions
  36. </div>
  37. </div>
  38. </div>
  39. <div class="body">
  40. <!-- 充值组件 -->
  41. <top-up v-show="showComType == 'topUp'"></top-up>
  42. <!-- 表单填写容器 -->
  43. <div class="body-content" v-show="showComType != 'topUp'">
  44. <!-- 货币列表 -->
  45. <div class="currency-pop" v-if="showCurrencyPop">
  46. <currency-list @selectCurrency="selectCurrency"></currency-list>
  47. </div>
  48. <div class="left" @click.self="showCurrencyPop = false">
  49. <div class="gift-pack-wrapper">
  50. <img
  51. class="icon"
  52. :src="
  53. require('../../assets/svg/icon-gift-pack.svg')
  54. "
  55. />
  56. </div>
  57. <div class="bottom">
  58. </div>
  59. </div>
  60. <div class="right">
  61. <template v-if="showComType == 'default'">
  62. <div class="form-wrapper">
  63. <img
  64. @click.stop="showCurrencyPop = false"
  65. class="img-mode"
  66. src="../../assets/img/img-mode.png"
  67. />
  68. <!-- 金额、数量 -->
  69. <div class="form-base">
  70. <div class="item currency-select-wrapper">
  71. <div
  72. class="label currency-select"
  73. @click="showCurrencyPop = true"
  74. >
  75. <img
  76. class="icon"
  77. :src="
  78. require('../../assets/svg/icon-usd.svg')
  79. "
  80. />
  81. USD
  82. <img
  83. class="arrow"
  84. :src="
  85. require('../../assets/svg/icon-form-arrow-down.svg')
  86. "
  87. />
  88. </div>
  89. <el-input
  90. v-model="baseFormData.amountValue"
  91. placeholder="0"
  92. autofocus
  93. @input="onUsdInput"
  94. @blur="onUsdBlur"
  95. :input-style="{
  96. 'box-shadow': 'none',
  97. padding: '1px',
  98. width: '110px',
  99. 'text-align': 'right',
  100. 'font-size': '15px',
  101. color: '#000',
  102. 'margin-right': '14px',
  103. }"
  104. />
  105. </div>
  106. <div class="item" @click.stop="showCurrencyPop = false">
  107. <div class="label">
  108. <img
  109. class="icon"
  110. :src="
  111. require('../../assets/svg/icon-winners.svg')
  112. "
  113. />
  114. Winners
  115. </div>
  116. <el-input
  117. v-model="baseFormData.totalCount"
  118. placeholder="0"
  119. @input="onCountInput"
  120. @blur="onCountBlur"
  121. :input-style="{
  122. 'box-shadow': 'none',
  123. padding: '1px',
  124. width: '120px',
  125. 'text-align': 'right',
  126. 'font-size': '15px',
  127. color: '#000',
  128. }"
  129. />
  130. </div>
  131. </div>
  132. <!-- 刷新按钮、充值 -->
  133. <div class="form-base-help" @click.stop="showCurrencyPop = false">
  134. <div class="currency-operation">
  135. <div class="balance">
  136. <img
  137. :src="
  138. require('../../assets/svg/icon-balance.svg')
  139. "
  140. />
  141. Balance
  142. </div>
  143. <div class="amount">
  144. 218
  145. <img
  146. :src="
  147. require('../../assets/svg/icon-form-refresh.svg')
  148. "
  149. />
  150. </div>
  151. <div class="top-up" @click="goTopUp">Top UP</div>
  152. </div>
  153. <div class="msg">
  154. Recommend quantity 100~10000
  155. </div>
  156. </div>
  157. <div class="form-label">Tasks</div>
  158. <!-- 转推、like、关注 -->
  159. <div class="form-require" @click.stop="showCurrencyPop = false">
  160. <div
  161. class="form-item"
  162. v-for="(item, index) in formList"
  163. :key="index"
  164. >
  165. <div class="label">
  166. <img
  167. class="icon"
  168. :src="item.icon"
  169. />
  170. {{ item.label }}
  171. </div>
  172. <div
  173. class="control"
  174. v-if="item.nodeType == 'textarea'"
  175. >
  176. <follow-input
  177. :isAddSelf="!isBack"
  178. :atUserList="atUserList"
  179. @addUser="addFollowUser"
  180. @setUser="setFollowUser"
  181. @delUser="delFollowUser"
  182. ></follow-input>
  183. </div>
  184. <el-switch
  185. v-if="item.type == 2"
  186. v-model="item.checked"
  187. />
  188. <img
  189. v-if="item.type == 3"
  190. :src="
  191. require('../../assets/svg/icon-option-checked.svg')
  192. "
  193. />
  194. </div>
  195. </div>
  196. <!-- 机器人 -->
  197. <div class="anti-bot-wrapper">
  198. <div class="label">
  199. <img
  200. :src="
  201. require('../../assets/svg/icon-anti-bot.svg')
  202. "
  203. class="icon-bot"
  204. />
  205. Anti Bot
  206. <img
  207. :src="
  208. require('../../assets/svg/icon-beta.svg')
  209. "
  210. class="icon-beta"
  211. />
  212. <img
  213. :src="
  214. require('../../assets/svg/icon-question.svg')
  215. "
  216. class="icon-question"
  217. />
  218. </div>
  219. <el-switch v-model="openAntiBot" />
  220. </div>
  221. <!-- 提示 -->
  222. <div class="tips-wrapper">
  223. <div class="title">TIPS</div>
  224. <div class="row">
  225. 1. Only after the user completes the
  226. tasks you set, they can claim your red
  227. envelopes
  228. </div>
  229. <div class="row">
  230. 2. Each user can only receive one red
  231. envelope
  232. </div>
  233. <div class="row">
  234. 3. The red envelope issued is valid for
  235. 7 days. Please promote your red envelope
  236. as much as possible within the validity
  237. period. After the red envelope expires,
  238. the red envelope will be returned to
  239. your DeNet wallet.
  240. </div>
  241. <div class="more">More</div>
  242. </div>
  243. <div class="submit-btn-wrapper">
  244. <div class="submit-btn" @click="confirm">
  245. <img
  246. class="icon-loading"
  247. v-if="submitIng"
  248. :src="
  249. require('../../assets/svg/icon-btn-loading.svg')
  250. "
  251. />
  252. NEXT
  253. </div>
  254. </div>
  255. </div>
  256. </template>
  257. <!-- 预览 -->
  258. <template v-else-if="showComType == 'preview'">
  259. <preview-card
  260. :postData="publishRes"
  261. :baseFormData="baseFormData"
  262. ></preview-card>
  263. </template>
  264. <!-- paypal支付按钮 -->
  265. <div v-show="showComType == 'preview'">
  266. <paypal-button
  267. :finalAmountData="finalAmountData"
  268. :payConfig="{
  269. paypalClientId,
  270. paypalHtml,
  271. }"
  272. @payPalFinsh="payPalFinsh"
  273. ></paypal-button>
  274. </div>
  275. </div>
  276. </div>
  277. </div>
  278. </div>
  279. <!-- 提示 -->
  280. <message-box
  281. :dialogVisible="showMessageBox"
  282. :title="messageBoxData.title"
  283. :content="messageBoxData.content"
  284. @cancel="messageBoxCancel"
  285. @confirm="messageBoxConfirm"
  286. ></message-box>
  287. </div>
  288. </template>
  289. <script setup>
  290. import { ref, watch, reactive, defineProps, defineEmits, onMounted } from "vue";
  291. import { postPublish, verifyPaypalResult } from "../../http/publishApi";
  292. import { payCalcFee, getPayConfig } from "../../http/pay";
  293. import { getFrontConfig } from "../../http/account";
  294. import { ElMessage, ElLoading } from "element-plus";
  295. import "element-plus/es/components/message/style/css";
  296. import previewCard from "./preview-card";
  297. import paypalButton from "./paypal-button";
  298. import followInput from "./follow-input";
  299. import messageBox from "./message-box.vue";
  300. import currencyList from "./currency-list.vue";
  301. import topUp from "./top-up.vue";
  302. let paypalClientId = ref("");
  303. let paypalHtml = ref("");
  304. let publishRes = reactive({});
  305. let currentComData = {
  306. default: {
  307. title: "Giveaways",
  308. },
  309. preview: {
  310. title: "Preview",
  311. },
  312. topUp: {
  313. title: "Top Up",
  314. },
  315. };
  316. let visible = ref(false);
  317. let showComType = ref("default"); // default(表单) preview(预览) topUp(充值)
  318. let openAntiBot = ref(false);
  319. let dialogHeight = ref(680);
  320. let submitIng = ref(false);
  321. let atUserList = ref([]);
  322. let iptErrMsgTxt = ref("");
  323. let isBack = ref(false);
  324. let showMessageBox = ref(false);
  325. let showCurrencyPop = ref(false);
  326. let messageBoxData = ref({
  327. title: "",
  328. content: "",
  329. });
  330. let finalAmountData = ref({
  331. currencyCode: "USD",
  332. feeAmountValue: 0,
  333. finalAmountValue: 0,
  334. requestAmountValue: 0,
  335. });
  336. let baseFormData = reactive({
  337. amountCurrencyCode: "USD",
  338. amountValue: "",
  339. totalCount: "",
  340. });
  341. let formList = reactive([
  342. {
  343. label: "Follow",
  344. icon: require("../../assets/svg/icon-follow.svg"),
  345. nodeType: "textarea",
  346. type: 1,
  347. text: [],
  348. checked: true,
  349. },
  350. {
  351. label: "Retweet",
  352. icon: require("../../assets/svg/icon-retweet.svg"),
  353. nodeType: "div",
  354. type: 3,
  355. checked: true,
  356. },
  357. {
  358. label: "Like tweet",
  359. icon: require("../../assets/svg/icon-like.svg"),
  360. nodeType: "div",
  361. type: 2,
  362. checked: true,
  363. },
  364. ]);
  365. const props = defineProps({
  366. dialogVisible: {
  367. type: Boolean,
  368. default: false,
  369. },
  370. });
  371. watch(
  372. () => props.dialogVisible,
  373. (newVal) => {
  374. console.log("watch", newVal);
  375. if (newVal) {
  376. setTimeout(() => {
  377. setDialogHeight();
  378. }, 300);
  379. }
  380. visible.value = newVal;
  381. }
  382. );
  383. const emits = defineEmits(["close", "confirm", "payPalFinsh"]);
  384. const close = () => {
  385. if (showComType.value != "default") {
  386. showComType.value = "default";
  387. isBack.value = true;
  388. } else {
  389. initParams();
  390. emits("close", false);
  391. }
  392. };
  393. /**
  394. * 设置弹窗高度
  395. */
  396. const setDialogHeight = () => {
  397. let clientHeight = window.innerHeight;
  398. let gapSafe = 40;
  399. if (dialogHeight.value > clientHeight - gapSafe) {
  400. dialogHeight.value = clientHeight - gapSafe;
  401. }
  402. };
  403. /**
  404. * 获取实际支付金额
  405. */
  406. const getPayAmount = (amountValue, cb) => {
  407. payCalcFee({
  408. params: {
  409. amountValue,
  410. currencyCode: "USD",
  411. payChannel: 1,
  412. },
  413. }).then((res) => {
  414. if (res.code == 0) {
  415. cb && cb(res.data);
  416. let { finalAmountValue } = res.data;
  417. if (finalAmountValue >= 100) {
  418. res.data.finalAmountValue = finalAmountValue / 100;
  419. finalAmountData.value = res.data;
  420. }
  421. }
  422. });
  423. };
  424. const confirm = () => {
  425. if (submitIng.value) {
  426. return;
  427. }
  428. let { totalCount = 0 } = baseFormData;
  429. if (!totalCount) {
  430. return;
  431. }
  432. if (!calcIptValue()) {
  433. return;
  434. }
  435. submitRequest();
  436. };
  437. const selectCurrency = (params) => {
  438. console.log(params);
  439. messageBoxBlock({
  440. title: "是否要充值 USDT",
  441. content: "USDT 可用余额为0,是否要去充值?",
  442. });
  443. };
  444. const messageBoxBlock = ({ title = "", content = "" }) => {
  445. showMessageBox.value = true;
  446. messageBoxData.value.title = title;
  447. messageBoxData.value.content = content;
  448. };
  449. const messageBoxCancel = () => {
  450. showMessageBox.value = false;
  451. };
  452. const messageBoxConfirm = () => {
  453. showMessageBox.value = false;
  454. // showCurrencyPop.value = false;
  455. showComType.value = "topUp";
  456. };
  457. /**
  458. * 去充值
  459. */
  460. const goTopUp = () => {
  461. showComType.value = 'topUp';
  462. }
  463. /**
  464. * 提交表单请求
  465. */
  466. const submitRequest = () => {
  467. let { amountValue = 0, totalCount = 0, amountCurrencyCode } = baseFormData;
  468. formList[0]["text"] = atUserList.value;
  469. amountValue = amountValue * 100; // 元转分
  470. let finishConditions = [];
  471. for (let i = 0; i < formList.length; i++) {
  472. let item = {};
  473. item.type = formList[i]["type"];
  474. if (item.type == 1 && formList[i]["text"]) {
  475. // follow 参数
  476. let relatedUsers = formList[i]["text"];
  477. item.relatedUsers = relatedUsers;
  478. finishConditions.push(item);
  479. } else if (formList[i]["checked"]) {
  480. finishConditions.push(item);
  481. }
  482. }
  483. let receiveConditions = openAntiBot.value ? "" : [];
  484. let formData = {
  485. amountCurrencyCode,
  486. amountValue,
  487. totalCount,
  488. finishConditions,
  489. receiveConditions,
  490. };
  491. submitIng.value = true;
  492. getPayAmount(amountValue, (res) => {
  493. formData["payAmountValue"] = res.finalAmountValue;
  494. let data = {
  495. params: {
  496. postBizData: JSON.stringify(formData),
  497. postSrc: 1, //1 twitter
  498. postType: 1, //1 红包
  499. },
  500. };
  501. postPublish(data)
  502. .then((res) => {
  503. submitIng.value = false;
  504. if (res.code == 0) {
  505. publishRes = res.data;
  506. // setPreviewDialogHeight();
  507. showComType.value = "preview";
  508. isBack.value = false;
  509. } else {
  510. console.log(res);
  511. }
  512. })
  513. .catch((err) => {
  514. console.log(err);
  515. });
  516. });
  517. };
  518. /**
  519. * 输入结果计算、校验
  520. */
  521. const calcIptValue = (cb) => {
  522. let amountValue = baseFormData.amountValue;
  523. let totalCount = baseFormData.totalCount;
  524. let flag = true;
  525. if (!amountValue || !totalCount) {
  526. return flag;
  527. }
  528. //每人平均要分到大于 0.01美元(1美分)
  529. if ((amountValue * 100) / totalCount < 1) {
  530. flag = false;
  531. }
  532. cb && cb(flag);
  533. return flag;
  534. };
  535. /**
  536. * 初始化提交参数
  537. */
  538. const initParams = () => {
  539. baseFormData.amountValue = "";
  540. baseFormData.totalCount = "";
  541. formList[0].text = [];
  542. atUserList.value = [];
  543. submitIng.value = false;
  544. isBack.value = false;
  545. };
  546. /**
  547. * 支付完成回调
  548. */
  549. const payPalFinsh = (params) => {
  550. let transaction = params.transaction;
  551. console.log("transaction", transaction);
  552. let loadingInstance = ElLoading.service({
  553. background: "rgba(0,0,0,.3)",
  554. });
  555. verifyPaypalResult({
  556. params: {
  557. paypalTransactionId: transaction.id,
  558. postId: publishRes.postId,
  559. paypalClientId: paypalClientId.value,
  560. },
  561. })
  562. .then((res) => {
  563. loadingInstance.close();
  564. if (res.code == 0) {
  565. //支付状态 0:未支付,1:支付成功,2:支付失败,3:已关闭,4:已退款
  566. if (res.data) {
  567. let payStatus = res.data.payStatus;
  568. switch (payStatus) {
  569. case 1:
  570. emits("payPalFinsh", { publishRes });
  571. showComType.value = "default";
  572. initParams();
  573. break;
  574. case 2:
  575. ElMessage({
  576. message: "Pay Fail",
  577. type: "warning",
  578. });
  579. break;
  580. case 3:
  581. ElMessage({
  582. message: "Pay Exceptions",
  583. type: "warning",
  584. });
  585. break;
  586. case 4:
  587. ElMessage({
  588. message: "Pay Exceptions",
  589. type: "warning",
  590. });
  591. break;
  592. }
  593. }
  594. }
  595. })
  596. .catch(() => {
  597. loadingInstance.close();
  598. });
  599. };
  600. /**
  601. * follow组件触发新增关注人
  602. */
  603. const addFollowUser = (params) => {
  604. atUserList.value.push(params);
  605. };
  606. const setFollowUser = (params) => {
  607. atUserList.value[params.index]["name"] = params.name;
  608. };
  609. const delFollowUser = (params) => {
  610. atUserList.value.splice(params.index, 1);
  611. };
  612. const onUsdInput = (val) => {
  613. val = val.replace(/[^\d]/g, "");
  614. baseFormData.amountValue = val;
  615. setIptAmountErrorMsg();
  616. return val;
  617. };
  618. const onCountInput = (val) => {
  619. if (val == 0) {
  620. val = "";
  621. }
  622. val = val.replace(/[^\d]/g, "");
  623. if (val > 9999) {
  624. val = 9999;
  625. }
  626. baseFormData.totalCount = val;
  627. setIptAmountErrorMsg();
  628. return val;
  629. };
  630. /**
  631. * 金额输入失焦
  632. */
  633. const onUsdBlur = () => {
  634. if (!baseFormData.amountValue) {
  635. iptErrMsgTxt.value =
  636. "Please enter the giveaways amount in USD input box.";
  637. } else {
  638. setIptAmountErrorMsg((res) => {
  639. if (res) {
  640. iptErrMsgTxt.value = "";
  641. }
  642. });
  643. }
  644. };
  645. /**
  646. * count失焦,校验输入结果
  647. */
  648. const onCountBlur = () => {
  649. if (!baseFormData.totalCount) {
  650. iptErrMsgTxt.value =
  651. "Please enter the number of giveaways in Quantity input box.";
  652. } else {
  653. setIptAmountErrorMsg((res) => {
  654. if (res) {
  655. iptErrMsgTxt.value = "";
  656. }
  657. });
  658. }
  659. };
  660. /**
  661. * 输入金额提示语
  662. */
  663. const setIptAmountErrorMsg = (cb) => {
  664. let res = calcIptValue();
  665. if (!res) {
  666. iptErrMsgTxt.value = `If you wish to send ${
  667. baseFormData.totalCount
  668. } red packets, please send USD amount > $${
  669. baseFormData.totalCount * 0.01
  670. }`;
  671. } else {
  672. iptErrMsgTxt.value = "";
  673. }
  674. cb && cb(res);
  675. };
  676. /**
  677. * 获取支付配置(paypalClientId)
  678. */
  679. const setPayConfig = () => {
  680. getPayConfig({
  681. params: {},
  682. }).then((res) => {
  683. if (res.code == 0) {
  684. paypalClientId.value = res.data.paypalClientId;
  685. }
  686. });
  687. };
  688. /**
  689. * 获取配置
  690. */
  691. const setFrontConfig = () => {
  692. getFrontConfig({
  693. params: {},
  694. }).then((res) => {
  695. if (res.code == 0) {
  696. paypalHtml.value = res.data.paypalHtml;
  697. }
  698. });
  699. };
  700. onMounted(() => {
  701. setFrontConfig();
  702. setPayConfig();
  703. document.onkeydown = function (e) {
  704. var keyNum = window.event ? e.keyCode : e.which;
  705. let escKey = 27;
  706. if (keyNum == escKey) {
  707. if (visible.value) {
  708. close();
  709. }
  710. }
  711. };
  712. // document.addEventListener('click',e => {
  713. // let btn = document.querySelector('.currency-select');
  714. // let box = document.querySelector('.msg-box-overlay')
  715. // let dom = document.querySelector('.currency-pop');
  716. // if(btn && !btn.contains(e.target) || box && !box.contains(e.target)) {
  717. // if (dom && !dom.contains(e.target)) {
  718. // showCurrencyPop.value = false;
  719. // }
  720. // }
  721. // })
  722. });
  723. </script>
  724. <style lang="scss" scoped>
  725. .ql-container {
  726. height: 100px;
  727. }
  728. .overlay {
  729. position: fixed;
  730. top: 0;
  731. right: 0;
  732. bottom: 0;
  733. left: 0;
  734. z-index: 1000;
  735. height: 100%;
  736. background-color: rgba(0, 0, 0, 0.5);
  737. overflow: auto;
  738. .content {
  739. height: 620px;
  740. background: #ffffff;
  741. border-radius: 20px;
  742. position: absolute;
  743. left: 50%;
  744. top: 50%;
  745. transform: translate(-50%, -50%);
  746. box-sizing: border-box;
  747. .head {
  748. border-bottom: 1px solid #ececec;
  749. height: 48px;
  750. box-sizing: border-box;
  751. display: flex;
  752. align-items: center;
  753. justify-content: space-between;
  754. padding: 0 14px;
  755. .left {
  756. display: flex;
  757. align-items: center;
  758. .title {
  759. font-size: 16px;
  760. font-weight: 500;
  761. }
  762. .close-btn {
  763. display: flex;
  764. align-items: center;
  765. width: max-content;
  766. margin-right: 12px;
  767. cursor: pointer;
  768. }
  769. }
  770. .right {
  771. .transactions {
  772. color: #a0a0a0;
  773. font-weight: 400;
  774. font-size: 13px;
  775. display: flex;
  776. align-items: center;
  777. cursor: pointer;
  778. img {
  779. margin-right: 5px;
  780. }
  781. }
  782. }
  783. }
  784. .body {
  785. box-sizing: border-box;
  786. height: calc(100% - 48px);
  787. display: flex;
  788. position: relative;
  789. .body-content {
  790. display:flex;
  791. width:100%;
  792. }
  793. .currency-pop {
  794. position: absolute;
  795. width: 375px;
  796. height: 480px;
  797. top: 85px;
  798. left: 88px;
  799. z-index: 1000;
  800. box-shadow: 0px 4px 30px rgba(0, 0, 0, 0.3);
  801. background-color: #fff;
  802. border-radius: 20px;
  803. overflow-y: scroll;
  804. }
  805. .left,
  806. .right {
  807. height: 100%;
  808. }
  809. .left {
  810. width: 50px;
  811. display: flex;
  812. flex-direction: column;
  813. justify-content: space-between;
  814. align-items: center;
  815. .gift-pack-wrapper {
  816. width: 100%;
  817. height: 54px;
  818. background: #f5f5f5;
  819. display: flex;
  820. align-items: center;
  821. justify-content: center;
  822. }
  823. .bottom {
  824. .icon {
  825. display: block;
  826. margin-bottom: 26px;
  827. }
  828. }
  829. }
  830. .right {
  831. width: calc(100% - 50px);
  832. box-sizing: border-box;
  833. position: relative;
  834. border-left: 1px solid #ececec;
  835. .form-wrapper {
  836. padding: 0px 18px 18px 18px;
  837. height: calc(100% - 80px);
  838. overflow-y: scroll;
  839. box-sizing: border-box;
  840. .img-mode {
  841. width: 553px;
  842. margin-left: -20px;
  843. }
  844. .form-base-help {
  845. display: flex;
  846. justify-content: space-between;
  847. margin-top: 10px;
  848. .currency-operation {
  849. width: 217px;
  850. height: 45px;
  851. background: url("../../assets/svg/icon-form-bg-border.svg");
  852. box-sizing: border-box;
  853. padding: 14px 10px 10px 10px;
  854. display: flex;
  855. align-items: center;
  856. justify-content: space-around;
  857. .balance,
  858. .amount {
  859. display: flex;
  860. align-items: center;
  861. }
  862. .balance {
  863. font-weight: 400;
  864. font-size: 13px;
  865. img {
  866. width: 16px;
  867. height: 16px;
  868. margin-right: 3px;
  869. }
  870. }
  871. .amount {
  872. font-weight: 500;
  873. font-size: 13px;
  874. color: #4e4e4e;
  875. img {
  876. margin-left: 5px;
  877. cursor: pointer;
  878. }
  879. }
  880. .top-up {
  881. font-weight: 500;
  882. font-size: 12px;
  883. color: #ff9839;
  884. cursor: pointer;
  885. }
  886. }
  887. .msg {
  888. font-weight: 400;
  889. font-size: 12px;
  890. color: #acacac;
  891. }
  892. }
  893. .form-base {
  894. display: flex;
  895. justify-content: space-between;
  896. align-items: center;
  897. margin-top: 14px;
  898. .item {
  899. width: 250px;
  900. height: 50px;
  901. box-sizing: border-box;
  902. border-radius: 12px;
  903. display: flex;
  904. align-items: center;
  905. justify-content: space-between;
  906. padding: 16px 14px;
  907. box-shadow: 0px 3px 27px 0px #0000001a;
  908. .label {
  909. font-weight: 500;
  910. font-size: 15px;
  911. display: flex;
  912. align-items: center;
  913. .icon {
  914. width: 20px;
  915. height: 20px;
  916. margin-right: 8px;
  917. }
  918. }
  919. }
  920. .currency-select-wrapper {
  921. padding: 0 !important;
  922. .currency-select {
  923. box-shadow: 3px 0 10px 2px #ececec;
  924. padding: 16px 14px;
  925. border-bottom-left-radius: 12px;
  926. border-top-left-radius: 12px;
  927. cursor: pointer;
  928. .arrow {
  929. margin-left: 5px;
  930. }
  931. }
  932. }
  933. }
  934. .form-label {
  935. margin-top: 14px;
  936. margin-bottom: 10px;
  937. font-weight: 500;
  938. font-size: 14px;
  939. }
  940. .form-require {
  941. box-sizing: border-box;
  942. border-radius: 15px;
  943. margin-top: 12px;
  944. box-shadow: 0px 3px 27px 0px #0000001a;
  945. .form-item {
  946. min-height: 50px;
  947. display: flex;
  948. align-items: center;
  949. justify-content: space-between;
  950. margin: 0 16px;
  951. border-bottom: 1px solid #ececec;
  952. .label {
  953. min-width: 88px;
  954. display: flex;
  955. align-items: center;
  956. font-size: 15px;
  957. font-weight: 500;
  958. .icon {
  959. margin-right: 10px;
  960. }
  961. }
  962. .control {
  963. width: 100%;
  964. min-height: 50px;
  965. margin-left: 18px;
  966. box-sizing: border-box;
  967. }
  968. }
  969. }
  970. }
  971. .anti-bot-wrapper {
  972. width: 100%;
  973. height: 50px;
  974. display: flex;
  975. align-items: center;
  976. justify-content: space-between;
  977. box-sizing: border-box;
  978. border-radius: 15px;
  979. padding: 0 18px;
  980. margin-top: 14px;
  981. box-shadow: 0px 3px 27px 0px #0000001a;
  982. .label {
  983. display: flex;
  984. align-items: center;
  985. font-size: 15px;
  986. font-weight: 500;
  987. .icon-bot {
  988. margin-right: 8px;
  989. }
  990. .icon-beta {
  991. margin-left: 5px;
  992. margin-right: 8px;
  993. }
  994. .icon-question {
  995. cursor: pointer;
  996. }
  997. }
  998. }
  999. .tips-wrapper {
  1000. margin-top: 23px;
  1001. .title,
  1002. .row {
  1003. font-weight: 400;
  1004. font-size: 13px;
  1005. color: rgba(0, 0, 0, 0.3);
  1006. }
  1007. .row {
  1008. box-sizing: border-box;
  1009. padding-left: 4px;
  1010. }
  1011. .more {
  1012. color: #389aff;
  1013. font-size: 13px;
  1014. padding-left: 4px;
  1015. cursor: pointer;
  1016. }
  1017. }
  1018. .submit-btn-wrapper {
  1019. width: 96%;
  1020. background: #fff;
  1021. position: absolute;
  1022. bottom: 18px;
  1023. left: 0;
  1024. box-sizing: border-box;
  1025. padding-top: 16px;
  1026. .submit-btn {
  1027. width: calc(100% - 36px);
  1028. height: 46px;
  1029. text-align: center;
  1030. line-height: 46px;
  1031. background: #4a99e9;
  1032. border-radius: 100px;
  1033. color: #fff;
  1034. margin-left: 18px;
  1035. display: flex;
  1036. align-items: center;
  1037. justify-content: center;
  1038. font-size: 16px;
  1039. font-weight: 500;
  1040. cursor: pointer;
  1041. .icon-loading {
  1042. width: 20px;
  1043. height: 20px;
  1044. margin-right: 3px;
  1045. }
  1046. }
  1047. }
  1048. }
  1049. }
  1050. }
  1051. }
  1052. </style>