remove unused code
This commit is contained in:
parent
fa6af8b1e7
commit
9416799e35
@ -58,18 +58,15 @@
|
||||
</div>
|
||||
<div id="wallet"></div>
|
||||
<Cart v-if="cartShow" @closeCart="closeCartBox" class="cart-con" />
|
||||
<ChainModel></ChainModel>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script setup>
|
||||
import { ref, reactive, onMounted, computed, watchEffect, getCurrentInstance, watch } from "vue";
|
||||
const { proxy } = getCurrentInstance();
|
||||
import { useChainStore } from "@/store/chain";
|
||||
import { useAppStore } from "@/store/app";
|
||||
import { hasMetamask } from "@/utils/chain.util";
|
||||
import { useRouter, useRoute } from "vue-router";
|
||||
import ChainModel from "@/components/home/ChainModel.vue";
|
||||
import { useCopyToClipboard } from "./../../hooks/useCopyToClipboard";
|
||||
import { useMarketplaceStore } from "@/store/marketplace"
|
||||
|
||||
@ -82,7 +79,6 @@ const marketplaceStore = useMarketplaceStore()
|
||||
const AppModule = useAppStore();
|
||||
const router = useRouter();
|
||||
const route = useRoute();
|
||||
const chain = useChainStore();
|
||||
const app = useAppStore();
|
||||
const showMenu = ref(false);
|
||||
const loginShowMenu = ref(false);
|
||||
@ -158,35 +154,9 @@ const { copied, error, reset, copyToClipboard } = useCopyToClipboard();
|
||||
const message = copied.value
|
||||
? "Text copied!"
|
||||
: "Click the button to copy text.";
|
||||
const formatAddress = computed(() => {
|
||||
const accountId = localWalletStore.address
|
||||
if (!accountId) return "-";
|
||||
if (accountId.length >= 10) {
|
||||
return `${accountId.substring(0, 6)}......${accountId.slice(-6)}`;
|
||||
}
|
||||
return accountId;
|
||||
});
|
||||
|
||||
async function login(type) {
|
||||
|
||||
if (!chain.logined) {
|
||||
//没有登录情况下执行登录
|
||||
|
||||
await chain.chainManager.login(type);
|
||||
// console.log("logined:", chain.chainManager.isLogined);
|
||||
chain.logined = chain.chainManager.isLogined;
|
||||
}
|
||||
}
|
||||
const handlLogin = () => {
|
||||
loginShowMenu.value = !loginShowMenu.value;
|
||||
};
|
||||
const logout = async () => {
|
||||
await chain.chainManager.logout();
|
||||
window.location.reload();
|
||||
// console.log("logined:", chain.chainManager.isLogined);
|
||||
chain.logined = chain.chainManager.isLogined;
|
||||
window.location.reload();
|
||||
};
|
||||
const handlHome = () => {
|
||||
router.push("/");
|
||||
};
|
||||
|
@ -42,7 +42,6 @@ import { useChainStore } from "@/store/chain";
|
||||
import { useAppStore } from "@/store/app";
|
||||
import { useRouter, useRoute } from "vue-router";
|
||||
import { UserStatus } from "@/api/User";
|
||||
import ChainModel from "@/components/home/ChainModel.vue";
|
||||
import { useCopyToClipboard } from "./../../hooks/useCopyToClipboard";
|
||||
import { hasMetamask } from "@/utils/chain.util";
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user