Commit 66447f83 authored by 王炽's avatar 王炽

66666

parent 4254c03c
......@@ -20,4 +20,10 @@ export const fetchBirthdayGiftJSON = () => api.get('/c/equity/birthdayGift/index
* 领取生日礼
* @returns
*/
export const fetchBatchReceiveJSON = () => api.post('/c/equity/birthdayGift/batchReceive');
\ No newline at end of file
export const fetchBatchReceiveJSON = () => api.post('/c/equity/birthdayGift/batchReceive');
/**
* 获取活动状态--溯源游
* @returns
*/
export const fetchActivityStateJSON = () => api.get('/c/third/activity/state');
\ No newline at end of file
......@@ -16,7 +16,7 @@
<view
class="bottom-button"
v-if="isStart()"
v-if="isStart"
:style="{
background: `url(${$baseUrl}integral/1015/shengriliBtnBg${props.index}.png) no-repeat center/contain`
}"
......@@ -43,6 +43,7 @@
<script setup>
import { defineProps, defineEmits } from 'vue'
import { showLoading, hideLoading } from '../../utils';
// 定义组件名称
defineOptions({
......@@ -66,12 +67,12 @@ isshowLock:{
}
})
const isStart = () => {
const startDate = new Date(props.startDate);
const now = new Date();
console.log(startDate <= now);
return startDate <= now;
}
// const isStart = () => {
// const startDate = new Date(props.startDate);
// const now = new Date();
// console.log(startDate <= now);
// return startDate <= now;
// }
// 定义组件事件
const emit = defineEmits(['upgrade'])
......@@ -119,6 +120,17 @@ const getColor = () => {
]
return colors;
}
const isStart = ref(false);
onMounted(async () => {
showLoading();
const res = await fetchActivityStateJSON();
if(res?.success){
isStart.value = res?.data?.isStart;
}
hideLoading();
})
</script>
<style lang="less" scoped>
......
......@@ -270,7 +270,7 @@
</view>
</view>
<view>
<!-- 普通弹窗 -->
<!-- 普通弹窗 企微等二维码-->
<uni-popup :is-mask-click="false" :safe-area="false" ref="popup" background-color="#fff"
border-radius="48rpx">
<view v-if="qrObj !== null" class="popup-content">
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment