|
|
@@ -14,7 +14,12 @@
|
|
|
height: safeArea.capsuleBarContentHeight+'px',
|
|
|
width: safeArea.capsuleBarContentHeight+'px',
|
|
|
}">
|
|
|
- <uni-icons type="person" :size="safeArea.capsuleBarContentHeight" color="#FFFFFF"></uni-icons>
|
|
|
+ <!-- <uni-icons type="person" :size="safeArea.capsuleBarContentHeight" color="#FFFFFF"></uni-icons> -->
|
|
|
+ <image :style="{
|
|
|
+ height: safeArea.capsuleBarContentHeight+'px',
|
|
|
+ width: safeArea.capsuleBarContentHeight+'px',
|
|
|
+ }"
|
|
|
+ mode="aspectFill" src="https://thirdwx.qlogo.cn/mmopen/vi_32/POgEwh4mIHO4nibH0KlMECNjjGxQUq24ZEaGT4poC6icRiccVGKSyXwibcPq4BWmiaIGuG1icwxaQX6grC9VemZoJ8rg/132"></image>
|
|
|
</view>
|
|
|
</view>
|
|
|
|
|
|
@@ -29,7 +34,8 @@
|
|
|
</view>
|
|
|
<view class="task-container">
|
|
|
<view class="task-header">
|
|
|
- <view class="task-title">任务(3个)</view>
|
|
|
+ <view class="task-title" v-if="punchIns.length > 0">任务({{punchIns.lengt}}个)</view>
|
|
|
+ <view class="task-title" v-else>任务</view>
|
|
|
<view class="task-add-btn" @click="goPunchInDetailPage">
|
|
|
<uni-icons type="plusempty" size="30" color="#406CE7"></uni-icons>
|
|
|
</view>
|
|
|
@@ -76,8 +82,9 @@
|
|
|
|
|
|
<script setup>
|
|
|
import { onMounted, ref } from 'vue';
|
|
|
+ import { onLoad, onPullDownRefresh } from "@dcloudio/uni-app";
|
|
|
import { rewardApi, punchInApi } from '@/service/apis.js';
|
|
|
- import safeArea from '@/utils/system.js';
|
|
|
+ import { getSafeArea } from '@/utils/system.js';
|
|
|
|
|
|
/**
|
|
|
* 可领取奖励
|
|
|
@@ -94,6 +101,11 @@
|
|
|
*/
|
|
|
const claimRewardDialog = ref(null);
|
|
|
|
|
|
+ /**
|
|
|
+ * 安全区
|
|
|
+ */
|
|
|
+ const safeArea = ref({});
|
|
|
+
|
|
|
|
|
|
/**
|
|
|
* 领取奖励
|
|
|
@@ -151,7 +163,11 @@
|
|
|
uni.navigateTo({
|
|
|
url: "/pages/detail/detail"
|
|
|
})
|
|
|
- }
|
|
|
+ };
|
|
|
+
|
|
|
+ onLoad(() => {
|
|
|
+ safeArea.value = getSafeArea();
|
|
|
+ });
|
|
|
|
|
|
onMounted(() => {
|
|
|
let token = uni.getStorageSync("token");
|
|
|
@@ -166,6 +182,14 @@
|
|
|
// 获取打卡
|
|
|
getPunchIn();
|
|
|
});
|
|
|
+
|
|
|
+ onPullDownRefresh(() => {
|
|
|
+ // 获取奖励
|
|
|
+ getReward();
|
|
|
+ // 获取打卡
|
|
|
+ getPunchIn();
|
|
|
+ uni.stopPullDownRefresh();
|
|
|
+ });
|
|
|
</script>
|
|
|
|
|
|
<style lang="scss" scoped>
|