Selaa lähdekoodia

fix:修改一些细节

aamin 1 vuosi sitten
vanhempi
commit
9314c2c992

+ 2 - 2
src/api/request.ts

@@ -5,8 +5,8 @@ import axios from 'axios';
 // export const baseUrl = "https://wxfalangchang.4dage.com/api";
 // export const baseIMGUrl = "https://wxfalangchang.4dage.com";
 // export const baseUrl = "https://sit-ningguobwg.4dage.com/api/";
-// export const baseIMGUrl = "";
-export const baseIMGUrl = "https://sit-ningguobwg.4dage.com/";
+export const baseIMGUrl = "";
+// export const baseIMGUrl = "https://sit-ningguobwg.4dage.com/";
 
 
 export const baseUrl =

+ 15 - 6
src/views/EnterNingguo/dynamic-detail.vue

@@ -1,12 +1,13 @@
 <script setup lang='ts'>
 import { DynamicApi } from '@/api/api/dynamic';
 import { showToast } from 'vant';
-import {baseIMGUrl} from '@/api/request.ts'
+import { baseIMGUrl } from '@/api/request.ts'
 
 
 // import { DynamicApi } from "@/api/api/dynamic/index";
 // import { showToast } from "vant";
 
+// const router = useRouter()
 const route = useRoute()
 
 
@@ -47,9 +48,17 @@ const getDetailById = async () => {
 }
 
 const formatrtf = computed(() => {
-  return  dynamicDetail.value.rtf.replace(/<img /g, '<img style="width: 100%;" ');
+  return dynamicDetail.value.rtf.replace(
+    /<img /g,
+    '<img style="width: 100%;" '
+  ).replace(
+    /<p\b[^>]*>/g,
+    '<p style="width: 100%; word-wrap: break-word;">'
+  );
 })
 
+
+
 onBeforeMount(async () => {
   getDetailById()
 })
