|
@@ -1,58 +1,89 @@
|
|
<template>
|
|
<template>
|
|
- <div class="more-page">
|
|
|
|
- <div class="more-list">
|
|
|
|
- <div
|
|
|
|
- class="cell"
|
|
|
|
- v-for="(item, index) in moreTabList"
|
|
|
|
- :key="index"
|
|
|
|
- @click="moreItemHandle(item)"
|
|
|
|
- >
|
|
|
|
- <img class="icon" :src="item.icon" />
|
|
|
|
- <div class="info-wrapper">
|
|
|
|
- <div class="left">
|
|
|
|
- {{ item.label }}
|
|
|
|
- </div>
|
|
|
|
- <div class="right">
|
|
|
|
- <img
|
|
|
|
- class="icon"
|
|
|
|
- :src="require('@/assets/svg/icon-cell-arrow-right.svg')"
|
|
|
|
- />
|
|
|
|
- </div>
|
|
|
|
|
|
+ <div class="more-page">
|
|
|
|
+ <div class="more-list">
|
|
|
|
+ <template
|
|
|
|
+ :key="index"
|
|
|
|
+ v-for="(item, index) in moreTabList">
|
|
|
|
+ <template v-if="item.icon">
|
|
|
|
+ <div class="cell" @click="moreItemHandle(item)">
|
|
|
|
+ <img class="icon" :src="item.icon" />
|
|
|
|
+ <div class="info-wrapper">
|
|
|
|
+ <div class="left">
|
|
|
|
+ {{ item.label }}
|
|
|
|
+ </div>
|
|
|
|
+ <div class="right">
|
|
|
|
+ <img class="icon" :src="require('@/assets/svg/icon-cell-arrow-right.svg')" />
|
|
|
|
+ </div>
|
|
|
|
+ </div>
|
|
|
|
+ </div>
|
|
|
|
+ </template>
|
|
|
|
+ <template v-else>
|
|
|
|
+ <div class="clear"></div>
|
|
|
|
+ </template>
|
|
|
|
+ </template>
|
|
</div>
|
|
</div>
|
|
- </div>
|
|
|
|
</div>
|
|
</div>
|
|
- </div>
|
|
|
|
</template>
|
|
</template>
|
|
|
|
|
|
<script setup>
|
|
<script setup>
|
|
-import { ref } from "vue";
|
|
|
|
|
|
+import { ref, onMounted } from "vue";
|
|
|
|
+import { websiteUrl } from '@/http/configAPI'
|
|
|
|
+import { getChromeStorage } from '@/uilts/chromeExtension.js'
|
|
|
|
|
|
|
|
+let userStorage = ref({})
|
|
let moreTabList = ref([
|
|
let moreTabList = ref([
|
|
{
|
|
{
|
|
icon: require("@/assets/svg/icon-website.svg"),
|
|
icon: require("@/assets/svg/icon-website.svg"),
|
|
label: "Official Website",
|
|
label: "Official Website",
|
|
href: "https://www.denet.me",
|
|
href: "https://www.denet.me",
|
|
|
|
+ type: 'link'
|
|
},
|
|
},
|
|
{
|
|
{
|
|
icon: require("@/assets/svg/icon-twitter.svg"),
|
|
icon: require("@/assets/svg/icon-twitter.svg"),
|
|
label: "Twitter",
|
|
label: "Twitter",
|
|
href: "https://twitter.com/denet2022",
|
|
href: "https://twitter.com/denet2022",
|
|
|
|
+ type: 'link'
|
|
},
|
|
},
|
|
// {
|
|
// {
|
|
// icon: require("@/assets/svg/icon-discord.svg"),
|
|
// icon: require("@/assets/svg/icon-discord.svg"),
|
|
// label: "Discord",
|
|
// label: "Discord",
|
|
// href: "https://discord.gg/wZSz9p8ddG",
|
|
// href: "https://discord.gg/wZSz9p8ddG",
|
|
|
|
+ // type: 'link'
|
|
// },
|
|
// },
|
|
{
|
|
{
|
|
icon: require("@/assets/svg/icon-telegram.svg"),
|
|
icon: require("@/assets/svg/icon-telegram.svg"),
|
|
label: "Telegram",
|
|
label: "Telegram",
|
|
- href: 'https://t.me/denetpro'
|
|
|
|
|
|
+ href: 'https://t.me/denetpro',
|
|
|
|
+ type: 'link'
|
|
|
|
+ },
|
|
|
|
+ {},
|
|
|
|
+ {
|
|
|
|
+ icon: require("@/assets/svg/icon-create-nfts.svg"),
|
|
|
|
+ label: "Create NFTs",
|
|
|
|
+ type: 'jumpWebsite'
|
|
}
|
|
}
|
|
]);
|
|
]);
|
|
|
|
|
|
const moreItemHandle = (params) => {
|
|
const moreItemHandle = (params) => {
|
|
- window.open(params.href);
|
|
|
|
|
|
+ switch (params.type) {
|
|
|
|
+ case 'link':
|
|
|
|
+ window.open(params.href);
|
|
|
|
+ break;
|
|
|
|
+ case 'jumpWebsite':
|
|
|
|
+ let url = websiteUrl + `?params=${btoa(JSON.stringify(userStorage.value))}`
|
|
|
|
+ window.open(url);
|
|
|
|
+ break;
|
|
|
|
+ }
|
|
};
|
|
};
|
|
|
|
+
|
|
|
|
+const getUserInfo = async () => {
|
|
|
|
+ userStorage.value = await getChromeStorage('userInfo') || {}
|
|
|
|
+}
|
|
|
|
+
|
|
|
|
+onMounted(() => {
|
|
|
|
+ getUserInfo()
|
|
|
|
+})
|
|
|
|
+
|
|
</script>
|
|
</script>
|
|
|
|
|
|
<style scoped lang="scss">
|
|
<style scoped lang="scss">
|
|
@@ -112,4 +143,10 @@ const moreItemHandle = (params) => {
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
|
|
+
|
|
|
|
+.clear {
|
|
|
|
+ overflow: hidden;
|
|
|
|
+ height: 10px;
|
|
|
|
+ background-color: #f6f6f6;
|
|
|
|
+}
|
|
</style>
|
|
</style>
|