1212121
This commit is contained in:
@@ -8,6 +8,9 @@
|
||||
<div class="common">
|
||||
<Abar href="/map">继续</Abar>
|
||||
</div>
|
||||
<div class="common" v-if="isCopy == 1">
|
||||
[<Abutton @click="onHook">立即挂机</Abutton>]
|
||||
</div>
|
||||
<div class="common">
|
||||
你体力:{{ blood }}/{{ upBlood }}
|
||||
</div>
|
||||
@@ -38,6 +41,7 @@ const blood = ref(0);
|
||||
const upBlood = ref(0);
|
||||
const fight = ref<any>({});
|
||||
const AwardTips = ref('');
|
||||
const isCopy = ref(0);
|
||||
let fightId = PageExtend.QueryString("f");
|
||||
|
||||
onMounted(async () => {
|
||||
@@ -57,6 +61,7 @@ const BindData = async (): Promise<void> => {
|
||||
blood.value = result.data.blood;
|
||||
upBlood.value = result.data.upBlood;
|
||||
fight.value = result.data.fight;
|
||||
isCopy.value = result.data.isCopy;
|
||||
if (fight.value.award != '') {
|
||||
AwardTips.value = awardTipsStr(JSON.parse(fight.value.award))
|
||||
}
|
||||
@@ -89,4 +94,18 @@ const awardTipsStr = (data: any) => {
|
||||
return result;
|
||||
}
|
||||
|
||||
/**挂机 */
|
||||
const onHook = async () => {
|
||||
MessageExtend.LoadingToast("正在进行挂机...");
|
||||
let result = await FightService.OnHook(fightId);
|
||||
MessageExtend.LoadingClose();
|
||||
if (result.code == 0) {
|
||||
isCopy.value = 0;
|
||||
MessageExtend.Notify("挂机成功!", "success");
|
||||
}
|
||||
else {
|
||||
MessageExtend.Notify(result.msg, "danger");
|
||||
}
|
||||
}
|
||||
|
||||
</script>
|
||||
Reference in New Issue
Block a user