SyuanYu 1 年之前
父節點
當前提交
fa88082e9c

+ 2 - 2
src/components/CourseCard.vue

@@ -11,7 +11,7 @@ const props = defineProps({
 
 const store = useMainStore();
 let progress = ref(false);
-let token = localStorage.getItem("token");
+let token = sessionStorage.getItem("token");
 
 // 收藏課程清單
 let favorites = reactive({
@@ -28,7 +28,7 @@ async function setFavoriteClass(classId) {
   }
 
   progress.value = true;
-
+  console.log('取token',token);
   const url = `${store.apiUrl}/api/add_favorite_class?class_name_id=${classId}&access_token=${token}`;
   try {
     const response = await axios.post(url);

+ 1 - 1
src/components/Footer.vue

@@ -10,7 +10,7 @@
 
     <ul class="ms-sm-13">
       <li>
-        <a href="tel:(049)233-4141#275">Tel&ensp;(049)233-4141#275</a>
+        <a href="tel:(049)233-4141">Tel&ensp;(049)233-4141</a>
       </li>
       <li>
         <a href="fax:(049)235-6593">Fax&ensp;(049)235-6593</a>

+ 6 - 3
src/components/HomeList.vue

@@ -39,7 +39,7 @@ const props = defineProps({
         <router-link :to="`/news/${data.news_id}`" class="cover-img">
           <section class="d-flex flex-column pa-3">
             <h3>{{ data.title }}</h3>
-            <hr>
+            <hr />
             <p v-html="data.content"></p>
           </section>
         </router-link>
@@ -53,7 +53,7 @@ const props = defineProps({
         >
           <section class="d-flex flex-column pa-3">
             <h3>{{ data.name }}</h3>
-            <hr>
+            <hr />
             <p v-html="data.introduction"></p>
           </section>
         </router-link>
@@ -79,6 +79,7 @@ const props = defineProps({
 
   h3,
   p {
+    position: relative; // for iOS
     overflow: hidden;
     text-overflow: ellipsis;
     display: -webkit-box;
@@ -96,13 +97,15 @@ const props = defineProps({
   }
 
   p {
+    height: 85px;
     -webkit-line-clamp: 3;
     line-height: 1.75em;
     letter-spacing: 0.0625em;
   }
 
   .cover-img {
-    height: 14.6875em;
+    display: block;
+    max-height: 15em;
     border-radius: 0.3125em;
   }
 }

+ 2 - 2
src/components/Navbar.vue

@@ -119,8 +119,8 @@ function changeLang() {
 }
 
 function handleLogout() {
-  localStorage.removeItem("token");
-  localStorage.removeItem("AuthToken");
+  sessionStorage.removeItem("token");
+  sessionStorage.removeItem("AuthToken");
   window.location.href =
     "https://member.moc.gov.tw/MOCMC/M0003/ottLogout?SYS_ID=CRAFT_NTCRI&urlRedirectTo=https://craftsplatform.ntcri.gov.tw/";
   // window.location.reload();

+ 2 - 2
src/views/ArticleDetail.vue

@@ -112,7 +112,7 @@ getArticle();
                   </v-chip>
                 </li>
               </ul>
-              <div
+              <!-- <div
                 v-if="file.list.length"
                 class="d-flex flex-column align-start"
               >
@@ -137,7 +137,7 @@ getArticle();
                     >
                   </li>
                 </ul>
-              </div>
+              </div> -->
               <!-- <a :href="`${store.imgUrl}/${filePath}`" download class="download-link">附件下載</a> -->
             </v-col>
           </v-row>

+ 2 - 2
src/views/CollegeGroup/Cross.vue

@@ -298,7 +298,7 @@ async function handleSearch() {
 
   <p class="cooming-soon">「籌備中 cooming soon」</p> -->
 
-  <h2 class="title pb-10">{{ t("craft_plus") }}</h2>
+  <!-- <h2 class="title pb-10">{{ t("craft_plus") }}</h2>
 
   <div class="craftplus-item mb-6"></div>
 
@@ -307,7 +307,7 @@ async function handleSearch() {
     width="100%"
     height="600"
     frameborder="0"
-  ></iframe>
+  ></iframe> -->
 
   <!-- <div class="craftplus-item mb-6"></div> -->
 

+ 10 - 10
src/views/CourseDetail.vue

@@ -80,7 +80,7 @@ let courseLoading = ref(false);
     courseNameId.value = course.data.class_name_id;
 
     console.log("courseData", course.data);
-    
+
     if (course.data.work_imgs) {
       course.data.work_imgs = JSON.parse(
         course.data.work_imgs.replace(/'/g, '"')
@@ -928,16 +928,16 @@ let slides = [
                                   >
                                     {{ t("form.close") }}
                                   </v-btn>
-                                  <v-btn
-                                    color="brown"
-                                    class="text-none"
-                                    rounded
-                                    @click="isActive.value = false"
-                                  >
-                                    <router-link to="/user/passport"
-                                      >前往會員專區</router-link
+                                  <router-link to="/user/passport">
+                                    <v-btn
+                                      color="brown"
+                                      class="text-none"
+                                      rounded
+                                      @click="isActive.value = false"
                                     >
-                                  </v-btn>
+                                      前往會員專區
+                                    </v-btn>
+                                  </router-link>
                                 </v-sheet>
                               </v-card-text>
                             </v-window-item>

+ 18 - 64
src/views/Crafts.vue

@@ -451,7 +451,7 @@ const restorationArticles = reactive({
         </v-row>
 
         <!-- 線上工藝 -->
-        <h2 class="mb-16 pb-5">{{ t("college_group_4") }}</h2>
+        <!-- <h2 class="mb-16 pb-5">{{ t("college_group_4") }}</h2>
 
         <v-row class="mt-16">
           <v-col md="2" cols="12">
@@ -470,23 +470,6 @@ const restorationArticles = reactive({
                 variant="outlined"
               ></v-select>
             </v-label>
-
-            <!-- <ul class="btn-list">
-              <li
-                v-for="(item, index) in categoryList"
-                :key="index"
-                class="mx-3"
-              >
-                <v-btn
-                  @click="setOnlineCategory(item.id, index)"
-                  class="mb-5"
-                  :class="{ active: item.active }"
-                  variant="outlined"
-                >
-                  {{ item.title }}
-                </v-btn>
-              </li>
-            </ul> -->
           </v-col>
           <v-col md="10" cols="12">
             <div class="d-flex justify-center mb-10" v-if="videoLoading">
@@ -530,9 +513,6 @@ const restorationArticles = reactive({
                         </template>
                       </v-img>
                     </div>
-                    <!-- <div class="img-box">
-                      <img v-bind="props" :src="item.image_m" alt="" />
-                    </div> -->
                   </template>
                   <template v-slot:default="{ isActive }">
                     <v-card>
@@ -564,16 +544,10 @@ const restorationArticles = reactive({
                           </video>
                         </div>
                       </v-card-text>
-                      <!-- <v-card-actions class="justify-end">
-                        <v-btn variant="text" @click="isActive.value = false"
-                          >Close</v-btn
-                        >
-                      </v-card-actions> -->
                     </v-card>
                   </template>
                 </v-dialog>
 
-                <!-- <img :src="item.image_m" alt="" /> -->
                 <h3>{{ item.metadata[1].name }}</h3>
                 <p>{{ item.metadata[1].desc }}</p>
                 <div class="d-flex justify-end mt-3">
@@ -592,30 +566,7 @@ const restorationArticles = reactive({
               :length="imediatotalPagesOnline"
             ></v-pagination>
           </v-col>
-          <!-- <v-col sm="10" cols="12">
-            <v-row class="video-list">
-              <v-col
-                cols="12"
-                md="6"
-                v-for="(item, index) in videoData"
-                :key="index"
-                class="mb-5 mb-md-0"
-              >
-                <video controls class="w-100">
-                  <source :src="item.video" type="video/mp4" />
-                  <a :href="item.video"></a>
-                </video>
-                <h3>{{ item.title }}</h3>
-                <p>{{ item.introduction }}</p>
-                <div class="d-flex justify-end mt-3">
-                  <span class="text-gray"
-                    >{{ item.date }}|點閱次數:{{ item.ctr }}</span
-                  >
-                </div>
-              </v-col>
-            </v-row>
-          </v-col> -->
-        </v-row>
+        </v-row> -->
 
         <!-- 線上體驗課程 -->
         <h2 class="mb-16 pb-5">
@@ -625,7 +576,7 @@ const restorationArticles = reactive({
         <v-row class="mt-5 mt-sm-0">
           <v-col
             cols="12"
-            md="6"
+            sm="6"
             lg="4"
             v-for="(item, index) in onlineCourese.list"
             :key="index"
@@ -634,18 +585,21 @@ const restorationArticles = reactive({
             <CourseCard :data="item" />
           </v-col>
 
-          <div class="mx-auto d-flex flex-column">
-            <v-pagination
-              v-model="pageNumOnline"
-              :length="totalPagesOnline"
-              rounded="circle"
-              class="mt-16"
-            ></v-pagination>
-
-            <span class="text-gray total-item"
-              >{{ t("total_count") }}:{{ totalNumOnline }}</span
-            >
-          </div>
+          <v-col cols="12">
+            <div class="mx-auto d-flex flex-column">
+              <v-pagination
+                v-model="pageNumOnline"
+                :length="totalPagesOnline"
+                rounded="circle"
+                class="mt-16 w-100"
+                style="max-width: 500px"
+              ></v-pagination>
+
+              <span class="text-gray total-item"
+                >{{ t("total_count") }}:{{ totalNumOnline }}</span
+              >
+            </div>
+          </v-col>
         </v-row>
 
         <!-- 修護工藝 -->

+ 3 - 3
src/views/Home.vue

@@ -473,7 +473,7 @@ let closeBanner = ref(false);
           </section>
         </router-link>
       </v-col> -->
-      <v-col cols="6" md="4">
+      <v-col cols="12" sm="4">
         <router-link to="/college-group/craft" class="img-info">
           <img
             src="@/assets/img/home/首頁元素-11.webp"
@@ -484,7 +484,7 @@ let closeBanner = ref(false);
           </section>
         </router-link>
       </v-col>
-      <v-col cols="6" md="4">
+      <v-col cols="12" sm="4">
         <router-link to="/college-group/cross" class="img-info">
           <img
             src="@/assets/img/home/首頁元素-06.webp"
@@ -495,7 +495,7 @@ let closeBanner = ref(false);
           </section>
         </router-link>
       </v-col>
-      <v-col cols="6" md="4">
+      <v-col cols="12" sm="4">
         <router-link to="/achievement" class="img-info">
           <img
             src="@/assets/img/home/首頁元素-12.webp"

+ 10 - 10
src/views/User/Profile.vue

@@ -172,7 +172,7 @@ async function setUserInfo() {
   } else {
     store.loginState = false;
     console.log("setUserInfo error");
-    localStorage.removeItem("token");
+    sessionStorage.removeItem("token");
     // console.error(error);
   }
 }
@@ -196,7 +196,7 @@ let resume = reactive({
 
 // 取得工藝教育者履歷
 (async () => {
-  let token = localStorage.getItem("token");
+  let token = sessionStorage.getItem("token");
   try {
     const response = await axios.get(
       `${store.apiUrl}/api/get_user_resume?access_token=${token}`
@@ -290,8 +290,8 @@ let productList = ["機具", "織布"];
   <v-card v-else class="h-100 px-10 profile-card">
     <v-tabs v-model="tab" color="purple" align-tabs="center" class="mb-16">
       <v-tab :value="1">{{ t("profile.about_me") }}</v-tab>
-      <v-tab :value="2">{{ t("profile.creator") }}</v-tab>
-      <v-tab :value="3">{{ t("profile.processing_manufacturers") }}</v-tab>
+      <!-- <v-tab :value="2">{{ t("profile.creator") }}</v-tab>
+      <v-tab :value="3">{{ t("profile.processing_manufacturers") }}</v-tab> -->
       <!-- <v-tab v-if="isCrafts" :value="2">工藝教育者履歷</v-tab> -->
     </v-tabs>
     <v-window v-model="tab">
@@ -324,7 +324,7 @@ let productList = ["機具", "織布"];
             </v-select>
           </v-label>
 
-          <v-label class="mt-10">
+          <!-- <v-label class="mt-10">
             <p class="d-flex mb-5">
               {{ t("profile.displayName") }}<span class="mark">*</span>
             </p>
@@ -335,7 +335,7 @@ let productList = ["機具", "織布"];
               density="comfortable"
               class="d-block"
             ></v-text-field>
-          </v-label>
+          </v-label> -->
 
           <v-label class="mt-3">
             <p class="d-flex my-3">{{ t("profile.gender") }}</p>
@@ -409,7 +409,7 @@ let productList = ["機具", "織布"];
       </v-window-item>
 
       <!-- 創作者 -->
-      <v-window-item :value="2">
+      <!-- <v-window-item :value="2">
         <v-form @submit.prevent>
           <v-label class="mt-5">
             <p class="d-flex mb-5">
@@ -518,10 +518,10 @@ let productList = ["機具", "織布"];
             </v-btn>
           </div>
         </v-form>
-      </v-window-item>
+      </v-window-item> -->
 
       <!-- 加工製造者 -->
-      <v-window-item :value="3">
+      <!-- <v-window-item :value="3">
         <v-form @submit.prevent>
           <p class="text-h5 font-weight-bold">
             {{ t("profile.processing_techniques_info") }}
@@ -736,7 +736,7 @@ let productList = ["機具", "織布"];
             </v-btn>
           </div>
         </v-form>
-      </v-window-item>
+      </v-window-item> -->
 
       <!-- 工藝教育者履歷 -->
       <!-- <v-window-item :value="2">