Browse Source

教材详情页面多语言

natasha 3 years ago
parent
commit
0875f86062

+ 4 - 4
src/components/inputModules/common/Header.vue

@@ -25,7 +25,7 @@
       </ul>
     </div>
     <div class="userName">
-      <template v-if="routePath == '/curGoodsDetail'">
+      <template v-if="routePath == '/curGoodsDetail'||routePath == '/TextbookDetailVideo'||routePath == '/TextbookDetailPdf'">
         <el-dropdown
           style="margin-right: 16px; cursor: pointer"
           trigger="click"
@@ -46,7 +46,7 @@
       </template>
       <div v-if="!userMessage" class="selectLoginOrRegistration">
         <span @click="cutLoginReg">{{
-          routePath == "/curGoodsDetail" ? $t("Key9") : "登录"
+          routePath == "/curGoodsDetail"||routePath == '/TextbookDetailVideo'||routePath == '/TextbookDetailPdf' ? $t("Key9") : "登录"
         }}</span>
       </div>
       <!-- 用户头像和用户名 -->
@@ -67,11 +67,11 @@
         <div class="userShow" v-show="userShow">
           <p @click="gopresonal">
             <img src="../../../assets/login/project7.png" alt="" />
-            {{ routePath == "/curGoodsDetail" ? $t("Key38") : "个人中心" }}
+            {{ routePath == "/curGoodsDetail"||routePath == '/TextbookDetailVideo'||routePath == '/TextbookDetailPdf' ? $t("Key38") : "个人中心" }}
           </p>
           <p @click="QuitLogin">
             <img src="../../../assets/login/Frame77.png" alt="" />
-            {{ routePath == "/curGoodsDetail" ? $t("Key39") : "退出登录" }}
+            {{ routePath == "/curGoodsDetail"||routePath == '/TextbookDetailVideo'||routePath == '/TextbookDetailPdf' ? $t("Key39") : "退出登录" }}
           </p>
         </div>
       </div>

+ 30 - 10
src/views/TextbookDetail.vue

@@ -6,7 +6,8 @@
       <Header />
       <div class="shade"></div>
     </div>
-    <HeaderOne text="123" title="教材详情" name="" />
+    <!-- 教材详情 744 -->
+    <HeaderOne text="123" :title="$t('Key744')" name="" /> 
     <template v-if="TextbookData.is_deleted == 'false'">
       <template v-if="bookIsBuy == 'true' || TextbookData.publish_status == 1">
         <div class="main" v-loading="loading">
@@ -171,7 +172,8 @@
           <img src="../assets/textBookDetail/upload.png" alt="" />
         </div> -->
             <div class="resource-content" v-if="fileListVideo.length > 0">
-              <h2 class="video-title">视频资源</h2>
+                <!-- 视频资源 736 -->
+              <h2 class="video-title">{{ $t("Key736") }}</h2>
               <ul class="video-list">
                 <li
                   v-for="(item, index) in fileListVideo"
@@ -197,9 +199,11 @@
               class="resource-content"
               v-if="fileListAudio.length > 0 || fileListOtheraudio.length > 0"
             >
-              <h2 class="video-title">音频资源</h2>
+            <!-- 音频资源737 -->
+              <h2 class="video-title">{{ $t("Key737") }}</h2>
               <div class="audio-content" v-if="fileListAudio.length > 0">
-                <p class="audio-type">课文资源</p>
+                  <!-- 课文资源 738 -->
+                <p class="audio-type">{{ $t("Key738") }}</p>
                 <div class="audio-line-box">
                   <AudioLine
                     :audioId="'fileListAudio'"
@@ -210,7 +214,8 @@
                 </div>
               </div>
               <div class="audio-content" v-if="fileListOtheraudio.length > 0">
-                <p class="audio-type">自学音频</p>
+                  <!-- 自学音频 739 -->
+                <p class="audio-type">{{ $t("Key739") }}</p>
                 <div class="audio-line-box">
                   <AudioLine
                     :audioId="'fileListOtheraudio'"
@@ -221,14 +226,16 @@
                 </div>
               </div>
               <div class="audio-content">
-                <p class="audio-type">资源下载</p>
+                  <!-- 资源下载 740 -->
+                <p class="audio-type">{{ $t("Key740") }}</p>
                 <div class="download">
                   <div class="book-open" @click="handleDownloadAudio">
                     <img
                       src="../assets/common/download.png"
                       class="book-open-img"
                     />
-                    <span class="book-open-text">音频</span>
+                    <!-- 音频 -->
+                    <span class="book-open-text">{{ $t("Key400") }}</span>
                   </div>
                   <!-- <div class="book-open">
               <img
@@ -241,7 +248,8 @@
               </div>
             </div>
             <div class="resource-content" v-if="fileListDoc.length > 0">
-              <h2 class="video-title">试读PDF</h2>
+                <!-- 试读PDF 741 -->
+              <h2 class="video-title">{{ $t("Key741") }}</h2>
               <ul class="PDF-list">
                 <li
                   v-for="(item, index) in fileListDoc"
@@ -265,7 +273,8 @@
     </template>
     <template v-if="TextbookData.is_deleted == 'true'">
       <div class="noview-msg-box">
-        <div class="noview-msg">无法查看,教材已被删除</div>
+          <!-- 无法查看,教材已被删除 742 -->
+        <div class="noview-msg">{{ $t("Key742") }}</div>
       </div>
     </template>
     <template
@@ -276,7 +285,8 @@
       "
     >
       <div class="noview-msg-box">
-        <div class="noview-msg">无法查看,教材已下架</div>
+          <!-- 无法查看,教材已下架 743 -->
+        <div class="noview-msg">{{ $t("Key743") }}</div>
       </div>
     </template>
     <!-- 商品详情 -->
@@ -659,6 +669,7 @@ export default {
         "Key116",
         "Key390",
         "Key396",
+        "Key400",
         "Key472",
         "Key473",
         "Key474",
@@ -666,6 +677,15 @@ export default {
         "Key575",
         "Key612",
         "Key613",
+        "Key744",
+        "Key736",
+        "Key737",
+        "Key738",
+        "Key739",
+        "Key740",
+        "Key741",
+        "Key742",
+        "Key743"
       ],
     });
     this.isData = true;

+ 3 - 1
src/views/textbook-detail/TextbookDetailPdf.vue

@@ -3,7 +3,7 @@
   <div class="tarcer-dev-Preview" v-loading="loading" v-if="isData">
     <Header />
 
-    <HeaderOne title="教材详情" name="试读PDF" />
+    <HeaderOne :title="$t('Key744')" :name="$t('Key741')" />
     <div class="main" v-if="data">
       <div class="flassify">
         <div class="text">
@@ -181,6 +181,8 @@ export default {
         "Key574",
         "Key575",
         "Key576",
+        "Key741",
+        "key744",
       ],
     });
     this.isData = true;

+ 2 - 2
src/views/textbook-detail/TextbookDetailVideo.vue

@@ -9,7 +9,7 @@
 
     <div>
       <HeaderOne
-        title="教材详情" name="视频资源"
+        :title="$t('Key744')" :name="$t('Key736')"
       />
     </div>
     <div class="main" v-if="data && VideoList">
@@ -151,7 +151,7 @@ export default {
   async created() {
     this.articleId = this.$route.query.id;
     await updateWordPack({
-      word_key_list: ["Key150", "Key583", "Key584"],
+      word_key_list: ["Key150", "Key583", "Key584","Key736"],
     });
     this.getdetail()
     this.getBookSource()