|
@@ -1,11 +1,9 @@
|
|
|
<template>
|
|
<template>
|
|
|
<view class="container page-bg">
|
|
<view class="container page-bg">
|
|
|
<view class="header-container">
|
|
<view class="header-container">
|
|
|
- <navigator url="/pages/login/login">
|
|
|
|
|
- <view class="user-info">
|
|
|
|
|
- <uni-icons type="person" size="30" color="#FFFFFF"></uni-icons>
|
|
|
|
|
- </view>
|
|
|
|
|
- </navigator>
|
|
|
|
|
|
|
+ <view class="user-info" @click="goUserInfoPage">
|
|
|
|
|
+ <uni-icons type="person" size="30" color="#FFFFFF"></uni-icons>
|
|
|
|
|
+ </view>
|
|
|
</view>
|
|
</view>
|
|
|
<view class="settle-container">
|
|
<view class="settle-container">
|
|
|
<view class="settle-text-container">
|
|
<view class="settle-text-container">
|
|
@@ -17,10 +15,8 @@
|
|
|
<view class="task-container">
|
|
<view class="task-container">
|
|
|
<view class="task-header">
|
|
<view class="task-header">
|
|
|
<view class="task-title">任务(3个)</view>
|
|
<view class="task-title">任务(3个)</view>
|
|
|
- <view class="task-add-btn">
|
|
|
|
|
- <navigator url="/pages/detail/detail">
|
|
|
|
|
- <uni-icons type="plusempty" size="30" color="#406CE7"></uni-icons>
|
|
|
|
|
- </navigator>
|
|
|
|
|
|
|
+ <view class="task-add-btn" @click="goPunchInDetailPage">
|
|
|
|
|
+ <uni-icons type="plusempty" size="30" color="#406CE7"></uni-icons>
|
|
|
</view>
|
|
</view>
|
|
|
</view>
|
|
</view>
|
|
|
<view class="task-item" v-for="punchIn in punchIns" :key="punchIn.punchInId">
|
|
<view class="task-item" v-for="punchIn in punchIns" :key="punchIn.punchInId">
|
|
@@ -36,7 +32,7 @@
|
|
|
<view class="item-btn" @click="doPunchIn(punchIn.punchInId)">完成</view>
|
|
<view class="item-btn" @click="doPunchIn(punchIn.punchInId)">完成</view>
|
|
|
</view>
|
|
</view>
|
|
|
<view class="item-detail-list">
|
|
<view class="item-detail-list">
|
|
|
- <view class="item-detail" v-for="punchInRecord in punchIn.punchInRecords">
|
|
|
|
|
|
|
+ <view class="item-detail" v-for="punchInRecord in punchIn.punchInRecords" :key="punchInRecord.punchInDate">
|
|
|
<view class="detail-text">
|
|
<view class="detail-text">
|
|
|
<uni-dateformat :date="punchInRecord.punchInDate" format="M月d日"></uni-dateformat>
|
|
<uni-dateformat :date="punchInRecord.punchInDate" format="M月d日"></uni-dateformat>
|
|
|
</view>
|
|
</view>
|
|
@@ -118,7 +114,32 @@
|
|
|
getPunchIn();
|
|
getPunchIn();
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
|
|
+ /**
|
|
|
|
|
+ * 跳转用户用心
|
|
|
|
|
+ */
|
|
|
|
|
+ const goUserInfoPage = () => {
|
|
|
|
|
+ uni.navigateTo({
|
|
|
|
|
+ url: "/pages/userInfo/userInfo"
|
|
|
|
|
+ });
|
|
|
|
|
+ }
|
|
|
|
|
+
|
|
|
|
|
+ /**
|
|
|
|
|
+ * 获取打卡编辑页面
|
|
|
|
|
+ */
|
|
|
|
|
+ const goPunchInDetailPage = () => {
|
|
|
|
|
+ uni.navigateTo({
|
|
|
|
|
+ url: "/pages/detail/detail"
|
|
|
|
|
+ })
|
|
|
|
|
+ }
|
|
|
|
|
+
|
|
|
onMounted(() => {
|
|
onMounted(() => {
|
|
|
|
|
+ let token = uni.getStorageSync("token");
|
|
|
|
|
+ // 如果还没登录就结束获取数据
|
|
|
|
|
+ if (!token) {
|
|
|
|
|
+ reward.value = 0;
|
|
|
|
|
+ punchIns.value = [];
|
|
|
|
|
+ return;
|
|
|
|
|
+ }
|
|
|
// 获取奖励
|
|
// 获取奖励
|
|
|
getReward();
|
|
getReward();
|
|
|
// 获取打卡
|
|
// 获取打卡
|