fix
This commit is contained in:
parent
4cb9067683
commit
760774e495
Binary file not shown.
@ -43,6 +43,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 { useCopyToClipboard } from "./../../hooks/useCopyToClipboard";
|
import { useCopyToClipboard } from "./../../hooks/useCopyToClipboard";
|
||||||
import { hasMetamask } from "@/utils/chain.util";
|
import { hasMetamask } from "@/utils/chain.util";
|
||||||
@ -64,6 +65,7 @@ const formatAddress = computed(() => {
|
|||||||
return accountId;
|
return accountId;
|
||||||
});
|
});
|
||||||
async function login(event) {
|
async function login(event) {
|
||||||
|
|
||||||
var next = window.location.href;
|
var next = window.location.href;
|
||||||
if (!hasMetamask()) {
|
if (!hasMetamask()) {
|
||||||
var url = `https://metamask.app.link/dapp/${next}`;
|
var url = `https://metamask.app.link/dapp/${next}`;
|
||||||
@ -75,6 +77,9 @@ 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;
|
||||||
|
const resq = await UserStatus({
|
||||||
|
account: AppModule.accountId,invite_code: route.query.code
|
||||||
|
});
|
||||||
emit("login-success");
|
emit("login-success");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -395,8 +395,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) {
|
||||||
|
@ -306,8 +306,12 @@ const totalRegularPoints = computed(() =>
|
|||||||
userInfo.regular.reduce((total, item) => total + item.point, 0)
|
userInfo.regular.reduce((total, item) => total + item.point, 0)
|
||||||
);
|
);
|
||||||
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,7 +79,13 @@ const handTaskOne = () => {
|
|||||||
console.log(router, "-=-=-");
|
console.log(router, "-=-=-");
|
||||||
};
|
};
|
||||||
const handTaskTwo = () => {
|
const handTaskTwo = () => {
|
||||||
router.push("/taskTwo");
|
/// router.push("/taskTwo");
|
||||||
|
const code = route.query.code;
|
||||||
|
if (code) {
|
||||||
|
router.push({ path: "/taskTwo", query: { code: code } });
|
||||||
|
} else {
|
||||||
|
router.push("/taskTwo");
|
||||||
|
}
|
||||||
console.log(router, "-=-=-");
|
console.log(router, "-=-=-");
|
||||||
};
|
};
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user