feat: 添加签到功能
This commit is contained in:
8
Yi.Bbs.Vue3/src/apis/integralApi.js
Normal file
8
Yi.Bbs.Vue3/src/apis/integralApi.js
Normal file
@@ -0,0 +1,8 @@
|
|||||||
|
import request from "@/config/axios/service";
|
||||||
|
|
||||||
|
export function signIn() {
|
||||||
|
return request({
|
||||||
|
url: "/integral/sign-in",
|
||||||
|
method: "post"
|
||||||
|
});
|
||||||
|
}
|
||||||
@@ -87,10 +87,10 @@
|
|||||||
</div>
|
</div>
|
||||||
<!-- 签到 -->
|
<!-- 签到 -->
|
||||||
<el-col :span="24">
|
<el-col :span="24">
|
||||||
<InfoCard header="签到">
|
<InfoCard header="每日签到">
|
||||||
<template #content>
|
<template #content>
|
||||||
<div class="signIn">
|
<div class="signIn">
|
||||||
<div class="left">欢迎来到意社区!</div>
|
<div class="left">你好,很高兴今天又遇到你!</div>
|
||||||
<div class="right">
|
<div class="right">
|
||||||
<div class="signIn-btn" @click="handleToSign">去签到</div>
|
<div class="signIn-btn" @click="handleToSign">去签到</div>
|
||||||
</div>
|
</div>
|
||||||
|
|||||||
@@ -1,8 +1,29 @@
|
|||||||
<template>
|
<template>
|
||||||
<div class="everyday-box">每日签到页持续coding中~~~</div>
|
<div class="everyday-box">
|
||||||
|
<h4>每日签到页持续coding中~~~</h4>
|
||||||
|
|
||||||
|
|
||||||
|
<el-button type="primary" @click="signInOnclic">点击完成签到</el-button>
|
||||||
|
|
||||||
|
|
||||||
|
</div>
|
||||||
</template>
|
</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>
|
<style lang="scss" scoped>
|
||||||
.everyday-box {
|
.everyday-box {
|
||||||
|
|||||||
Reference in New Issue
Block a user