Commit 0effb792 by haojie

1

parent 41eaf755
......@@ -60,3 +60,8 @@ export const useUserAddress = () => {
export const useCurrentKLinePrice = () => {
return useState('CurrentKLinePrice', () => 0);
};
// 全局loading
export const useGlbLogin = () => {
return useState('GlbLogin', () => false);
};
......@@ -61,7 +61,7 @@ export const chain_options = [
// BSC
{
label: 'BSC',
value: '/coinnav',
value: '/bsc',
img: '/images/svg/selectChain/bsc.svg',
name: 'BSC',
fullName: 'BSC',
......
export const TOKEN_NAME = "dexnav-token";
export const submitInfoLink = "https://forms.gle/v1xuZF3hJ6ey8SPx9";
import { ref } from 'vue';
import { useI18n } from 'vue-i18n';
import { TableSort } from '@/utils/tool';
export default function () {
const { t } = useI18n();
const otherLink = ref([
{
img: '/images/svg/rightDetail/other/Project-website.svg',
label: t('home.ProjectWebsite'),
title: 'web',
url: '',
weight: 9,
},
{
img: '/images/svg/rightDetail/other/Email-address.svg',
label: t('home.emailAddress'),
title: 'email',
url: '',
weight: 8,
},
{
img: '/images/svg/rightDetail/other/dex-tg.svg',
label: 'Telegram',
title: 'telegram',
url: '',
weight: 7,
},
{
img: '/images/svg/rightDetail/other/dex-twitter.svg',
label: 'Twitter',
title: 'twitter',
url: '',
weight: 6,
},
{
img: '/images/svg/rightDetail/other/dex-discord.svg',
label: 'Discord',
title: 'discord',
url: '',
weight: 5,
},
{
img: '/images/svg/rightDetail/other/dex-Youtube.svg',
label: 'Youtube',
title: 'youtube',
url: '',
weight: 4,
},
{
img: '/images/svg/rightDetail/other/dex-tiktok.svg',
label: 'Tik Tok',
title: 'tiktok',
url: '',
weight: 3,
},
{
img: '/images/svg/rightDetail/other/dex-Facebook.svg',
label: 'Facebook',
title: 'facebook',
url: '',
weight: 2,
},
{
img: '/images/svg/rightDetail/other/dex-Instagram.svg',
label: 'Instagram',
title: 'instagram',
url: '',
weight: 1,
},
{
img: '/images/svg/rightDetail/other/dex-other.svg',
label: t('home.AdditionalInfo'),
title: 'other',
url: '',
},
]);
const popupVisible = ref(false);
// 链接跳转
const openSocialLink = (
ChainObj: any,
token: string,
title: string,
url: string
) => {
if (!url) {
return;
}
// 考虑到不同链的website-Transaction的token拼接位置可能不一致,所以使用title标记,后续要改的话单个改就行
if (title === 'website') {
if (ChainObj.url.website.need_token) {
// 需要拼接token在跳转
window.open(`${url}${token}`);
return;
} else {
// 无需拼接的
window.open(url);
return;
}
} else if (title === 'Transaction') {
// 交易平台
if (ChainObj.url.Transaction.need_token) {
// 需要拼接token在跳转
window.open(`${url}${token}`);
return;
} else {
// 无需拼接的
window.open(url);
return;
}
} else if (title == 'more') {
popupVisible.value = true;
} else {
//其他链接,即twitter,tg,discord,web
window.open(url);
}
};
const sortImg = async (chat: any) => {
Object.keys(chat).forEach((item: any) => {
let index = otherLink.value.findIndex((it: any) => it.title == item);
if (index !== -1) {
otherLink.value[index].url = chat[item];
}
});
// 先取出所有存在链接的object
let list = otherLink.value.filter((item: any) => item.url);
let NotUrlList: any = [];
if (list.length <= 3) {
// 有链接的不够,先将没有链接的筛选出来,并降序排列
NotUrlList = otherLink.value.filter((item: any) => !item.url);
NotUrlList = TableSort(NotUrlList, 'weight');
// 判断需要插入几个数据
let index = 4 - list.length;
// 需要在后面加入的图标
NotUrlList = NotUrlList.slice(0, index);
list = list.concat(NotUrlList);
return list;
} else if (list.length == 4) {
// 正好四个
return list;
} else {
// 超出四个,根据权重排序
list = TableSort(list, 'weight');
return list.splice(0, 4);
}
};
return {
popupVisible,
otherLink,
sortImg,
openSocialLink,
};
}
......@@ -96,6 +96,28 @@ const cn = {
volume: '成交量',
txns: '交易笔数',
JoinUs: '加入我们',
Finish: '完成',
Custom: '自定义',
updatemessageTitle: '更新社交信息',
message1: '确保您的代币具有最新的所有社交信息,以便获得高热度。',
message2:
' 这不是强制性的,您仍然可以仅依靠 CoinGecko、Etherscan (和区块浏览器等)或 CoinMarketCap 更新的信息。',
message3: '但请注意,这些平台可能需要一些时间才能真正反映这些变化。',
message4: '您还可以添加项目的简短描述,解释代币的主要用途和优势。',
message5: `
请注意诈骗者,这是在 Dexfilter 中更新代币信息的唯一方法。
我们的管理员不会先私信,不会私下索要资金,也不会使用不
同的方法。
`,
toSubmit: '前往提交',
Connect: 'Dex连接',
token2: '代币',
info: '社交和其他链接',
ViewContract: '查看合同',
TokenTrading: '代币交易',
ProjectWebsite: '项目网站',
emailAddress: '电子邮箱',
AdditionalInfo: '额外信息',
},
tool: {
swap: '交易',
......@@ -170,6 +192,7 @@ const cn = {
name: '代币名称',
price: '价格',
r24h: '24小时涨跌',
r24hCollect: '24H收藏',
},
Search: {
search: '搜索',
......
......@@ -97,6 +97,29 @@ const cn = {
volume: 'Volume',
txns: 'Txns',
JoinUs: 'Join Us',
Finish: 'Finish',
Custom: 'Custom',
updatemessageTitle: 'Update social info',
message1:
'Make sure your token has all social info up to date so that it gets a high DEXTScore.',
message2:
'This is not mandatory and you can still just rely on the info to be updated at CoinGecko, Etherscan (and block explorers alike) or CoinMarketCap.',
message3:
'Notice however that those platforms might take some time to actually reflect those changes.',
message4:
'Also you can add a brief description of your project, explaining the main uses and advantages of your token.',
message5: `
BE AWARE OF SCAMMERS, this is the only way to update the token's info in Dexfilter.Our admins won't DM first, won't ask for funds in private nor use different methods.
`,
toSubmit: 'Go to Submit',
Connect: 'Dex Conncet',
token2: 'Token',
info: 'Social and other links',
ViewContract: 'View Contract',
TokenTrading: 'Token Trading',
ProjectWebsite: 'Project Website',
emailAddress: 'Email',
AdditionalInfo: 'Additional Info',
},
tokenInfo: {
total: 'Volume',
......@@ -165,6 +188,7 @@ const cn = {
name: 'NAME',
price: 'PRICE',
r24h: '24H',
r24hCollect: '24H收藏',
},
Search: {
search: 'Search',
......
......@@ -31,10 +31,6 @@ export default defineNuxtConfig({
target: loginApi,
changeOrigin: true,
},
'/video': {
target: 'http://192.168.1.19:5000',
changeOrigin: true,
},
},
},
experimental: {
......@@ -76,7 +72,7 @@ export default defineNuxtConfig({
transpile:
process.env.NODE_ENV === 'production'
? ['tdesign-vue-next', 'echarts', 'vue-i18n']
: [],
: ['echarts'],
// cssSourceMap: true,
},
css: [],
......
<svg width="20" height="20" viewBox="0 0 20 20" fill="none" xmlns="http://www.w3.org/2000/svg">
<path d="M4.50245 9.93667C4.34623 9.78046 4.34621 9.52719 4.50243 9.37097L10.9635 2.90965C11.1197 2.75342 11.373 2.75343 11.5292 2.90967L14.4764 5.85744C14.6326 6.01366 14.6326 6.26692 14.4763 6.42311L8.01519 12.8833C7.85898 13.0395 7.60575 13.0395 7.44954 12.8833L4.50245 9.93667ZM0 15.8589C0 15.638 0.179086 15.4589 0.4 15.4589H8.69689H16.991C17.2121 15.4589 17.3912 15.6382 17.391 15.8592L17.3903 16.9916C17.3902 17.2124 17.2111 17.3913 16.9903 17.3913H0.399999C0.179086 17.3913 0 17.2122 0 16.9913V15.8589ZM12.4038 2.04015C12.2475 1.88398 12.2475 1.63072 12.4036 1.47447L13.5944 0.282982C13.7506 0.126705 14.0039 0.12666 14.1602 0.282882L17.1084 3.23067C17.2646 3.38688 17.2646 3.64018 17.1084 3.7964L15.9177 4.98695C15.7615 5.14311 15.5083 5.14313 15.3521 4.987L12.4038 2.04015ZM4.14841 10.6222C3.89642 10.3703 3.46559 10.5487 3.46559 10.9051V13.2654C3.46559 13.4863 3.64468 13.6654 3.86559 13.6654H6.22625C6.58263 13.6654 6.76109 13.2345 6.50907 12.9825L4.14841 10.6222Z" fill="#287EFF"/>
</svg>
\ No newline at end of file
<svg width="20" height="20" viewBox="0 0 20 20" fill="none" xmlns="http://www.w3.org/2000/svg">
<rect x="0.5" y="0.5" width="19" height="19" rx="2.5" fill="white"/>
<path d="M11.1749 10.0005L14.7583 6.42548C14.9152 6.26856 15.0034 6.05573 15.0034 5.83381C15.0034 5.6119 14.9152 5.39907 14.7583 5.24215C14.6014 5.08523 14.3885 4.99707 14.1666 4.99707C13.9447 4.99707 13.7319 5.08523 13.575 5.24215L9.99995 8.82548L6.42495 5.24215C6.26803 5.08523 6.0552 4.99707 5.83328 4.99707C5.61136 4.99707 5.39854 5.08523 5.24162 5.24215C5.0847 5.39907 4.99654 5.6119 4.99654 5.83381C4.99654 6.05573 5.0847 6.26856 5.24162 6.42548L8.82495 10.0005L5.24162 13.5755C5.16351 13.653 5.10151 13.7451 5.05921 13.8467C5.0169 13.9482 4.99512 14.0571 4.99512 14.1671C4.99512 14.2772 5.0169 14.3861 5.05921 14.4876C5.10151 14.5892 5.16351 14.6813 5.24162 14.7588C5.31908 14.8369 5.41125 14.8989 5.5128 14.9412C5.61435 14.9835 5.72327 15.0053 5.83328 15.0053C5.94329 15.0053 6.05221 14.9835 6.15376 14.9412C6.25531 14.8989 6.34748 14.8369 6.42495 14.7588L9.99995 11.1755L13.575 14.7588C13.6524 14.8369 13.7446 14.8989 13.8461 14.9412C13.9477 14.9835 14.0566 15.0053 14.1666 15.0053C14.2766 15.0053 14.3855 14.9835 14.4871 14.9412C14.5886 14.8989 14.6808 14.8369 14.7583 14.7588C14.8364 14.6813 14.8984 14.5892 14.9407 14.4876C14.983 14.3861 15.0048 14.2772 15.0048 14.1671C15.0048 14.0571 14.983 13.9482 14.9407 13.8467C14.8984 13.7451 14.8364 13.653 14.7583 13.5755L11.1749 10.0005Z" fill="#4D4D4D"/>
<rect x="0.5" y="0.5" width="19" height="19" rx="2.5" stroke="#E6E8EC"/>
</svg>
\ No newline at end of file
<svg width="29" height="29" viewBox="0 0 29 29" fill="none" xmlns="http://www.w3.org/2000/svg">
<g clip-path="url(#clip0_1549_6006)">
<path d="M28.9999 14.5C28.9999 6.49205 22.5078 0 14.4999 0C6.49192 0 -0.00012207 6.49205 -0.00012207 14.5C-0.00012207 22.508 6.49192 29 14.4999 29C22.5078 29 28.9999 22.508 28.9999 14.5ZM22.409 11.8636C23.8642 11.8636 25.0453 13.0447 25.0453 14.5C25.0453 15.9553 23.8642 17.1364 22.409 17.1364C20.9524 17.1364 19.7726 15.9566 19.7726 14.5C19.7726 13.0434 20.9524 11.8636 22.409 11.8636ZM6.59079 17.1364C5.1342 17.1364 3.95442 15.9566 3.95442 14.5C3.95442 13.0434 5.1342 11.8636 6.59079 11.8636C8.04606 11.8636 9.22715 13.0447 9.22715 14.5C9.22715 15.9553 8.04606 17.1364 6.59079 17.1364ZM11.8635 14.5C11.8635 13.0434 13.0433 11.8636 14.4999 11.8636C15.9552 11.8636 17.1362 13.0447 17.1362 14.5C17.1362 15.9553 15.9552 17.1364 14.4999 17.1364C13.0433 17.1364 11.8635 15.9566 11.8635 14.5Z" fill="#7B7B7B"/>
</g>
<defs>
<clipPath id="clip0_1549_6006">
<rect width="29" height="29" fill="white"/>
</clipPath>
</defs>
</svg>
\ No newline at end of file
<svg width="22" height="22" viewBox="0 0 22 22" fill="none" xmlns="http://www.w3.org/2000/svg">
<g clip-path="url(#clip0_1718_5145)">
<rect width="22" height="22" fill="white"/>
<path d="M11 0C8.82441 0 6.69767 0.645139 4.88873 1.85383C3.07979 3.06253 1.66989 4.78049 0.83733 6.79048C0.00476609 8.80047 -0.213071 11.0122 0.211367 13.146C0.635804 15.2798 1.68345 17.2398 3.22183 18.7782C4.76021 20.3166 6.72022 21.3642 8.85401 21.7886C10.9878 22.2131 13.1995 21.9952 15.2095 21.1627C17.2195 20.3301 18.9375 18.9202 20.1462 17.1113C21.3549 15.3023 22 13.1756 22 11C22 8.08262 20.8411 5.28473 18.7782 3.22183C16.7153 1.15893 13.9174 0 11 0ZM16.0417 13.2046C16.0405 13.6503 15.8629 14.0775 15.5477 14.3927C15.2325 14.7079 14.8053 14.8855 14.3596 14.8867H7.64042C7.19468 14.8855 6.76754 14.7079 6.45235 14.3927C6.13716 14.0775 5.95955 13.6503 5.95834 13.2046V8.79542C5.95955 8.34967 6.13716 7.92253 6.45235 7.60734C6.76754 7.29215 7.19468 7.11454 7.64042 7.11333H14.3596C14.8053 7.11454 15.2325 7.29215 15.5477 7.60734C15.8629 7.92253 16.0405 8.34967 16.0417 8.79542V13.2046Z" fill="#428DFF"/>
<path d="M14.859 8.12158L11.8294 10.7662C11.5992 10.9661 11.3046 11.0762 10.9998 11.0762C10.6949 11.0762 10.4003 10.9661 10.1702 10.7662L7.14063 8.12158C7.03509 8.19962 6.94911 8.30109 6.88946 8.418C6.82981 8.53492 6.79812 8.66408 6.79688 8.79533V8.942L9.23521 11.0641L6.83813 13.4291C6.87866 13.5713 6.9559 13.7004 7.06209 13.8034C7.16828 13.9064 7.29969 13.9796 7.44313 14.0157L9.82646 11.6645C9.8488 11.6416 9.86736 11.6153 9.88146 11.5866C10.2174 11.7993 10.6068 11.9122 11.0044 11.9122C11.402 11.9122 11.7914 11.7993 12.1273 11.5866C12.1414 11.6153 12.16 11.6416 12.1823 11.6645L14.5656 14.0157C14.7091 13.9796 14.8405 13.9064 14.9467 13.8034C15.0529 13.7004 15.1301 13.5713 15.1706 13.4291L12.7735 11.0641L15.2119 8.942V8.79533C15.2096 8.6633 15.1765 8.53364 15.1152 8.41667C15.0539 8.29969 14.9662 8.19865 14.859 8.12158Z" fill="#428DFF"/>
</g>
<defs>
<clipPath id="clip0_1718_5145">
<rect width="22" height="22" fill="white"/>
</clipPath>
</defs>
</svg>
\ No newline at end of file
<svg width="22" height="22" viewBox="0 0 22 22" fill="none" xmlns="http://www.w3.org/2000/svg">
<circle cx="11" cy="11" r="11" fill="#428DFF"/>
<path d="M14.8576 14.1236H12.283V15.374H12.8529C12.9566 15.3698 13.0554 15.4287 13.1079 15.5273C13.1616 15.6259 13.1616 15.7478 13.1079 15.8464C13.0541 15.945 12.9566 16.0039 12.8529 15.9998H9.43082C9.27334 15.9998 9.14586 15.8601 9.14586 15.6876C9.14586 15.515 9.27334 15.3753 9.43082 15.3753H10.0008V14.125H7.14111C6.51119 14.125 6 13.5649 6 12.8747V7.24895C6 6.55874 6.51119 6 7.14111 6H14.8589C15.4888 6 15.9988 6.55874 16 7.24895V12.8733C15.9988 13.5635 15.4876 14.1236 14.8576 14.1236ZM6.56993 12.2488V12.8747C6.56993 13.2198 6.8249 13.4992 7.13986 13.4992H14.8576C15.1726 13.4992 15.4288 13.2184 15.4288 12.8747V12.2488H6.56993Z" fill="white"/>
</svg>
\ No newline at end of file
<svg width="23" height="22" viewBox="0 0 23 22" fill="none" xmlns="http://www.w3.org/2000/svg">
<path d="M22.1339 11.0669C22.1339 4.95335 17.1805 0 11.0669 0C4.95335 0 0 4.95335 0 11.0669C0 16.5906 4.04702 21.1691 9.33773 22V14.2661H6.52637V11.0669H9.33773V8.62864C9.33773 5.85521 10.9888 4.32325 13.5177 4.32325C14.7288 4.32325 15.9953 4.53923 15.9953 4.53923V7.26134H14.5994C13.225 7.26134 12.7961 8.11456 12.7961 8.98965V11.0669H15.8654L15.3746 14.2661H12.7961V22C18.0869 21.1691 22.1339 16.5906 22.1339 11.0669Z" fill="#425F9B"/>
</svg>
\ No newline at end of file
<svg width="22" height="22" viewBox="0 0 22 22" fill="none" xmlns="http://www.w3.org/2000/svg">
<path d="M11.7971 22H10.2029C4.59132 22 0 17.4087 0 11.7971V10.2029C0 4.59132 4.59132 0 10.2029 0H11.7971C17.4087 0 22 4.59132 22 10.2029V11.7971C22 17.4087 17.4087 22 11.7971 22Z" fill="#DD1829"/>
<path d="M17.0463 7.99265C16.7803 7.05018 16.571 6.52789 15.6894 6.41412C15.6894 6.41412 13.328 6.28613 10.9801 6.28613C8.65877 6.28613 6.35062 6.41412 6.35062 6.41412C5.41573 6.52789 5.19325 7.0786 4.9538 7.99265C4.9538 7.99265 4.71436 9.44819 4.71436 10.9222C4.71436 12.4341 4.9538 13.9655 4.9538 13.9655C5.14005 14.8511 5.52219 15.4303 6.35062 15.5441C6.35062 15.5441 8.91248 15.7147 11.3526 15.7147C13.5713 15.7147 15.6894 15.5441 15.6894 15.5441C16.5179 15.3734 16.8069 14.908 17.0463 13.9655C17.0463 13.9655 17.2858 12.5656 17.2858 11.1213C17.2858 9.58222 17.0463 7.99265 17.0463 7.99265ZM9.74289 13.4962V8.46196L13.3746 10.9791L9.74289 13.4962Z" fill="white"/>
</svg>
\ No newline at end of file
<svg width="22" height="22" viewBox="0 0 22 22" fill="none" xmlns="http://www.w3.org/2000/svg">
<circle cx="11" cy="11" r="11" fill="#5865F2"/>
<path fill-rule="evenodd" clip-rule="evenodd" d="M16.0908 6.45963C15.1414 6.01133 14.1263 5.68552 13.065 5.5C12.9346 5.73783 12.7823 6.05771 12.6774 6.31218C11.5492 6.14095 10.4313 6.14095 9.3239 6.31218C9.21893 6.05771 9.0632 5.73783 8.93169 5.5C7.86924 5.68552 6.85293 6.01253 5.90353 6.46201C3.98859 9.38248 3.46947 12.2304 3.72903 15.0379C4.99912 15.9951 6.23 16.5766 7.4401 16.9572C7.73888 16.5421 8.00535 16.101 8.23491 15.636C7.79771 15.4684 7.37896 15.2615 6.98329 15.0213C7.08826 14.9428 7.19094 14.8607 7.29014 14.7763C9.70342 15.9155 12.3255 15.9155 14.71 14.7763C14.8103 14.8607 14.913 14.9428 15.0168 15.0213C14.62 15.2627 14.2001 15.4696 13.7629 15.6372C13.9924 16.101 14.2578 16.5433 14.5577 16.9583C15.769 16.5778 17.001 15.9963 18.2711 15.0379C18.5756 11.7833 17.7508 8.96153 16.0908 6.45963ZM8.56362 13.3113C7.83918 13.3113 7.24508 12.6288 7.24508 11.7976C7.24508 10.9664 7.82649 10.2827 8.56362 10.2827C9.30077 10.2827 9.89486 10.9652 9.88217 11.7976C9.88332 12.6288 9.30077 13.3113 8.56362 13.3113ZM12.1178 11.7976C12.1178 12.6288 12.7119 13.3113 13.4363 13.3113C14.1735 13.3113 14.7549 12.6288 14.7549 11.7976C14.7676 10.9652 14.1735 10.2827 13.4363 10.2827C12.6992 10.2827 12.1178 10.9664 12.1178 11.7976Z" fill="white"/>
</svg>
\ No newline at end of file
<svg width="23" height="22" viewBox="0 0 23 22" fill="none" xmlns="http://www.w3.org/2000/svg">
<path d="M6.93862 11.3349C6.70124 11.3582 6.4356 11.4078 6.14171 11.4836C5.84781 11.5594 5.57086 11.6848 5.31088 11.8597C5.05089 12.0347 4.83329 12.2679 4.65808 12.5595C4.48288 12.851 4.39527 13.2126 4.39527 13.6441C4.39527 14.0872 4.49418 14.4546 4.692 14.7462C4.88981 15.0377 5.13849 15.2739 5.43804 15.4547C5.73759 15.6354 6.06258 15.7666 6.413 15.8483C6.76341 15.9299 7.09122 15.9766 7.39642 15.9882C7.93901 16.0232 8.5155 16.0524 9.1259 16.0757C9.73631 16.099 10.4541 16.099 11.2793 16.0757C11.8558 16.0524 12.2994 16.0203 12.6103 15.9795C12.9211 15.9387 13.15 15.8891 13.297 15.8308C13.4666 15.7725 13.557 15.7025 13.5683 15.6209L15.8912 15.4459C15.8912 15.8191 15.7754 16.1602 15.5436 16.4693C15.3119 16.7784 14.9954 17.0466 14.5941 17.274C14.1928 17.5014 13.7181 17.6793 13.1698 17.8076C12.6216 17.9359 12.0366 18 11.4149 18C11.0419 18 10.6378 17.9971 10.2026 17.9913C9.76739 17.9854 9.32937 17.9825 8.88852 17.9825H7.61685C7.19861 17.9825 6.83123 17.9767 6.51473 17.965C6.32257 17.965 6.07953 17.9388 5.78564 17.8863C5.49174 17.8338 5.18371 17.7493 4.86155 17.6326C4.53939 17.516 4.21158 17.3586 3.87812 17.1603C3.54466 16.962 3.24511 16.7113 2.97947 16.4081C2.71383 16.1048 2.49058 15.7433 2.30972 15.3235C2.12886 14.9036 2.02713 14.408 2.00452 13.8365C1.98191 13.265 2.04408 12.7577 2.19103 12.3146C2.33798 11.8714 2.53863 11.4807 2.79296 11.1425C3.0473 10.8043 3.34402 10.5185 3.68313 10.2853C4.02225 10.052 4.37266 9.86252 4.73438 9.71674C5.09611 9.57096 5.455 9.46599 5.81107 9.40185C6.16714 9.33771 6.48647 9.30563 6.76906 9.30563H7.88814H8.87157H9.97369H11.4149C12.2514 9.30563 12.9381 9.42809 13.475 9.673C14.012 9.91791 14.433 10.1745 14.7382 10.4427C14.9643 10.1162 15.1508 9.84211 15.2978 9.62052C15.4447 9.39893 15.5747 9.20359 15.6877 9.03448C15.8008 8.86538 15.9025 8.70502 15.9929 8.55341C16.0834 8.40179 16.1851 8.22686 16.2982 8.0286C16.4112 7.80701 16.5157 7.55044 16.6118 7.25887C16.7079 6.96731 16.756 6.667 16.756 6.35795C16.756 6.04889 16.691 5.7515 16.561 5.46577C16.431 5.18004 16.1964 4.93221 15.8573 4.72229C15.5182 4.52403 15.1904 4.41615 14.8739 4.39865C14.5574 4.38116 14.2606 4.42198 13.9837 4.52111C13.7068 4.62024 13.4553 4.76602 13.2292 4.95845C13.0031 5.15088 12.8166 5.35789 12.6696 5.57948C12.5114 5.81273 12.339 6.0693 12.1525 6.3492C11.966 6.6291 11.7879 6.90317 11.6184 7.1714C11.4149 7.47463 11.2171 7.78368 11.0249 8.09857H8.53245C8.89418 7.51545 9.24459 6.96148 9.58371 6.43667C9.73065 6.21508 9.88043 5.98766 10.033 5.75442C10.1856 5.52117 10.3326 5.29666 10.4739 5.08091C10.6152 4.86515 10.7508 4.66398 10.8808 4.47738C11.0108 4.29078 11.1267 4.13333 11.2284 4.00505C11.4319 3.74847 11.7173 3.45108 12.0847 3.11287C12.452 2.77466 12.8901 2.50059 13.3987 2.29066C13.9074 2.08074 14.4811 1.98452 15.1197 2.00202C15.7584 2.01951 16.4451 2.25568 17.1798 2.71051C17.6659 3.01374 18.0418 3.35195 18.3074 3.72515C18.573 4.09835 18.7596 4.48904 18.8669 4.89722C18.9743 5.30541 19.0167 5.71943 18.9941 6.13928C18.9715 6.55913 18.9093 6.95856 18.8076 7.33759C18.7059 7.71663 18.5843 8.06358 18.443 8.37847C18.3017 8.69336 18.1633 8.95576 18.0276 9.16569C17.632 9.79546 17.2307 10.4136 16.8238 11.02C16.4168 11.6265 15.9816 12.2621 15.5182 12.9268C15.326 13.2067 15.0547 13.5041 14.7043 13.819C14.3539 14.1339 13.9357 14.3876 13.4496 14.58C12.9635 14.7724 12.4181 14.8745 11.8134 14.8861C11.2086 14.8978 10.5502 14.7345 9.83804 14.3963C9.67979 14.3263 9.48762 14.2126 9.26155 14.0552C9.03547 13.8977 8.81505 13.6907 8.60028 13.4341C8.3855 13.1776 8.19617 12.8714 8.03226 12.5157C7.86836 12.16 7.76945 11.7489 7.73554 11.2824C7.57728 11.2941 7.43316 11.2999 7.30317 11.2999C7.17317 11.2999 7.05166 11.3116 6.93862 11.3349ZM13.28 12.1746C13.1218 11.9763 12.8788 11.8072 12.5509 11.6673C12.2231 11.5273 11.7653 11.434 11.1775 11.3874C10.9854 11.3757 10.7876 11.3641 10.5841 11.3524L9.97369 11.3174C10.0415 11.5157 10.1432 11.7052 10.2789 11.886C10.4145 12.0667 10.601 12.2271 10.8384 12.367C11.268 12.6119 11.6862 12.714 12.0931 12.6732C12.5001 12.6324 12.8957 12.4662 13.28 12.1746Z" fill="#47444F"/>
</svg>
\ No newline at end of file
<svg width="22" height="22" viewBox="0 0 22 22" fill="none" xmlns="http://www.w3.org/2000/svg">
<circle cx="11" cy="11" r="11" fill="url(#paint0_linear_0_1)"/>
<path d="M16.9891 6.94976C17.0904 6.31689 16.4681 5.81736 15.8862 6.06443L4.29641 10.9852C3.87912 11.1624 3.90965 11.7736 4.34244 11.9069L6.73256 12.643C7.18872 12.7834 7.68268 12.7108 8.08101 12.4447L13.4697 8.8445C13.6322 8.73593 13.8093 8.95936 13.6704 9.09778L9.79159 12.9651C9.41532 13.3402 9.49001 13.9759 9.9426 14.2504L14.2854 16.8839C14.7725 17.1793 15.3991 16.8826 15.4902 16.3134L16.9891 6.94976Z" fill="white"/>
<defs>
<linearGradient id="paint0_linear_0_1" x1="11" y1="0" x2="11" y2="22" gradientUnits="userSpaceOnUse">
<stop stop-color="#37BBFE"/>
<stop offset="1" stop-color="#007DBB"/>
</linearGradient>
</defs>
</svg>
\ No newline at end of file
<svg width="22" height="22" viewBox="0 0 22 22" fill="none" xmlns="http://www.w3.org/2000/svg">
<path d="M0 11C0 13.9174 1.15893 16.7153 3.22183 18.7782C5.28473 20.8411 8.08262 22 11 22C13.9174 22 16.7153 20.8411 18.7782 18.7782C20.8411 16.7153 22 13.9174 22 11C22 8.08262 20.8411 5.28473 18.7782 3.22183C16.7153 1.15893 13.9174 0 11 0C8.08262 0 5.28473 1.15893 3.22183 3.22183C1.15893 5.28473 0 8.08262 0 11Z" fill="black"/>
<path d="M9.41599 9.30897V8.77604C9.23106 8.74978 9.04446 8.73626 8.8577 8.73535C6.57309 8.73535 4.71436 10.5944 4.71436 12.879C4.71436 14.2804 5.41476 15.521 6.4832 16.2712C5.76777 15.5062 5.36997 14.4977 5.37057 13.4502C5.37057 11.1981 7.17647 9.36151 9.41599 9.30897Z" fill="#00F2EA"/>
<path d="M9.51394 15.3428C10.5333 15.3428 11.3648 14.5319 11.4027 13.5213L11.4062 4.4999H13.0544C13.0191 4.31148 13.0014 4.12032 13.0012 3.92871H10.7502L10.7464 12.9504C10.7089 13.9607 9.87697 14.7714 8.85787 14.7714C8.55193 14.7715 8.25055 14.697 7.97998 14.5541C8.33451 15.0487 8.9054 15.3422 9.51394 15.3428ZM16.1329 7.56221V7.06086C15.5273 7.06146 14.9345 6.88519 14.4275 6.55389C14.8721 7.06572 15.4705 7.41948 16.1332 7.56221" fill="#00F2EA"/>
<path d="M14.4275 6.55307C13.9307 5.98461 13.657 5.25506 13.6573 4.5H13.0542C13.212 5.34328 13.7083 6.08528 14.4275 6.55307ZM8.85786 10.9866C7.81326 10.9878 6.96679 11.8343 6.96558 12.8789C6.96618 13.5821 7.3567 14.2271 7.97966 14.5539C7.7469 14.2329 7.62164 13.8468 7.62164 13.4504C7.62271 12.4057 8.46917 11.559 9.51393 11.5578C9.70888 11.5578 9.89579 11.59 10.0722 11.6454V9.34724C9.88728 9.32097 9.70068 9.30746 9.51393 9.30655C9.48113 9.30655 9.44879 9.30837 9.4163 9.30898V11.0742C9.23562 11.0168 9.04735 10.9872 8.85786 10.9866Z" fill="#FF004F"/>
<path d="M16.1325 7.56198V9.31154C14.9651 9.31154 13.8839 8.93819 13.0007 8.30444V12.8791C13.0007 15.1638 11.1423 17.0225 8.85766 17.0225C7.97475 17.0225 7.15607 16.7439 6.48315 16.2714C7.26524 17.1148 8.36344 17.594 9.51357 17.5937C11.7982 17.5937 13.6569 15.735 13.6569 13.4506V8.87593C14.5693 9.532 15.6651 9.8844 16.7888 9.88304V7.63137C16.5634 7.63137 16.3444 7.60692 16.1324 7.56152" fill="#FF004F"/>
<path d="M13.0008 12.8789V8.30415C13.9131 8.96037 15.0089 9.31262 16.1326 9.31126V7.56185C15.47 7.41897 14.8717 7.06505 14.4272 6.55307C13.708 6.08528 13.2117 5.34328 13.0539 4.5H11.4059L11.4024 13.5214C11.3646 14.5317 10.5331 15.3426 9.51365 15.3426C8.90526 15.342 8.33422 15.0484 7.97984 14.554C7.35687 14.2274 6.96621 13.5824 6.96545 12.879C6.96667 11.8344 7.81313 10.9879 8.85774 10.9867C9.05238 10.9867 9.23929 11.0186 9.41602 11.0743V9.30913C7.1765 9.36167 5.37061 11.1982 5.37061 13.4504C5.37061 14.5394 5.79376 15.5309 6.48323 16.2714C7.17832 16.7608 8.00778 17.023 8.85774 17.0222C11.1425 17.0222 13.0008 15.1635 13.0008 12.8789Z" fill="white"/>
</svg>
\ No newline at end of file
<svg width="22" height="22" viewBox="0 0 22 22" fill="none" xmlns="http://www.w3.org/2000/svg">
<circle cx="11" cy="11" r="11" fill="#1D9BF0"/>
<path d="M16.8319 8.00862C16.8408 8.1379 16.8408 8.26719 16.8408 8.39767C16.8408 12.3734 13.8139 16.9587 8.27917 16.9587V16.9563C6.64417 16.9587 5.04314 16.4904 3.66675 15.6074C3.90449 15.636 4.14342 15.6503 4.38295 15.6509C5.7379 15.6521 7.05411 15.1975 8.12008 14.3604C6.83246 14.336 5.70334 13.4965 5.30889 12.2709C5.75994 12.3579 6.2247 12.3401 6.66741 12.2191C5.26361 11.9355 4.25365 10.7022 4.25365 9.26991C4.25365 9.25681 4.25365 9.2443 4.25365 9.23178C4.67193 9.46474 5.14027 9.59403 5.61932 9.60833C4.29715 8.72476 3.88959 6.96597 4.68802 5.59088C6.21576 7.47061 8.46984 8.61335 10.8896 8.73429C10.647 7.68927 10.9783 6.5942 11.7601 5.85958C12.972 4.72042 14.8781 4.77881 16.0174 5.99006C16.6913 5.8572 17.3372 5.60994 17.9282 5.25961C17.7036 5.9561 17.2335 6.54772 16.6055 6.92367C17.2019 6.85337 17.7846 6.69369 18.3334 6.45001C17.9294 7.05534 17.4206 7.58262 16.8319 8.00862Z" fill="white"/>
</svg>
\ No newline at end of file
<svg width="20" height="20" viewBox="0 0 20 20" fill="none" xmlns="http://www.w3.org/2000/svg">
<path d="M16.4166 7.1502H14.9001C14.7012 7.1502 14.5104 7.22921 14.3698 7.36987C14.2291 7.51052 14.1501 7.70128 14.1501 7.9002C14.1501 8.09911 14.2291 8.28987 14.3698 8.43053C14.5104 8.57118 14.7012 8.6502 14.9001 8.6502H16.4166C16.714 8.6502 16.9501 8.8753 16.9501 9.1448V16.4559C16.9501 16.7251 16.714 16.9502 16.4166 16.9502H3.58355C3.28621 16.9502 3.0501 16.7251 3.0501 16.4556V9.1448C3.0501 8.8753 3.28621 8.6502 3.58355 8.6502H5.1001C5.29901 8.6502 5.48978 8.57118 5.63043 8.43053C5.77108 8.28987 5.8501 8.09911 5.8501 7.9002C5.8501 7.70128 5.77108 7.51052 5.63043 7.36987C5.48978 7.22921 5.29901 7.1502 5.1001 7.1502H3.58355C2.46312 7.1502 1.5501 8.04385 1.5501 9.1448V16.4559C1.5501 17.5565 2.46313 18.4502 3.58355 18.4502H16.417C17.5371 18.4502 18.4501 17.5565 18.4501 16.4556V9.1448C18.4501 8.04385 17.5371 7.1502 16.4166 7.1502Z" fill="#287EFF" stroke="#287EFF" stroke-width="0.1"/>
<path d="M6.3999 6.04483H9.1299V14.4843C9.1299 14.7142 9.22178 14.9345 9.38503 15.0968C9.54825 15.2591 9.76945 15.3501 9.9999 15.3501C10.2304 15.3501 10.4516 15.2591 10.6148 15.0968C10.778 14.9345 10.8699 14.7142 10.8699 14.4843V6.04483H13.5999H13.9203L13.7151 5.79877L10.1338 1.50403L10.0192 1.3666L9.90391 1.50344L6.28519 5.79818L6.07736 6.04483H6.3999Z" fill="#287EFF" stroke="#287EFF" stroke-width="0.3"/>
</svg>
\ No newline at end of file
/** 公共前缀 */
@prefix: tdesign-starter;
@border-radius: 10px;
@box-shadow:inset 0px 0px 2px rgba(0, 0, 0, 0.25);
/* 6/15开始修改样式 */
@main-theme-color: var(--main-theme-color);
// 搜索框边框色
......
......@@ -425,3 +425,20 @@ export const filterRepeatTimestamp = (list: any, newList: any) => {
}
return NewData;
};
// 表格排序--降序
export const TableSort = (list: any, field: string) => {
let minIndex, temp;
for (let i = 0; i < list.length - 1; i++) {
minIndex = i;
for (let j = i + 1; j < list.length; j++) {
if (list[j][field] > list[minIndex][field]) {
minIndex = j;
}
}
temp = list[i];
list[i] = list[minIndex];
list[minIndex] = temp;
}
return list;
};
......@@ -89,6 +89,5 @@ const props = defineProps({
height: calc(100vh - 120px);
width: 100%;
overflow-y: scroll;
padding: 0 4px 0 12px;
}
</style>
......@@ -76,7 +76,7 @@ onMounted(() => {
const getPublicToken = async () => {
try {
const result: any = await request.post(
`/v1/${chain.value}/mainstream/scroll`,
`/v1${chain.value}/mainstream/scroll`,
{}
);
let list: any = [];
......
......@@ -2,36 +2,51 @@ import { defineComponent, computed } from 'vue';
import { useI18n } from 'vue-i18n';
import './index.less';
export default defineComponent({
setup() {
emits: ['filterChange'],
setup(props, { emit }) {
const { t } = useI18n();
const currentBtn = ref('default');
// 筛选条件
const GlbFilter = useCurFilter();
const btns = computed(() => {
return [
{
label: t('filter.pairs'),
value: 'default',
type: 1,
},
{
label: t('filter.updated'),
value: 'new',
type: 1,
},
{
label: t('filter.gainers'),
value: 'max-up',
type: 2,
},
{
label: t('filter.losers'),
value: 'max-down',
type: 2,
},
{
label: t('filter.r24hVolume'),
value: 'max-tx',
value: 'txn',
type: 2,
},
];
});
const btnChange = (value: string) => {
currentBtn.value = value;
const btnChange = (item: any) => {
currentBtn.value = item.value;
// 更新筛选条件
if (currentBtn.value == 'new') {
GlbFilter.value.nt = 1;
} else if (currentBtn.value == 'default') {
GlbFilter.value.nt = 0;
}
// 请求接口
emit('filterChange', item.type, item.value);
};
return () => (
<div class="custom-table-filter-btns">
......@@ -41,7 +56,7 @@ export default defineComponent({
'table-filter-btn',
currentBtn.value == item.value ? 'active' : '',
]}
onClick={btnChange.bind(this, item.value)}
onClick={btnChange.bind(this, item)}
>
{item.label}
</t-button>
......
......@@ -17,7 +17,7 @@
<template v-if="item.value === 'details'">
<Detailsicon class="details-icon-cl"></Detailsicon>
</template>
<template v-else-if="item.value === 'favo'">
<template v-else-if="item.value === 'echart'">
<Favo class="right-detail-analysis-icon"></Favo>
</template>
<template v-else>
......@@ -29,7 +29,7 @@
</t-button>
</template>
</div>
<div v-show="isDetails" class="details-title-box">
<div v-show="defaBtn == 'details'" class="details-title-box">
<RightDetailHeader
:tokenInfo="tokenInfo"
:numR24h="numR24h"
......@@ -45,6 +45,7 @@
:currentPath="currentPath"
:chat="tokenInfo.chat"
></token-social-list>
<SubmitSocialInfo></SubmitSocialInfo>
<t-tabs
class="info-tabs"
v-model="currentTab"
......@@ -87,8 +88,14 @@
</div>
</div>
</div>
<!-- 收藏 -->
<template v-if="CollectionOnload">
<div v-show="defaBtn == 'collection'">
<Collection></Collection>
</div>
</template>
<template v-if="ifDetails">
<div v-show="!isDetails" class="all-echarts">
<div v-show="details == 'echart'" class="all-echarts">
<details-echarts
:token="props.token"
:tb="tb"
......@@ -108,7 +115,6 @@ import SecurityCheck from './SecurityCheck.vue';
import TokenInfo from './TokenInfo.vue';
import TokenPool from './TokenPool.vue';
import TokenSocialList from './TokenSocialList.vue';
import CollectionTable from './collectionTable.vue';
import * as Cache from '@/utils/cache';
import { MessagePlugin } from 'tdesign-vue-next';
import DetailsEcharts from '../analysis/detailsEcharts.vue';
......@@ -117,6 +123,8 @@ import Favo from '/public/images/svg/rightDetail/favo.svg';
import CollectionSvg from '/public/images/svg/rightDetail/colection.svg';
import { useI18n } from 'vue-i18n';
import RightDetailHeader from './rightDetailHeader';
import SubmitSocialInfo from './SubmitSocialInfo';
import Collection from './collection';
const router = useRouter();
const { t, locale } = useI18n();
// 通知表格收藏图表取消收藏
......@@ -134,7 +142,7 @@ const headerBtns = computed(() => [
},
{
label: t('securityCheck.analysis'),
value: 'favo',
value: 'echart',
},
]);
const props = defineProps({
......@@ -148,13 +156,14 @@ const props = defineProps({
const emit = defineEmits(['update:setPool', 'SettwitterRul']);
const r24h = ref('');
const numR24h = ref('');
// 收藏列表是否首次加载
const CollectionOnload = ref(false);
// 判断当前路由,隐藏右侧详情box中的折线图模块
const currentRouter = router.currentRoute.value.name;
const currentTab = ref('info');
const isInCollection = ref(false);
// 默认选择detail按钮
const defaBtn = ref('details');
const isDetails = ref(true);
const ifDetails = ref(false);
const WatchEcharts = useWatchEcharts();
// 传给详情折线图的tbname
......@@ -186,7 +195,7 @@ watch(
}
);
const btnLoad = (value: string) => {
if (currentRouter == 'tokenAnalysis' && value == 'favo') {
if (currentRouter == 'tokenAnalysis' && value == 'echart') {
return false;
}
return true;
......@@ -209,7 +218,7 @@ const changeTab = (value) => {
const getTokenInfo = async () => {
try {
const result: any = await request.get(`/v1/${chain.value}/getRightInfo`, {
const result: any = await request.get(`/v1${chain.value}/getRightInfo`, {
params: {
tag: props.tb,
mainstream: props.mt,
......@@ -250,7 +259,7 @@ const getTokenInfo = async () => {
watch(
() => locale.value,
(v) => {
if (isDetails.value) {
if (defaBtn.value == 'echart') {
ifDetails.value = false;
} else {
WatchEcharts.value += 1;
......@@ -260,19 +269,19 @@ watch(
// 点击查看token详情信息
// v-if v-show同时使用,折线图第一次加载后,不在使用v-if,减少请求
const gotoDetail = (value) => {
if (value == 'collection' && !CollectionOnload.value) {
CollectionOnload.value = true;
}
// 先判断是否有token,没有则禁止打开折线图模块
if (!props.tb && value === 'favo') {
if (!props.tb && value === 'echart') {
MessagePlugin.closeAll();
MessagePlugin.warning(t('MessagePlugin.plToken'));
return;
}
defaBtn.value = value;
if (defaBtn.value === 'favo') {
if (defaBtn.value === 'echart') {
tb.value = props.tb;
isDetails.value = false;
ifDetails.value = true;
} else {
isDetails.value = true;
}
};
// 监听按钮点击事件,切换样式
......@@ -291,7 +300,7 @@ watch(
(v) => {
if (v) {
//如果折线图为隐藏状态,需注销折线图模块
if (isDetails.value) {
if (defaBtn.value != 'echart') {
ifDetails.value = false;
}
tb.value = props.tb;
......@@ -423,9 +432,5 @@ watch(
}
}
}
.all-echarts {
width: 338px;
}
}
</style>
.custom-submit-social-box {
height: 38px;
border: var(--new-border-2);
border-top: none;
box-sizing: border-box;
background-color: var(--td-bg-color-container);
font-size: 14px;
color: var(--new-color-3);
display: flex;
align-items: center;
justify-content: center;
cursor: pointer;
.span1 {
padding-left: 4px;
}
}
.custom-set-message-popup-box {
background: var(--custom-body-back-color);
border-radius: 10px;
box-sizing: border-box;
color: var(--td-Search-info-color-1);
.message-popup-title {
font-size: 18px;
}
.message-popup-body {
color: var(--td-Search-info-color-1);
margin-top: 10px;
p {
padding-top: 16px;
margin: 0;
}
}
.message-popup-footer {
text-align: right;
.clear-btn {
background: #9a9a9a;
margin-right: 12px;
}
.submit-btn {
background: #287eff;
}
.t-button {
height: 32px;
color: white;
border-radius: 5px;
border: none;
}
}
}
import { defineComponent, ref } from 'vue';
import { useI18n } from 'vue-i18n';
import './index.less';
import SubmitSvg from '/public/images/svg/rightDetail/submit.svg';
import ConnectCloseSvg from '/public/images/svg/rightDetail/connectClose.svg';
import { submitInfoLink } from '@/constants/global';
export default defineComponent({
setup() {
const visible = ref(false);
const { t } = useI18n();
const OpenDialog = () => {
visible.value = true;
};
const closeDialog = () => {
visible.value = false;
};
const submit = () => {
//
window.open(submitInfoLink);
};
const closeBtn = () => {
return <ConnectCloseSvg></ConnectCloseSvg>;
};
return () => (
<div>
<div class="custom-submit-social-box" onClick={OpenDialog}>
<SubmitSvg></SubmitSvg>
<span class="span1">更新社区信息</span>
</div>
<t-dialog
footer={false}
v-model:visible={visible.value}
placement="center"
attach="body"
closeBtn={closeBtn}
>
<div class="custom-set-message-popup-box">
<div class="message-popup-title">
{t('home.updatemessageTitle')}
</div>
<div class="message-popup-body">
<p>{t('home.message1')}</p>
<p>{t('home.message2')}</p>
<p>{t('home.message3')}</p>
<p>{t('home.message4')}</p>
<p>{t('home.message5')}</p>
</div>
<div class="message-popup-footer">
<t-button class="clear-btn" onClick={closeDialog}>
{t('user.Cancel')}
</t-button>
<t-button class="submit-btn" onClick={submit}>
{t('home.toSubmit')}
</t-button>
</div>
</div>
</t-dialog>
</div>
);
},
});
<template>
<div class="filter-block-wrapper">
<div class="custom-form">
<div class="custom-form-cl">
<div class="select-box-chain">
<ChoseChain></ChoseChain>
<ClientOnly>
......@@ -95,7 +96,10 @@
</div>
<div class="custom-form-item">
<div class="title">
<t-tooltip :content="$t('tips.PirceRangeValue')" placement="left-top">
<t-tooltip
:content="$t('tips.PirceRangeValue')"
placement="left-top"
>
<QuestionSvg></QuestionSvg>
</t-tooltip>
{{ $t('home.pirceRange') }}:
......@@ -138,7 +142,10 @@
</div>
<div class="custom-form-item">
<div class="title">
<t-tooltip :content="$t('tips.NewHolderValue')" placement="left-top">
<t-tooltip
:content="$t('tips.NewHolderValue')"
placement="left-top"
>
<QuestionSvg></QuestionSvg>
</t-tooltip>
{{ $t('home.newHolder') }}:
......@@ -167,7 +174,10 @@
{{ $t('home.volume') }}:
</div>
<div class="value">
<t-radio-group v-model="formData.volume" class="custom-group-type-1">
<t-radio-group
v-model="formData.volume"
class="custom-group-type-1"
>
<t-radio-button
v-for="item in VOLUME_OPTIONS"
:value="item.value"
......@@ -200,6 +210,7 @@
</div>
</div>
</div>
</div>
<FilterTips></FilterTips>
</div>
</template>
......@@ -427,7 +438,12 @@ watch(formData, (v) => {
.custom-form {
padding-right: 12px;
background: var(--main-theme-color-2);
.custom-form-cl {
box-shadow: @box-shadow;
padding: 1px;
border-radius: @border-radius;
.select-box-chain {
padding-left: 12px;
height: 53px;
background: var(--td--right-back-color-2);
border-radius: @border-radius @border-radius 0 0;
......@@ -453,45 +469,6 @@ watch(formData, (v) => {
-ms-transform-origin: 0 0;
-moz-transform-origin: 0 0;
}
.t-select__wrap {
width: 15.3%;
.t-input {
height: 40px !important;
.t-input__inner {
margin-left: 6px;
font-weight: 1000;
}
}
}
.t-select {
margin-left: 12px;
width: 110px;
}
.custom-group2 {
.t-radio-button {
border: none;
margin: 0 4px;
width: 90px;
.dj();
font-size: var(--font-size-base);
font-weight: bold;
.t-radio-button__former {
width: 0 !important;
}
&.t-is-checked {
background-color: var(--td--main-btn-color-1);
color: #fff;
border-radius: 16px;
}
}
:nth-child(1) {
width: 63px !important;
height: 24px;
}
label:nth-child(2) {
margin-left: 72px;
}
}
.Advanced-Features {
position: absolute;
right: 12px;
......@@ -628,5 +605,6 @@ watch(formData, (v) => {
}
}
}
}
}
</style>
<template>
<div class="token-list-wrapper-fa">
<FilterBtns></FilterBtns>
<FilterBtns @filterChange="filterChange"></FilterBtns>
<div class="token-list-wrapper">
<t-table
row-key="index"
......@@ -76,9 +76,10 @@ const route = useRoute();
// 当前链
const chain = useChain();
const loading = ref(false);
// 当前请求哪个接口
const currentRequestType = ref(1);
// 筛选条件
const GlbFilter = useCurFilter();
//
const HeadTokenType = useTableHeadToken();
const ChainObj = ref();
if (route.params.chain) {
......@@ -93,7 +94,7 @@ if (route.params.chain) {
}
useHead({
title: `Dexfilter | ${ChainObj.value.name ?? 'ETH'}`,
title: `Dexfilter | ${ChainObj.value.name}`,
link: [webLogo],
meta: [
{
......@@ -116,42 +117,89 @@ const PreRenderList = UsePreRenderList();
const resultData = reactive(PreRenderList.value);
// 右侧数据
const RightInfo = useCurrentRightInfo();
const isFirst = ref(true);
// 新接口当前参数
const NewParams = ref({});
// 通知表格变化
const getTableList = () => {
const getTableList = async () => {
try {
loading.value = true;
request
.get(`/v1/${chain.value}/index`, {
let result: any = await request.get(`/v1${chain.value}/index`, {
params: GlbFilter.value,
})
.then((result: any) => {
});
if (result.list.length) {
TableFilter(result);
loading.value = false;
if (process.client) {
closeInterVal();
// 开启定时器
Intervalfun();
}
if (isFirst.value) {
// 通知右侧请求接口
RightInfo.value.token = result.list[0].token;
RightInfo.value.tb = result.list[0].tbname;
RightInfo.value.r24h = result.list[0].r24h;
isFirst.value = false;
}
}
} catch (e) {
loading.value = false;
} finally {
loading.value = false;
}
};
const getNewTableList = async () => {
try {
loading.value = true;
let params = JSON.parse(JSON.stringify(GlbFilter.value));
if ('nt' in params) {
delete params.nt;
}
let res: any = await request.get(`/v1${chain.value}/phone/index`, {
params: {
...params,
page: pageNum.value,
...NewParams.value,
},
});
loading.value = false;
TableFilter(res);
} catch (e) {
console.log(e);
loading.value = false;
} finally {
loading.value = false;
if (process.client) {
closeInterVal();
}
};
const filterChange = (value: number, txn: string) => {
pageNum.value = 1;
currentRequestType.value = value;
if (value == 1) {
// 旧接口
getTableList();
} else {
NewParams.value = JSON.parse(JSON.stringify({}));
if (txn == 'txn') {
NewParams.value.date_orderby = txn;
NewParams.value.sort = 'desc';
} else if (txn == 'max-up') {
// 最大涨幅
NewParams.value.date_orderby = 'radio';
NewParams.value.sort = 'desc';
} else if (txn == 'max-down') {
// 最大跌幅
NewParams.value.date_orderby = 'radio';
NewParams.value.sort = 'asc';
}
getNewTableList();
}
};
const ChangeTable = useChangeTable();
watch(
() => ChangeTable.value,
(v) => {
if (currentRequestType.value == 1) {
getTableList();
} else {
getNewTableList();
}
}
);
// 表格数据过滤方法
......@@ -215,6 +263,7 @@ watch(
// 修改title
ChainObj.value = filterChainObj('value', chain.value);
// 请求数据
currentRequestType.value = 1;
getTableList();
}
);
......@@ -259,7 +308,11 @@ const closeInterVal = () => {
// 有数据,开启定时器
const Intervalfun = () => {
listInterval = setInterval(() => {
if (currentRequestType.value == 1) {
getTableList();
} else {
getNewTableList();
}
}, 10000);
};
// 窗口关闭和打开要执行的方法
......@@ -275,6 +328,8 @@ const windowOpenFn = (e: any) => {
closeInterVal();
}
};
// 全局loading
const glbloading = useGlbLogin();
// 表头吸顶
const TableScroll = ref(null);
onMounted(() => {
......@@ -296,6 +351,7 @@ onMounted(() => {
zIndex: 10,
container: '#layout-scroll',
};
glbloading.value = false;
});
onUnmounted(() => {
......@@ -456,7 +512,10 @@ const columns = computed(() => {
margin-top: 8px;
background: var(--td--right-back-color-2);
border-radius: @border-radius;
box-shadow: @box-shadow;
.token-list-wrapper {
box-sizing: border-box;
padding: 1px;
#table-height-auto {
.t-table__content {
background: var(--main-theme-color-2);
......@@ -538,7 +597,7 @@ const columns = computed(() => {
}
.t-table__double-icons {
.t-table-sort-asc {
padding-top: 8px;
padding-top: 6px;
svg {
fill: #7b7d87;
opacity: 1;
......
......@@ -5,11 +5,13 @@
-->
<template>
<div class="social-info-wrapper">
<template v-for="item in all_href_and_icon.list" :key="item">
<template v-for="(item, index) in all_href_and_icon.list" :key="item">
<a
class="social-item"
target="_blank"
:class="{ active: item.url == '' }"
:class="{
active: item.url == '' && index != all_href_and_icon.list.length,
}"
@click="gohref(item.title, item.url)"
>
<img
......@@ -20,11 +22,16 @@
/>
</a>
</template>
<ClientOnly>
<MoreUrlPopup :chat="chat" :token="token"></MoreUrlPopup>
</ClientOnly>
</div>
</template>
<script setup lang="ts">
import { sortImg } from '@/utils/tool';
import { filterChainObj } from '@/constants/UnifiedManagementChain';
import MoreUrlPopup from './moreUrlPopup';
import useSocial from '@/hooks/useSocial';
const { sortImg, openSocialLink } = useSocial();
const props = defineProps({
token: String,
currentPath: String,
......@@ -58,6 +65,12 @@ const all_href_and_icon = reactive({
alt: 'Trading platform',
},
{
img: '/images/svg/rightDetail/other/Project-website.svg',
url: '',
title: 'web',
alt: 'web',
},
{
img: '/images/svg/rightDetail/tg.svg',
url: '',
title: 'teleg',
......@@ -75,40 +88,11 @@ const all_href_and_icon = reactive({
title: 'discord',
alt: 'discord',
},
{
img: '/images/svg/rightDetail/google.svg',
url: '',
title: 'web',
alt: 'web',
},
],
});
const gohref = (title: string, url: string) => {
// 考虑到不同链的website-Transaction的token拼接位置可能不一致,所以使用title标记,后续要改的话单个改就行
if (title === 'website') {
if (ChainObj.value.url.website.need_token) {
// 需要拼接token在跳转
window.open(`${url}${props.token}`);
return;
} else {
// 无需拼接的
window.open(url);
return;
}
} else if (title === 'Transaction') {
// 交易平台
if (ChainObj.value.url.Transaction.need_token) {
// 需要拼接token在跳转
window.open(`${url}${props.token}`);
return;
} else {
// 无需拼接的
window.open(url);
return;
}
} else {
//其他链接,即twitter,tg,discord,web
window.open(url);
if (title && url && props.token) {
openSocialLink(ChainObj.value, props.token, title, url);
}
};
......@@ -117,28 +101,23 @@ watch(
() => props.chat,
(v) => {
if (Object.keys(v).length > 0) {
// 拿到链接
Object.keys(v).forEach((item: any) => {
let index = all_href_and_icon.list.findIndex(
(item) => item.title === 'twitter'
);
all_href_and_icon.list[index]['url'] = v.twitter;
index = all_href_and_icon.list.findIndex(
(item) => item.title === 'discord'
(it: any) => it.title == item
);
all_href_and_icon.list[index]['url'] = v.discord;
index = all_href_and_icon.list.findIndex((item) => item.title === 'web');
all_href_and_icon.list[index]['url'] = v.web;
index = all_href_and_icon.list.findIndex(
(item) => item.title === 'teleg'
);
all_href_and_icon.list[index]['url'] = v.telegram;
if (index !== -1) {
all_href_and_icon.list[index].url = v[item];
}
});
sortAllHref(v);
}
// sortAllHref();
}
);
// 做个排序,有链接的放前面
const sortAllHref = async () => {
all_href_and_icon.list = await sortImg(toRaw(all_href_and_icon.list));
const sortAllHref = async (chat: any) => {
let list = await sortImg(chat);
all_href_and_icon.list.splice(2, all_href_and_icon.list.length - 2);
all_href_and_icon.list.splice(2, 0, ...list);
};
// home链改变时,修改对应的图标和链接
......
......@@ -94,7 +94,8 @@
font-weight: 700;
color: var(--home-page-color-1);
cursor: pointer;
font-size: 13px;
font-size: 12px;
white-space: nowrap;
}
}
}
import { defineComponent, ref } from 'vue';
import { defineComponent, ref, reactive } from 'vue';
import {
chain_options,
filterChainObj,
......@@ -17,22 +17,29 @@ export default defineComponent({
const ChainObj = ref<any>({});
const chain = useChain();
const chainName = ref('');
// 筛选后的列表
const filterList = reactive({
list: chain_options,
});
// 弹窗是否打开
const DialogVisible = ref<boolean>(false);
let Scopedchain = '';
if (typeof route.params.chain == 'string') {
Scopedchain = route.params.chain;
}
if (route.params.chain) {
if (Scopedchain) {
let Obj = filterChainObj('name', Scopedchain, true);
if (Obj) {
ChainObj.value = Obj;
chainName.value = ChainObj.value.name;
ChainImgIndex.value = Obj.index;
ChainImgIndex.value = ChainObj.value.index;
chain.value = Obj.value;
}
} else {
ChainObj.value = filterChainObj('value', chain.value, true);
chainName.value = ChainObj.value.name;
ChainImgIndex.value = ChainObj.value.index;
chain.value = ChainObj.value.value;
}
const ChangeDialog = () => {
// DialogVisible.value = !DialogVisible.value;
......@@ -58,6 +65,32 @@ export default defineComponent({
});
ClosePopup();
};
// 输入框内容改变
const InputChange = (value: string) => {
if (value) {
// 循环链列表,判断是否包含搜索的字符
let list = [];
for (let i in chain_options) {
// 将fullName全部
// 大写
let upperValue = value.toUpperCase();
// 小写
let lowerValue = value.toLowerCase();
let fullName = chain_options[i].fullName;
let index = fullName.indexOf(upperValue);
let index2 = fullName.indexOf(lowerValue);
if (index !== -1) {
list.push(chain_options[i]);
}
if (index2 !== -1) {
list.push(chain_options[i]);
}
}
filterList.list = JSON.parse(JSON.stringify(list));
} else {
filterList.list = JSON.parse(JSON.stringify(chain_options));
}
};
// 弹窗内容
const popupContent = () => {
return (
......@@ -66,10 +99,11 @@ export default defineComponent({
<t-input
placeholder={t('Search.search')}
prefixIcon={() => <ChainSearch></ChainSearch>}
onChange={InputChange}
></t-input>
</div>
<div class="chain-box-body narrow-scrollbar">
{chain_options.map((item: any) => (
{filterList.list.map((item: any) => (
<div
class="chain-box"
onClick={selectChange.bind(this, item.value)}
......
@import '@/style/variables.less';
.custom-home-collection-box {
background-color: var(--td-bg-color-container);
border: var(--new-border-2);
border-radius: 0 0 @border-radius @border-radius;
.custom-collection-header {
height: 40px;
display: flex;
align-items: center;
justify-content: space-between;
padding: 0 12px;
.title {
font-size: 15px;
}
.edit-icon {
display: flex;
align-items: center;
}
}
.custom-collection-table {
table {
width: 100%;
tr {
th {
color: red;
}
}
}
tbody {
tr {
td {
text-align: center;
}
}
}
}
}
import { defineComponent, onMounted, ref } from 'vue';
import { useI18n } from 'vue-i18n';
import EditSvg from '/public/images/svg/collection/edit.svg';
import './index.less';
export default defineComponent({
setup(props) {
const { t } = useI18n();
// 收藏模块的高度
const CollectHeight = ref('');
// 需要计算剩余高度
const getCurrentHtmlHeight = () => {
let collectBox = document.getElementById('collectionBox');
if (collectBox) {
let client = collectBox.getBoundingClientRect();
// 获取文档高度
let domHeight = document.documentElement.clientHeight;
CollectHeight.value = domHeight - client.top + 'px';
}
};
onMounted(() => {
getCurrentHtmlHeight();
});
return () => (
<div
class="custom-home-collection-box"
style={{
height: CollectHeight.value,
}}
id="collectionBox"
>
<div class="custom-collection-header">
<span></span>
<span class="title">{t('collection.r24hCollect')}</span>
<span class="edit-icon">
<EditSvg></EditSvg>
</span>
</div>
<div class="custom-collection-table">
<table>
<thead>
<tr>
<th>1</th>
<th>1</th>
<th>1</th>
</tr>
</thead>
<tbody>
<tr>
<td>1</td>
<td>1</td>
<td>1</td>
</tr>
</tbody>
</table>
</div>
</div>
);
},
});
......@@ -30,9 +30,9 @@
<Announcement></Announcement>
</ClientOnly>
<Animation
v-if="pageLoading2"
v-if="glbloading"
position="fixed"
background="red"
background="rgba(240,240,240,0.2)"
></Animation>
</template>
</MyLayout>
......@@ -49,7 +49,8 @@ const TbName = ref();
const r24h = ref();
const chain = useChain();
const currentPath = ref('');
const pageLoading2 = ref(false);
// 全局loading
const glbloading = useGlbLogin();
// div是否隐藏
const pageloading = ref(true);
const getUa = () => {
......@@ -67,6 +68,8 @@ onBeforeMount(() => {
onMounted(() => {
pageloading.value = false;
currentPath.value = chain.value;
//
glbloading.value = false;
});
const RightInfo = useCurrentRightInfo();
watch(RightInfo.value, (v) => {
......@@ -81,7 +84,7 @@ const changeChain = (chain) => {
watch(
() => route.href,
(v) => {
pageLoading2.value = true;
glbloading.value = true;
}
);
</script>
......
@import '@/style/flex.less';
.social-img {
width: 22px;
height: 22px;
cursor: pointer;
}
.custom-more-ulr-popup {
.t-popup__content {
width: 320px;
.custom-submit-info-dialog-box {
width: 100%;
border-radius: 15px 15px 0px 0px;
padding: 0 12px;
box-sizing: border-box;
color: var(--home-page-color-1);
overflow-y: auto;
.submit-info-title {
padding-top: 12px;
.dja(space-between);
background: var(--custom-body-back-color);
.label {
font-size: 20px;
}
.close-icon {
cursor: pointer;
}
}
.submit-info-body {
.dj();
& > * {
width: 50%;
margin-top: 20px;
}
.body-left,
.body-right {
.label {
font-weight: 500;
font-size: 14px;
color: var(--home-page-color-2);
}
.value {
.da();
margin: 12px 0;
cursor: pointer;
& > :nth-child(1) {
padding-right: 6px;
}
}
}
.body-right {
.value {
.active {
pointer-events: none;
filter: grayscale(90%);
}
}
}
}
}
}
}
import { defineComponent, ref } from 'vue';
import { useI18n } from 'vue-i18n';
import './index.less';
import ConnectCloseSvg from '/public/images/svg/rightDetail/connectClose.svg';
import { filterChainObj } from '@/constants/UnifiedManagementChain';
import SubmitTableText from '../submitTableText.vue';
import useSocial from '@/hooks/useSocial';
export default defineComponent({
props: {
chat: Object as any,
token: String,
},
emits: ['update:visible'],
setup(props, { emit }) {
const DialogVisible = ref(false);
const chain = useChain();
const { t } = useI18n();
const ChainObj = ref<any>({});
const { otherLink, openSocialLink } = useSocial();
const tokenList = ref([
{
img: '',
url: '',
title: 'website',
alt: 'website',
label: t('home.ViewContract'),
},
{
img: '',
url: '',
title: 'Transaction',
alt: 'Trading platform',
label: t('home.TokenTrading'),
},
]);
// 更换交易平台及官方浏览器
const changeLink = () => {
ChainObj.value = filterChainObj('value', chain.value);
// 更换图标和链接
// 官方浏览器
tokenList.value[0].img = ChainObj.value.url.website.img;
tokenList.value[0].url = ChainObj.value.url.website.link;
// // 交易平台
tokenList.value[1].img = ChainObj.value.url.Transaction.img;
tokenList.value[1].url = ChainObj.value.url.Transaction.link;
};
watch(
() => chain.value,
(v) => {
changeLink();
}
// {
// immediate: true,
// }
);
watch(
() => props.chat,
(v) => {
if (v) {
Object.keys(v).forEach((item: any) => {
let index = otherLink.value.findIndex(
(it: any) => it.title == item
);
if (index !== -1) {
// 存在
otherLink.value[index].url = v[item];
}
});
}
}
);
const closeDialog = () => {
DialogVisible.value = false;
};
const gohref = (title: string, url: string) => {
if (title && url && props.token) {
openSocialLink(ChainObj.value, props.token, title, url);
}
};
const popupContent = () => {
return (
<div class="custom-submit-info-dialog-box">
<div class="submit-info-title">
<span class="label">{t('home.Connect')}</span>
<span onClick={closeDialog} class="close-icon">
<ConnectCloseSvg></ConnectCloseSvg>
</span>
</div>
<div class="submit-info-body">
<div class="body-left">
<div class="label">{t('home.token2')}</div>
{tokenList.value.map((item: any) => (
<div>
<div
class="value"
key={item.alt}
onClick={gohref.bind(this, item.title, item.url)}
>
<img
src={item.img}
alt=""
class={[item.url ? '' : 'active']}
/>
<span>{item.label}</span>
</div>
</div>
))}
</div>
<div class="body-right">
<div class="label">{t('home.info')}</div>
{otherLink.value.map((item: any) => (
<div
class="value"
key={item.label}
onClick={gohref.bind(this, item.title, item.url)}
>
<img
src={item.img}
alt=""
class={[item.url ? '' : 'active']}
/>
<span>{item.label}</span>
</div>
))}
</div>
</div>
<SubmitTableText></SubmitTableText>
</div>
);
};
const onVisibleChange = (visible: any, e: any) => {
DialogVisible.value = visible;
};
return () => (
<t-popup
content={popupContent}
placement="bottom-left"
trigger="click"
overlayClassName="custom-more-ulr-popup"
v-model:visible={DialogVisible.value}
onVisibleChange={onVisibleChange}
>
<img
placement="top"
class="social-img"
src="/images/svg/rightDetail/more.svg"
alt="more"
/>
</t-popup>
);
},
});
......@@ -26,9 +26,10 @@
.token-name-child {
.da();
max-width: 176px;
font-size: var(--font-size-xxl);
font-size: 26px;
color: var(--td-right-detail-font-color-1);
line-height: 47px;
min-height: 47px;
.title {
font-weight: bold;
overflow-x: hidden;
......@@ -72,15 +73,17 @@
font-size: 16px;
font-weight: bold;
.price-box {
.da();
.dja(flex-end);
height: 50px;
margin-top: -24px;
font-weight: 700;
font-size: 28px;
min-height: 50px;
}
.r24h-cl {
font-size: var(--font-size-s);
font-weight: normal;
margin-top: -3px;
text-align: right;
}
}
.kline-btn {
......
import { defineComponent } from 'vue';
import { defineComponent, computed } from 'vue';
import { useI18n } from 'vue-i18n';
import { StarFilledIcon } from 'tdesign-icons-vue-next';
import CopySvg from '/public/images/svg/rightDetail/copy.svg';
......@@ -47,7 +47,9 @@ export default defineComponent({
}
};
const getPrice = () => {
try {
const { tokenInfo } = props;
if (tokenInfo) {
if ('up' in tokenInfo) {
let up = parseCoinAmount(tokenInfo.up);
if (up.indexOf('{') !== -1) {
......@@ -57,22 +59,15 @@ export default defineComponent({
} else {
return '';
}
}
} catch (e) {
console.log(e);
return '';
}
};
return () => (
<div class="header-token-box">
<div class="header-token-info">
<div class="filled-star-box">
<span>
{props.isInCollection ? (
<CollectionSvg3 class="filled-star" onClick={collectData} />
) : (
<CollectionSvg2
onClick={collectData}
class="filled-star-on"
></CollectionSvg2>
)}
</span>
</div>
<div class="pro-tokeninfo-header">
<div class="left-token-name">
<div class="token-name-child">
......@@ -107,8 +102,8 @@ export default defineComponent({
color: r24hColor(),
}}
>
{/* <span>{getPrice()}</span> */}
{getPrice()}
{props.tokenInfo ? getPrice() : ''}
{/* <span>{props.tokenInfo ? getPrice() : ''}</span> */}
</div>
<div
class="r24h-cl"
......@@ -119,6 +114,21 @@ export default defineComponent({
{props.numR24h}
{`(${props.r24h})`}
</div>
<div class="filled-star-box">
<span>
{props.isInCollection ? (
<CollectionSvg3
class="filled-star"
onClick={collectData}
/>
) : (
<CollectionSvg2
onClick={collectData}
class="filled-star-on"
></CollectionSvg2>
)}
</span>
</div>
</div>
</div>
</div>
......
<template>
<div class="submit-info-footer">
<div class="line"></div>
<div class="footer-label">
<template v-if="locale == 'cn'">
<div>
上面欠缺的链接可以通过
<span class="a" @click="toSubmitForm">此表格</span>
并付费提交信息
</div>
</template>
<template v-else-if="locale == 'en'">
<div>
The missing link above allows you to submit information via
<span class="a" @click="toSubmitForm">this form</span>
and pay for it
</div>
</template>
</div>
</div>
</template>
<script lang="ts" setup>
import { submitInfoLink } from '@/constants/global';
import { useI18n } from 'vue-i18n';
const { t, locale } = useI18n();
const toSubmitForm = () => {
window.open(submitInfoLink);
};
</script>
<style lang="less">
.submit-info-footer {
.line {
width: 100%;
height: 1px;
border-top: 1px solid #000000;
}
.footer-label {
font-weight: 400;
font-size: 13px;
color: var(--home-page-color-2);
font-family: 'Regular';
text-align: center;
margin-top: 6px;
.a {
color: #287eff;
cursor: pointer;
}
}
}
</style>
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment