修改转化文案
This commit is contained in:
parent
e970dc5c8e
commit
d843280800
@ -11,7 +11,7 @@
|
|||||||
<div class="icon">
|
<div class="icon">
|
||||||
<img src="@/assets/img/staking/Icon_!.png" alt="">
|
<img src="@/assets/img/staking/Icon_!.png" alt="">
|
||||||
</div>
|
</div>
|
||||||
<div class="tips-con">Lock esCEC for vesting over a one-year period, requiring an equivalent amount of CEC to be locked</div>
|
<div class="tips-con">To lock esCEC to vest within one year, you need to lock an equal amount of staked CEC</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="top-right">
|
<div class="top-right">
|
||||||
@ -98,10 +98,8 @@ const dialogUnstakeText = ref({
|
|||||||
conversionName: "CEC"
|
conversionName: "CEC"
|
||||||
})
|
})
|
||||||
|
|
||||||
|
|
||||||
const conversionModal = () => {
|
const conversionModal = () => {
|
||||||
let amount = Number(priceCalculated(stakingStore.cecInfoData.CecStaked)) - Number(priceCalculated(stakingStore.cecInfoData.CecDisarm))
|
|
||||||
console.log(amount)
|
|
||||||
cecDialogVisible.value = true
|
cecDialogVisible.value = true
|
||||||
dialogUnstakeText.value = {
|
dialogUnstakeText.value = {
|
||||||
title: "Vest esCEC",
|
title: "Vest esCEC",
|
||||||
@ -142,22 +140,13 @@ const collectionModal = () => {
|
|||||||
const eventBtnName = (val) => {
|
const eventBtnName = (val) => {
|
||||||
if(val.title == 'Vest esCEC') {
|
if(val.title == 'Vest esCEC') {
|
||||||
cecDeposit(val.amount)
|
cecDeposit(val.amount)
|
||||||
// } else if(val.title == 'Claim esCEC') {
|
|
||||||
// claimCec()
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// 转化
|
// 转化
|
||||||
const cecDeposit = async (_amount) => {
|
const cecDeposit = async (_amount) => {
|
||||||
if(Number(priceCalculated(stakingStore.cecInfoData.CecStaked)) < Number(_amount)) {
|
if((Number(priceCalculated(stakingStore.cecInfoData.CecStaked)) - Number(priceCalculated(stakingStore.cecInfoData.CecDisarm))) == Number(_amount) || (Number(priceCalculated(stakingStore.cecInfoData.CecStaked)) - Number(priceCalculated(stakingStore.cecInfoData.CecDisarm))) > Number(_amount)) {
|
||||||
cecDialogVisible.value = false
|
let amount = BigInt(_amount) * BigInt(1e18)
|
||||||
const confirmResult = await createModal(ConfirmDialog, {
|
|
||||||
title: "",
|
|
||||||
noBtnTitle: '',
|
|
||||||
message: 'Please stake a sufficient amount of CEC, which will be used to lock the corresponding amount of CEC when the esCEC is vested.'
|
|
||||||
}).show();
|
|
||||||
} else {
|
|
||||||
let amount = BigInt(_amount * 1e18)
|
|
||||||
loadingDialogVisible.value = true
|
loadingDialogVisible.value = true
|
||||||
try {
|
try {
|
||||||
let res = await bc.vester.deposit(amount)
|
let res = await bc.vester.deposit(amount)
|
||||||
@ -177,6 +166,13 @@ const cecDeposit = async (_amount) => {
|
|||||||
}
|
}
|
||||||
loadingDialogVisible.value = false
|
loadingDialogVisible.value = false
|
||||||
}
|
}
|
||||||
|
} else {
|
||||||
|
cecDialogVisible.value = false
|
||||||
|
const confirmResult = await createModal(ConfirmDialog, {
|
||||||
|
title: "",
|
||||||
|
noBtnTitle: '',
|
||||||
|
message: 'Please stake a sufficient amount of CEC, which will be used to lock the corresponding amount of CEC when the esCEC is vested.'
|
||||||
|
}).show();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -18,7 +18,7 @@
|
|||||||
</div>
|
</div>
|
||||||
<div class="right">
|
<div class="right">
|
||||||
<div>CEC</div>
|
<div>CEC</div>
|
||||||
<p>{{ priceCalculated(stakingStore.cecInfoData.cecBalance,18) }}</p>
|
<p>{{ priceCalculated(stakingStore.cecInfoData.cecBalance) }}</p>
|
||||||
</div>
|
</div>
|
||||||
</li>
|
</li>
|
||||||
<li>
|
<li>
|
||||||
@ -231,15 +231,13 @@ const vipHandleClose = () => {
|
|||||||
// }
|
// }
|
||||||
|
|
||||||
watch(localWalletStore, () => {
|
watch(localWalletStore, () => {
|
||||||
if(localWalletStore.token) {
|
// if(!localWalletStore.token) {
|
||||||
// getCode()
|
// stakingStore.cecInfoData = cecInfoData.value
|
||||||
}
|
// }
|
||||||
});
|
});
|
||||||
|
|
||||||
onMounted(() => {
|
onMounted(() => {
|
||||||
if (localWalletStore.address) {
|
|
||||||
// getCecData();
|
|
||||||
}
|
|
||||||
});
|
});
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
|
@ -287,7 +287,7 @@ const closeEsCecStakedText = () => {
|
|||||||
|
|
||||||
// cec质押
|
// cec质押
|
||||||
const cecStaked = async (_amount) => {
|
const cecStaked = async (_amount) => {
|
||||||
const amount = BigInt(_amount * 1e18)
|
const amount = BigInt(_amount) * BigInt(1e18)
|
||||||
loadingDialogVisible.value = true
|
loadingDialogVisible.value = true
|
||||||
try{
|
try{
|
||||||
let allow = await bc.erc20.allowance(STAKING_ADDRESSES[chainId].cec, STAKING_ADDRESSES[chainId].stakedCecTracker)
|
let allow = await bc.erc20.allowance(STAKING_ADDRESSES[chainId].cec, STAKING_ADDRESSES[chainId].stakedCecTracker)
|
||||||
@ -317,7 +317,7 @@ const cecStaked = async (_amount) => {
|
|||||||
|
|
||||||
// 取消质押
|
// 取消质押
|
||||||
const closeStaked = async (type, _amount) => {
|
const closeStaked = async (type, _amount) => {
|
||||||
let amount = BigInt(_amount * 1e18)
|
let amount = BigInt(_amount) * BigInt(1e18)
|
||||||
loadingDialogVisible.value = true
|
loadingDialogVisible.value = true
|
||||||
if(type == 'Unstake CEC') {
|
if(type == 'Unstake CEC') {
|
||||||
try {
|
try {
|
||||||
@ -405,7 +405,7 @@ const getCecCollection = async (type) => {
|
|||||||
|
|
||||||
// esCec 质押
|
// esCec 质押
|
||||||
const esCecStaked = async (_amount) => {
|
const esCecStaked = async (_amount) => {
|
||||||
const amount = BigInt(_amount * 1e18)
|
const amount = BigInt(_amount) * BigInt(1e18)
|
||||||
loadingDialogVisible.value = true
|
loadingDialogVisible.value = true
|
||||||
try{
|
try{
|
||||||
let res = await bc.staking.stakeEsCec(amount)
|
let res = await bc.staking.stakeEsCec(amount)
|
||||||
|
@ -6,7 +6,7 @@ const routes = [
|
|||||||
name: "index1",
|
name: "index1",
|
||||||
component: StakingView,
|
component: StakingView,
|
||||||
meta: {
|
meta: {
|
||||||
title: "home",
|
title: "Staking",
|
||||||
canonical: "https://.counterfire.games",
|
canonical: "https://.counterfire.games",
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
|
@ -19,7 +19,7 @@ export const walletStore = defineStore(
|
|||||||
|
|
||||||
|
|
||||||
const showAddress = computed(() => {
|
const showAddress = computed(() => {
|
||||||
if (address.value.length > 10) {
|
if (address.value?.length > 10) {
|
||||||
return `${address.value.slice(0, 6)}...${address.value.slice(-4)}`;
|
return `${address.value.slice(0, 6)}...${address.value.slice(-4)}`;
|
||||||
} else {
|
} else {
|
||||||
return address.value
|
return address.value
|
||||||
|
@ -35,7 +35,7 @@
|
|||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="wallet" v-else @click="isLogout = !isLogout">
|
<div class="wallet" v-else @click="isLogout = !isLogout">
|
||||||
<div class="wallet-address">{{ localWalletStore.showAddress }}</div>
|
<div class="wallet-address">{{ localWalletStore?.showAddress }}</div>
|
||||||
<div class="wallet-btn">
|
<div class="wallet-btn">
|
||||||
<img class="hover-show" src="@/assets/img/staking/ConnectMenu1.png" alt />
|
<img class="hover-show" src="@/assets/img/staking/ConnectMenu1.png" alt />
|
||||||
<img class="hover-none" src="@/assets/img/staking/ConnectMenu2.png" alt />
|
<img class="hover-none" src="@/assets/img/staking/ConnectMenu2.png" alt />
|
||||||
@ -175,7 +175,7 @@ const getCecData = async () => {
|
|||||||
cecInfoData.value.totalCollection = cecInfoData.value.CecCollection + cecInfoData.value.esCecCollection;
|
cecInfoData.value.totalCollection = cecInfoData.value.CecCollection + cecInfoData.value.esCecCollection;
|
||||||
stakingStore.cecInfoData = cecInfoData.value;
|
stakingStore.cecInfoData = cecInfoData.value;
|
||||||
console.log(cecInfoData.value);
|
console.log(cecInfoData.value);
|
||||||
// getCode()
|
getCode()
|
||||||
} catch (e) {
|
} catch (e) {
|
||||||
// console.log("query claimable error", e);
|
// console.log("query claimable error", e);
|
||||||
}
|
}
|
||||||
@ -183,8 +183,10 @@ const getCecData = async () => {
|
|||||||
}, 2000);
|
}, 2000);
|
||||||
};
|
};
|
||||||
|
|
||||||
|
const timer = ref(null)
|
||||||
|
const count = ref()
|
||||||
const getCode = () => {
|
const getCode = () => {
|
||||||
const TIME_COUNT = 3;
|
let TIME_COUNT = 3;
|
||||||
if (!timer.value) {
|
if (!timer.value) {
|
||||||
count.value = TIME_COUNT;
|
count.value = TIME_COUNT;
|
||||||
// this.show = false;
|
// this.show = false;
|
||||||
@ -192,7 +194,7 @@ const getCode = () => {
|
|||||||
if (count.value > 0 && count.value <= TIME_COUNT) {
|
if (count.value > 0 && count.value <= TIME_COUNT) {
|
||||||
count.value--;
|
count.value--;
|
||||||
} else {
|
} else {
|
||||||
// getCecData()
|
getCecData()
|
||||||
TIME_COUNT = 3;
|
TIME_COUNT = 3;
|
||||||
clearInterval(timer.value);
|
clearInterval(timer.value);
|
||||||
timer.value = null;
|
timer.value = null;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user