Browse Source

[edit][paypal]

zhangwei 3 năm trước cách đây
mục cha
commit
3e3bca5b83

+ 2 - 0
package.json

@@ -11,6 +11,7 @@
     "build-watch": "vue-cli-service  --env.NODE_ENV=development build-watch --mode development"
   },
   "dependencies": {
+    "ant-design-vue": "^2.2.8",
     "axios": "^0.26.1",
     "clipboard": "^2.0.10",
     "core-js": "^3.8.3",
@@ -30,6 +31,7 @@
     "@babel/core": "^7.12.16",
     "@vue/cli-plugin-babel": "~5.0.0",
     "@vue/cli-service": "~5.0.0",
+    "babel-plugin-import": "^1.13.5",
     "copy-webpack-plugin": "^10.2.4",
     "node-sass": "^7.0.1",
     "sass-loader": "^12.6.0",

+ 5 - 0
src/entry/popup.js

@@ -5,6 +5,11 @@ const app = createApp(App)
 
 // 引入路由对象实例
 import router from '@/router/popup.js'
+import { message } from "ant-design-vue";
+app.use(message);
+import "ant-design-vue/dist/antd.css"; // or 'ant-design-vue/dist/antd.less'
+
+
 app.use(router)
 console.log(router)
 app.mount('#app')

+ 6 - 0
src/router/popup.js

@@ -5,6 +5,7 @@ import Withdraw from '@/view/popup/withdraw/index.vue'
 import WithdrawInfo from '@/view/popup/withdraw/info.vue'
 import WithdrawConfirm from '@/view/popup/withdraw/confirm.vue'
 import WithdrawSuccess from '@/view/popup/withdraw/success.vue'
+import WithdrawPaypal from '@/view/popup/withdraw/paypal.vue'
 import WithdrawHome from '@/view/popup/withdraw/home.vue'
 import Transactions from '@/view/popup/transactions.vue'
 
@@ -43,6 +44,11 @@ const routes = [
                 path: 'success',
                 name: 'WithdrawSuccess',
                 component: WithdrawSuccess,
+            },
+            {
+                path: 'paypal',
+                name: 'WithdrawPaypal',
+                component: WithdrawPaypal,
             }
         ],
     },

+ 84 - 72
src/view/components/option-withdraw.vue

@@ -1,74 +1,58 @@
 <template>
     <div class="withdraw-wrapper">
-        <div class="nav-bar">
+        <!-- <div class="nav-bar">
             <img
                 :src="require('@/assets/svg/icon-bar-arrow-left.svg')"
                 class="icon"
                 @click="back"
             />
             Withdraw
-        </div>
+        </div> -->
         <template v-if="!isSubmit">
             <div class="content">
                 <div class="logo-wrapper">
                     <div class="title">Withdraw to</div>
-                    <img
-                        class="icon"
-                        :src="
-                            require('@/assets/svg/icon-withdraw-paypal-logo.svg')
-                        "
-                    />
+                    <img class="icon" :src="
+                        require('@/assets/svg/icon-withdraw-paypal-logo.svg')
+                    " />
                 </div>
 
                 <div class="form-wrapper">
                     <div class="form-item">
                         <div class="label">PayPal account</div>
                         <div class="input-wrapper">
-                            <el-input
-                                type="text"
-                                v-model="
-                                    requestWithdrawParams.withdrawReceiveAccount
-                                "
-                                placeholder="Enter PayPal account"
-                                :input-style="{
-                                    'box-shadow': 'none',
-                                    height: '48px',
-                                    'border-radius': '8px',
-                                }"
-                            />
+                            <el-input type="text" v-model="
+                                requestWithdrawParams.withdrawReceiveAccount
+                            " placeholder="Enter PayPal account" :input-style="{
+    'box-shadow': 'none',
+    height: '48px',
+    'border-radius': '8px',
+}" />
                         </div>
                     </div>
                     <div class="form-item">
