shmily1213 1 месяц назад
Родитель
Сommit
b7f92564d0

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

@@ -10,7 +10,7 @@
     </view>
   </view>
   <view class="mx-30 mt-36">
-    <ie-image :is-oss="true" src="/banner/index-banner-2.png" custom-class="w-full min-h-180 bg-back" :round="15" />
+    <ie-image :is-oss="true" src="/banner/index-banner-5.png" custom-class="w-full min-h-180 bg-back" :round="15" />
   </view>
 </template>
 <script lang="ts" setup>

+ 3 - 1
src/pagesMain/pages/index/components/index-map.vue

@@ -21,7 +21,9 @@
                     <view>
                         <view class="text-24 text-fore-title flex items-center gap-12">
                             <view class="font-bold">{{ m.title }}</view>
-                            <uv-icon name="arrow-right" color="white" size="12" custom-class="bg-black rounded-full"/>
+                            <view class="bg-black rounded-full p-4">
+                              <uv-icon name="arrow-right" color="white" size="6" />
+                            </view>
                         </view>
                         <view class="mt-3 text-22 text-fore-tip">{{ m.desc }}</view>
                     </view>

+ 2 - 2
src/pagesMain/pages/me/components/me-menu.vue

@@ -23,7 +23,7 @@
           <uv-cell isLink :cellStyle="cellStyle" @click="handleQuestion" :border="true">
             <template #title>
               <view class="flex items-center gap-x-10">
-                <uv-icon name="question-circle" size="16" color="#888888" />
+                <uv-icon name="question-circle" size="32rpx" color="#888888" />
                 <text class="text-30 text-fore-subtitle">常见问题</text>
               </view>
             </template>
@@ -31,7 +31,7 @@
           <uv-cell isLink :cellStyle="cellStyle" @click="handlePhone" :border="false">
             <template #title>
               <view class="flex items-center gap-x-10">
-                <uv-icon name="phone" size="17" color="#888888" />
+                <uv-icon name="phone" size="34rpx" color="#888888" />
                 <text class="text-30 text-fore-subtitle">客服电话</text>
               </view>
             </template>

+ 2 - 2
src/pagesOther/pages/university/detail/components/college-profile.vue

@@ -184,8 +184,8 @@ const grouped = computed<ProfessionGroup[]>(() => {
 });
 
 const handleWebsite = () => {
-  if (baseInfo.value.webSite) {
-    uni.$ie.openBrowser(baseInfo.value.webSite)
+  if (baseInfo.value.zhaoBanWZ) {
+    uni.$ie.openBrowser(baseInfo.value.zhaoBanWZ)
   } else {
     uni.$ie.showToast('未提供网址')
   }

+ 1 - 1
src/pagesOther/pages/voluntary/list/components/voluntary-item.vue

@@ -41,7 +41,7 @@ const handleSortUpdate = () => {
 }
 
 const handleDelete = async (m: VoluntaryMajorItem) => {
-    await uni.$ie.showConfirm({title: '删除提醒', content: `确定删除该专业?`})
+    await uni.$ie.showConfirm({title: '删除提醒', content: `确定删除该专业?`})
     await removeVoluntaryByMajor(m.majorId)
     uni.$ie.showSuccess('删除成功')
     emits('deleted')

+ 1 - 1
src/pagesStudy/components/knowledge-tree-node.vue

@@ -117,7 +117,7 @@ const getProgressPercent = (nodeData: Study.KnowledgeNode): number => {
   if (!finishedCount || !questionCount) {
     return 0;
   }
-  return Math.min(finishedCount / questionCount, 1);
+  return Math.min(finishedCount / questionCount, 1) * 100;
 };
 </script>
 

+ 8 - 9
src/pagesStudy/components/question-book-item.vue

@@ -26,21 +26,18 @@
         <uv-icon name="info-circle" size="18" color="var(--primary-color)" />
         <text class="text-26 text-primary">纠错</text>
       </view>
-      <view v-if="!showAnswer" class="flex items-center" @click="toggleShowParse">
-        <cover-view class="w-60 h-60 flex items-center justify-center">
-          <cover-image v-show="!showParse" src="@/pagesSystem/static/image/icon/icon-eye.png" mode="widthFix"
-            class="w-38 h-38" />
-          <cover-image v-show="showParse" src="@/pagesSystem/static/image/icon/icon-eye-off.png" mode="widthFix"
-            class="w-38 h-38" />
-        </cover-view>
+      <view v-show="!showAnswer" class="flex items-center" @click="toggleShowParse">
+        <view class="w-60 h-60 flex items-center justify-center">
+          <ie-image :src="showParse ? EyeOffIcon : EyeIcon" mode="widthFix" custom-class="w-38 h-38" />
+        </view>
         <text class="text-26 text-primary">{{ showParse ? '隐藏解析' : '查看解析' }}</text>
       </view>
-      <view v-else class="flex items-center" @click="handleDelete">
+      <view v-show="showAnswer" class="flex items-center" @click="handleDelete">
         <uv-icon name="trash" size="18" color="var(--danger)" />
         <text class="text-26 text-danger">删除</text>
       </view>
     </view>
-    <view v-show="showParse" class="question-parse">
+    <view v-if="showParse" class="question-parse">
       <view v-if="showAnswer">
         <view class="text-28 text-fore-title font-bold">知识点</view>
         <view class="mt-10 text-26 text-primary">
@@ -63,6 +60,8 @@
   </view>
 </template>
 <script lang="ts" setup>
+import EyeIcon from '@/pagesSystem/static/image/icon/icon-eye.png';
+import EyeOffIcon from '@/pagesSystem/static/image/icon/icon-eye-off.png';
 import { EnumQuestionType } from '@/common/enum';
 import type { Study } from '@/types';
 

+ 18 - 10
src/pagesStudy/pages/question-favorites/question-favorites.vue

@@ -6,7 +6,7 @@
         <ie-navbar title="收藏夹" />
       </template>
       <view v-for="item in list" :key="item.id">
-        <question-book-item :data="item" @correct="handleCorrect" @cancelCollect="handleCancelCollect" />
+        <question-book-item :data="item" @correct="handleCorrect" @toggleCollect="handleToggleCollect" />
       </view>
     </z-paging>
     <question-correct-popup ref="questionCorrectPopupRef" />
@@ -24,7 +24,7 @@ import useQuestionBook from '@/composables/useQuestionBook';
 const list = ref<Study.FavoriteQuestionVO[]>([]);
 const paging = ref<ZPagingInstance>();
 const questionCorrectPopupRef = ref();
-const { cancelCollect, isOptionCorrect, isOptionSelected } = useQuestionBook();
+const { isOptionCorrect, isOptionSelected, cancelCollect, collect,  } = useQuestionBook();
 
 const transfomeToQuestionBookVO = (list: Study.FavoriteQuestion[]): Study.FavoriteQuestionVO[] => {
   const orders = ['A', 'B', 'C', 'D', 'E', 'F', 'G', 'H', 'I', 'J', 'K', 'L', 'M', 'N', 'O', 'P', 'Q', 'R', 'S', 'T', 'U', 'V', 'W', 'X', 'Y', 'Z'];
@@ -48,7 +48,7 @@ const transfomeToQuestionBookVO = (list: Study.FavoriteQuestion[]): Study.Favori
       title: item.title,
       options: options,
       answers: [], // 收藏下没有答案
-      answer: decodeHtmlEntities(item.answer1 || ''),
+      answer: decodeHtmlEntities(item.answer2 || ''),
       qtype: item.qtpye,
       typeId: item.typeId,
       parse: decodeHtmlEntities(item.parse || ''),
@@ -68,19 +68,27 @@ const handleQuery = (page: number, size: number) => {
         option.isIncorrect = !option.isCorrect && option.isSelected;
       });
     });
-    console.log(data)
     paging.value?.completeByTotal(data, res.total);
   });
 };
 const handleCorrect = (question: Study.FavoriteQuestionVO) => {
   questionCorrectPopupRef.value.open(question.id);
 }
