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