-                        <div class="label">Withdrawal amount<span class="msg">(${{walletWithdrawConfig.withdrawUSDPreMinAmount/100}} minimum)</span></div>
+                        <div class="label">Withdrawal amount<span
+                                class="msg">(${{ walletWithdrawConfig.withdrawUSDPreMinAmount / 100 }} minimum)</span></div>
                         <div class="input-wrapper amount-wrapper">
-                            <el-input
-                                type="text"
-                                @input="onAmountInput"
-                                @blur="onAmountBlur"
-                                v-model="requestWithdrawParams.amountValue"
-                                placeholder="$0"
-                                :input-style="{
+                            <el-input type="text" @input="onAmountInput" @blur="onAmountBlur"
+                                v-model="requestWithdrawParams.amountValue" placeholder="$0" :input-style="{
                                     'box-shadow': 'none',
                                     width: '220px',
                                     height: '46px',
                                     'border-radius': '8px',
-                                }"
-                            />
-                            <div
-                                @click="withdrawalAll"
-                                class="withdrawal-all-btn"
-                            >
+                                }" />
+                            <div @click="withdrawalAll" class="withdrawal-all-btn">
                                 Withdrawal All
                             </div>
                         </div>
                     </div>
 
                     <div class="error-msg">
-                        <template  v-if="showWithdrawError">
-                            The minimum withdrawal amount is ${{walletWithdrawConfig.withdrawUSDPreMinAmount/100}} USD
+                        <template v-if="showWithdrawError">
+                            The minimum withdrawal amount is ${{ walletWithdrawConfig.withdrawUSDPreMinAmount / 100 }} USD
                         </template>
-                        <template  v-if="showWithdrawIptError">
-                            The withdrawal amount exceeds the total account balance of ${{canWithdrawBalance/100}} USD
+                        <template v-if="showWithdrawIptError">
+                            The withdrawal amount exceeds the total account balance of ${{ canWithdrawBalance / 100 }} USD
                         </template>
                     </div>
                 </div>
@@ -76,32 +60,29 @@
                 <div class="bottom-msg">
                     <div class="top">
                         <template v-if="!calcReq">
-                                final amount
-                                <span>${{
-                                        finalWithdrawalAmount > 0
-                                            ? finalWithdrawalAmount
-                                            : 0
-                                    }}
-                                </span>
+                            final amount
+                            <span>${{
+                                    finalWithdrawalAmount > 0
+                                        ? finalWithdrawalAmount
+                                        : 0
+                            }}
+                            </span>
                         </template>
                         <template v-else>
                             计算中
                         </template>
                     </div>
-                    <div>{{walletWithdrawConfig.withdrawUSDPaypalFeeDesc}}</div>
+                    <div>{{ walletWithdrawConfig.withdrawUSDPaypalFeeDesc }}</div>
                 </div>
             </div>
             <div @click="withdraw" class="confirm-btn">
-                <img class="icon-loading" v-if="withdrawIng" :src="require('@/assets/svg/icon-btn-loading.svg')"  />
+                <img class="icon-loading" v-if="withdrawIng" :src="require('@/assets/svg/icon-btn-loading.svg')" />
                 Confirm
             </div>
         </template>
         <template v-else>
             <div class="withdraw-status">
-                <img
-                    :src="require('@/assets/svg/icon-withdraw-status.svg')"
-                    alt=""
-                />
+                <img :src="require('@/assets/svg/icon-withdraw-status.svg')" alt="" />
                 <div>
                     <div class="title">Submitted successfully</div>
                     <div class="desc">
@@ -119,12 +100,11 @@
 
 <script setup>
 /* eslint-disable */
-import { defineProps, defineEmits, ref, onMounted, watch, computed } from "vue";
-import { ElMessage } from 'element-plus';
+import { defineProps, defineEmits, ref, onMounted, watch, computed, inject } from "vue";
 import 'element-plus/es/components/message/style/css'
-import { withdrawRequest } from "@/http/account";
+import { withdrawRequest, getWithdrawConfig } from "@/http/account";
 import { withdrawCalcFee } from "@/http/pay";
