fix
This commit is contained in:
parent
a37cb7a721
commit
3e70bef212
@ -38,6 +38,7 @@ import { ref, reactive, onMounted, computed, watchEffect } from "vue";
|
||||
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 { hasMetamask } from "@/utils/chain.util";
|
||||
import { useCopyToClipboard } from "./../../hooks/useCopyToClipboard";
|
||||
@ -80,10 +81,13 @@ async function login(event) {
|
||||
await chain.chainManager.login();
|
||||
// console.log("logined:", chain.chainManager.isLogined);
|
||||
chain.logined = chain.chainManager.isLogined;
|
||||
if(chain.logined){
|
||||
const resq = await UserStatus({
|
||||
account: AppModule.accountId,
|
||||
invite_code: route.query.code,
|
||||
});
|
||||
if (chain.logined) {
|
||||
emit("login-success");
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
}
|
||||
@ -124,7 +128,7 @@ const handleCopy = () => {
|
||||
.logo {
|
||||
width: 166px;
|
||||
height: 80px;
|
||||
img{
|
||||
img {
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
}
|
||||
@ -142,7 +146,7 @@ const handleCopy = () => {
|
||||
cursor: pointer;
|
||||
text-align: center;
|
||||
line-height: 61px;
|
||||
font-family: 'Arial';
|
||||
font-family: "Arial";
|
||||
//border: 1px solid #ffffff;
|
||||
background: url("@/assets/img/task/login-btn.png") no-repeat;
|
||||
background-size: 100% 100%;
|
||||
@ -156,7 +160,7 @@ const handleCopy = () => {
|
||||
width: 211px;
|
||||
height: 61px;
|
||||
cursor: pointer;
|
||||
font-family: 'Arial';
|
||||
font-family: "Arial";
|
||||
font-size: 22px;
|
||||
color: #fff;
|
||||
text-align: center;
|
||||
@ -205,7 +209,7 @@ const handleCopy = () => {
|
||||
// padding: 5px 15px;
|
||||
color: #f5f5f5;
|
||||
display: flex;
|
||||
font-family: 'Arial';
|
||||
font-family: "Arial";
|
||||
//border: 1px solid #ccc;
|
||||
background-color: #161515;
|
||||
justify-content: center;
|
||||
|
@ -376,8 +376,13 @@ const updateLogin = async () => {
|
||||
currentTask.value = 2;
|
||||
};
|
||||
const handTaskHome = () => {
|
||||
router.push("/quest");
|
||||
console.log(router, "-=-=-");
|
||||
//router.push("/quest");
|
||||
const code = route.query.code;
|
||||
if (code) {
|
||||
router.push({ path: "/quest", query: { code: code } });
|
||||
} else {
|
||||
router.push("/quest");
|
||||
}
|
||||
};
|
||||
const formatAddress = (address) => {
|
||||
if (address.length >= 10) {
|
||||
|
@ -289,8 +289,12 @@ const assign = (source, target) => {
|
||||
}
|
||||
};
|
||||
const handTaskHome = () => {
|
||||
router.push("/quest");
|
||||
console.log(router, "-=-=-");
|
||||
const code = route.query.code;
|
||||
if (code) {
|
||||
router.push({ path: "/quest", query: { code: code } });
|
||||
} else {
|
||||
router.push("/quest");
|
||||
}
|
||||
};
|
||||
const handTaskOne = () => {
|
||||
const code = route.query.code;
|
||||
|
@ -79,8 +79,13 @@ const handTaskOne = () => {
|
||||
console.log(router, "-=-=-");
|
||||
};
|
||||
const handTaskTwo = () => {
|
||||
router.push("/taskTwo");
|
||||
console.log(router, "-=-=-");
|
||||
/// router.push("/taskTwo");
|
||||
const code = route.query.code;
|
||||
if (code) {
|
||||
router.push({ path: "/taskTwo", query: { code: code } });
|
||||
} else {
|
||||
router.push("/taskTwo");
|
||||
}
|
||||
};
|
||||
|
||||
watch(
|
||||
|
Loading…
x
Reference in New Issue
Block a user