-const handleCancelCollect = (question: Study.FavoriteQuestionVO) => {
-  cancelCollect(question.id).then(res => {
-    if (res) {
-      paging.value?.refresh();
-    }
-  });
+const handleToggleCollect = (question: Study.FavoriteQuestionVO) => {
+  if (question.collect) {
+    cancelCollect(question.id).then(res => {
+      if (res) {
+        paging.value?.refresh();
+      }
+    });
+  } else {
+    collect(question.id).then(res => {
+      if (res) {
+        paging.value?.refresh();
+      }
+    });
+  }
+
 }
 </script>
 

+ 1 - 1
src/pagesStudy/pages/wrong-book/wrong-book.vue

@@ -57,7 +57,7 @@ const transfomeToQuestionBookVO = (list: Study.WrongBookQuestion[]): Study.Favor
       title: item.title,
       options: options,
       answers: item.answers,
-      answer: decodeHtmlEntities(item.answer1 || ''),
+      answer: decodeHtmlEntities(item.answer2 || ''),
       qtype: item.type,
       typeId: item.typeId,
       parse: decodeHtmlEntities(item.parse || ''),

+ 4 - 4
src/uni_modules/mp-html/components/mp-html/latex/index.js

@@ -13,7 +13,7 @@ Latex.prototype.onParse = function (node, vm) {
   // $...$、$$...$$、\(...\)、\[...\]包裹的内容为latex公式
   if (!vm.options.editable && node.type === 'text' && 
       (node.text.includes('$') || node.text.includes('\\(') || node.text.includes('\\['))) {
-    console.log('原始文本:', node.text)
+    // console.log('原始文本:', node.text)
     
     const children = []
     let remaining = node.text
@@ -69,7 +69,7 @@ Latex.prototype.onParse = function (node, vm) {
       
       // 提取公式内容
       let formulaContent = remaining.substring(contentStart, endPos)
-      console.log('提取的原始公式内容:', formulaContent, '分隔符类型:', delimiter.type)
+      // console.log('提取的原始公式内容:', formulaContent, '分隔符类型:', delimiter.type)
       
       // 清理公式内容:移除内部嵌套的数学分隔符
       // 如果外层用 \(...\) 或 \[...\],需要移除内部的 $...$ 和 $$...$$
@@ -79,12 +79,12 @@ Latex.prototype.onParse = function (node, vm) {
         // 匹配 $...$ 和 $$...$$ 并只保留内容
         formulaContent = formulaContent.replace(/\$\$(.*?)\$\$/g, '$1')  // 先处理 $$
         formulaContent = formulaContent.replace(/\$(.*?)\$/g, '$1')      // 再处理 $
-        console.log('清理后的公式内容:', formulaContent)
+        // console.log('清理后的公式内容:', formulaContent)
       } else if (delimiter.type === '$' || delimiter.type === '$$') {
         // 外层是 $ 格式,移除内部的 \(...\) 和 \[...\]
         formulaContent = formulaContent.replace(/\\\[(.*?)\\\]/g, '$1')  // 先处理 \[...\]
         formulaContent = formulaContent.replace(/\\\((.*?)\\\)/g, '$1')  // 再处理 \(...\)
-        console.log('清理后的公式内容:', formulaContent)
+        // console.log('清理后的公式内容:', formulaContent)
       }
       
       // 容错处理:修正常见的 LaTeX 语法错误