|
@@ -282,7 +282,7 @@ const WGTbalance = ref(0);
|
|
const STTbalance = ref(0);
|
|
const STTbalance = ref(0);
|
|
const entry_fee = ref(0);
|
|
const entry_fee = ref(0);
|
|
const wgt_price = ref(0);
|
|
const wgt_price = ref(0);
|
|
-const privateKey = window.android.getPrivateKey();//app
|
|
|
|
|
|
+const privateKey = ref('');
|
|
// const privateKey = "0x4553077da5d773773dad0511c6e5d33142ae2c1bd05a3a8a4a7becbc0d23d9b5";//H5
|
|
// const privateKey = "0x4553077da5d773773dad0511c6e5d33142ae2c1bd05a3a8a4a7becbc0d23d9b5";//H5
|
|
|
|
|
|
const bgClass = computed(() => {
|
|
const bgClass = computed(() => {
|
|
@@ -291,8 +291,10 @@ const bgClass = computed(() => {
|
|
return 'bg3';
|
|
return 'bg3';
|
|
});
|
|
});
|
|
const handleAddressUpdate = (addr) => {
|
|
const handleAddressUpdate = (addr) => {
|
|
|
|
+ privateKey.value = window.android.getPrivateKey();//app
|
|
walletAddress.value = addr;
|
|
walletAddress.value = addr;
|
|
getGameMatchList();
|
|
getGameMatchList();
|
|
|
|
+ getnum(privateKey.value);
|
|
};
|
|
};
|
|
// 获取游戏赛事列表(三个tab)
|
|
// 获取游戏赛事列表(三个tab)
|
|
const getGameMatchList = async (type = true) => {
|
|
const getGameMatchList = async (type = true) => {
|
|
@@ -336,7 +338,7 @@ const openGamePopup = (value) => {
|
|
showType.value=value;
|
|
showType.value=value;
|
|
};
|
|
};
|
|
// 获取余额
|
|
// 获取余额
|
|
-const getnum = async () =>{
|
|
|
|
|
|
+const getnum = async (privateKey) =>{
|
|
try {
|
|
try {
|
|
WGTbalance.value = await getBalance(privateKey,'wgt');
|
|
WGTbalance.value = await getBalance(privateKey,'wgt');
|
|
STTbalance.value = await getBalance(privateKey,'stt');
|
|
STTbalance.value = await getBalance(privateKey,'stt');
|
|
@@ -385,7 +387,7 @@ const handleTokenSignUp = async (signUpFn, price) => {
|
|
mask: true
|
|
mask: true
|
|
});
|
|
});
|
|
try {
|
|
try {
|
|
- const result = await signUpFn(privateKey, price);
|
|
|
|
|
|
+ const result = await signUpFn(privateKey.value, price);
|
|
if (result.status === "success") {
|
|
if (result.status === "success") {
|
|
await getMatchEnroll();
|
|
await getMatchEnroll();
|
|
} else {
|
|
} else {
|
|
@@ -442,7 +444,7 @@ const getsendSingleReward = async (prize_money) =>{
|
|
mask: true
|
|
mask: true
|
|
});
|
|
});
|
|
try {
|
|
try {
|
|
- const result = await sendSingleReward(privateKey,prize_money);
|
|
|
|
|
|
+ const result = await sendSingleReward(privateKey.value,prize_money);
|
|
if (result.status === "success") {
|
|
if (result.status === "success") {
|
|
await getClaimPrize();
|
|
await getClaimPrize();
|
|
}else{
|
|
}else{
|
|
@@ -463,9 +465,9 @@ const getsendSingleReward = async (prize_money) =>{
|
|
}
|
|
}
|
|
}
|
|
}
|
|
|
|
|
|
-onMounted(async () => {
|
|
|
|
- getnum();
|
|
|
|
-});
|
|
|
|
|
|
+// onMounted(async () => {
|
|
|
|
+
|
|
|
|
+// });
|
|
</script>
|
|
</script>
|
|
|
|
|
|
<style lang="scss" scoped>
|
|
<style lang="scss" scoped>
|