SyuanYu преди 1 година
родител
ревизия
1907a6ec74
променени са 6 файла, в които са добавени 52 реда и са изтрити 13 реда
  1. 7 0
      src/assets/css/style.css
  2. 0 0
      src/assets/css/style.css.map
  3. 7 7
      src/assets/css/style.scss
  4. 17 0
      src/views/CollegeGroup/Life/Shop.vue
  5. 16 3
      src/views/CourseDetail.vue
  6. 5 3
      src/views/User/Passport.vue

+ 7 - 0
src/assets/css/style.css

@@ -296,6 +296,13 @@ input:focus-visible {
     margin-top: -24%;
   }
 }
+.college-content .main-block.life {
+  padding: 50px 80px;
+  margin-top: 20px;
+  background-image: none;
+  background-color: #fff;
+  border-radius: 20px;
+}
 .college-content .main-block .title {
   padding: 80px 0;
   font-size: 30px;

Файловите разлики са ограничени, защото са твърде много
+ 0 - 0
src/assets/css/style.css.map


+ 7 - 7
src/assets/css/style.scss

@@ -294,13 +294,13 @@ input:focus-visible {
       margin-top: -24%;
     }
 
-    // &.life {
-    //   padding: 50px 80px;
-    //   margin-top: 20px;
-    //   background-image: none;
-    //   background-color: #fff;
-    //   border-radius: 20px;
-    // }
+    &.life {
+      padding: 50px 80px;
+      margin-top: 20px;
+      background-image: none;
+      background-color: #fff;
+      border-radius: 20px;
+    }
 
     .title {
       padding: 80px 0;

+ 17 - 0
src/views/CollegeGroup/Life/Shop.vue

@@ -1,6 +1,7 @@
 <script setup>
 import { reactive } from "vue";
 import { useMainStore } from "@/stores/store";
+import axios from "axios";
 
 const store = useMainStore();
 
@@ -21,6 +22,22 @@ const breadcrumbs = reactive([
   },
 ]);
 
+let article = reactive({
+  list: [],
+});
+
+(async () => {
+  try {
+    const response = await axios.get(
+      "https://cmm.ai:8088/api/get_article?group_sort=旅物SHOP"
+    );
+    article.list = response.data.articles;
+    console.log("response", article.list);
+  } catch (error) {
+    console.error(error);
+  }
+})();
+
 const shopImgs = [
   {
     img: store.getImageUrl("college-group/life/shop/旅物shop-01.png"),

+ 16 - 3
src/views/CourseDetail.vue

@@ -376,6 +376,7 @@ let currentTitle = computed(() => {
                 <th>場次名稱</th>
                 <th>開始/結束時間</th>
                 <th>課程地點</th>
+                <th>課程費用</th>
                 <th>講師</th>
                 <th>報名截止日</th>
                 <th></th>
@@ -384,7 +385,7 @@ let currentTitle = computed(() => {
             <tbody>
               <tr v-for="(item, index) in session.data" :key="index">
                 <td>{{ item.class_name }}</td>
-                <td>
+                <td width="20%">
                   {{ moment(`${item.start_time}`).format("YYYY/MM/DD H:mm") }}
                   <br />
                   ~ <br />
@@ -393,8 +394,20 @@ let currentTitle = computed(() => {
                 <td>
                   {{ isInner === 0 ? course.data.school : item.location }}
                 </td>
-                <td></td>
-                <td></td>
+                <td>{{ item.fee_method }}</td>
+                <td>{{ item.lecturer }}</td>
+                <td>
+                  <span
+                    v-if="item.registration_end && item.registration_end !== ''"
+                  >
+                    {{
+                      moment(`${item.registration_end}`).format(
+                        "YYYY/MM/DD H:mm"
+                      )
+                    }}
+                  </span>
+                  <span v-else>無</span>
+                </td>
                 <td>
                   <v-btn rounded="xl" color="brown">
                     <a v-if="isInner === 0" :href="item.URL" target="_blank"

+ 5 - 3
src/views/User/Passport.vue

@@ -12,7 +12,7 @@ let register = reactive({
   list: [],
 });
 
-console.log('profile',store.profile);
+console.log("profile", store.profile);
 (async () => {
   try {
     const response = await axios.get(
@@ -50,7 +50,7 @@ console.log('profile',store.profile);
           <img src="@/assets/img/passport/icon-03.png" alt="" />
           <p>
             總共 <br />
-            <strong> {{ store.profile.points * 3 }} </strong> <small>小時</small>
+            <strong> {{ store.profile.points }} </strong> <small>小時</small>
           </p>
         </div>
       </v-col>
@@ -67,7 +67,9 @@ console.log('profile',store.profile);
           <img src="@/assets/img/passport/icon-03.png" alt="" />
           <p>
             總共 <br />
-            <strong> {{ store.profile.points }} </strong> <small>點</small>
+            <!-- 小數點無條件捨去 -->
+            <strong> {{ Math.floor(store.profile.points / 3) }} </strong>
+            <small class="ps-2">點</small>
           </p>
         </div>
       </v-col>

Някои файлове не бяха показани, защото твърде много файлове са промени