Преглед изворни кода

fix: 🐛 修复显示异常问题

zhangtao пре 2 дана
родитељ
комит
351557c5cf
2 измењених фајлова са 33 додато и 23 уклоњено
  1. 30 22
      src/components/classItem/index.vue
  2. 3 1
      src/manifest.json

+ 30 - 22
src/components/classItem/index.vue

@@ -12,35 +12,43 @@
       <view class="max-w-500rpx">
         <wd-text :text="item.name" size="28rpx" :lines="1"></wd-text>
       </view>
-      <view v-if="item.unwrittenOffNum">
+      <template v-if="item.unwrittenOffNum && item.orDone">
         <commonbtn
           bg-color="#0074FF"
           @click="handlePic(String(item.id))"
-          v-if="(type == 0 && showBtn) || item.unwrittenOffNum"
+          v-if="type == 0"
           >拍照核销</commonbtn
         >
-        <commonbtn
-          bg-color="#0074FF"
-          @click="handleGoPath(`/subPack/ReservationClass/index?id=${item.id}`)"
-          v-if="type == 1 && showBtn"
-          >预约这节</commonbtn
+      </template>
+
+      <commonbtn
+        bg-color="#0074FF"
+        @click="handleGoPath(`/subPack/ReservationClass/index?id=${item.id}`)"
+        v-if="type == 1 && showBtn"
+        >预约这节</commonbtn
+      >
+      <commonbtn
+        bg-color="#0074FF"
+        @click="handlePost"
+        v-if="type == 2 && showBtn"
+        >延期这节</commonbtn
+      >
+      <template v-if="!showBtn">
+        <view
+          class="text-gray font-semibold text-28rpx"
+          v-if="item.orDone && !item.unwrittenOffNum && type == 0"
+          >已完成</view
         >
-        <commonbtn
-          bg-color="#0074FF"
-          @click="handlePost"
-          v-if="type == 2 && showBtn"
-          >延期这节</commonbtn
+        <view
+          class="text-gray font-semibold text-28rpx"
+          v-if="item.orDone && type != 0"
+          >已完成</view
+        >
+        <view
+          v-if="!item.orDone"
+          class="text-[#0074FF] font-semibold text-28rpx"
+          >未开始</view
         >
-      </view>
-      <template v-else>
-        <view v-if="!showBtn">
-          <view class="text-gray font-semibold text-28rpx" v-if="item.orDone"
-            >已完成</view
-          >
-          <view v-else class="text-[#0074FF] font-semibold text-28rpx"
-            >未开始</view
-          >
-        </view>
       </template>
     </view>
     <view

+ 3 - 1
src/manifest.json

@@ -49,7 +49,9 @@
     "usingComponents": true,
     "darkmode": false,
     "themeLocation": "theme.json",
-    "requiredPrivateInfos": ["getLocation"],
+    "requiredPrivateInfos": [
+      "getLocation"
+    ],
     "permission": {
       "scope.userLocation": {
         "desc": "将获取你的位置,以添加到水印相机"