Browse Source

fix:1.接口对接样式修改

suwenjiang 4 days ago
parent
commit
0268fd1093

+ 11 - 0
app.vue

@@ -28,4 +28,15 @@ useHead({
     { src: '/js/main.js', defer: true, body: true }
   ]
 })
+
+// const { t, locale, setLocale } = useI18n()
+// const switchLanguage = (lang) => {
+//   console.log(lang)
+//   // localStorage.setItem('lang', lang)
+//   setLocale(lang)
+// }
+
+// onMounted(() => {
+//   switchLanguage()
+// })
 </script>

+ 14 - 8
components/About-list/index.vue

@@ -1,10 +1,12 @@
 <script setup>
 const { t, locale, setLocale } = useI18n()
+const { $$t } = useStoreI18n()
+
 const bestList = ref([
-  'Encouraging Education',
-  'Enlighten Thinking',
-  'Teach Through fun',
-  'Respect Individuality'
+  $$t('encouragingEducation'),
+  $$t('enlightenThinking'),
+  $$t('teachThroughFun'),
+  $$t('respectIndividuality')
 ])
 </script>
 <template>
@@ -12,22 +14,26 @@ const bestList = ref([
     <ul class="wow fadeInUp" data-wow-delay=".3s">
       <li>
         <i class="fa-regular fa-circle-check"></i>
-        Encouraging Education
+        <!-- Encouraging Education -->
+        {{ t('encouragingEducation') }}
       </li>
 
       <li>
         <i class="fa-regular fa-circle-check"></i>
-        Enlighten Thinking
+        <!-- Enlighten Thinking -->
+        {{ t('enlightenThinking') }}
       </li>
     </ul>
     <ul class="wow fadeInUp" data-wow-delay=".5s">
       <li>
         <i class="fa-regular fa-circle-check"></i>
-        Teach Through fun
+        <!-- Teach Through fun -->
+        {{ t('teachThroughFun') }}
       </li>
       <li>
         <i class="fa-regular fa-circle-check"></i>
-        Respect Individuality
+        <!-- Respect Individuality -->
+        {{ t('respectIndividuality') }}
       </li>
     </ul>
   </div>

+ 15 - 14
components/HomeIndex/Activities-wrapper/index.vue

@@ -1,39 +1,38 @@
 <script setup>
-const { t, locale, setLocale } = useI18n()
+const { t } = useI18n()
+const { $$t } = useStoreI18n()
 const dataList = ref([
   {
     bg: 'box-color-1',
     id: 'wrapper0',
     wowDelay: '0.3s',
     img: '/picture/icon-1.svg',
-    title: 'Handicraft courses',
-    subTitle: "Cultivate students' practical abilities"
+    title: $$t('handicraftCourses'),
+    subTitle: $$t('handicraftCoursesSubTitle')
   },
   {
     bg: 'box-color-3',
     id: 'wrapper1',
     wowDelay: '0.5s',
     img: '/picture/icon-3.svg',
-    title: 'Classroom games',
-
-    subTitle: 'Add fun to the classroom'
+    title: $$t('classroomGames'),
+    subTitle: $$t('classroomGamesSubTitle')
   },
   {
     bg: 'box-color-2',
     id: 'wrapper2',
     wowDelay: '0.6s',
     img: '/picture/icon-2.svg',
-    title: 'Musical rhythm',
-
-    subTitle: "Help memory through children's songs"
+    title: $$t('musicalRhythm'),
+    subTitle: $$t('musicalRhythmSubTitle')
   },
   {
     bg: 'box-color-4',
     id: 'wrapper3',
     wowDelay: '0.8s',
     img: '/picture/icon-4.svg',
-    title: 'Chinese culture',
-    subTitle: 'Understand traditional Chinese cultural customs'
+    title: $$t('chineseCulture'),
+    subTitle: $$t('chineseCultureSubTitle')
   }
 ])
 </script>
@@ -72,11 +71,13 @@ const dataList = ref([
           <div class="col-lg-6">
             <div class="activities-content">
               <div class="section-title">
-                <span class="wow fadeInUp">Our Original Courses</span>
-                <h2 class="wow fadeInUp fs-1" data-wow-delay=".3s">Curriculum Characteristics</h2>
+                <span class="wow fadeInUp">{{ t('ourOriginalCourses') }}</span>
+                <h2 class="wow fadeInUp fs-1" data-wow-delay=".3s">
+                  {{ t('curriculumCharacteristics') }}
+                </h2>
               </div>
               <p class="mt-3 mt-md-0 wow fadeInUp" data-wow-delay=".5s">
-                Multi-dimensional teaching model to promote the all-round development of students.
+                {{ t('multiDimensionalTeachingModel') }}
               </p>
               <div class="row g-4 mt-4">
                 <div

+ 14 - 16
components/HomeIndex/Kindergarten-class/index.vue

@@ -1,5 +1,6 @@
 <script setup>
-const { t, locale, setLocale } = useI18n()
+const { t } = useI18n()
+const { $$t } = useStoreI18n()
 const dataList = ref([
   {
     bg: '',
@@ -7,9 +8,9 @@ const dataList = ref([
     id: 'Beginning',
     wowDelay: '0.3s',
     img: '/picture/012.png',
-    title: 'Beginning',
-    ageBracket: '6-9 years old',
-    subTitle: 'Enlightenment in listening and speaking stimulates interest in Chinese learning.'
+    title: $$t('beginning'),
+    ageBracket: $$t('ageBracket', ['6-9']),
+    subTitle: $$t('beginningSubTitle')
   },
   {
     bg: 'bg-2',
@@ -17,10 +18,9 @@ const dataList = ref([
     id: 'Growing',
     wowDelay: '0.5s',
     img: '/picture/021.png',
-    title: 'Growing',
-    ageBracket: '6-12 years old',
-    subTitle:
-      'The primary school Chinese textbooks compiled by the deep matching department have reached the domestic primary school Chinese level and improved Chinese literacy.'
+    title: $$t('growing'),
+    ageBracket: $$t('ageBracket', ['6-12']),
+    subTitle: $$t('growingSubTitle')
   },
   {
     bg: 'bg-5',
@@ -28,10 +28,9 @@ const dataList = ref([
     id: 'DrawingClass',
     wowDelay: '0.7s',
     img: '/picture/082.png',
-    title: 'Drawing Class',
-    ageBracket: '9-15 years old',
-    subTitle:
-      'Comprehensive improvement of listening speaking, reading and writing skills, high-level direct HSK/AP/IB Chinese tests.'
+    title: $$t('drawingClass'),
+    ageBracket: $$t('ageBracket', ['9-15']),
+    subTitle: $$t('drawingClassSubTitle')
   },
   {
     bg: 'bg-6',
@@ -39,10 +38,9 @@ const dataList = ref([
     id: 'Expanding',
     wowDelay: '0.9s',
     img: '/picture/083.png',
-    title: 'Beginning',
-    ageBracket: '12-18years old',
-    subTitle:
-      'Benchmark HSK and YCT syllabuses to comprehensively improve Chinese listening, speaking, reading and writing skills for overseas students with zero foundation.'
+    title: $$t('expanding'),
+    ageBracket: $$t('ageBracket', ['12-18']),
+    subTitle: $$t('expandingSubTitle')
   }
 ])
 </script>

+ 10 - 32
components/HomeIndex/Recommendation/index.vue

@@ -1,5 +1,6 @@
 <script setup>
-const { t, locale, setLocale } = useI18n()
+const { t } = useI18n()
+const { $$t } = useStoreI18n()
 const dataList = ref([
   {
     bg: '',
@@ -7,9 +8,8 @@ const dataList = ref([
     id: 'Jenny0',
     wowDelay: '0.3s',
     img: '/picture/quote.png',
-    title: 'Jenny Wilson',
-    subTitle:
-      "The 'Cultural Theatre' session is a children's favorite, and it's so fun to learn festival customs with melodrama!"
+    title: $$t('jennyWilson'),
+    subTitle: $$t('culturalTheatre')
   },
   {
     bg: 'bg-2',
@@ -17,9 +17,8 @@ const dataList = ref([
     id: 'Jenny1',
     wowDelay: '0.5s',
     img: '/picture/quote-2.png',
-    title: 'Esther Howard',
-    subTitle:
-      'The pronunciation standard of the Chinese teacher, the child says that it is like learning Chinese with friends~'
+    title: $$t('estherHoward'),
+    subTitle: $$t('pronunciationStandard')
   },
   {
     bg: 'bg-3',
@@ -27,9 +26,8 @@ const dataList = ref([
     id: 'Jenny2',
     wowDelay: '0.7s',
     img: '/picture/quote-3.png',
-    title: 'Wade Warren',
-    subTitle:
-      'There is a video playback of the make-up class, which is too friendly to dual-income families.'
+    title: $$t('wadeWarren'),
+    subTitle: $$t('videoPlayback')
   }
 ])
 </script>
@@ -60,9 +58,9 @@ const dataList = ref([
     <div class="bee-shape float-bob-y"><img src="/picture/bee.png" alt="shape-img" /></div>
     <div class="container">
       <div class="section-title text-center">
-        <span class="wow fadeInUp">Recommendation</span>
+        <span class="wow fadeInUp">{{ t('recommendation') }}</span>
         <h2 class="wow fadeInUp w-50 m-auto" data-wow-delay=".3s">
-          Parents' feedback on Happy Chin
+          {{ t('parentsFeedback') }}
         </h2>
       </div>
 
@@ -83,26 +81,6 @@ const dataList = ref([
                 </div>
               </div>
             </div>
-
-            <!-- <div class="program-box-items">
-              <div :class="`program-bg ${item?.bg}`"></div>
-              <div class="program-image">
-                <img :src="item?.img" alt="img" />
-              </div>
-              <div class="program-content text-center">
-                <h4 class="multi-line clamp-1 h-color">
-                  {{ item?.title }}
-                </h4>
-                <span>({{ item?.ageBracket }})</span>
-                <p class="multi-line clamp-2">
-                  {{ item?.subTitle }}
-                </p>
-              
-                <a href="javascript:(0)" :class="`arrow-icon  ${item?.abg}`">
-                  <i class="fa-solid fa-arrow-right"></i>
-                </a>
-              </div>
-            </div> -->
           </div>
         </template>
       </div>

+ 17 - 128
components/HomeIndex/Teachers/index.vue

@@ -1,5 +1,6 @@
 <script setup>
 const { t, locale, setLocale } = useI18n()
+const { $$t } = useStoreI18n()
 const dataList = ref([
   {
     bg: '',
@@ -7,11 +8,10 @@ const dataList = ref([
     id: 'teacher0',
     wowDelay: '0.3s',
     img: '/picture/01.jpg',
-    name: 'Aria Lan',
-    tType: 'English teacher',
-    subSchool: "Bachelor's Degree in English",
-    introduce:
-      'Five years of extensive teaching experience. Former outstanding instructor and former excellent teacher at an international kindergarten.  Holds a Teaching Certificate issued by the Ministry of Education, TEM-4, and Mandarin Level 2-A Certificate. Proficient in standard pronunciation and intonation, skilled in Chinese picture book reading, phonics, and oral Chinese teaching'
+    name: $$t('ariaLan'),
+    tType: $$t('englishTeacher'),
+    subSchool: $$t('bachelorsDegreeInEnglish'),
+    introduce: $$t('ariaLanIntroduce')
   },
   {
     bg: 'bg-2',
@@ -19,11 +19,10 @@ const dataList = ref([
     id: 'teacher1',
     wowDelay: '0.5s',
     img: '/picture/02.jpg',
-    name: 'Wendy Chen',
-    tType: 'English teacher',
+    name: $$t('wendyChen'),
+    tType: $$t('englishTeacher'),
     subSchool: '',
-    introduce:
-      'Graduated from a normal college with a Bachelor’s degree and holds CET6 (National College English Test Band 4 and 6) certificate, TEM4 (Test for English Major) certificate, BEC (BUSINESS ENGLISH CERTIFICATE) Intermediate certificate, Mandarin Level 1 B certificate.With strong affinity, she is good at mobilizing the classroom atmosphere with rich teaching methods.'
+    introduce: $$t('wendyChenIntroduce')
   },
   {
     bg: 'bg-3',
@@ -31,11 +30,10 @@ const dataList = ref([
     id: 'teacher2',
     wowDelay: '0.7s',
     img: '/picture/03.jpg',
-    name: 'Aspen Chou',
-    tType: 'English teacher',
-    subSchool: 'Graduated from a normal university.',
-    introduce:
-      "I have the Ministry of Education's teaching certification and a Level 2A Mandarin proficiency certificate. I have three years of one-on-one teaching experience. I've participated in public - welfare volunteer teaching activities multiple times. Proficient in oral Chinese teaching with standard pronunciation and intonation, I create a child - loved atmosphere."
+    name: $$t('aspenChou'),
+    tType: $$t('englishTeacher'),
+    subSchool: $$t('graduatedFromNormalUniversity'),
+    introduce: $$t('aspenChouIntroduce')
   },
   {
     bg: 'bg-3',
@@ -43,11 +41,10 @@ const dataList = ref([
     id: 'teacher3',
     wowDelay: '0.7s',
     img: '/picture/04.jpg',
-    name: 'Olivia Huang',
-    tType: 'English teacher',
+    name: $$t('oliviaHuang'),
+    tType: $$t('englishTeacher'),
     subSchool: '',
-    introduce:
-      "Graduated from the University of Valencia, Spain with a doctorate in linguistics, with TEM-8 Certificate in English and Spanish, Mandarin Level 2A Certificate and the“National Outstanding Teacher”. Has American English pronunciation, places emphasis on practice, and cultivates students' practical application abilities."
+    introduce: $$t('oliviaHuangIntroduce')
   }
 ])
 </script>
@@ -145,8 +142,8 @@ const dataList = ref([
     <div class="container">
       <div class="section-title-area">
         <div class="section-title mt-60">
-          <span class="wow fadeInUp">Our Experts</span>
-          <h2 class="wow fadeInUp" data-wow-delay=".3s">Our Expert Instructors</h2>
+          <span class="wow fadeInUp">{{ t('ourExperts') }}</span>
+          <h2 class="wow fadeInUp" data-wow-delay=".3s">{{ t('ourExpertInstructors') }}</h2>
         </div>
       </div>
       <div class="row">
@@ -195,114 +192,6 @@ const dataList = ref([
           </div>
         </template>
       </div>
-      <!-- <div class="swiper team-slider">
-        <div class="swiper-wrapper">
-          <div class="swiper-slide">
-            <div class="team-items">
-              <div class="team-image">
-                <div class="shape-img"><img src="/picture/team-shape.png" alt="img" /></div>
-                <img src="/picture/01.jpg" alt="team-img" />
-                <div class="social-profile">
-                  <span class="plus-btn"><i class="fas fa-share-alt"></i></span>
-                  <ul>
-                    <li>
-                      <a href="#"><i class="fab fa-facebook-f"></i></a>
-                    </li>
-                    <li>
-                      <a href="#"><i class="fa-brands fa-instagram"></i></a>
-                    </li>
-                    <li>
-                      <a href="#"><i class="fab fa-linkedin-in"></i></a>
-                    </li>
-                  </ul>
-                </div>
-              </div>
-              <div class="team-content">
-                <h3><a href="team-details.html">Brooklyn Simmons</a></h3>
-                <p>Instructors</p>
-              </div>
-            </div>
-          </div>
-          <div class="swiper-slide">
-            <div class="team-items">
-              <div class="team-image">
-                <div class="shape-img"><img src="/picture/team-shape.png" alt="img" /></div>
-                <img src="/picture/02.jpg" alt="team-img" />
-                <div class="social-profile">
-                  <span class="plus-btn"><i class="fas fa-share-alt"></i></span>
-                  <ul>
-                    <li>
-                      <a href="#"><i class="fab fa-facebook-f"></i></a>
-                    </li>
-                    <li>
-                      <a href="#"><i class="fa-brands fa-instagram"></i></a>
-                    </li>
-                    <li>
-                      <a href="#"><i class="fab fa-linkedin-in"></i></a>
-                    </li>
-                  </ul>
-                </div>
-              </div>
-              <div class="team-content">
-                <h3><a href="team-details.html">Leslie Alexander</a></h3>
-                <p>Instructors</p>
-              </div>
-            </div>
-          </div>
-          <div class="swiper-slide">
-            <div class="team-items">
-              <div class="team-image">
-                <div class="shape-img"><img src="/picture/team-shape.png" alt="img" /></div>
-                <img src="/picture/03.jpg" alt="team-img" />
-                <div class="social-profile">
-                  <span class="plus-btn"><i class="fas fa-share-alt"></i></span>
-                  <ul>
-                    <li>
-                      <a href="#"><i class="fab fa-facebook-f"></i></a>
-                    </li>
-                    <li>
-                      <a href="#"><i class="fa-brands fa-instagram"></i></a>
-                    </li>
-                    <li>
-                      <a href="#"><i class="fab fa-linkedin-in"></i></a>
-                    </li>
-                  </ul>
-                </div>
-              </div>
-              <div class="team-content">
-                <h3><a href="team-details.html">Ronald Richards</a></h3>
-                <p>Instructors</p>
-              </div>
-            </div>
-          </div>
-          <div class="swiper-slide">
-            <div class="team-items">
-              <div class="team-image">
-                <div class="shape-img"><img src="/picture/team-shape.png" alt="img" /></div>
-                <img src="/picture/04.jpg" alt="team-img" />
-                <div class="social-profile">
-                  <span class="plus-btn"><i class="fas fa-share-alt"></i></span>
-                  <ul>
-                    <li>
-                      <a href="#"><i class="fab fa-facebook-f"></i></a>
-                    </li>
-                    <li>
-                      <a href="#"><i class="fa-brands fa-instagram"></i></a>
-                    </li>
-                    <li>
-                      <a href="#"><i class="fab fa-linkedin-in"></i></a>
-                    </li>
-                  </ul>
-                </div>
-              </div>
-              <div class="team-content">
-                <h3><a href="team-details.html">Kristin Watson</a></h3>
-                <p>Instructors</p>
-              </div>
-            </div>
-          </div>
-        </div>
-      </div> -->
     </div>
   </section>
 </template>

+ 9 - 55
components/HomeIndex/Work-wrapper/index.vue

@@ -1,50 +1,5 @@
 <script setup>
-const { t, locale, setLocale } = useI18n()
-// const dataList = ref([
-//   {
-//     bg: '',
-//     abg: 'abg1',
-//     id: 'Beginning',
-//     wowDelay: '0.3s',
-//     img: '/picture/012.png',
-//     title: 'Beginning',
-//     ageBracket: '6-9 years old',
-//     subTitle: 'Enlightenment in listening and speaking stimulates interest in Chinese learning.'
-//   },
-//   {
-//     bg: 'bg-2',
-//     abg: '',
-//     id: 'Growing',
-//     wowDelay: '0.5s',
-//     img: '/picture/021.png',
-//     title: 'Growing',
-//     ageBracket: '6-12 years old',
-//     subTitle:
-//       'The primary school Chinese textbooks compiled by the deep matching department have reached the domestic primary school Chinese level and improved Chinese literacy.'
-//   },
-//   {
-//     bg: 'bg-5',
-//     abg: 'abg3',
-//     id: 'DrawingClass',
-//     wowDelay: '0.7s',
-//     img: '/picture/012.png',
-//     title: 'Drawing Class',
-//     ageBracket: '9-15 years old',
-//     subTitle:
-//       'Comprehensive improvement of listening speaking, reading and writing skills, high-level direct HSK/AP/IB Chinese tests.'
-//   },
-//   {
-//     bg: 'bg-6',
-//     abg: 'abg4',
-//     id: 'Expanding',
-//     wowDelay: '0.9s',
-//     img: '/picture/021.png',
-//     title: 'Beginning',
-//     ageBracket: '12-18years old',
-//     subTitle:
-//       'Benchmark HSK and YCT syllabuses to comprehensively improve Chinese listening, speaking, reading and writing skills for overseas students with zero foundation.'
-//   }
-// ])
+const { t } = useI18n()
 </script>
 <style lang="css" scoped>
 .multi-line {
@@ -75,9 +30,9 @@ const { t, locale, setLocale } = useI18n()
                 <img src="/picture/01.svg" alt="img" />
               </div>
               <div class="content">
-                <h4>Expert Teachers</h4>
+                <h4>{{ t('expertTeachers') }}</h4>
                 <p class="multi-line clamp-2">
-                  The excellent team of teachers escorts students' learning
+                  {{ t('excellentTeam') }}
                 </p>
               </div>
             </div>
@@ -89,9 +44,9 @@ const { t, locale, setLocale } = useI18n()
                 <img src="/picture/02.svg" alt="img" />
               </div>
               <div class="content">
-                <h4>E-learning Media</h4>
+                <h4>{{ t('eLearningMedia') }}</h4>
                 <p class="multi-line clamp-2">
-                  Learners can freely explore knowledge via E-learning media
+                  {{ t('exploreKnowledge') }}
                 </p>
               </div>
             </div>
@@ -103,9 +58,9 @@ const { t, locale, setLocale } = useI18n()
                 <img src="/picture/03.svg" alt="img" />
               </div>
               <div class="content">
-                <h4>Professional Service</h4>
+                <h4>{{ t('professionalService') }}</h4>
                 <p class="multi-line clamp-2">
-                  Tailor-made learning plans for students to achieve personalized development
+                  {{ t('tailorMadePlans') }}
                 </p>
               </div>
             </div>
@@ -113,10 +68,9 @@ const { t, locale, setLocale } = useI18n()
           <div class="col-xl-3 col-lg-4 col-md-6 wow fadeInUp" data-wow-delay=".8s">
             <div class="work-process-items text-center">
               <div class="content style-two">
-                <h4>Teaching Assistant Tracking</h4>
+                <h4>{{ t('teachingAssistantTracking') }}</h4>
                 <p class="multi-line clamp-2">
-                  Remedial system of professional teaching assistant to track during the whole
-                  process.
+                  {{ t('remedialSystem') }}
                 </p>
               </div>
               <div class="icon bg-cover" style="background-image: url('/image/icon-bg.png')">

+ 26 - 87
components/TopHeader.vue

@@ -27,6 +27,7 @@ const switchLanguage = (event) => {
               <select
                 @change="switchLanguage"
                 name="cate"
+                v-model="locale"
                 class="category bg-transparent border border-0 w-75"
               >
                 <option class="border border-0" value="zh">
@@ -45,10 +46,10 @@ const switchLanguage = (event) => {
                   <ul>
                     <li class="has-dropdown active menu-thumb">
                       <a href="/">
-                        Home
-                        <i class="fas fa-angle-down"></i>
+                        {{ t('home') }}
+                        <!-- <i class="fas fa-angle-down"></i> -->
                       </a>
-                      <ul class="submenu has-homemenu">
+                      <!-- <ul class="submenu has-homemenu">
                         <li>
                           <div class="homemenu-items">
                             <div class="homemenu">
@@ -56,15 +57,15 @@ const switchLanguage = (event) => {
                                 <img src="/picture/home-1.jpg" alt="img" />
                                 <div class="demo-button">
                                   <a href="/" class="theme-btn">
-                                    <span>Multi Page</span>
+                                    <span>{{ t('multiPage') }}</span>
                                   </a>
                                   <a href="/index-one" class="theme-btn">
-                                    <span>One Page</span>
+                                    <span>{{ t('onePage') }}</span>
                                   </a>
                                 </div>
                               </div>
                               <div class="homemenu-content text-center">
-                                <h4 class="homemenu-title">Home 01</h4>
+                                <h4 class="homemenu-title">{{ t('home01') }}</h4>
                               </div>
                             </div>
                             <div class="homemenu">
@@ -72,13 +73,15 @@ const switchLanguage = (event) => {
                                 <img src="/picture/home-2.jpg" alt="img" />
                                 <div class="demo-button">
                                   <a href="/index-2" class="theme-btn">
-                                    <span>Multi Page</span>
+                                    <span>{{ t('multiPage') }}</span>
+                                  </a>
+                                  <a href="/index-two" class="theme-btn">
+                                    <span>{{ t('onePage') }}</span>
                                   </a>
-                                  <a href="/index-two" class="theme-btn"><span>One Page</span></a>
                                 </div>
                               </div>
                               <div class="homemenu-content text-center">
-                                <h4 class="homemenu-title">Home 02</h4>
+                                <h4 class="homemenu-title">{{ t('home02') }}</h4>
                               </div>
                             </div>
                             <div class="homemenu">
@@ -86,13 +89,15 @@ const switchLanguage = (event) => {
                                 <img src="/picture/home-3.jpg" alt="img" />
                                 <div class="demo-button">
                                   <a href="/index-3" class="theme-btn">
-                                    <span>Multi Page</span>
+                                    <span>{{ t('multiPage') }}</span>
+                                  </a>
+                                  <a href="/index-three" class="theme-btn">
+                                    <span>{{ t('onePage') }}</span>
                                   </a>
-                                  <a href="/index-three" class="theme-btn"><span>One Page</span></a>
                                 </div>
                               </div>
                               <div class="homemenu-content text-center">
-                                <h4 class="homemenu-title">Home 03</h4>
+                                <h4 class="homemenu-title">{{ t('home03') }}</h4>
                               </div>
                             </div>
                             <div class="homemenu">
@@ -100,100 +105,34 @@ const switchLanguage = (event) => {
                                 <img src="/picture/home-4.jpg" alt="img" />
                                 <div class="demo-button">
                                   <a href="/index-4" class="theme-btn">
-                                    <span>Multi Page</span>
+                                    <span>{{ t('multiPage') }}</span>
                                   </a>
                                   <a href="/index-four" class="theme-btn">
-                                    <span>One Page</span>
+                                    <span>{{ t('onePage') }}</span>
                                   </a>
                                 </div>
                               </div>
                               <div class="homemenu-content text-center">
-                                <h4 class="homemenu-title">Home 04</h4>
+                                <h4 class="homemenu-title">{{ t('home04') }}</h4>
                               </div>
                             </div>
                           </div>
                         </li>
-                      </ul>
-                    </li>
-                    <li><a href="/about">About Us</a></li>
-                    <li><a href="/program/carousel">Programs</a></li>
-                    <!-- <li>
-                      <a href="program-details.html">
-                        Programs
-                        <i class="fas fa-angle-down"></i>
-                      </a>
-                      <ul class="submenu">
-                        <li><a href="/program">Programs Grid</a></li>
-                        <li><a href="/program/carousel">Programs Carousel</a></li>
-                        <li><a href="/program/detail">Programs Details</a></li>
-                      </ul>
+                      </ul> -->
                     </li>
-                    <li class="has-dropdown">
-                      <a href="">
-                        Pages
-                        <i class="fas fa-angle-down"></i>
-                      </a>
-                      <ul class="submenu">
-                        <li class="has-dropdown">
-                          <a href="/event">
-                            Event
-                            <i class="fas fa-angle-down"></i>
-                          </a>
-                          <ul class="submenu">
-                            <li><a href="/event">Event Grid</a></li>
-                            <li><a href="/event/carousel">Event Carousel</a></li>
-                            <li><a href="/event/detail">Event Details</a></li>
-                          </ul>
-                        </li>
-                        <li class="has-dropdown">
-                          <a href="/team">
-                            Teacher
-                            <i class="fas fa-angle-down"></i>
-                          </a>
-                          <ul class="submenu">
-                            <li><a href="/team">Our Teacher</a></li>
-                            <li><a href="/team/carousel">Teacher Carousel</a></li>
-                            <li><a href="/team/detail">Teacher Details</a></li>
-                          </ul>
-                        </li>
-                        <li><a href="/pricing">Pricing</a></li>
-                        <li><a href="/faq">Faq's</a></li>
-                      </ul>
+                    <li>
+                      <a href="/about">{{ t('aboutUs') }}</a>
                     </li>
                     <li>
-                      <a href="/blog">
-                        Blog
-                        <i class="fas fa-angle-down"></i>
-                      </a>
-                      <ul class="submenu">
-                        <li><a href="/blog">Blog Grid</a></li>
-                        <li><a href="/blog/blog-carousel">Blog Carousel</a></li>
-                        <li><a href="/blog/detail">Blog Details</a></li>
-                      </ul>
-                    </li> -->
+                      <a href="/program/carousel">{{ t('programs') }}</a>
+                    </li>
                     <li>
-                      <a href="/contact">Contact Us</a>
+                      <a href="/contact">{{ t('contactUs') }}</a>
                     </li>
                   </ul>
                 </nav>
               </div>
             </div>
-            <!-- <div style="opacity: 0" href="#0" class="search-trigger search-icon">
-              <i class="fal fa-search"></i>
-            </div>
-            <div style="opacity: 0" class="header-button">
-              <div href="contact.html" class="theme-btn">
-                <span>
-                  get A Quote
-                  <i class="fa-solid fa-arrow-right-long"></i>
-                </span>
-              </div>
-            </div>
-            <div class="header__hamburger d-xl-none my-auto">
-              <div class="sidebar__toggle">
-                <i class="fas fa-bars"></i>
-              </div>
-            </div> -->
           </div>
         </div>
       </div>

+ 1 - 1
i18n.config.ts

@@ -1,9 +1,9 @@
 import en from './locales/en.json'
 import zh from './locales/zh.json'
-
 export default defineI18nConfig(() => ({
     legacy: false,  // 是否兼容之前
     fallbackLocale: 'en',  // 区配不到的语言就用en
+    // locale: 'en',  // 默认语言
     messages: {
         en: en,
         zh: zh,

+ 107 - 1
locales/en.json

@@ -3,5 +3,111 @@
     "welcome": "Welcome",
     "about": "About",
     "chinese":"Chinese",
-    "english":"English"
+    "english":"English",
+    "search": "Search...",
+    "contactUs": "Contact Us",
+    "home": "Home",
+    "readyToGetStarted": "Ready to Get Started?",
+    "description": "Education is about discovering beauty and magnifying it infinitely, enabling every child to shine in their own unique way. ",
+    "lastName": "Last name",
+    "firstName": "First name",
+    "childAge": "Child age",
+    "yourEmail": "Your Email",
+    "courseCategory": "Course category",
+    "phone": "Phone",
+    "pleaseEnter": "Please enter",
+     "pleaseEnterMin": "Please enter the minimum age",
+    "pleaseEnterMax": "Please enter the maximum age",
+    "sendMessage": "Send Message",
+    "pleaseEnterSurname": "Please enter surname",
+  "pleaseEnterName": "Please enter name",
+  "pleaseEnterAgeRange": "Please enter age range",
+  "pleaseEnterEmail": "Please enter email",
+  "pleaseEnterPhone": "Please enter phone",
+  "pleaseSelectCourseType": "Please select course type",
+  "signUpSuccess": "Sign up successful",
+  
+  "encouragingEducation": "Encouraging Education",
+  "enlightenThinking": "Enlighten Thinking",
+  "teachThroughFun": "Teach Through Fun",
+  "respectIndividuality": "Respect Individuality",
+  "kindergartenAndBabyCare": "Kindergarten & Baby Care",
+  "happySpeaking": "Happy Speaking",
+  "happyReading": "Happy Reading",
+  "happyWriting": "Happy Writing",
+  "communicationIsNatural": "Communication is a natural instinct for humans, and we help our",
+  "childrenBuildBridges": "children build bridges with the world",
+  "applyToday": "Apply Today",
+  "aboutUs": "About us",
+  "bestChoiceForChildren": "Best Choice for Children",
+  "educationIsNotFilling": "Education is not the filling of a pail but the lighting of a fire",
+  "exploreMore": "Explore More",
+  "callUsNow": "Call Us Now",
+  "ourPrograms": "Our Programs",
+  "weMeetKidsAtTheirLevel": "We meet kids at their level",
+  "regardlessOfTheirAge": "regardless of their age",
+  "getYourQuality": "Get your quality",
+  "comeAndBeAPartOfIt": "Come and be a part of it Our newest member",
+  "applyNow": "Apply Now",
+  "expertTeachers": "Expert Teachers",
+  "excellentTeam": "The excellent team of teachers escorts students' learning",
+  "eLearningMedia": "E-learning Media",
+  "exploreKnowledge": "Learners can freely explore knowledge via E-learning media",
+  "professionalService": "Professional Service",
+  "tailorMadePlans": "Tailor-made learning plans for students to achieve personalized development",
+  "teachingAssistantTracking": "Teaching Assistant Tracking",
+  "remedialSystem": "Remedial system of professional teaching assistant to track during the whole process",
+  "beginning": "Beginning",
+  "beginningSubTitle": "Enlightenment in listening and speaking stimulates interest in Chinese learning.",
+  "growing": "Growing",
+  "growingSubTitle": "The primary school Chinese textbooks compiled by the deep matching department have reached the domestic primary school Chinese level and improved Chinese literacy.",
+  "drawingClass": "Drawing Class",
+  "drawingClassSubTitle": "Comprehensive improvement of listening, speaking, reading, and writing skills, high-level direct HSK/AP/IB Chinese tests.",
+  "expanding": "Expanding",
+  "expandingSubTitle": "Benchmark HSK and YCT syllabuses to comprehensively improve Chinese listening, speaking, reading, and writing skills for overseas students with zero foundation.",
+  "ageBracket":" years old",
+  "handicraftCourses": "Handicraft Courses",
+  "handicraftCoursesSubTitle": "Cultivate students' practical abilities.",
+  "classroomGames": "Classroom Games",
+  "classroomGamesSubTitle": "Add fun to the classroom.",
+  "musicalRhythm": "Musical Rhythm",
+  "musicalRhythmSubTitle": "Help memory through children's songs.",
+  "chineseCulture": "Chinese Culture",
+  "chineseCultureSubTitle": "Understand traditional Chinese cultural customs.",
+  "ourOriginalCourses": "Our Original Courses",
+  "curriculumCharacteristics": "Curriculum Characteristics",
+  "multiDimensionalTeachingModel": "Multi-dimensional teaching model to promote the all-round development of students.",
+  "jennyWilson": "Jenny Wilson",
+  "culturalTheatre": "The 'Cultural Theatre' session is a children's favorite, and it's so fun to learn festival customs with melodrama!",
+  "estherHoward": "Esther Howard",
+  "pronunciationStandard": "The pronunciation standard of the Chinese teacher, the child says that it is like learning Chinese with friends~",
+  "wadeWarren": "Wade Warren",
+  "videoPlayback": "There is a video playback of the make-up class, which is too friendly to dual-income families.",
+  "recommendation": "Recommendation",
+  "parentsFeedback": "Parents' feedback on Happy Chin",
+  "ariaLan": "Aria Lan",
+  "englishTeacher": "English teacher",
+  "bachelorsDegreeInEnglish": "Bachelor's Degree in English",
+  "ariaLanIntroduce": "Five years of extensive teaching experience. Former outstanding instructor and former excellent teacher at an international kindergarten. Holds a Teaching Certificate issued by the Ministry of Education, TEM-4, and Mandarin Level 2-A Certificate. Proficient in standard pronunciation and intonation, skilled in Chinese picture book reading, phonics, and oral Chinese teaching.",
+  "wendyChen": "Wendy Chen",
+  "wendyChenIntroduce": "Graduated from a normal college with a Bachelor’s degree and holds CET6 (National College English Test Band 4 and 6) certificate, TEM4 (Test for English Major) certificate, BEC (BUSINESS ENGLISH CERTIFICATE) Intermediate certificate, Mandarin Level 1 B certificate. With strong affinity, she is good at mobilizing the classroom atmosphere with rich teaching methods.",
+  "aspenChou": "Aspen Chou",
+  "graduatedFromNormalUniversity": "Graduated from a normal university.",
+  "aspenChouIntroduce": "I have the Ministry of Education's teaching certification and a Level 2A Mandarin proficiency certificate. I have three years of one-on-one teaching experience. I've participated in public-welfare volunteer teaching activities multiple times. Proficient in oral Chinese teaching with standard pronunciation and intonation, I create a child-loved atmosphere.",
+  "oliviaHuang": "Olivia Huang",
+  "oliviaHuangIntroduce": "Graduated from the University of Valencia, Spain with a doctorate in linguistics, with TEM-8 Certificate in English and Spanish, Mandarin Level 2A Certificate and the “National Outstanding Teacher”. Has American English pronunciation, places emphasis on practice, and cultivates students' practical application abilities.",
+  "ourExperts": "Our Experts",
+  "ourExpertInstructors": "Our Expert Instructors",
+  "pleaseSelectRegion": "Please select a area",
+  "region": "Area",
+  "level_1": "Beginner",
+  "level_2": "Intermediate",
+  "level_3": "Advanced",
+  "multiPage": "Multi Page",
+  "onePage": "One Page",
+  "home01": "Home 01",
+  "home02": "Home 02",
+  "home03": "Home 03",
+  "home04": "Home 04",
+  "programs": "Programs"
   }

+ 106 - 1
locales/zh.json

@@ -2,5 +2,110 @@
     "welcome": "欢迎",
     "about": "关于",
     "chinese":"中文",
-    "english":"英文"
+    "english":"英文",
+    "search": "搜索...",
+    "contactUs": "联系我们",
+    "home": "首页",
+    "readyToGetStarted": "准备好开始了吗?",
+    "description": "教育是发现美并无限放大,使每个孩子以自己独特的方式闪耀。",
+    "lastName": "姓氏",
+    "firstName": "名字",
+    "childAge": "孩子年龄",
+    "yourEmail": "您的邮箱",
+    "courseCategory": "课程类别",
+    "phone": "电话",
+    "pleaseEnter": "请输入",
+    "pleaseEnterMin": "请输入最小年龄",
+    "pleaseEnterMax": "请输入最大年龄",
+    "sendMessage": "发送消息",
+    "pleaseEnterSurname": "请输入姓氏",
+    "pleaseEnterName": "请输入名字",
+    "pleaseEnterAgeRange": "请输入年龄段",
+    "pleaseEnterEmail": "请输入邮箱",
+    "pleaseEnterPhone": "请输入电话",
+    "pleaseSelectCourseType": "请选择课程类型",
+     "signUpSuccess": "报名成功",
+    
+  "encouragingEducation": "鼓励教育",
+  "enlightenThinking": "启发思维",
+  "teachThroughFun": "通过乐趣教学",
+  "respectIndividuality": "尊重个性",
+  "kindergartenAndBabyCare": "幼儿园和婴儿护理",
+  "happySpeaking": "快乐说话",
+  "happyReading": "快乐阅读",
+  "happyWriting": "快乐写作",
+  "communicationIsNatural": "沟通是人类的自然本能,我们帮助我们的",
+  "childrenBuildBridges": "孩子们与世界建立联系",
+  "applyToday": "今天申请",
+  "aboutUs": "关于我们",
+  "bestChoiceForChildren": "孩子们的最佳选择",
+  "educationIsNotFilling": "教育不是填满水桶,而是点燃火焰",
+  "exploreMore": "探索更多",
+  "callUsNow": "现在联系我们",
+  "ourPrograms": "我们的项目",
+  "weMeetKidsAtTheirLevel": "我们在孩子们的水平上与他们见面",
+  "regardlessOfTheirAge": "无论他们的年龄",
+  "getYourQuality": "获得你的质量",
+  "comeAndBeAPartOfIt": "来成为我们最新成员的一部分",
+  "applyNow": "立即申请",
+  "expertTeachers": "专家教师",
+  "excellentTeam": "优秀的教师团队护航学生的学习",
+  "eLearningMedia": "电子学习媒体",
+  "exploreKnowledge": "学习者可以通过电子学习媒体自由探索知识",
+  "professionalService": "专业服务",
+  "tailorMadePlans": "为学生量身定制学习计划,实现个性化发展",
+  "teachingAssistantTracking": "助教跟踪",
+  "remedialSystem": "专业助教的补救系统,全程跟踪",
+  "beginning": "初级",
+  "beginningSubTitle": "听说启蒙,激发对中文学习的兴趣。",
+  "growing": "成长",
+  "growingSubTitle": "深度匹配部门编写的小学中文教材,达到国内小学中文水平,提高中文素养。",
+  "drawingClass": "绘画班",
+  "drawingClassSubTitle": "全面提升听、说、读、写能力,高水平直通HSK/AP/IB中文考试。",
+  "expanding": "扩展",
+  "expandingSubTitle": "基准HSK和YCT大纲,全面提升零基础海外学生的中文听、说、读、写能力。",
+   "ageBracket":"{0}岁",
+"handicraftCourses": "手工课程",
+  "handicraftCoursesSubTitle": "培养学生的实践能力",
+  "classroomGames": "课堂游戏",
+  "classroomGamesSubTitle": "为课堂增添乐趣",
+  "musicalRhythm": "音乐节奏",
+  "musicalRhythmSubTitle": "通过儿歌帮助记忆",
+  "chineseCulture": "中国文化",
+  "chineseCultureSubTitle": "了解中国传统文化习俗",
+  "ourOriginalCourses": "我们的原创课程",
+  "curriculumCharacteristics": "课程特点",
+  "multiDimensionalTeachingModel": "多维教学模式,促进学生的全面发展。",
+"jennyWilson": "珍妮·威尔逊",
+  "culturalTheatre": "“文化剧场”环节是孩子们的最爱,通过戏剧学习节日习俗真是太有趣了!",
+  "estherHoward": "埃丝特·霍华德",
+  "pronunciationStandard": "中文老师的发音标准,孩子说就像和朋友一起学中文~",
+  "wadeWarren": "韦德·沃伦",
+  "videoPlayback": "补课有视频回放,对双职工家庭太友好了。",
+  "recommendation": "推荐",
+  "parentsFeedback": "家长对开心中文的反馈",
+  "ariaLan": "蓝皓琦",
+  "englishTeacher": "英语老师",
+  "bachelorsDegreeInEnglish": "英语学士学位",
+  "ariaLanIntroduce": "五年丰富的教学经验。曾任国际幼儿园优秀导师和优秀教师。持有教育部颁发的教师资格证书、TEM-4和普通话二级甲等证书。标准发音和语调,擅长中文绘本阅读、自然拼读和口语教学。",
+  "wendyChen": "陈炎炎",
+  "wendyChenIntroduce": "毕业于师范学院,拥有学士学位,并持有CET6(全国大学英语四、六级考试)证书、TEM4(英语专业四级考试)证书、BEC(商务英语证书)中级证书、普通话一级乙等证书。亲和力强,善于用丰富的教学方法调动课堂气氛。",
+  "aspenChou": "周诗萍",
+  "graduatedFromNormalUniversity": "毕业于师范大学。",
+  "aspenChouIntroduce": "我拥有教育部的教学认证和二级甲等普通话水平证书。拥有三年一对一教学经验,多次参与公益志愿教学活动。标准发音和语调,擅长口语教学,营造孩子喜爱的氛围。",
+  "oliviaHuang": "黄筱雯",
+  "oliviaHuangIntroduce": "毕业于西班牙瓦伦西亚大学,拥有语言学博士学位,持有TEM-8英语和西班牙语证书、普通话二级甲等证书和“全国优秀教师”称号。美式英语发音,注重实践,培养学生的实际应用能力。",
+  "ourExperts": "我们的专家",
+  "ourExpertInstructors": "我们的专家导师",
+"pleaseSelectRegion": "请选择地区",
+        "region": "地区",
+        "level_1": "初级",
+        "level_2": "中级",
+        "level_3": "高级",
+  "onePage": "单页面",
+  "home01": "首页 01",
+  "home02": "首页 02",
+  "home03": "首页 03",
+  "home04": "首页 04",
+  "programs": "项目"
   }

File diff suppressed because it is too large
+ 116 - 177
pages/contact/index.vue


+ 19 - 41
pages/index/index.client.vue

@@ -5,13 +5,6 @@ const switchLanguage = (lang: 'en' | 'zh') => {
   console.log(lang)
   setLocale(lang)
 }
-
-const bestList = ref([
-  'Encouraging Education',
-  'Enlighten Thinking',
-  'Teach Through fun',
-  'Respect Individuality'
-])
 </script>
 
 <template>
@@ -25,7 +18,7 @@ const bestList = ref([
       <div class="search-cell">
         <form method="get">
           <div class="search-field-holder">
-            <input type="search" class="main-search-input" placeholder="Search..." />
+            <input type="search" class="main-search-input" :placeholder="t('search')" />
           </div>
         </form>
       </div>
@@ -60,35 +53,25 @@ const bestList = ref([
       <div class="row g-4 align-items-center">
         <div class="col-lg-6">
           <div class="hero-content">
-            <h5 class="wow fadeInUp">Kindergarten & Baby Care</h5>
+            <h5 class="wow fadeInUp">{{ t('kindergartenAndBabyCare') }}</h5>
             <h1 class="wow fadeInUp" data-wow-delay=".3s">
-              Happy Speaking
+              {{ t('happySpeaking') }}
               <br />
-              Happy Reading
+              {{ t('happyReading') }}
               <br />
-              Happy Writing
+              {{ t('happyWriting') }}
               <br />
             </h1>
             <p class="wow fadeInUp" data-wow-delay=".5s">
-              Communication is a natural instinct for humans, and we help our
+              {{ t('communicationIsNatural') }}
               <br />
-              children build bridges with the world
+              {{ t('childrenBuildBridges') }}
             </p>
             <div class="hero-button">
-              <!-- contact.html -->
               <a href="javascript:(0)" class="theme-btn wow fadeInUp" data-wow-delay=".7s">
-                Apply Today
+                {{ t('applyToday') }}
                 <i class="fa-solid fa-arrow-right-long"></i>
               </a>
-              <!-- <span class="button-text wow fadeInUp" data-wow-delay=".8s">
-                <a
-                  href="https://www.youtube.com/watch?v=Cn4G2lZ_g2I"
-                  class="video-btn ripple video-popup"
-                >
-                  <i class="fa-solid fa-play"></i>
-                </a>
-                <span class="ms-4 d-line">Play Video</span>
-              </span> -->
             </div>
           </div>
         </div>
@@ -117,24 +100,24 @@ const bestList = ref([
           <div class="col-lg-6">
             <div class="about-content">
               <div class="section-title">
-                <span class="wow fadeInUp">About us</span>
-                <h2 class="wow fadeInUp" data-wow-delay=".3s">Best Choice for Children</h2>
+                <span class="wow fadeInUp">{{ t('aboutUs') }}</span>
+                <h2 class="wow fadeInUp" data-wow-delay=".3s">{{ t('bestChoiceForChildren') }}</h2>
               </div>
               <p class="mt-3 mt-md-0 wow fadeInUp" data-wow-delay=".5s">
-                Education is not the filling of a pail but the lighting of a fire
+                {{ t('educationIsNotFilling') }}
               </p>
               <AboutList />
               <div class="about-author">
                 <div class="about-button wow fadeInUp" data-wow-delay=".3s">
                   <a href="about.html" class="theme-btn">
-                    Explore More
+                    {{ t('exploreMore') }}
                     <i class="fa-solid fa-arrow-right-long"></i>
                   </a>
                 </div>
                 <div class="author-icon wow fadeInUp" data-wow-delay=".5s">
                   <div class="icon"><i class="fa-solid fa-phone"></i></div>
                   <div class="content">
-                    <span>Call Us Now</span>
+                    <span>{{ t('callUsNow') }}</span>
                     <h5><a href="tel:18589716552">18589716552</a></h5>
                   </div>
                 </div>
@@ -158,11 +141,11 @@ const bestList = ref([
     <div class="compass-shape"><img src="/picture/compass.png" alt="shape-img" /></div>
     <div class="container container-xxxl">
       <div class="section-title text-center mt-60">
-        <span class="wow fadeInUp">Our Programs</span>
+        <span class="wow fadeInUp">{{ t('ourPrograms') }}</span>
         <h2 class="wow fadeInUp" data-wow-delay=".3s">
-          We meet kids at their level
+          {{ t('weMeetKidsAtTheirLevel') }}
           <br />
-          regardless of their age
+          {{ t('regardlessOfTheirAge') }}
         </h2>
       </div>
 
@@ -186,20 +169,15 @@ const bestList = ref([
         <div class="row justify-content-between">
           <div class="col-lg-6">
             <div class="section-title">
-              <span class="text-white wow fadeInUp">Get your quality</span>
+              <span class="text-white wow fadeInUp">{{ t('getYourQuality') }}</span>
               <h2 class="text-white wow fadeInUp" data-wow-delay=".3s">
-                Come and be a part of it Our newest member
+                {{ t('comeAndBeAPartOfIt') }}
               </h2>
             </div>
             <div class="cta-button mt-4 mt-md-0 wow fadeInUp" data-wow-delay=".5s">
               <NuxtLink to="/contact" class="theme-btn bg-white">
-                Apply Now
-                <!-- <i class="fa-solid fa-arrow-right-long"></i> -->
+                {{ t('applyNow') }}
               </NuxtLink>
-              <!-- <a href="contact.html" class="theme-btn bg-white">
-                Apply Now
-                <i class="fa-solid fa-arrow-right-long"></i>
-              </a> -->
             </div>
           </div>
           <div class="col-lg-5 wow fadeInUp" data-wow-delay=".4s">

+ 18 - 0
server/api/hello.js

@@ -0,0 +1,18 @@
+export default defineEventHandler(async (event) => {
+  const baseUrl = import.meta.env.VITE_APP_BASE_URL
+  // console.log('Base URL from env: ', baseUrl)
+  if (event.method === 'GET') {
+    const response = await fetch(baseUrl + '/country/baseCountry/getCountryCode')
+    return response.ok ? response.json() : { msg: '获取国家信息错误' }
+  }
+  const response = await fetch(baseUrl + '/education/happyEntry/addHappyEntry', {
+    method: 'post',
+    headers: {
+      'Content-Type': 'application/json',
+      project: '123'
+    },
+    body: await readBody(event)
+  })
+
+  return response.ok ? response.json() : { msg: '添加表单错误' }
+})

+ 0 - 19
server/api/hello.ts

@@ -1,19 +0,0 @@
-import {request} from '../../utils/request';
-
-export default defineEventHandler(async (event) => {
-   console.log(event.toString(),"55");
-  //  const query= getQuery(event);
-  // console.log(query,"query");
-  if(event.method==="GET"){
-    return  request('/country/baseCountry/getCountryCode')
-     
-
-  }else{
-
-    const body=await readBody(event).catch((e)=>{
-      console.log(e,"e");});
-      console.log(body.name,"body");
-     
-    }
-    return { message: 'Hello, world!' }
-})

+ 2 - 2
utils/request.js

@@ -7,12 +7,12 @@ export function request(url, options = {}) {
 
   const defatulOpts = {
     method: 'get',
-    // baseURL: config.public.baseApi,
+    baseURL: config.public.baseApi,
     headers: {
       // 'Content-Type': 'application/json',
       // deviceType: config.public.deviceType,
       // authorization: authStore.token,
-      project: '',
+      project: '123',
       ...options.headers
     },
     onRequest({ options }) {

+ 16 - 0
utils/useI18.js

@@ -0,0 +1,16 @@
+import { reactive, toRefs, watchEffect } from 'vue'
+import { useI18n } from 'vue-i18n'
+
+export function useStoreI18n(options) {
+  const { t, locale } = useI18n(options)
+  const keyMap = reactive({})
+  function $$t(...key) {
+    watchEffect(() => {
+      if (locale.value) keyMap[key] = t(...key)
+    })
+    return toRefs(keyMap)[key]
+  }
+  return {
+    $$t
+  }
+}

Some files were not shown because too many files changed in this diff