give-dialog.vue 27 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843
  1. <template>
  2. <div class="overlay" v-if="visible">
  3. <div class="content"
  4. :style="{height: dialogHeight +'px', width: !showPreview ? '650px' : 'auto' }">
  5. <div class="head">
  6. <div class="left">
  7. <div class="close-btn" @click="close">
  8. <img class="icon-close" v-if="!showPreview" :src="require('@/assets/svg/icon-close.svg')" />
  9. <img class="icon-close" v-else :src="require('@/assets/svg/icon-back.svg')" />
  10. </div>
  11. <div class="title">
  12. Giveaways
  13. </div>
  14. </div>
  15. <!-- <img class="icon-question" :src="require('@/assets/svg/icon-question.svg')"> -->
  16. </div>
  17. <div class="body">
  18. <div class="left">
  19. <div class="gift-pack-wrapper">
  20. <img class="icon" :src="require('@/assets/svg/icon-gift-pack.svg')">
  21. </div>
  22. <div class="bottom">
  23. <!-- <img class="icon" :src="require('@/assets/svg/icon-wallet.svg')">
  24. <img class="icon" :src="require('@/assets/svg/icon-setting.svg')"> -->
  25. </div>
  26. </div>
  27. <div class="right">
  28. <template v-if="!showPreview">
  29. <div class="form-wrapper">
  30. <div class="error-msg" v-if="iptErrMsgTxt">
  31. {{iptErrMsgTxt}}
  32. </div>
  33. <img class="img-mode" src="@/assets/img/img-mode.png">
  34. <div class="form-base-title">
  35. Reward
  36. <div class="msg">
  37. Recommend quantity 100~10000
  38. </div>
  39. </div>
  40. <div class="form-base">
  41. <div class="item">
  42. <div class="label">
  43. <img class="icon"
  44. :src="require('@/assets/svg/icon-usd.svg')" />
  45. USD
  46. </div>
  47. <el-input
  48. v-model="baseFormData.amountValue"
  49. placeholder="Amount entered"
  50. autofocus
  51. @input = "onUsdInput"
  52. @blur = "onUsdBlur"
  53. :input-style="{ 'box-shadow': 'none','padding': '1px', 'width': '110px', 'text-align': 'right', 'font-size' : '15px', 'color': '#000' }"/>
  54. </div>
  55. <div class="item">
  56. <div class="label">
  57. <img class="icon"
  58. :src="require('@/assets/svg/icon-quantity.svg')" />
  59. Quantity
  60. </div>
  61. <el-input
  62. v-model="baseFormData.totalCount"
  63. placeholder="Quantity entered"
  64. @input = "onCountInput"
  65. @blur = "onCountBlur"
  66. :input-style="{ 'box-shadow': 'none','padding': '1px', 'width': '120px',
  67. 'text-align': 'right', 'font-size' : '15px', 'color': '#000'}"/>
  68. </div>
  69. </div>
  70. <div class="form-label">
  71. Tasks
  72. </div>
  73. <div class="form-require">
  74. <div
  75. class="form-item"
  76. v-for="(item, index) in formList"
  77. :key="index">
  78. <div class="label">
  79. <img class="icon"
  80. :src="item.icon" />
  81. {{ item.label }}
  82. </div>
  83. <div class="control" v-if="item.nodeType == 'textarea'">
  84. <follow-input
  85. :isAddSelf="!isBack"
  86. :atUserList="atUserList"
  87. @addUser="addFollowUser" @setUser="setFollowUser"
  88. @delUser="delFollowUser"></follow-input>
  89. </div>
  90. <el-switch v-if="item.type == 2" v-model="item.checked" />
  91. <img v-if="item.type == 3" :src="require('@/assets/svg/icon-option-checked.svg')" />
  92. </div>
  93. </div>
  94. <div class="anti-bot-wrapper">
  95. <div class="label">
  96. <img :src="require('@/assets/svg/icon-anti-bot.svg')" class="icon-bot">
  97. Anti Bot
  98. <img :src="require('@/assets/svg/icon-beta.svg')" class="icon-beta">
  99. <img :src="require('@/assets/svg/icon-question.svg')" class="icon-question">
  100. </div>
  101. <el-switch v-model="openAntiBot" />
  102. </div>
  103. <div class="tips-wrapper">
  104. <div class="title">
  105. TIPS
  106. </div>
  107. <div class="row">
  108. 1. Only after the user completes the tasks you set, they can claim your red envelopes
  109. </div>
  110. <div class="row">
  111. 2. Each user can only receive one red envelope
  112. </div>
  113. <div class="row">
  114. 3. The red envelope issued is valid for 7 days. Please promote your red envelope as much as possible within the validity period. After the red envelope expires, the red envelope will be returned to your DeNet wallet.
  115. </div>
  116. <div class="more">
  117. More
  118. </div>
  119. </div>
  120. <div class="submit-btn-wrapper">
  121. <div class="submit-btn" @click="confirm">
  122. <img class="icon-loading" v-if="submitIng" :src="require('@/assets/svg/icon-btn-loading.svg')" />
  123. NEXT
  124. </div>
  125. </div>
  126. </div>
  127. </template>
  128. <template v-if="showPreview">
  129. <preview-card :postData="publishRes" :baseFormData="baseFormData"></preview-card>
  130. </template>
  131. <div v-show="showPreview">
  132. <paypal-button
  133. :finalAmountData="finalAmountData"
  134. :payConfig="{
  135. paypalClientId,
  136. paypalHtml
  137. }"
  138. @payPalFinsh="payPalFinsh"></paypal-button>
  139. </div>
  140. </div>
  141. </div>
  142. </div>
  143. <message-box :dialogVisible="showMessageBox"
  144. :title="messageBoxData.title"
  145. :content="messageBoxData.content"
  146. @cancel="messageBoxCancel"
  147. @confirm="messageBoxConfirm"></message-box>
  148. </div>
  149. </template>
  150. <script setup>
  151. import { ref, watch, reactive, defineProps, defineEmits, onMounted } from "vue";
  152. import {postPublish, verifyPaypalResult} from "@/http/publishApi"
  153. import {payCalcFee, getPayConfig} from "@/http/pay"
  154. import {getFrontConfig} from "@/http/account"
  155. import { ElMessage, ElLoading} from 'element-plus';
  156. import 'element-plus/es/components/message/style/css'
  157. import previewCard from "./preview-card";
  158. import paypalButton from "./paypal-button";
  159. import followInput from "./follow-input";
  160. import messageBox from "./message-box.vue";
  161. let paypalClientId = ref('');
  162. let paypalHtml = ref('');
  163. let publishRes = reactive({})
  164. let visible = ref(false);
  165. let showPreview = ref(false);
  166. let openAntiBot = ref(false);
  167. let dialogHeight = ref(680);
  168. let submitIng = ref(false);
  169. let atUserList = ref([]);
  170. let iptErrMsgTxt = ref('');
  171. let isBack = ref(false);
  172. let showMessageBox = ref(false);
  173. let messageBoxData = ref({
  174. title: '',
  175. content: ''
  176. })
  177. let finalAmountData = ref({
  178. currencyCode: "USD",
  179. feeAmountValue: 0,
  180. finalAmountValue: 0,
  181. requestAmountValue: 0
  182. })
  183. let baseFormData = reactive({
  184. amountCurrencyCode: "USD",
  185. amountValue: "",
  186. totalCount: "",
  187. });
  188. let formList = reactive([
  189. {
  190. label: "Follow",
  191. icon: require('@/assets/svg/icon-follow.svg'),
  192. nodeType: 'textarea',
  193. type: 1,
  194. text: [],
  195. checked: true
  196. },
  197. {
  198. label: "Retweet",
  199. icon: require('@/assets/svg/icon-retweet.svg'),
  200. nodeType: 'div',
  201. type: 3,
  202. checked: true
  203. },
  204. {
  205. label: "Like tweet",
  206. icon: require('@/assets/svg/icon-like.svg'),
  207. nodeType: 'div',
  208. type: 2,
  209. checked: true
  210. },
  211. ]);
  212. const props = defineProps({
  213. dialogVisible: {
  214. type: Boolean,
  215. default: false,
  216. },
  217. });
  218. watch(
  219. () => props.dialogVisible,
  220. (newVal) => {
  221. console.log("watch", newVal);
  222. if(newVal) {
  223. setTimeout(() => {
  224. setDialogHeight();
  225. }, 300)
  226. }
  227. visible.value = newVal;
  228. }
  229. );
  230. const emits = defineEmits(["close", "confirm", "payPalFinsh"]);
  231. const close = () => {
  232. if (showPreview.value) {
  233. showPreview.value = false;
  234. isBack.value = true;
  235. } else {
  236. initParams();
  237. emits("close", false);
  238. }
  239. };
  240. const setDialogHeight = () => {
  241. let clientHeight = window.innerHeight;
  242. let gapSafe = 40;
  243. if(dialogHeight.value > clientHeight - gapSafe) {
  244. dialogHeight.value = clientHeight - gapSafe;
  245. }
  246. };
  247. const getPayAmount = (amountValue, cb) => {
  248. payCalcFee({
  249. params : {
  250. amountValue,
  251. currencyCode: "USD",
  252. payChannel: 1
  253. }
  254. }).then(res => {
  255. if(res.code == 0) {
  256. cb && cb(res.data);
  257. let {finalAmountValue} = res.data;
  258. if(finalAmountValue >= 100) {
  259. res.data.finalAmountValue = finalAmountValue / 100;
  260. finalAmountData.value = res.data
  261. }
  262. }
  263. })
  264. }
  265. const confirm = () => {
  266. if(submitIng.value) {
  267. return;
  268. }
  269. let {totalCount = 0} = baseFormData;
  270. if(!totalCount) {
  271. return;
  272. }
  273. if(!calcIptValue()) {
  274. return;
  275. }
  276. submitRequest();
  277. };
  278. /*
  279. const messageBoxBlock = () => {
  280. showMessageBox.value = true;
  281. messageBoxData.value.title = 'Quantity is too small';
  282. messageBoxData.value.content = 'A Reward of $100 is recommended to be allocated to 100~10000 participants, would you prefer to modify it?';
  283. }*/
  284. const messageBoxCancel = () => {
  285. showMessageBox.value = false;
  286. submitRequest();
  287. }
  288. const messageBoxConfirm = () => {
  289. showMessageBox.value = false;
  290. }
  291. const submitRequest = () => {
  292. let {amountValue = 0, totalCount = 0, amountCurrencyCode} = baseFormData;
  293. formList[0]['text'] = atUserList.value;
  294. amountValue = amountValue * 100; // 元转分
  295. let finishConditions = [];
  296. for(let i = 0; i < formList.length; i++) {
  297. let item = {};
  298. item.type = formList[i]['type'];
  299. if(item.type == 1 && formList[i]['text']) { // follow 参数
  300. let relatedUsers = formList[i]['text'];
  301. item.relatedUsers = relatedUsers;
  302. finishConditions.push(item);
  303. } else if(formList[i]['checked']){
  304. finishConditions.push(item);
  305. }
  306. }
  307. let receiveConditions = openAntiBot.value ? '' : [];
  308. let formData = {
  309. amountCurrencyCode,
  310. amountValue,
  311. totalCount,
  312. finishConditions,
  313. receiveConditions
  314. }
  315. submitIng.value = true;
  316. getPayAmount(amountValue, (res) => {
  317. formData['payAmountValue'] = res.finalAmountValue;
  318. let data = {
  319. params: {
  320. postBizData: JSON.stringify(formData),
  321. postSrc: 1, //1 twitter
  322. postType: 1, //1 红包
  323. }
  324. }
  325. postPublish(data).then((res) => {
  326. submitIng.value = false;
  327. if(res.code == 0) {
  328. publishRes = res.data;
  329. // setPreviewDialogHeight();
  330. showPreview.value = true;
  331. isBack.value = false;
  332. } else {
  333. console.log(res);
  334. }
  335. }).catch(err => {
  336. console.log(err);
  337. })
  338. });
  339. }
  340. const calcIptValue = (cb) => {
  341. let amountValue = baseFormData.amountValue;
  342. let totalCount = baseFormData.totalCount;
  343. let flag = true;
  344. if(!amountValue || !totalCount) {
  345. return flag;
  346. }
  347. //每人平均要分到大于 0.01美元(1美分)
  348. if((amountValue * 100) / totalCount < 1) {
  349. flag = false;
  350. }
  351. cb && cb(flag);
  352. return flag
  353. }
  354. const initParams = () => {
  355. baseFormData.amountValue = '';
  356. baseFormData.totalCount = '';
  357. formList[0].text = [];
  358. atUserList.value = [];
  359. submitIng.value = false;
  360. isBack.value = false;
  361. }
  362. const payPalFinsh = (params) => {
  363. let transaction = params.transaction;
  364. console.log('transaction', transaction)
  365. let loadingInstance = ElLoading.service({
  366. background: 'rgba(0,0,0,.3)'
  367. })
  368. verifyPaypalResult({
  369. params: {
  370. paypalTransactionId: transaction.id,
  371. postId: publishRes.postId,
  372. paypalClientId: paypalClientId.value
  373. }
  374. }).then((res) => {
  375. loadingInstance.close();
  376. if(res.code == 0) {
  377. //支付状态 0:未支付,1:支付成功,2:支付失败,3:已关闭,4:已退款
  378. if(res.data) {
  379. let payStatus = res.data.payStatus;
  380. switch (payStatus) {
  381. case 1:
  382. emits("payPalFinsh", {publishRes});
  383. showPreview.value = false;
  384. initParams();
  385. break;
  386. case 2:
  387. ElMessage({
  388. message: 'Pay Fail',
  389. type: 'warning',
  390. })
  391. break;
  392. case 3:
  393. ElMessage({
  394. message: 'Pay Exceptions',
  395. type: 'warning',
  396. })
  397. break;
  398. case 4:
  399. ElMessage({
  400. message: 'Pay Exceptions',
  401. type: 'warning',
  402. })
  403. break;
  404. }
  405. }
  406. }
  407. }).catch(() => {
  408. loadingInstance.close();
  409. })
  410. }
  411. const addFollowUser = (params) => {
  412. atUserList.value.push(params)
  413. }
  414. const setFollowUser = (params) => {
  415. atUserList.value[params.index]['name'] = params.name;
  416. }
  417. const delFollowUser = (params) => {
  418. atUserList.value.splice(params.index, 1);
  419. }
  420. const onUsdInput = (val) => {
  421. val = val.replace(/[^\d]/g,'');
  422. baseFormData.amountValue = val;
  423. setIptAmountErrorMsg();
  424. return val;
  425. }
  426. const onCountInput = (val) => {
  427. if(val == 0) {
  428. val = ''
  429. }
  430. val = val.replace(/[^\d]/g,'');
  431. if(val > 9999) {
  432. val = 9999;
  433. }
  434. baseFormData.totalCount = val;
  435. setIptAmountErrorMsg();
  436. return val;
  437. }
  438. const onUsdBlur = () => {
  439. if(!baseFormData.amountValue) {
  440. iptErrMsgTxt.value = 'Please enter the giveaways amount in USD input box.';
  441. } else {
  442. setIptAmountErrorMsg((res) => {
  443. if(res) {
  444. iptErrMsgTxt.value = '';
  445. }
  446. })
  447. }
  448. }
  449. const onCountBlur = () => {
  450. if(!baseFormData.totalCount) {
  451. iptErrMsgTxt.value = 'Please enter the number of giveaways in Quantity input box.';
  452. } else {
  453. setIptAmountErrorMsg((res) => {
  454. if(res) {
  455. iptErrMsgTxt.value = '';
  456. }
  457. })
  458. }
  459. }
  460. const setIptAmountErrorMsg = (cb) => {
  461. let res = calcIptValue();
  462. if(!res) {
  463. iptErrMsgTxt.value = `If you wish to send ${baseFormData.totalCount} red packets, please send USD amount > $${baseFormData.totalCount * 0.01}`;
  464. } else {
  465. iptErrMsgTxt.value = '';
  466. }
  467. cb && cb(res);
  468. }
  469. const setPayConfig = () => {
  470. getPayConfig({
  471. params: {}
  472. }).then(res => {
  473. if(res.code ==0) {
  474. paypalClientId.value = res.data.paypalClientId
  475. }
  476. })
  477. }
  478. const setFrontConfig = () => {
  479. getFrontConfig({
  480. params : {}
  481. }).then(res => {
  482. if(res.code == 0) {
  483. paypalHtml.value = res.data.paypalHtml
  484. }
  485. })
  486. }
  487. onMounted(() => {
  488. setFrontConfig();
  489. setPayConfig();
  490. document.onkeydown = function(e){
  491. var keyNum=window.event ? e.keyCode :e.which;
  492. let escKey = 27;
  493. if(keyNum == escKey) {
  494. if(visible.value) {
  495. close();
  496. }
  497. }
  498. console.log(keyNum)
  499. }
  500. })
  501. </script>
  502. <style lang="scss" scoped>
  503. .ql-container {
  504. height: 100px;
  505. }
  506. .overlay {
  507. position: fixed;
  508. top: 0;
  509. right: 0;
  510. bottom: 0;
  511. left: 0;
  512. z-index: 1000;
  513. height: 100%;
  514. background-color: rgba(0, 0, 0, 0.5);
  515. overflow: auto;
  516. .content {
  517. height: 620px;
  518. background: #ffffff;
  519. border-radius: 20px;
  520. position: absolute;
  521. left: 50%;
  522. top: 50%;
  523. transform: translate(-50%, -50%);
  524. box-sizing: border-box;
  525. .head {
  526. border-bottom: 1px solid #ececec;
  527. height: 48px;
  528. box-sizing: border-box;
  529. display: flex;
  530. align-items: center;
  531. justify-content: space-between;
  532. padding: 0 14px;
  533. .left {
  534. display: flex;
  535. .title {
  536. font-size: 16px;
  537. font-weight: 500;
  538. }
  539. .close-btn {
  540. display: flex;
  541. align-items: center;
  542. width: max-content;
  543. margin-right: 12px;
  544. cursor: pointer;
  545. }
  546. }
  547. .icon-question {
  548. cursor: pointer;
  549. }
  550. }
  551. .body {
  552. box-sizing: border-box;
  553. height: calc(100% - 48px);
  554. display: flex;
  555. .left,
  556. .right {
  557. height: 100%;
  558. }
  559. .left {
  560. width: 50px;
  561. display: flex;
  562. flex-direction: column;
  563. justify-content: space-between;
  564. align-items: center;
  565. .gift-pack-wrapper {
  566. width: 100%;
  567. height: 54px;
  568. background: #F5F5F5;
  569. display: flex;
  570. align-items: center;
  571. justify-content: center;
  572. }
  573. .bottom {
  574. .icon {
  575. display: block;
  576. margin-bottom: 26px;
  577. }
  578. }
  579. }
  580. .right {
  581. width: calc(100% - 50px);
  582. box-sizing: border-box;
  583. position: relative;
  584. border-left: 1px solid #ececec;
  585. .form-wrapper {
  586. padding: 8px 18px 26px 18px;
  587. height: calc(100% - 80px);
  588. overflow-y: scroll;
  589. box-sizing: border-box;
  590. .img-mode {
  591. width: 600px;
  592. margin-left: -20px;
  593. }
  594. .error-msg {
  595. width: 100%;
  596. font-size: 12px;
  597. background: #FF0000;
  598. opacity: 0.8;
  599. font-weight: 500;
  600. font-size: 13px;
  601. color: #fff;
  602. margin-bottom: 8px;
  603. position: absolute;
  604. z-index: 1000;
  605. left: 0px;
  606. top: 0px;
  607. padding: 7px 12px;
  608. box-sizing: border-box;
  609. }
  610. .form-base-title {
  611. color: rgba(0, 0, 0, 0.4);
  612. margin-bottom: 10px;
  613. font-size: 13px;
  614. display: flex;
  615. align-items: center;
  616. justify-content: space-between;
  617. .msg {
  618. font-weight: 500;
  619. font-size: 12px;
  620. color: #E58A00;
  621. }
  622. }
  623. .form-base {
  624. display: flex;
  625. justify-content: space-between;
  626. align-items: center;
  627. .item {
  628. width: 270px;
  629. height: 50px;
  630. box-sizing: border-box;
  631. border-radius: 15px;
  632. display: flex;
  633. align-items: center;
  634. justify-content: space-between;
  635. padding: 16px 14px;
  636. box-shadow: 0px 3px 27px 0px #0000001A;
  637. .label {
  638. font-weight: 500;
  639. font-size: 15px;
  640. display: flex;
  641. align-items: center;
  642. .icon {
  643. width: 20px;
  644. height: 20px;
  645. margin-right: 8px;
  646. }
  647. }
  648. }
  649. }
  650. .form-label {
  651. color: rgba(0, 0, 0, 0.4);
  652. margin-top: 23px;
  653. margin-bottom: 10px;
  654. font-size: 13px;
  655. }
  656. .form-require {
  657. box-sizing: border-box;
  658. border-radius: 15px;
  659. margin-top: 12px;
  660. box-shadow: 0px 3px 27px 0px #0000001A;
  661. .form-item {
  662. min-height: 50px;
  663. display: flex;
  664. align-items: center;
  665. justify-content: space-between;
  666. margin: 0 16px;
  667. border-bottom: 1px solid #ececec;
  668. .label {
  669. min-width: 88px;
  670. display: flex;
  671. align-items: center;
  672. font-size: 15px;
  673. font-weight: 500;
  674. .icon {
  675. margin-right: 10px;
  676. }
  677. }
  678. .control {
  679. width: 100%;
  680. min-height: 50px;
  681. margin-left: 18px;
  682. padding: 4px 0;
  683. box-sizing: border-box;
  684. }
  685. }
  686. }
  687. }
  688. .anti-bot-wrapper {
  689. width: 100%;
  690. height: 50px;
  691. display: flex;
  692. align-items: center;
  693. justify-content: space-between;
  694. box-sizing: border-box;
  695. border-radius: 15px;
  696. padding: 0 18px;
  697. margin-top: 14px;
  698. box-shadow: 0px 3px 27px 0px #0000001A;
  699. .label {
  700. display: flex;
  701. align-items: center ;
  702. font-size: 15px;
  703. font-weight: 500;
  704. .icon-bot {
  705. margin-right: 8px;
  706. }
  707. .icon-beta {
  708. margin-left: 5px;
  709. margin-right: 8px;
  710. }
  711. .icon-question {
  712. cursor: pointer;
  713. }
  714. }
  715. }
  716. .tips-wrapper {
  717. margin-top: 23px;
  718. .title, .row {
  719. font-weight: 400;
  720. font-size: 13px;
  721. color: rgba(0, 0, 0, 0.3);
  722. }
  723. .row {
  724. box-sizing: border-box;
  725. padding-left: 4px;
  726. }
  727. .more {
  728. color: #389AFF;
  729. font-size: 13px;
  730. padding-left: 4px;
  731. cursor: pointer;
  732. }
  733. }
  734. .submit-btn-wrapper {
  735. width: 100%;
  736. background: #fff;
  737. position: absolute;
  738. bottom: 32px;
  739. left: 0;
  740. box-sizing: border-box;
  741. padding-top: 16px;
  742. .submit-btn {
  743. width: calc(100% - 36px);
  744. height: 46px;
  745. text-align: center;
  746. line-height: 46px;
  747. background: #4a99e9;
  748. border-radius: 100px;
  749. color: #fff;
  750. margin-left: 18px;
  751. display: flex;
  752. align-items: center;
  753. justify-content: center;
  754. font-size: 16px;
  755. font-weight: 500;
  756. cursor: pointer;
  757. .icon-loading {
  758. width: 20px;
  759. height: 20px;
  760. margin-right: 3px;
  761. }
  762. }
  763. }
  764. }
  765. }
  766. }
  767. }
  768. </style>