build(custom): 修正提交规范
This commit is contained in:
@@ -1,59 +1,63 @@
|
||||
<script setup lang="ts">
|
||||
import {ref} from 'vue'
|
||||
import Taro from '@tarojs/taro'
|
||||
import {getSignRecord, userSign} from '@/api/user'
|
||||
import { ref } from "vue";
|
||||
import Taro from "@tarojs/taro";
|
||||
import { getSignRecord, userSign } from "@/api/user";
|
||||
|
||||
const show = ref(false)
|
||||
const show = ref(false);
|
||||
|
||||
Taro.useLoad(async () => {
|
||||
show.value = true
|
||||
// const res = await getSignRecord()
|
||||
// console.log(res)
|
||||
})
|
||||
show.value = true;
|
||||
// const res = await getSignRecord()
|
||||
// console.log(res)
|
||||
});
|
||||
|
||||
const toSign = async () => {
|
||||
try {
|
||||
await userSign()
|
||||
Taro.showToast({
|
||||
title: '签到成功',
|
||||
icon: 'none'
|
||||
})
|
||||
} catch (e) {
|
||||
console.log(e)
|
||||
}
|
||||
show.value = false
|
||||
}
|
||||
try {
|
||||
await userSign();
|
||||
Taro.showToast({
|
||||
title: "签到成功",
|
||||
icon: "none",
|
||||
});
|
||||
} catch (e) {
|
||||
console.log(e);
|
||||
}
|
||||
show.value = false;
|
||||
};
|
||||
</script>
|
||||
|
||||
<template>
|
||||
<nut-overlay v-model:visible="show" :lock-scroll="true" :close-on-click-overlay="false">
|
||||
<view class="wrapper">
|
||||
<view @click.stop="toSign">
|
||||
<image class="image" src="../static/index/poppBg.png"/>
|
||||
</view>
|
||||
<view @click.stop="show = false">
|
||||
<image class="icon" src="../static/index/close.png"/>
|
||||
</view>
|
||||
</view>
|
||||
</nut-overlay>
|
||||
<nut-overlay
|
||||
v-model:visible="show"
|
||||
:lock-scroll="true"
|
||||
:close-on-click-overlay="false"
|
||||
>
|
||||
<view class="wrapper">
|
||||
<view @click.stop="toSign">
|
||||
<image class="image" src="../static/index/poppBg.png" />
|
||||
</view>
|
||||
<view @click.stop="show = false">
|
||||
<image class="icon" src="../static/index/close.png" />
|
||||
</view>
|
||||
</view>
|
||||
</nut-overlay>
|
||||
</template>
|
||||
|
||||
<style lang="scss">
|
||||
.wrapper {
|
||||
display: flex;
|
||||
height: 100%;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
flex-direction: column;
|
||||
display: flex;
|
||||
height: 100%;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
flex-direction: column;
|
||||
}
|
||||
|
||||
.image {
|
||||
width: 500px;
|
||||
height: 600px;
|
||||
width: 500px;
|
||||
height: 600px;
|
||||
}
|
||||
|
||||
.icon {
|
||||
width: 80px;
|
||||
height: 80px;
|
||||
width: 80px;
|
||||
height: 80px;
|
||||
}
|
||||
</style>
|
||||
</style>
|
||||
|
||||
Reference in New Issue
Block a user