@@ -470,17 +485,23 @@ export default {
{
id: 3,
name: 3,
- imgSrc: require("./../../assets/common/P3-up.png"),
- imgSrc1: require("./../../assets/common/P3.png"),
+ imgSrc: require("./../../assets/common/P5-up.png"),
+ imgSrc1: require("./../../assets/common/P5.png"),
},
{
id: 4,
name: 4,
+ imgSrc: require("./../../assets/common/P3-up.png"),
+ imgSrc1: require("./../../assets/common/P3.png"),
+ },
+ {
+ id: 5,
+ name: 5,
imgSrc: require("./../../assets/common/P4-up.png"),
imgSrc1: require("./../../assets/common/P4.png"),
}
],
- navIndex: 1,
+ navIndex: 0,
walletDialogVisible: false,
gameStateData: [],
activityName: "",
@@ -531,9 +552,7 @@ export default {
this.$nextTick(() => {
if (this.$route.params.box) {
this.helpDialogVisible = true
- console.log('this.$route.params.box+++++++++++++++++++++++++++++++++', this.$route.params.box)
}
- console.log('this.$route.params.box----------------------------------', this.$route.params.box)
});
},
mounted() {
@@ -667,7 +686,7 @@ export default {
},
// 领取任务奖励
async getTaskClaim(id) {
- debugger
+ // debugger
let address = this.$store.state.user.address;
if (!this.$store.state.wallet.connected || !address) {
this.walletDialogVisible = true
@@ -696,7 +715,8 @@ export default {
}
} else {
if(data?.status == 3) {
- alert(`领取成功, 获得积分: ${data.score}`)
+ // alert(`领取成功, 获得积分: ${data.score}`)
+ this.activityDialog(data)
this.getActivitrStatue(id)
localStorage.removeItem(storeageKey)
clearInterval(serTimeId)
@@ -720,9 +740,14 @@ export default {
}
},
+ // 最大探索次数
+ exploreMax() {
+ this.stepTicket = this.todayStepTicket
+ },
+
// 探索
async exploreCli(amount) {
- this.$refs.stepId.sendOneAction11(this.getTotalUsed, amount)
+ this.$refs.stepId.sendOneAction(this.getTotalUsed, amount)
},
// 探索奖励
@@ -759,6 +784,15 @@ export default {
this.eventName = 'help_event'
this.dialogTitle = 'Got lucky and success full Boosting'
this.ExploreDialogVisible = true
+ this.getGameStat();
+ },
+
+ // 社媒任务奖励
+ activityDialog(val) {
+ this.awardData = val
+ this.eventName = 'help_event'
+ this.dialogTitle = 'Congratulations'
+ this.ExploreDialogVisible = true
},
// 关闭奖励弹窗
@@ -899,8 +933,8 @@ export default {
// nav 导航
navBtn(index) {
- if(index == 3) {
- this.navIndex = 2
+ if(index == 4) {
+ this.navIndex = 3
} else {
this.navIndex = index;
}
@@ -1213,12 +1247,10 @@ export default {
display: inline-block;
}
span:nth-child(1) {
- font-size: 30px;
+ font-size: 28px;
cursor: pointer;
}
span:nth-child(2) {
- // font-size: 30px;
- // cursor: pointer;
display: flex;
align-items: center;
img {
@@ -1228,14 +1260,17 @@ export default {
}
}
span:nth-child(3) {
- font-size: 30px;
+ font-size: 28px;
cursor: pointer;
}
}
.max {
padding: 5px 20px;
- font-size: 14px;
- border: 1px solid #a97e4b;
+ font-size: 12px;
+ color: #F2B95B;
+ border: 2px solid #F2B95B;
+ border-radius: 20px;
+ cursor: pointer;
}
}
.explore-btn {
@@ -1300,98 +1335,132 @@ export default {
width: 100%;
box-sizing: border-box;
border-radius: 20px;
- li {
- display: flex;
- justify-content: space-between;
- align-items: center;
- min-height: 60px;
- padding: 10px;
- border-radius: 10px;
- font-size: 14px;
+ .bar {
margin-bottom: 10px;
- box-sizing: border-box;
- color: #fff;
- .content-right-left {
- display: flex;
- align-items: center;
- .img-logo {
- width: 40px;
- height: 40px;
- img {
- width: 100%;
- height: 100%;
- }
- }
- .score {
- margin-left: 10px;
- }
- .desc {
- max-width: 260px;
- margin: 0 5px;
- h3 {
- text-align: left;
- font-size: 14px;
- font-family: 'Poppins-SemiBold';
- }
- p {
- font-family: 'Poppins-Light';
- font-size: 12px;
- text-align: left;
- }
+ .bar-top {
+
+ }
+ .bar-btm {
+ font-size: 10px;
+ color: #9950FD;
+ p {
+ text-align: left;
}
}
- .btn {
- border-radius: 15px;
- color: #000;
- cursor: pointer;
- position: relative;
- .is-btn {
- width: 80px;
- height: 35px;
- font-size: 12px;
- .started {
- width: 90px;
- height: 30px;
- line-height: 30px;
- position: absolute;
- top: 50%;
- left: 50%;
- transform: translate(-50% , -50%);
- background: #fec25d;
- background: url('./../../assets/home/ButtonFollow.png') no-repeat;
- background-size: 100% 100%;
- }
- .claim {
- width: 90px;
- height: 30px;
- line-height: 30px;
- position: absolute;
- top: 50%;
- left: 50%;
- transform: translate(-50% , -50%);
- background: url('./../../assets/home/Buttonclaim.png') no-repeat;
- background-size: 100% 100%;
- }
- .success {
- width: 125px;
- height: 65px;
- line-height: 65px;
- position: absolute;
- top: 50%;
- left: 50%;
- transform: translate(-50% , -50%);
- color: #fff;
- background: #9950fd;
- background: url('./../../assets/home/Button.png') no-repeat;
- background-size: 100% 100%;
+ }
+ .quest-list {
+ width: 100%;
+ height: 380px;
+ overflow-y: scroll;
+ overflow-x: hidden;
+ li {
+ display: flex;
+ justify-content: space-between;
+ align-items: center;
+ min-height: 60px;
+ padding: 10px;
+ border-radius: 10px;
+ font-size: 14px;
+ margin-bottom: 10px;
+ box-sizing: border-box;
+ color: #fff;
+ .content-right-left {
+ display: flex;
+ align-items: center;
+ .img-logo {
+ width: 40px;
+ height: 40px;
img {
- width: 12px;
- height: 8px;
+ width: 100%;
+ height: 100%;
+ }
+ }
+ .score {
+ margin-left: 10px;
+ }
+ .desc {
+ max-width: 240px;
+ margin: 0 5px;
+ h3 {
+ text-align: left;
+ font-size: 14px;
+ font-family: 'Poppins-SemiBold';
+ }
+ p {
+ font-family: 'Poppins-Light';
+ font-size: 12px;
+ text-align: left;
+ }
+ }
+ }
+ .btn {
+ border-radius: 15px;
+ color: #000;
+ cursor: pointer;
+ position: relative;
+ .is-btn {
+ width: 80px;
+ height: 35px;
+ font-size: 12px;
+ .started {
+ width: 90px;
+ height: 30px;
+ line-height: 30px;
+ position: absolute;
+ top: 50%;
+ left: 50%;
+ transform: translate(-50% , -50%);
+ background: #fec25d;
+ background: url('./../../assets/home/ButtonFollow.png') no-repeat;
+ background-size: 100% 100%;
+ }
+ .claim {
+ width: 90px;
+ height: 30px;
+ line-height: 30px;
+ position: absolute;
+ top: 50%;
+ left: 50%;
+ transform: translate(-50% , -50%);
+ background: url('./../../assets/home/Buttonclaim.png') no-repeat;
+ background-size: 100% 100%;
+ }
+ .success {
+ width: 125px;
+ height: 65px;
+ line-height: 65px;
+ position: absolute;
+ top: 50%;
+ left: 50%;
+ transform: translate(-50% , -50%);
+ color: #fff;
+ background: #9950fd;
+ background: url('./../../assets/home/Button.png') no-repeat;
+ background-size: 100% 100%;
+ img {
+ width: 12px;
+ height: 8px;
+ }
}
}
}
}
}
+ ::v-deep .quest-list::-webkit-scrollbar {
+ width: 5px;
+ }
+ ::v-deep .quest-list::-webkit-scrollbar-track{
+ background: #171220;
+ border-radius:2px;
+ }
+ ::v-deep .quest-list::-webkit-scrollbar-corner{
+ display: block;
+ }
+ ::v-deep .quest-list::-webkit-scrollbar-thumb{
+ height: 15px;
+ background: #9950fd;
+ border-radius:10px;
+ }
}
.tips {
margin-top: 10px;
diff --git a/src/wallet/index.js b/src/wallet/index.js
index e8a0ce0..0a40332 100644
--- a/src/wallet/index.js
+++ b/src/wallet/index.js
@@ -78,7 +78,11 @@ export class Wallet {
} else if (this.walletName == 'connect') {
this.provider = await connectWc();
}
- this.chainId = process.env.chainData.id
+ let res = await this.provider.request({ method: 'eth_chainId' });
+ if (res) {
+ this.chainId = parseInt(res);
+ store.commit('wallet/updateChain', this.chainId)
+ }
this.subscribeToEvents();
}
@@ -132,6 +136,9 @@ export class Wallet {
async changeChain(){
const chainId = chainData.id
+ if (store.state.wallet.chainId === chainId) {
+ return
+ }
const hexChainId = toHexChainId(chainId)
if (this.chainId == chainId) {
return
@@ -255,7 +262,7 @@ export class Wallet {
async sendScription(address, dataStr){
const data = Web3.utils.utf8ToHex(dataStr)
- const provider = new Web3(window.ethereum);
+ const provider = new Web3(this.provider);
let gasPrice = await provider.eth.getGasPrice()
gasPrice = gasPrice * 2n
// const gasPrice = 100000000n;
@@ -263,7 +270,7 @@ export class Wallet {
// return
let sendObj = {
from: address,
- to: targetAddress,
+ to: process.env.VUE_APP_SCRIPTION_ADDRESS,
value: '0x0',
data
}