-import {debounce} from "@/uilts/help"
+import { debounce } from "@/uilts/help"
 
 const props = defineProps({
     amountValue: {
@@ -142,7 +122,9 @@ const props = defineProps({
         }
     }
 });
+let withdraw_info = inject('withdraw_info')
 
+console.log('withdraw_info', withdraw_info)
 let requestWithdrawParams = ref({
     amountValue: "",
     currencyCode: "USD",
@@ -150,7 +132,7 @@ let requestWithdrawParams = ref({
     withdrawReceiveAccount: "",
 });
 
-let canWithdrawBalance = ref(props.amountValue);
+let canWithdrawBalance = ref(withdraw_info.paypal.amount_value);
 
 let showWithdrawError = ref(false);
 let showWithdrawIptError = ref(false);
@@ -161,7 +143,24 @@ let finalWithdrawalAmount = ref('');
 let calcReq = ref(false);
 
 onMounted(() => {
+    queryWithdrawConfig()
 });
+/**
+ * 获取提现配置
+ */
+const queryWithdrawConfig = () => {
+    getWithdrawConfig({
+        params: {
+            currencyCode: withdraw_info.currency_code || 'USD',
+            withdrawNetwork: 'paypal'
+        },
+    }).then((res) => {
+        console.log(res);
+        if (res.code == 0) {
+            walletWithdrawConfig.value = res.data;
+        }
+    });
+};
 
 const emits = defineEmits("back");
 const back = () => {
@@ -182,7 +181,7 @@ const withdrawalAll = () => {
     console.log(canWithdrawBalance.value);
     showWithdrawIptError.value = false;
     requestWithdrawParams.value.amountValue =
-            canWithdrawBalance.value / 100;
+        canWithdrawBalance.value / 100;
     setWithdrawIptStatus(canWithdrawBalance.value);
     withdrawCalcAmount();
 };
@@ -197,15 +196,15 @@ const withdrawCalcAmount = () => {
         }
     }).then(res => {
         calcReq.value = false;
-        if(res.code == 0) {
+        if (res.code == 0) {
             finalWithdrawalAmount.value = res.data.finalAmountValue / 100;
         }
     })
 }
 
-const withdrawCalcAmountDebounce = debounce(function() {
+const withdrawCalcAmountDebounce = debounce(function () {
     withdrawCalcAmount();
-}, 1000) 
+}, 1000)
 
 /**
  * 提现
@@ -215,16 +214,16 @@ const withdraw = () => {
     if (withdrawIng.value) {
         return;
     }
-    
+
     let params = {
         ...requestWithdrawParams.value,
     };
-    if(!params.amountValue || !params.withdrawReceiveAccount) {
+    if (!params.amountValue || !params.withdrawReceiveAccount) {
         return;
     }
-    params.withdrawReceiveAccount = params.withdrawReceiveAccount.replace(/\s*/g,"");
+    params.withdrawReceiveAccount = params.withdrawReceiveAccount.replace(/\s*/g, "");
     params.amountValue = params.amountValue * 100;
-    if(params.amountValue > canWithdrawBalance.value) {
+    if (params.amountValue > canWithdrawBalance.value) {
         // ElMessage({
         //     message: '大于可提现金额',
         //     type: 'warning',
@@ -250,9 +249,9 @@ const withdraw = () => {
             console.log(res);
         }
     })
-    .catch((err) => {
-        console.log(err);
-    });
+        .catch((err) => {
+            console.log(err);
+        });
 };
 
 const onAmountBlur = () => {
@@ -275,12 +274,12 @@ const onAmountInput = (value) => {
 
     setWithdrawIptStatus(amount);
 
-     // 输入金额大于可提现金额
-    if(amount > canWithdrawBalance.value) {
+    // 输入金额大于可提现金额
+    if (amount > canWithdrawBalance.value) {
         // value = '';
         // requestWithdrawParams.value.amountValue = '';
 
-        if(!showWithdrawError.value) {
+        if (!showWithdrawError.value) {
             showWithdrawIptError.value = true;
         }
     } else {
@@ -296,7 +295,7 @@ const setWithdrawIptStatus = (amount) => {
     //显示tips
     if (
         amount > 0 &&
-        amount < props.walletWithdrawConfig.withdrawUSDPreMinAmount
+        amount < withdraw_info.paypal.wallet_withdraw_config.withdrawUSDPreMinAmount
     ) {
         showWithdrawError.value = true;
     } else {
@@ -319,6 +318,7 @@ const setWithdrawIptStatus = (amount) => {
         align-items: center;
         font-weight: 500;
         font-size: 13px;
+
         .icon {
             width: 16px;
             margin-right: 6px;
@@ -329,12 +329,14 @@ const setWithdrawIptStatus = (amount) => {
     .content {
         padding: 0 20px;
         box-sizing: border-box;
+
         .logo-wrapper {
             .title {
                 margin-top: 13px;
                 font-size: 14px;
                 color: #5b5b5b;
             }
+
             .icon {
                 width: 111px;
                 height: 56px;
@@ -345,22 +347,26 @@ const setWithdrawIptStatus = (amount) => {
         .form-wrapper {
             .form-item {
                 margin-bottom: 30px;
+
                 .label {
                     font-size: 14px;
                     color: #5b5b5b;
                     margin-bottom: 8px;
+
                     .msg {
                         font-weight: 400;
                         font-size: 14px;
                         color: #FFA621;
                     }
                 }
+
                 .input-wrapper {
                     display: flex;
                     align-items: center;
                     justify-content: space-between;
                     border: 1px solid #e8e8e8;
                     border-radius: 8px;
+
                     .withdrawal-all-btn {
                         font-weight: 500;
                         font-size: 13px;
@@ -370,11 +376,12 @@ const setWithdrawIptStatus = (amount) => {
                     }
                 }
             }
+
             .error-msg {
                 font-size: 13px;
                 color: #ff0000;
                 margin-top: -15px;
-                height: 38px;   
+                height: 38px;
             }
         }
 
@@ -383,8 +390,10 @@ const setWithdrawIptStatus = (amount) => {
             color: #9d9d9d;
             text-align: right;
             margin-top: 52px;
+
             .top {
                 height: 22px;
+
                 span {
                     font-weight: 500;
                     font-size: 15px;
@@ -396,15 +405,18 @@ const setWithdrawIptStatus = (amount) => {
 
     .withdraw-status {
         text-align: center;
+
         img {
             margin-top: 40px;
             margin-bottom: 34px;
         }
+
         .title {
             font-weight: 500;
             font-size: 20px;
             margin-bottom: 10px;
         }
+
         .desc {
             font-size: 15px;
             color: rgba($color: #000000, $alpha: 0.5);

+ 5 - 1
src/view/popup/index.vue

@@ -5,7 +5,11 @@
 </template>
 
 <script setup>
-import { reactive, onMounted } from 'vue'
+import { reactive, onMounted  ,provide} from 'vue'
+
+let withdraw_info = reactive({})
+provide('withdraw_info', withdraw_info)
+
 let state = reactive({
   popup: true
 })

+ 32 - 38
src/view/popup/popup.vue

@@ -11,17 +11,17 @@
                     Transactions
                 </div>
             </div> -->
-            <v-head  :show_more="true" :show_state="'home'"></v-head>
+            <v-head :show_more="true" :show_state="'home'"></v-head>
             <div class="content">
                 <img :src="require('@/assets/svg/icon-money.svg')" class="icon-money" />
                 <div class="msg" v-show="walletWithdrawConfig.withdrawUSDPaypalFeeDesc">
                     ({{ walletWithdrawConfig.withdrawUSDPaypalFeeDesc }})</div>
-                <div class="amount">${{ canWithdrawBalance  }}</div>
+                <div class="amount">${{ canWithdrawBalance }}</div>
                 <div class="area-btn">
                     <div class="withdraw-btn" @click="clickWithdraw">Withdraw</div>
                     <div class="top-up-btn" @click="clickTopUp">Top Up</div>
                 </div>
-                
+
             </div>
             <div class="tab-bar">
                 <div class="tab-item" :class="{ active: currentTabIndex == index }" v-for="(item, index) in tabList"
@@ -54,16 +54,16 @@
                                 <div class="left">
                                     <div class="nickname">
                                         {{
-                                            item.type == 1
-                                                ? item.userInfo.nickName
-                                                : "Giveaways"
+                                                item.type == 1
+                                                    ? item.userInfo.nickName
+                                                    : "Giveaways"
                                         }}
                                     </div>
                                     <div class="time">
                                         {{
-                                            moment(item.timestamp).format(
-                                                "MM-DD HH:mm:ss"
-                                            )
+                                                moment(item.timestamp).format(
+                                                    "MM-DD HH:mm:ss"
+                                                )
                                         }}
                                     </div>
                                 </div>
@@ -78,7 +78,7 @@
                                                 </template>
                                                 <!-- 已完成 -->
                                                 <template v-else-if="item.status == 1">
-                                                    ${{ item.amount  }}
+                                                    ${{ item.amount }}
                                                 </template>
                                                 <!-- 已过期 -->
                                                 <template v-else-if="item.status == 2">
@@ -87,7 +87,7 @@
                                             </template>
                                             <!-- 发出去的 -->
                                             <template v-else-if="item.type == 2">
-                                                -${{ item.amount  }}
+                                                -${{ item.amount }}
                                             </template>
                                         </div>
                                         <!-- 发出的红包显示 -->
@@ -99,22 +99,22 @@
                                             <!-- 进行中 -->
                                             <template v-else-if="item.status == 1">
                                                 {{
-                                                    item.postTaskLuckdrop
-                                                        .receivedCount
+                                                        item.postTaskLuckdrop
+                                                            .receivedCount
                                                 }}/{{
-    item.postTaskLuckdrop
-        .totalCount
+        item.postTaskLuckdrop
+            .totalCount
 }}
                                             </template>
                                             <!-- 已结束 -->
                                             <template v-else-if="item.status == 2">
                                                 (Time expired)
                                                 {{
-                                                    item.postTaskLuckdrop
-                                                        .receivedCount
+                                                        item.postTaskLuckdrop
+                                                            .receivedCount
                                                 }}/{{
-    item.postTaskLuckdrop
-        .totalCount
+        item.postTaskLuckdrop
+            .totalCount
 }}
                                             </template>
                                             <!-- 红包未发出显示 -->
@@ -171,17 +171,18 @@
 </template>
 
 <script setup>
-import { ref, onMounted } from "vue";
+import { ref, onMounted, inject } from "vue";
 import optionTransactions from "@/view/components/options-transactions";
 import optionLogin from "@/view/components/option-login.vue";
 import optionWithdraw from "@/view/components/option-withdraw.vue";
 import {
     getChromeStorage,
 } from "@/uilts/chromeExtension";
-import { getBalance, getMineLuckdropRecords, getWithdrawConfig } from "@/http/account";
+import { getBalance, getMineLuckdropRecords } from "@/http/account";
 import router from "@/router/popup.js";
 import VHead from '@/view/popup/components/head.vue'
-
+let withdraw_info = inject('withdraw_info')
+withdraw_info.paypal = {}
 
 var moment = require("moment");
 
@@ -195,6 +196,9 @@ let withdrawVisibility = ref(false);
 
 let userInfo = ref({});
 let canWithdrawBalance = ref(0);
+withdraw_info.paypal.amount_value = canWithdrawBalance
+withdraw_info.balance = 0
+
 let isRequestWithdrawBalance = ref(false);
 
 let currentTabIndex = ref(0);
@@ -215,6 +219,8 @@ let walletWithdrawConfig = ref({
     withdrawUSDSwitch: "",
     withdrawUSDPaypalFeeDesc: ''
 });
+withdraw_info.paypal.wallet_withdraw_config = walletWithdrawConfig
+
 
 let moreTabList = ref([
     {
@@ -243,24 +249,11 @@ onMounted(() => {
         if (isLogin.value) {
             getAccountBalance();
             getLuckdropRecordsList();
-            queryWithdrawConfig();
         }
     });
 });
 
-/**
- * 获取提现配置
- */
-const queryWithdrawConfig = () => {
-    getWithdrawConfig({
-        params: {},
-    }).then((res) => {
-        console.log(res);
-        if (res.code == 0) {
-            walletWithdrawConfig.value = res.data;
-        }
-    });
-};
+
 
 /**
  * 获取账户余额
@@ -272,6 +265,7 @@ const getAccountBalance = () => {
         if (res.code == 0) {
             if (res.data) {
                 canWithdrawBalance.value = res.data.allAssetValuationUSD;
+                withdraw_info.balance = res.data.allAssetValuationUSD || 0
             }
         }
     });
@@ -441,10 +435,10 @@ const sendTwitter = (params) => {
     );
 };
 // 点击提现
-const clickWithdraw = ()=>{
+const clickWithdraw = () => {
     router.push('/withdraw/home');
 }
-const clickTopUp = ()=>{
+const clickTopUp = () => {
     router.push('/top-up/home');
 }
 

+ 33 - 36
src/view/popup/top-up/info.vue

@@ -47,12 +47,18 @@
 </template>
 
 <script setup>
-import { onMounted, reactive ,inject} from "vue";
+import { onMounted, reactive, inject } from "vue";
 import VHead from '@/view/popup/components/head.vue'
-import { ElMessage } from 'element-plus'
 import { useRouter } from "vue-router";
 import { useRoute } from "vue-router";
 import { getTokenRechargeAddress } from "@/http/pay";
+import { message } from 'ant-design-vue';
+message.config({
+    top: `10px`,
+    duration: 3,
+    maxCount: 1,
+});
+
 let top_up_info = inject('top_up_info')
 
 const router = useRouter()
@@ -60,7 +66,7 @@ const route = useRoute()
 var QRCode = require('qrcode')
 var ClipboardJS = require('clipboard')
 let state = reactive({
-    token_address: ''
+    token_address: '123'
 })
 
 const clickDone = () => {
@@ -85,14 +91,8 @@ const createQRCode = (str) => {
 const copyToken = () => {
     var clipboard = new ClipboardJS('.copy-btn');
     clipboard.on('success', function (e) {
-        ElMessage({
-            message: 'copy success',
-            grouping: true,
-            type: 'success',
-            offset: -16,
-            appendTo: document.body
-
-        })
+        console.log(1)
+        message.success('copy success');
         console.info('Action:', e.action);
         console.info('Text:', e.text);
         console.info('Trigger:', e.trigger);
@@ -101,37 +101,34 @@ const copyToken = () => {
     });
 
     clipboard.on('error', function (e) {
-
-        ElMessage({
-            message: 'copy error',
-            grouping: true,
-            type: 'error',
-            offset: -16
-        })
+        message.error('copy error');
         console.error('Action:', e.action);
         console.error('Trigger:', e.trigger);
     });
 }
 
 onMounted(() => {
-    getTokenRechargeAddress({
-        params: {
-            "tokenChain": route.query.tokenChain || ''
-        },
-    }).then((res) => {
-        switch (res.code.toString()) {
-            case '0':
-                if (res.data && res.data.rechargeAddress) {
-                    state.token_address = res.data.rechargeAddress
-                    createQRCode(state.token_address)
-                    copyToken()
-                }
-                break;
-
-            default:
-                break;
-        }
-    })
+    state.token_address = '123'
+    createQRCode(state.token_address)
+    copyToken()
+    // getTokenRechargeAddress({
+    //     params: {
+    //         "tokenChain": route.query.tokenChain || ''
+    //     },
+    // }).then((res) => {
+    //     switch (res.code.toString()) {
+    //         case '0':
+    //             if (res.data && res.data.rechargeAddress) {
+    //                 state.token_address = res.data.rechargeAddress
+    //                 createQRCode(state.token_address)
+    //                 copyToken()
+    //             }
+    //             break;
+
+    //         default:
+    //             break;
+    //     }
+    // })
 
 })
 

+ 2 - 0
src/view/popup/withdraw/confirm.vue

@@ -60,6 +60,7 @@ import VHead from '@/view/popup/components/head.vue'
 import { withdrawRequest } from "@/http/account";
 import router from "@/router/popup.js";
 let withdraw_info = inject('withdraw_info')
+withdraw_info.state_page = {}
 let state = reactive({
     img_enter_state: false
 })
@@ -78,6 +79,7 @@ const clickBtn = () => {
     //     }
     // })
     if(state.img_enter_state){
+        withdraw_info.state_page.txt = ['123123']
         router.push('/withdraw/success')
     }
 }

+ 13 - 6
src/view/popup/withdraw/home.vue

@@ -15,12 +15,19 @@ import { inject } from 'vue'
 let withdraw_info = inject('withdraw_info')
 
 function selectCurrency(_params) {
-    withdraw_info.token = _params.currencyName || ''
-    withdraw_info.net = _params.tokenChain || 'BNB Chain'
-    withdraw_info.currency_code = _params.currencyCode
-    withdraw_info.icon_token = _params.iconPath || ''
-    withdraw_info.icon_net = require('@/assets/svg/icon-BNB.svg')
-    router.push('/withdraw/info')
+
+    if (_params.currencyCode == 'USD') {
+        withdraw_info.currency_code = _params.currencyCode
+        router.push('/withdraw/paypal')
+    } else {
+        withdraw_info.token = _params.currencyName || ''
+        withdraw_info.net = _params.tokenChain || 'BNB Chain'
+        withdraw_info.currency_code = _params.currencyCode
+        withdraw_info.icon_token = _params.iconPath || ''
+        withdraw_info.icon_net = require('@/assets/svg/icon-BNB.svg')
+        router.push('/withdraw/info')
+    }
+
 }
 </script>
 

+ 0 - 7
src/view/popup/withdraw/index.vue

@@ -2,12 +2,5 @@
   <router-view></router-view>
 </template>
 
-<script setup>
-import { provide, reactive } from 'vue'
-let withdraw_info = reactive({})
-provide('withdraw_info', withdraw_info)
-</script>
-
-
 <style lang='scss' scoped>
 </style>

+ 1 - 1
src/view/popup/withdraw/info.vue

@@ -127,7 +127,7 @@ const clickBtn = () => {
 
 const initConfig = () => {
   state.fee_amount = 0.1
-  state.balance = 123
+  state.balance = withdraw_info.balance
   // 单次提现最小金额
   state.min_amount = 11
   // 单次提现最小金额

+ 22 - 0
src/view/popup/withdraw/paypal.vue

@@ -0,0 +1,22 @@
+<template>
+    <!-- 公共组件 -->
+    <div class="info">
+        <v-head :title="'Withdraw'" :show_more="true"></v-head>
+        <option-withdraw style="height: calc(100% - 48px);"></option-withdraw>
+    </div>
+
+</template>
+
+<script setup>
+import VHead from '@/view/popup/components/head.vue'
+import OptionWithdraw from "@/view/components/option-withdraw.vue";
+
+</script>
+
+
+<style lang='scss' scoped>
+.info {
+    height: 100%;
+    overflow: hidden;
+}
+</style>

+ 5 - 1
src/view/popup/withdraw/success.vue

@@ -2,7 +2,7 @@
     <!-- 公共组件 -->
     <div class="info">
         <v-head :title="'Withdraw'" :show_more="true"></v-head>
-        <state-page style="height: calc(100% - 48px);" :text="['123', '123']" @onDone="onDone"></state-page>
+        <state-page style="height: calc(100% - 48px);" :text="withdraw_info.state_page.txt || []" @onDone="onDone"></state-page>
     </div>
 
 </template>
@@ -11,6 +11,10 @@
 import VHead from '@/view/popup/components/head.vue'
 import StatePage from "@/view/popup/components/state-page.vue";
 import { useRouter } from "vue-router";
+import { inject } from 'vue'
+let withdraw_info = inject('withdraw_info')
+
+
 let router = useRouter()
 const onDone = () => {
     router.replace('/withdraw/home')