This commit is contained in:
Putoo
2026-07-16 17:52:33 +08:00
parent 2cd2ed02f8
commit 00c2758df2
43 changed files with 897 additions and 72 deletions

View File

@@ -0,0 +1,51 @@
<template>
<div class="module-title">
CDK兑换
</div>
<div class="module-content tips" style="font-size:14px;">
亲爱的航海家,CDK码可以在这里兑换奖励哦!
</div>
<div class="module-content">
<div class="input">
CDK码:<input name="cdk" placeholder="请输入CDK" class="ipt" type="text" v-model="no">
</div>
<div class="input" style="margin-top: 10px;">
<input type="button" value="立即兑换" class="btn btn-danger" @click="exchange" />
</div>
</div>
</template>
<script setup lang="ts">
definePageMeta({
layout: layout.default,
middleware: 'page-loading'
})
const no = ref('');
onMounted(async () => {
try {
}
finally {
PageLoading.Close();
}
})
const exchange = async () => {
if (no.value == '') {
MessageExtend.ShowToast("CDK不能为空!");
return;
}
MessageExtend.LoadingToast("兑换中...");
let result = await CdkService.Exchange(no.value);
MessageExtend.LoadingClose();
if (result.code == 0) {
no.value = '';
MessageExtend.Notify(result.msg, "success", 5000);
}
else {
MessageExtend.ShowDialog("提示", result.msg);
}
}
</script>