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

66666

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