diff --git a/.env.development b/.env.development index b338002..6206947 100644 --- a/.env.development +++ b/.env.development @@ -1,6 +1,6 @@ # API -# VUE_APP_API_URL = 'http://192.168.100.22:3006/api' -VUE_APP_API_URL = 'http://127.0.0.1:3006/api' +VUE_APP_API_URL = 'http://192.168.100.22:3006/api' +# VUE_APP_API_URL = 'http://127.0.0.1:3006/api' VUE_APP_WL_URL = 'https://nftwl.counterfire.games/wl_test' VUE_APP_CONFIG_URL = 'https://sepolia.infura.io/v3/b6bf7d3508c941499b10025c0776eaf8' diff --git a/src/views/home/index.vue b/src/views/home/index.vue index 538e923..be22467 100644 --- a/src/views/home/index.vue +++ b/src/views/home/index.vue @@ -165,18 +165,9 @@
-
-
Connect
-
Claim
-
+{{ item.score }}
-
-
-
Follow
-
Claim
-
+{{ item.score }}
-
-
-
Retweet
+
+
{{ item.actionTitle }}
+
Check
Claim
+{{ item.score }}
@@ -488,19 +479,15 @@ import Calen from "./calenView.vue"; import BoxBtm from './boxBtm.vue' // import ImgView from './../../components/imgView.vue' import gameView from "./gameView.vue"; -import WalletDialog from "./../../components/walletDialog/index.vue"; -import { getToken } from './../../utils/cookies.js' -import { getWalletAddress, isWalletConnected, linkWallet } from "./../../wallet/index.js"; +import WalletDialog from "@/components/walletDialog/index.vue"; +import { getToken } from '@/utils/cookies.js' +import { getWalletAddress, isWalletConnected, linkWallet } from "@/wallet/index.js"; import { - apiGameStat, apiBeginActivity, apiCheckActivity, apiTaskClaim, - apiUsercheckin, - apiProgress, apiCheckinClaim, apiCheckinClaimSeq, - apiGameStep, checkReCaptcha, retweetTwitter, } from "./../../utils/webapi.js"; @@ -634,7 +621,16 @@ export default { .then(res => { // if (res.data.errcode == 0) { this.activityName = res.data.data.name; - this.activeList = res.data.data.tasks; + const actionTitles = { + TwitterConnect: "Connect", + TwitterFollow: "Follow", + TwitterRetweet: "Retweet", + }; + this.activeList.length = 0 + for (let data of res.data.data.tasks) { + data.actionTitle = actionTitles[data.task] || 'Proceed' + this.activeList.push(data) + } this.activityData = res.data.data // } }) @@ -664,7 +660,7 @@ export default { async toPost(data) { let res = await apiBeginActivity(data.id); if(res.errcode == 0) { - this.getActivitrStatue(data.id) + this.getProgress() // console.log("开始任务", res, data); } if (data.task == "TwitterConnect") { @@ -675,10 +671,14 @@ export default { retweetTwitter(data.desc) } }, + // 手动检查任务 + async toCheck(data) { + this.getActivitrStatue(data.id) + }, // 检查任务状态 async getActivitrStatue(id) { - let res = await apiCheckActivity(id); - this.getProgress() + await apiCheckActivity(id); + await this.getProgress() // console.log(res, "检查任务状态------------------"); }, loginTwitter() {