feat(custom): 增加没有豆子不可进入游戏
All checks were successful
continuous-integration/drone/push Build is passing

This commit is contained in:
2024-11-18 22:56:23 +08:00
parent 7eed620962
commit 72705cb101

View File

@@ -32,8 +32,12 @@ const startGame = () => {
url: info.value.url,
});
} else {
// const user = Taro.getStorageSync('userInfo')
// if(user.data.pulse <= 0) return Taro.showToast({title: '您的豆子不足,无法进入游戏', icon: 'none'})
const user = Taro.getStorageSync('userInfo');
if (user.data.pulse <= 0)
return Taro.showToast({
title: '您的豆子不足,无法进入游戏',
icon: 'none',
});
Taro.setStorageSync(
'game_url',
`${info.value.url}?uid=${Taro.getStorageSync('token')}&id=${