浏览代码

[edit] style

A\An 2 年之前
父节点
当前提交
84247629ec

+ 3 - 0
src/assets/svg/icon-nft-back-arrow.svg

@@ -0,0 +1,3 @@
+<svg width="24" height="24" viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg">
+<path d="M3.46967 11.4697C3.17678 11.7626 3.17678 12.2374 3.46967 12.5303L8.24264 17.3033C8.53553 17.5962 9.01041 17.5962 9.3033 17.3033C9.59619 17.0104 9.59619 16.5355 9.3033 16.2426L5.06066 12L9.3033 7.75736C9.59619 7.46447 9.59619 6.98959 9.3033 6.6967C9.01041 6.40381 8.53553 6.40381 8.24264 6.6967L3.46967 11.4697ZM20 11.25L4 11.25L4 12.75L20 12.75L20 11.25Z" fill="black"/>
+</svg>

+ 7 - 0
src/router/popup.js

@@ -21,6 +21,8 @@ import TopUp from '@/view/popup/top-up/index.vue'
 import TopUpInfo from '@/view/popup/top-up/info.vue'
 import TopUpHome from '@/view/popup/top-up/home.vue'
 
+import CurrencyDetail from '@/view/popup/currency-detail.vue'
+
 // 2. 定义路由配置
 const routes = [
     {
@@ -115,6 +117,11 @@ const routes = [
         path: '/NFTDetail',
         name: 'NFTDetail',
         component: NFTDetail
+    },
+    {
+        path: '/currencyDetail',
+        name: 'currencyDetail',
+        component: CurrencyDetail
     }
 ]
 

+ 273 - 0
src/view/popup/currency-detail.vue

@@ -0,0 +1,273 @@
+<template>
+  <div class="currency-detail-page">
+    <div class="top">
+      <img
+        class="icon-currency"
+        :src="routerParams.iconPath"
+      />
+      <div class="amount">
+        {{routerParams.balance}} {{routerParams.currencyName}}
+        <div class="final">${{routerParams.usdEstimateBalance}}</div>
+      </div>
+    </div>
+    <div class="bottom">
+      <div class="btn deposit-btn"  @click="clickDeposit">Deposit</div>
+      <div class="btn withdrawal-btn" @click="clickWithdraw">Withdrawal</div>
+    </div>
+
+    <div class="popup" v-if="showPopup" @click="clickPopup">
+      <div class="content">
+        <div class="item" v-for="(item, index) in listData" :key="index">
+          <div class="chain">
+            <img
+              class="icon-chain"
+              src="https://d1mcov78iir8kk.cloudfront.net/image/currency_icon/BSC_USDT.png"
+            />
+            {{ item.chain }}
+          </div>
+          <div class="currency">
+            <div class="left">
+              <img
+                class="icon-currency"
+                src="https://d1mcov78iir8kk.cloudfront.net/image/currency_icon/BSC_USDT.png"
+              />
+              <div class="info">
+                <div class="unit">{{ item.currency }}</div>
+                TetherUS
+              </div>
+            </div>
+            <div class="right">
+              {{ item.amount }}
+              <div class="final">${{ item.amount }}</div>
+            </div>
+          </div>
+        </div>
+      </div>
+    </div>
+  </div>
+</template>
+
+<script setup>
+import { ref, onMounted, inject, reactive } from "vue";
+import router from "@/router/popup.js";
+import Report from "@/log-center/log";
+import { getStorage } from "@/uilts/help";
+
+let routerParams = ref({});
+
+let showPopup = ref(true);
+
+let listData = ref([
+  {
+    chain: "BNB Smart Chain (BEP20)",
+    currency: "USDT",
+    amount: "10",
+  },
+  {
+    chain: "BNB Smart Chain (BEP20)",
+    currency: "USDT",
+    amount: "10",
+  },
+]);
+
+const clickPopup = () => {
+  showPopup.value = false;
+};
+
+let withdraw_info = inject('withdraw_info')
+// 点击提现
+const clickWithdraw = () => {
+    let _params = routerParams.value;
+
+    Report.reportLog({
+        pageSource: Report.pageSource.denetHomePage,
+        businessType: Report.businessType.buttonClick,
+        objectType: Report.objectType.withdrawButton
+    });
+
+    if (_params.currencyCode == 'USD') {
+        withdraw_info.currency_code = _params.currencyCode
+        router.push('/withdraw/paypal')
+    } else {
+        withdraw_info.source = 'home'
+        withdraw_info.balance = _params.balance
+        withdraw_info.token_symbol = _params.tokenSymbol || ''
+        withdraw_info.currency_name = _params.currencyName || ''
+        withdraw_info.token_chain = _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')
+    }
+}
+
+let top_up_info = reactive(getStorage('top_up_info')) || inject('top_up_info') || {};
+
+const clickDeposit = () => {
+    let _params = routerParams.value;
+
+    top_up_info.token = _params.currencyName || ''
+    top_up_info.token_chain = _params.tokenChain 
+    top_up_info.token_symbol = _params.tokenSymbol || ''
+    top_up_info.currency_code = _params.currencyCode
+    top_up_info.icon_token = _params.iconPath || ''
+    top_up_info.icon_net = require('@/assets/svg/icon-BNB.svg')
+    Report.reportLog({
+        pageSource: Report.pageSource.denetHomePage,
+        businessType: Report.businessType.buttonClick,
+        objectType: Report.objectType.topupButton
+    });
+    router.push('/top-up/info');
+}
+
+onMounted(() => {
+    let {params = '{}'} = router.currentRoute.value.query;
+    routerParams.value =  JSON.parse(params);
+    console.log(routerParams.value)
+})
+</script>
+
+
+<style lang='scss' scoped>
+.currency-detail-page {
+  width: 100%;
+  height: 100%;
+  position: relative;
+
+  .top {
+    height: calc(100% - 163px);
+    display: flex;
+    flex-direction: column;
+    align-items: center;
+    justify-content: center;
+
+    .icon-currency {
+      width: 100px;
+      margin-bottom: 30px;
+    }
+
+    .amount {
+      font-weight: 700;
+      font-size: 28px;
+      .final {
+        margin-top: 9px;
+        font-weight: 500;
+        font-size: 22px;
+        color: #a2a2a2;
+        text-align: center;
+      }
+    }
+  }
+  .bottom {
+    height: 162px;
+    padding: 0 20px;
+    box-sizing: border-box;
+
+    .btn {
+      width: 100%;
+      height: 57px;
+      display: flex;
+      align-items: center;
+      justify-content: center;
+      font-weight: 500;
+      font-size: 17px;
+      border-radius: 100px;
+      cursor: pointer;
+    }
+
+    .deposit-btn {
+      margin-bottom: 18px;
+      background: #1d9bf0;
+      color: #fff;
+    }
+
+    .withdrawal-btn {
+      background: rgba(244, 244, 244, 0.01);
+      border: 1px solid #d7e8f4;
+      box-sizing: border-box;
+      color: #1d9bf0;
+    }
+  }
+
+  .popup {
+    width: 100%;
+    height: 100%;
+    position: absolute;
+    left: 0;
+    top: 0;
+    background: rgba(0, 0, 0, 0.6);
+    cursor: pointer;
+
+    .content {
+      background: #f7f7f7;
+      border-radius: 20px 20px 0px 0px;
+      width: 100%;
+      height: 230px;
+      position: absolute;
+      bottom: 0;
+      left: 0;
+      overflow-y: auto;
+      cursor: default;
+
+      .item {
+        .chain {
+          font-weight: 500;
+          font-size: 14px;
+          padding: 12px 14px;
+          box-sizing: border-box;
+          background: #f7f7f7;
+
+          .icon-chain {
+            width: 18px;
+            height: 18px;
+            margin-right: 8px;
+          }
+        }
+
+        .currency {
+          background: #fff;
+          padding: 12px 20px;
+          box-sizing: border-box;
+          display: flex;
+          justify-content: space-between;
+          cursor: pointer;
+
+          .left {
+            display: flex;
+
+            .icon-currency {
+              width: 24px;
+              height: 24px;
+              margin-right: 12px;
+              margin-top: 4px;
+            }
+
+            .info {
+              font-weight: 400;
+              font-size: 12px;
+              color: #a2a2a2;
+              .unit {
+                font-weight: 500;
+                font-size: 15px;
+                color: #000;
+                margin-bottom: 5px;
+              }
+            }
+          }
+
+          .right {
+            font-weight: 500;
+            font-size: 15px;
+            
+            .final {
+                font-weight: 400;
+                font-size: 12px;
+                color: #A2A2A2;
+            }
+          }
+        }
+      }
+    }
+  }
+}
+</style>

+ 227 - 5
src/view/popup/tabbar-page/nft/detail.vue

@@ -1,6 +1,12 @@
 <template>
   <div class="nft-detail-wrapper">
-    <div class="back-bar"></div>
+    <div class="back-bar">
+        <img :src="require('@/assets/svg/icon-nft-back-arrow.svg')" 
+            class="icon-arrow"
+            @click="back"
+            >
+        Azuki #6436
+    </div>
     <div class="content">
       <div class="nft-img">
         <img
@@ -20,41 +26,112 @@
       <div class="prop item">
         <div class="title">Properties</div>
         <div class="prop-content">
-            <div class="prop-item">
-
+            <div class="prop-item" v-for="(item, index) in propList" :key="index">
+                {{item.a}}
+                <div class="prop-name">
+                    {{item.b}}
+                </div>
+                {{item.c}}
             </div>
         </div>
       </div>
 
       <div class="about item">
         <div class="title">About</div>
+
+        <div class="about-content">
+            Take the red bean to join the garden. View the collection at azuki.com/gallery.
+
+Azuki starts with a collection of 10,000 avatars that give you membership access to The Garden: a corner of the internet where artists, builders, and web3 enthusiasts meet to create a decentralized future. Azuki holders receive access to exclusive drops, experiences, and more. Visit azuki.com for more details.
+
+We rise together. We build together. We grow together.
+        </div>
       </div>
 
       <div class="detail item">
         <div class="title">Details</div>
+        <div class="detail-content">
+            <div class="detail-item" v-for="(item, index) in detailList" :key="index">
+                <div class="left">{{item.label}}</div>
+                <div class="right" :class="{'blue': index < 2}">{{item.value}}</div>
+            </div>
+        </div>
       </div>
 
       <div class="date item">
         <div class="title">Date of possession</div>
+        <div class="date-content">
+            2022-05-27
+        </div>
       </div>
 
       <div class="price item">
         <div class="title">Purchase price</div>
+        <div class="price-content">
+            100 USDT
+        </div>
       </div>
     </div>
-    <div class="bottom-bar"></div>
+    <div class="bottom-bar">
+        <!-- <div class="default">
+            NFT Sale function, coming soon
+        </div> -->
+        <!-- <div class="sell">
+            <div class="sell-btn">
+                Sell
+            </div>
+        </div> -->
+        <div class="cancel-sale">
+            <div class="left">
+                233 USDT
+                <div class="final">
+                    (Final 203.5 USDT)
+                </div>
+            </div>
+            <div class="cancel-btn">
+                Cancel sale
+            </div>
+        </div>
+    </div>
   </div>
 </template>
 
 <script setup>
 import { ref } from "vue";
+import router from "@/router/popup.js";
 
 let propList = ref([
     {
+        a: 'BACKGROUND',
+        b: 'Cool Blue',
+        c: '5% have this trait'
+    },
+    {
+        a: 'BACKGROUND',
+        b: 'Cool Blue',
+        c: '5% have this trait'
+    }
+]);
 
+let detailList = ref([
+    {
+        label: 'Contract Address',
+        value: '0xed5a...c5442752'
+    },
+    {
+        label: 'Contract Address',
+        value: '0xed5a...c5442752'
+    },
+        {
+        label: 'Contract Address',
+        value: '0xed5a...c5442752'
     }
 ])
 
+const back = () => {
+    router.back();
+}
+
 </script>
 
 
@@ -69,6 +146,16 @@ let propList = ref([
     box-shadow: 0px 0.5px 0px #d1d9dd;
     box-sizing: border-box;
     padding: 14px;
+    font-weight: 500;
+    font-size: 16px;
+    display: flex;
+    align-items: center;
+
+    .icon-arrow {
+        width: 24px;
+        margin-right: 12px;
+        cursor: pointer;
+    }
   }
 
   .content {
@@ -107,12 +194,81 @@ let propList = ref([
             font-weight: 500;
             font-size: 14px;
             color: #929292;
-            
+
             span {
                 color: #1D9BF0;
             }
         }
     }
+
+    .prop {
+        .prop-content {
+            display: flex;
+            flex-wrap: wrap;
+            margin-top: 12px;
+
+            .prop-item {
+                width: 48%;
+                height: 88px;
+                background: #F8F8F8;
+                border-radius: 10px;
+                display: flex;
+                flex-direction: column;
+                justify-content: center;
+                padding: 8px;
+                box-sizing: border-box;
+                align-items: center;
+                font-weight: 500;
+                font-size: 12px;
+                color: #929292;
+
+                .prop-name {
+                    font-weight: 700;
+                    font-size: 17px;
+                    margin-top: 6px;
+                    margin-bottom: 8px;
+                    color: #000;
+                }
+            }
+            .prop-item:nth-child(odd) {
+                margin-right: 8px;
+            }
+        }
+    }
+
+    .about-content {
+        font-weight: 400;
+        font-size: 14px;
+        margin-top: 22px;
+    }
+
+    .detail-content {
+        margin-top: 15px;
+
+        .detail-item {
+            display: flex;
+            align-items: center;
+            justify-content: space-between;
+            height: 24px;
+            font-weight: 400;
+            font-size: 14px;
+
+            .right {
+                color: #929292;
+            }
+
+            .blue {
+                color: #1D9BF0 !important;
+            }
+        }
+    }
+
+    .date-content, .price-content {
+        margin-top: 10px;
+        font-weight: 500;
+        font-size: 14px;
+        color: #929292;
+    }
   }
 
   .bottom-bar {
@@ -121,6 +277,72 @@ let propList = ref([
     height: 70px;
     padding: 15px 16px;
     box-sizing: border-box;
+    display: flex;
+    align-items: center;
+    justify-content: center;
+
+    .default {
+        font-weight: 500;
+        font-size: 16px;
+        color: #a8a8a8;
+        text-align: center;
+    }
+
+    .sell {
+        width: 100%;
+        height: 100%;
+
+        .sell-btn {
+            width: 120px;
+            height: 40px;
+            box-sizing: border-box;
+            border: 1px solid #E9E9E9;
+            border-radius: 100px;
+            font-weight: 500;
+            font-size: 16px;
+            color: #1D9BF0;
+            display: flex;
+            align-items: center;
+            justify-content: center;
+            position: absolute;
+            right: 16px;
+            cursor: pointer;
+        }
+    }
+
+    .cancel-sale {
+        width: 100%;
+        height: 100%;
+        display: flex;
+        align-items: center;
+        justify-content: space-between;
+
+        .left {
+            font-weight: 500;
+            font-size: 15px;
+            .final {
+                font-weight: 500;
+                font-size: 12px;
+                color: #929292;
+                margin-top: 6px;
+            }
+        }
+
+        .cancel-btn {
+            width: 120px;
+            height: 40px;
+            box-sizing: border-box;
+            border: 1px solid #E9E9E9;
+            border-radius: 100px;
+            font-weight: 500;
+            font-size: 16px;
+            color: #FF0000;
+            display: flex;
+            align-items: center;
+            justify-content: center;
+            cursor: pointer;
+        }
+    }
   }
 }
 </style>

+ 9 - 1
src/view/popup/tabbar-page/nft/index.vue

@@ -1,7 +1,7 @@
 <template>
   <div class="nft-page-wrapper">
     <div class="content">
-      <div class="item" v-for="(item, index) in listData" :key="index">
+      <div class="item" v-for="(item, index) in listData" :key="index" @click="clickNFT(item)">
         <img :src="item.src" class="img">
         <div class="name">{{item.name}}</div>
       </div>
@@ -11,6 +11,8 @@
 
 <script setup>
 import { ref } from "vue";
+import router from "@/router/popup.js";
+
 let listData = ref([
   {
     src: 'https://img0.baidu.com/it/u=901606327,1176126707&fm=253&fmt=auto&app=138&f=JPEG?w=800&h=500',
@@ -33,6 +35,12 @@ let listData = ref([
     name: 'test Name'
   },
 ])
+
+const clickNFT = (params) => {
+  router.push({
+    path: '/NFTDetail'
+  })
+}
 </script>
 
 

+ 7 - 10
src/view/popup/tabbar-page/wallter/popup.vue

@@ -74,17 +74,14 @@ let walletWithdrawConfig = ref({
 withdraw_info.paypal.wallet_withdraw_config = walletWithdrawConfig
 
 
-let top_up_info = inject('top_up_info')
-
 function selectCurrency(_params) {
-    top_up_info.token = _params.currencyName || ''
-    top_up_info.token_chain = _params.tokenChain 
-    // top_up_info.token_chain = 'BNB Smart Chain (BEP20)'
-    top_up_info.token_symbol = _params.tokenSymbol || ''
-    top_up_info.currency_code = _params.currencyCode
-    top_up_info.icon_token = _params.iconPath || ''
-    top_up_info.icon_net = require('@/assets/svg/icon-BNB.svg')
-    router.push({ path: '/top-up/info'});
+    router.push({ 
+        // path: '/top-up/info'
+        path: 'currencyDetail',
+        query: {
+            params: JSON.stringify(_params)
+        }
+    });
 }
 
 onMounted(() => {