Преглед на файлове

refactor(system): 优化隐私政策和服务条款加载失败的提示信息- 将隐私政策加载失败的

fugui001 преди 4 месеца
родител
ревизия
982e770b62
променени са 2 файла, в които са добавени 4 реда и са изтрити 4 реда
  1. 2 2
      src/views/system/business/ofService/indexPreview.vue
  2. 2 2
      src/views/system/business/policy/indexPolicyPreview.vue

+ 2 - 2
src/views/system/business/ofService/indexPreview.vue

@@ -22,11 +22,11 @@ const fetchTos = async () => {
   try {
     const res = await getTermsServiceListMax();
     // 处理获取到的内容,确保格式良好
-    const formattedContent = handleContentFormatting(res.data.content || '<p>暂无服务条款内容</p>');
+    const formattedContent = handleContentFormatting(res.data.content || '<p>内容加载失败</p>');
     tosContent.value = DOMPurify.sanitize(formattedContent);
   } catch (error) {
     console.error('获取服务条款失败', error);
-    tosContent.value = '<p>服务条款内容加载失败</p>';
+    tosContent.value = '<p>内容加载失败</p>';
   }
 };
 

+ 2 - 2
src/views/system/business/policy/indexPolicyPreview.vue

@@ -20,10 +20,10 @@ onMounted(() => {
 const fetchPolicy = async () => {
   try {
     const res = await getPrivacyPolicyListMax();
-    policyContent.value = DOMPurify.sanitize(res.data.content || '<p>暂无隐私政策内容</p>');
+    policyContent.value = DOMPurify.sanitize(res.data.content || '<p>内容加载失败</p>');
   } catch (error) {
     console.error('获取隐私政策失败', error);
-    policyContent.value = '<p>隐私政策内容加载失败</p>';
+    policyContent.value = '<p>内容加载失败</p>';
   }
 };
 </script>