@@ -92,7 +101,7 @@ onBeforeMount(async () => {
     margin-top: -30px;
     position: relative;
     z-index: 2;
-    padding: 8% 15px;
+    padding: 8% 15px 8% 15px 20% 15px;
     box-sizing: border-box;
     overflow: auto;
 
@@ -123,15 +132,15 @@ onBeforeMount(async () => {
       margin-bottom: 10px;
       padding: 0 10px;
       font-family: 'SourceHanSansCN-Medium';
-      overflow-wrap: break-word; 
+      overflow-wrap: break-word;
     }
 
     .mainbody-box {
-      white-space: pre;
+      width: 100%;
+      // white-space: pre;
       margin-bottom: 10px;
       padding: 0 10px;
 
-
     }
 
     .video-box {

Tiedoston diff-näkymää rajattu, sillä se on liian suuri
+ 8 - 1
src/views/EnterNingguo/summarize.vue


+ 11 - 3
src/views/ExhibitionService/active-detail.vue

@@ -51,10 +51,18 @@ const goBooking = () => {
 }
 
 
+
 const formatrtf = computed(() => {
-  return  activeDetail.value.rtf.replace(/<img /g, '<img style="width: 100%;" ');
+  return activeDetail.value.rtf.replace(
+    /<img /g,
+    '<img style="width: 100%;" '
+  ).replace(
+    /<p\b[^>]*>/g,
+    '<p style="width: 100%; word-wrap: break-word;">'
+  );
 })
 
+
 onBeforeMount(() => {
   getDetailById()
 })
@@ -101,7 +109,7 @@ onBeforeMount(() => {
     margin-top: -30px;
     position: relative;
     z-index: 2;
-    padding: 8% 15px;
+    padding: 8% 15px 20% 15px;
     box-sizing: border-box;
     overflow: auto;
 
@@ -134,7 +142,7 @@ onBeforeMount(() => {
     }
 
     .rtf-box {
-      white-space: pre;
+      // white-space: pre;
       margin-bottom: 10px;
       padding: 0 10px;
       color: #88866F;

+ 0 - 3
src/views/ExhibitionService/bookedList.vue

@@ -64,8 +64,6 @@ const getList = async() => {
 }
 
 onMounted(() => {
-
-
   // 清除之前的预约选择记录
   store.selectDate = ''
   store.selectTime = ''
@@ -114,7 +112,6 @@ onMounted(() => {
   //     time: '9:00-1:00',
   //     updateTime: '2024-04-16 16:46:00'
   //   },
-
   // ]
 
   // userAuthorization()

+ 8 - 1
src/views/SmartTour/exhibition-detail.vue

@@ -43,8 +43,15 @@ const getDetailById = async () => {
   }
 }
 
+
 const formatrtf = computed(() => {
-  return exhibitionDetail.value.rtf.replace(/<img /g, '<img style="width: 100%;" ');
+  return exhibitionDetail.value.rtf.replace(
+    /<img /g,
+    '<img style="width: 100%;" '
+  ).replace(
+    /<p\b[^>]*>/g,
+    '<p style="width: 100%; word-wrap: break-word;">'
+  );
 })
 
 onBeforeMount(() => {

+ 3 - 1
src/views/SmartTour/exhibition.vue

@@ -3,6 +3,7 @@
 import { ExhibitionApi } from '@/api/api/exhibition';
 import { showToast } from 'vant';
 import SearchInput from '@/components/SearchInput/index.vue'
+import { baseIMGUrl } from '@/api/request';
 
 export type exhibitionType = {
   createTime: string,
@@ -118,7 +119,7 @@ onBeforeMount(() => {
             <!-- <div>{{ activeIndex }}</div> -->
             <div class="tab-content" v-if="data.length > 0">
               <div class="activity-card" v-for="(item, index) in data" :key="index" @click="goDetai(item.id)">
-                <img v-show="item.thumb != ''" class="thumb" :src="item.thumb" alt="">
+                <img v-show="item.thumb != ''" class="thumb" :src=" baseIMGUrl + item.thumb" alt="">
                 <div class="name">{{ item.name }}</div>
                 <div class="abstract">{{ item.description }}</div>
                 <div class="bottom-box">
@@ -174,6 +175,7 @@ onBeforeMount(() => {
 
         img {
           width: 100%;
+          height: 25vh;
           border-radius: 10px;
         }
 

+ 2 - 1
src/views/SmartTour/treasure.vue

@@ -3,6 +3,7 @@
 import { TreasureApi } from '@/api/api/treasure';
 import { showToast } from 'vant';
 import SearchInput from '@/components/SearchInput/index.vue'
+import { baseIMGUrl } from '@/api/request';
 
 export type DictType = {
   createTime: string | null,
@@ -129,7 +130,7 @@ onBeforeMount(() => {
           <!-- <div>{{ activeIndex }}</div> -->
           <div class="tab-content" v-if="data.length > 0">
             <div class="activity-card" v-for="(item, index) in data" :key="index" @click="goDetai(item.id)">
-              <img v-show="item.thumb != ''" class="thumb" :src="item.thumb" alt="">
+              <img v-show="item.thumb != ''" class="thumb" :src=" baseIMGUrl + item.thumb" alt="">
               <div class="title">{{ item.name }}</div>
               <div class="detail">
                 <div style="margin-right: 30px;">朝代:{{ item.age }}</div>

+ 10 - 1
src/views/VolunteerHome/detail.vue

@@ -41,9 +41,17 @@ const getDetailById = async () => {
 }
 
 const formatrtf = computed(() => {
-  return  activeDetail.value.rtf.replace(/<img /g, '<img style="width: 100%;" ');
+  return activeDetail.value.rtf.replace(
+    /<img /g,
+    '<img style="width: 100%;" '
+  ).replace(
+    /<p\b[^>]*>/g,
+    '<p style="width: 100%; word-wrap: break-word;">'
+  );
 })
 
+
+
 onBeforeMount(() => {
   getDetailById()
 })
@@ -120,6 +128,7 @@ onBeforeMount(() => {
 
     .mainbody-box {
       color: #88866F;
+      word-wrap: break-word;
     }
 
     .video-box {