Quellcode durchsuchen

【feat】【v3】

1.完善页面样式
ChenYL vor 9 Monaten
Ursprung
Commit
425c51bdb1

+ 6 - 3
src/pages/account/accountList.vue

@@ -24,7 +24,7 @@
         <view class="item-points">{{ account.points }}积分</view>
       </view>
       <view class="btn-group">
-        <view class="btn-item" @click="deleteDialogOpen(account.id)">删除</view>
+        <view class="btn-item del-btn" @click="deleteDialogOpen(account.id)">删除</view>
         <view class="btn-item" @click="goAccountEditPage(account.id)">编辑</view>
       </view>
     </view>
@@ -238,7 +238,6 @@ onPullDownRefresh(() => {
   }
 
   .btn-group {
-    margin-top: 16rpx;
     display: flex;
     border-top: 1px solid #C7C7C7;
 
@@ -249,7 +248,7 @@ onPullDownRefresh(() => {
       justify-content: center;
       align-items: center;
 
-      padding: 0rpx 16rpx;
+      padding: 8rpx 16rpx;
       font-size: 28rpx;
       font-weight: 400;
       letter-spacing: 0prx;
@@ -260,6 +259,10 @@ onPullDownRefresh(() => {
     .btn-item:not(:last-child) {
       border-right: 1px solid #C7C7C7;
     }
+
+    .del-btn {
+      color: red;
+    }
   }
 }
 </style>

+ 6 - 3
src/pages/reward/rewardList.vue

@@ -17,7 +17,7 @@
         <view class="item-points">{{ reward.exchangePoints }}积分</view>
       </view>
       <view class="btn-group">
-        <view class="btn-item" @click="deleteDialogOpen(reward.id)">删除</view>
+        <view class="btn-item del-btn" @click="deleteDialogOpen(reward.id)">删除</view>
         <view class="btn-item" @click="goRewardEditPage(reward.id)">编辑</view>
       </view>
     </view>
@@ -192,7 +192,6 @@ onPullDownRefresh(() => {
   }
 
   .btn-group {
-    margin-top: 16rpx;
     display: flex;
     border-top: 1px solid #C7C7C7;
 
@@ -203,7 +202,7 @@ onPullDownRefresh(() => {
       justify-content: center;
       align-items: center;
 
-      padding: 0rpx 16rpx;
+      padding: 8rpx 16rpx;
       font-size: 28rpx;
       font-weight: 400;
       letter-spacing: 0prx;
@@ -214,6 +213,10 @@ onPullDownRefresh(() => {
     .btn-item:not(:last-child) {
       border-right: 1px solid #C7C7C7;
     }
+
+    .del-btn {
+      color: red;
+    }
   }
 }
 </style>

+ 2 - 0
src/pages/rewardMarket.vue

@@ -262,6 +262,8 @@ onPullDownRefresh(() => {
   .general-account {
     display: inline-flex;
     width: 312rpx;
+
+    font-size: 28rpx;
   }
 
   .general-account:not(:last-child) {

+ 3 - 1
src/pages/task/taskEdit.vue

@@ -206,6 +206,8 @@ const taskForm = ref(null);
  * 打卡任务表单数据
  */
 const taskFormData = ref({
+  "displayOrder": 10,
+  "displayTime": "00:00",
   "repeatCategory": REPEAT_CATEGORY.EVERYDAY,
   "punchInMethod": PUNCH_IN_METHOD.SINGLE,
   "extraMethod": EXTRA_METHOD.NONE,
@@ -567,7 +569,7 @@ const timeChange = (e) => {
  * 显示时间 时间选择监听
  */
 const displayTimeChange = (e) => {
-  taskFormData.value.displayTIme = e.detail.value;
+  taskFormData.value.displayTime = e.detail.value;
 }
 
 /**

+ 45 - 39
src/pages/taskList.vue

@@ -9,39 +9,42 @@
         立即创建
       </view>
     </view>
-    <view class="task-item" v-for="task in tasks" :key="task.id">
-      <view class="main-box" @click="goTaskDetailPage(task.id)">
-        <view class="item-header">
-          <span class="item-title">{{ task.taskName }}</span>
-          <span class="item-reward">x{{ task.points }}</span>
-          <view class="item-tag" v-if="task.fullAttendanceFlag">全勤奖励</view>
-          <view class="item-tag" v-if="task.weekendDoubleFlag">周末双倍</view>
-        </view>
-        <view class="item-desc">
-          描述:{{ task.description }}
-        </view>
-        <view class="item-detail-list">
-          <view class="item-detail" v-for="punchInRecord in task.piTaskHistorySimpleVOS"
-            :key="punchInRecord.punchInDate">
-            <view class="detail-text">
-              <uni-dateformat :date="punchInRecord.punchInDate" format="M/d"></uni-dateformat>
-            </view>
-            <view class="detail-box" style="background-color: #E5E5E5;"
-              v-if="punchInRecord.punchInResult == 'NOT_NEED'"></view>
-            <view class="detail-box" style="background-color: #A5D63F;" v-if="punchInRecord.punchInResult == 'DONE'">
-            </view>
-            <view class="detail-box" style="background-color: #D43030;" v-if="punchInRecord.punchInResult == 'UNDONE'">
-            </view>
-            <view class="detail-box" v-if="punchInRecord.punchInResult == 'FUTURE'">
+    <view>
+      <view class="task-item" v-for="task in tasks" :key="task.id">
+        <view class="main-box" @click="goTaskDetailPage(task.id)">
+          <view class="item-header">
+            <span class="item-title">{{ task.taskName }}</span>
+            <span class="item-reward">x{{ task.points }}</span>
+            <view class="item-tag" v-if="task.fullAttendanceFlag">全勤奖励</view>
+            <view class="item-tag" v-if="task.weekendDoubleFlag">周末双倍</view>
+          </view>
+          <view class="item-desc">
+            描述:{{ task.description }}
+          </view>
+          <view class="item-detail-list">
+            <view class="item-detail" v-for="punchInRecord in task.piTaskHistorySimpleVOS"
+              :key="punchInRecord.punchInDate">
+              <view class="detail-text">
+                <uni-dateformat :date="punchInRecord.punchInDate" format="M/d"></uni-dateformat>
+              </view>
+              <view class="detail-box" style="background-color: #E5E5E5;"
+                v-if="punchInRecord.punchInResult == 'NOT_NEED'"></view>
+              <view class="detail-box" style="background-color: #A5D63F;" v-if="punchInRecord.punchInResult == 'DONE'">
+              </view>
+              <view class="detail-box" style="background-color: #D43030;"
+                v-if="punchInRecord.punchInResult == 'UNDONE'">
+              </view>
+              <view class="detail-box" v-if="punchInRecord.punchInResult == 'FUTURE'">
+              </view>
             </view>
           </view>
         </view>
-      </view>
-      <view class="btn-group">
-        <view class="btn-item" @click="deleteDialogOpen(task.id)">删除</view>
-        <view class="btn-item" @click="archiveDialogOpen(task.id)">归档</view>
-        <view class="btn-item" @click="revokeDialogOpen(task.id)">撤销</view>
-        <view class="btn-item" @click="goTaskEditPage(task.id)">编辑</view>
+        <view class="btn-group">
+          <view class="btn-item del-btn" @click="deleteDialogOpen(task.id)">删除</view>
+          <view class="btn-item" @click="archiveDialogOpen(task.id)">归档</view>
+          <view class="btn-item" @click="revokeDialogOpen(task.id)">撤销</view>
+          <view class="btn-item" @click="goTaskEditPage(task.id)">编辑</view>
+        </view>
       </view>
     </view>
 
@@ -263,7 +266,7 @@ onPullDownRefresh(() => {
 
 <style lang="scss" scoped>
 .task-container {
-  padding: 0rpx 24rpx;
+  padding: 0rpx 24rpx 16rpx 24rpx;
 
   .task-header {
     position: relative;
@@ -296,9 +299,8 @@ onPullDownRefresh(() => {
   }
 
   .task-item {
-    margin-top: 16rpx;
+    margin-bottom: 16rpx;
     width: 100%;
-    // height: 239rpx;
     border-radius: 24rpx;
     background: #FFFFFF;
     border: 0.5px solid #E4E4E4;
@@ -308,7 +310,6 @@ onPullDownRefresh(() => {
       padding: 16rpx 16rpx 16rpx 24rpx;
 
       .item-header {
-        // position: relative;
         display: flex;
         align-items: center;
 
@@ -349,7 +350,6 @@ onPullDownRefresh(() => {
           font-size: 18rpx;
           font-weight: 400;
           letter-spacing: 0rpx;
-          // line-height: 26.06rpx;
           color: #406CE7;
 
         }
@@ -384,7 +384,7 @@ onPullDownRefresh(() => {
       .item-detail-list {
         margin-top: 16rpx;
         display: grid;
-        grid-template-columns: repeat(7, 1fr);
+        grid-template-columns: repeat(10, 1fr);
 
         .item-detail {
           display: flex;
@@ -401,7 +401,6 @@ onPullDownRefresh(() => {
           }
 
           .detail-box {
-            // display: block;
             width: 42rpx;
             height: 42rpx;
             margin-top: 5rpx;
@@ -412,7 +411,6 @@ onPullDownRefresh(() => {
     }
 
     .btn-group {
-      margin-top: 16rpx;
       display: flex;
       border-top: 1px solid #C7C7C7;
 
@@ -423,7 +421,7 @@ onPullDownRefresh(() => {
         justify-content: center;
         align-items: center;
 
-        padding: 0rpx 16rpx;
+        padding: 8rpx 16rpx;
         font-size: 28rpx;
         font-weight: 400;
         letter-spacing: 0prx;
@@ -434,7 +432,15 @@ onPullDownRefresh(() => {
       .btn-item:not(:last-child) {
         border-right: 1px solid #C7C7C7;
       }
+
+      .del-btn {
+        color: red;
+      }
     }
   }
+
+  .task-item:last-child {
+    margin-bottom: 0rpx;
+  }
 }
 </style>

+ 9 - 4
src/pages/taskTodo.vue

@@ -28,7 +28,7 @@
           <span v-if="task.punchInMethod == PUNCH_IN_METHOD.COUNT">{{ holidayFlag ? task.holidayCountTrack :
             task.countTrack }}次</span>
           <span v-if="task.punchInMethod == PUNCH_IN_METHOD.TIMING">{{ holidayFlag ? task.holidayTimeTrack :
-            task.timeTrack.slice(0, 5) }}</span>
+            task.timeTrack ? task.timeTrack.slice(0, 5) : '00:00' }}</span>
         </view>
         <view class="item-desc">
           描述:{{ task.description }}
@@ -50,7 +50,7 @@
         :class="task.punchInResult == PUNCH_IN_RESULT.DONE ? 'func-box func-box-finish' : 'func-box func-box-unfinish'"
         v-if="task.punchInMethod == PUNCH_IN_METHOD.TIMING" @click="doPunchInForTimeTrack(task.id, task.timeTrack)">
         <span>
-          {{ task.currentTimeTrack.slice(0, 5) }}
+          {{ task.currentTimeTrack ? task.currentTimeTrack.slice(0, 5) : '00:00' }}
         </span>
         <span>计时</span>
       </view>
@@ -199,6 +199,7 @@ const goTaskDetailPage = (id) => {
 const loadData = async () => {
   let res = await punchInApi.queryToDoList();
   tasks.value = res;
+  console.log(tasks);
 };
 
 onShow(() => {
@@ -213,7 +214,7 @@ onPullDownRefresh(() => {
 
 <style lang="scss" scoped>
 .task-container {
-  padding: 0rpx 24rpx;
+  padding: 0rpx 24rpx 16rpx 24rpx;
 
   .task-header {
     position: relative;
@@ -246,7 +247,7 @@ onPullDownRefresh(() => {
   }
 
   .task-item {
-    margin-top: 16rpx;
+    margin-bottom: 16rpx;
     width: 100%;
     // height: 239rpx;
     border-radius: 24rpx;
@@ -361,6 +362,10 @@ onPullDownRefresh(() => {
       background: #406CE7;
     }
   }
+
+  .task-item:last-child {
+    margin-bottom: 0rpx;
+  }
 }
 
 .pick-box {

+ 2 - 2
src/pages/userCenter.vue

@@ -68,10 +68,10 @@
           :extraIcon="{ color: '#000000', size: 22, type: 'minus' }" link="navigateTo"
           :to="router.REWARD_EXCHANGE_HISTORY_PAGE">
         </uni-list-item>
-        <uni-list-item title="彩票消费与中奖记录" :showArrow="true" :showExtraIcon="true"
+        <!-- <uni-list-item title="彩票消费与中奖记录" :showArrow="true" :showExtraIcon="true"
           :extraIcon="{ color: '#000000', size: 22, type: 'info' }" link="navigateTo"
           :to="router.ITEM_CONSUME_WIN_HISTORY_PAGE">
-        </uni-list-item>
+        </uni-list-item> -->
         <uni-list-item title="账户转账记录" :showArrow="true" :showExtraIcon="true" clickable
           :extraIcon="{ color: '#000000', size: 22, type: 'minus' }" link="navigateTo"
           :to="router.ACCOUNT_TRANSFER_HISTORY_PAGE">