fix: 修复大转盘停止转动问题

This commit is contained in:
陈淳
2024-02-27 10:12:07 +08:00
parent 0a247a9229
commit 0b97823f92
3 changed files with 34 additions and 5 deletions

View File

@@ -20,7 +20,6 @@ router.beforeEach((to, from, next) => {
} else {
if (useUserStore().roles.length === 0) {
// 判断当前用户是否已拉取完user_info信息
alert("获取用户信息")
useUserStore()
.getInfo()
.then(() => {

View File

@@ -79,8 +79,22 @@ const startCallback = () => {
// 假设后端返回的中奖索引是0
// 调用stop停止旋转并传递中奖索引
}, 3000)
try
{
const ddd=(await luckyWheel()).data;
console.log(ddd,"dd");
index= (await luckyWheel()).data;
myLucky.value.stop(index)
}
catch
{
}
finally{
myLucky.value.stop(index)
}
})