feat: 添加签到功能

This commit is contained in:
陈淳
2024-01-13 17:20:57 +08:00
parent 4e5f51a4c8
commit f1a87ef529
3 changed files with 33 additions and 4 deletions

View File

@@ -0,0 +1,8 @@
import request from "@/config/axios/service";
export function signIn() {
return request({
url: "/integral/sign-in",
method: "post"
});
}

View File

@@ -87,10 +87,10 @@
</div>
<!-- 签到 -->
<el-col :span="24">
<InfoCard header="签到">
<InfoCard header="每日签到">
<template #content>
<div class="signIn">
<div class="left">欢迎来到意社区</div>
<div class="left">你好很高兴今天又遇到你</div>
<div class="right">
<div class="signIn-btn" @click="handleToSign">去签到</div>
</div>

View File

@@ -1,8 +1,29 @@
<template>
<div class="everyday-box">每日签到页持续coding中~~~</div>
<div class="everyday-box">
<h4>每日签到页持续coding中~~~</h4>
<el-button type="primary" @click="signInOnclic">点击完成签到</el-button>
</div>
</template>
<script setup></script>
<script setup>
import { onMounted, ref, reactive, computed, nextTick, watch } from "vue";
import { signIn } from "@/apis/integralApi.js";
const signInOnclic= async()=>{
const { data: data}= await signIn();
ElMessage({
message: `恭喜!运气爆棚,今日获得:${data.value} 钱钱`,
type: "success",
});
}
</script>
<style lang="scss" scoped>
.everyday-box {