瀏覽代碼

隐藏专升本模块

shmily1213 1 月之前
父節點
當前提交
732c6a2b83

+ 5 - 5
src/pagesMain/pages/index/components/index-banner.vue

@@ -65,11 +65,11 @@ const menus: MenuItem[] = [
     pageUrl: '/pagesOther/pages/news/index/index',
     noLogin: true
   },
-  {
-    name: '专升本',
-    icon: '/menu/menu-upgrade.png',
-    pageUrl: '/pages/index/index',
-  }
+  // {
+  //   name: '专升本',
+  //   icon: '/menu/menu-upgrade.png',
+  //   pageUrl: '/pages/index/index',
+  // }
 ]
 const navigateTo = async (item: MenuItem) => {
   const { pageUrl, navigateType, noLogin } = item;

+ 15 - 7
src/pagesStudy/pages/study-plan/components/page-calendar.vue

@@ -1,8 +1,8 @@
 <template>
   <view class="mt-24 bg-white relative z-4">
-    <uni-calendar :insert="true" :lunar="false" :readonly="false" :showMonth="false" :selected="selected"
+    <uni-calendar ref="calendarRef" :insert="true" :lunar="false" :readonly="false" :showMonth="false" :selected="selected"
       :endDate="endDate" @change-month="changeMonth" @change="handleChangeDate" />
-    <view class="wrap mt-20 w-fit mx-auto px-98 py-16 flex items-center justify-center">
+    <view class="wrap mt-20 w-fit mx-auto px-98 py-16 flex items-center justify-center transition-all duration-300">
       <ie-image src="/pagesStudy/static/image/icon-calendar.png" custom-class="w-22 h-22" />
       <text class="ml-4 text-20 text-primary">{{ tip }}</text>
     </view>
@@ -23,8 +23,8 @@ import { STUDY_PLAN_STATS, STUDY_PLAN } from '@/types/injectionSymbols';
 import { Study } from '@/types';
 const studyPlan = inject(STUDY_PLAN) || ref({} as Study.StudyPlan);
 const studyPlanStats = inject(STUDY_PLAN_STATS) || ref({} as Study.StudyPlanStats);
-
-let selectDate = ref(uni.$uv.timeFormat(new Date(), 'yyyy-mm-dd'));
+const today = uni.$uv.timeFormat(new Date(), 'yyyy-mm-dd');
+let selectDate = ref(today);
 const stat = computed(() => {
   let todayData = {} as Study.StudyStats;
   const questionCnt = studyPlan.value.questionCnt;
@@ -65,6 +65,9 @@ const stat = computed(() => {
     }
   ]
 });
+const isShowToday = computed(() => {
+  return selectDate.value === today;
+});
 const selected = computed(() => {
   if (!studyPlanStats.value?.studyList?.length) {
     return [];
@@ -94,10 +97,14 @@ const todayPlanFinish = computed(() => {
   return false
 });
 const tip = computed(() => {
-  if (todayPlanFinish.value) {
-    return '恭喜你,今日计划已完成'
+  if (isShowToday.value) {
+    if (todayPlanFinish.value) {
+      return '恭喜你,今日计划已完成'
+    }
+    return '今日计划进行中,加油~'
+  } else {
+    return '历史完成情况';
   }
-  return '今日计划进行中,加油~'
 });
 const getValue = (val?: number) => {
   return val || 0;
@@ -105,6 +112,7 @@ const getValue = (val?: number) => {
 const init = () => {
   endDate.value = uni.$uv.timeFormat(new Date(), 'yyyy-mm-dd')
 }
+const calendarRef = ref();
 const emit = defineEmits(['changeMonth', 'changeDate']);
 const changeMonth = (e: any) => {
   emit('changeMonth', e);

+ 0 - 1
src/pagesStudy/pages/study-plan/study-plan.vue

@@ -34,7 +34,6 @@ const handleEditPlan = () => {
   });
 }
 const handleChangeMonth = async (e: any) => {
-  console.log(e);
   uni.$ie.showLoading();
   selectDate.value = e.date.slice(0, 7) + '-01';
   await loadStatsData();