Prechádzať zdrojové kódy

修改课程查看 只要未购买都去申请

dusenyao 2 rokov pred
rodič
commit
8e1d409dad
1 zmenil súbory, kde vykonal 41 pridanie a 37 odobranie
  1. 41 37
      src/views/course_details/index.vue

+ 41 - 37
src/views/course_details/index.vue

@@ -38,48 +38,51 @@
             </p>
 
             <p v-if="backTime" class="tip">
-              {{ $t('Key48') }}
+              {{ !is_buy ? $t('Key48') : ' ' }}
             </p>
             <div class="operation">
-              <div v-if="backTime" class="countdown">
-                <div class="time">
-                  <div>
-                    <div class="time-num">
-                      {{ backTime.days }}
-                    </div>
-                    <div class="time-name">
-                      {{ $t('Key386') }}
-                    </div>
-                  </div>
-                  <div>
-                    <div class="time-num">
-                      {{ backTime.hours }}
-                    </div>
-                    <div class="time-name">
-                      {{ $t('Key387') }}
-                    </div>
-                  </div>
-                  <div>
-                    <div class="time-num">
-                      {{ backTime.minutes }}
+              <template v-if="!is_buy">
+                <div v-if="backTime" class="countdown">
+                  <div class="time">
+                    <div>
+                      <div class="time-num">
+                        {{ backTime.days }}
+                      </div>
+                      <div class="time-name">
+                        {{ $t('Key386') }}
+                      </div>
                     </div>
-                    <div class="time-name">
-                      {{ $t('Key388') }}
+                    <div>
+                      <div class="time-num">
+                        {{ backTime.hours }}
+                      </div>
+                      <div class="time-name">
+                        {{ $t('Key387') }}
+                      </div>
                     </div>
-                  </div>
-                  <div>
-                    <div class="time-num">
-                      {{ backTime.seconds }}
+                    <div>
+                      <div class="time-num">
+                        {{ backTime.minutes }}
+                      </div>
+                      <div class="time-name">
+                        {{ $t('Key388') }}
+                      </div>
                     </div>
-                    <div class="time-name">
-                      {{ $t('Key321') }}
+                    <div>
+                      <div class="time-num">
+                        {{ backTime.seconds }}
+                      </div>
+                      <div class="time-name">
+                        {{ $t('Key321') }}
+                      </div>
                     </div>
                   </div>
                 </div>
-              </div>
-              <div v-else>
-                {{ $t('Key389') }}
-              </div>
+                <div v-else>
+                  {{ $t('Key389') }}
+                </div>
+              </template>
+              <div v-else></div>
 
               <div v-if="!readonly">
                 <span v-show="CourseData.price !== 0" class="price">
@@ -88,7 +91,7 @@
                   <span class="price_2" v-text="changePrice('2', CourseData.price)"></span>
                 </span>
                 <button class="get" @click="getPurchase">
-                  {{ is_buy || is_free_license || CourseData.price === 0 ? $t('Key390') : $t('Key391') }}
+                  {{ is_buy ? $t('Key390') : $t('Key391') }}
                 </button>
                 <span class="collection" @click="addOrDeleteMyCollection">
                   <svg-icon :icon-class="collection ? 'collection-solid' : 'collection'" />
@@ -428,10 +431,10 @@ export default {
         });
       }
     },
-    // 购买   需要先加入课程 审核 审核通过之后才能购买课程
+    // 购买需要先加入课程 审核 审核通过之后才能购买课程
     getPurchase() {
       // 购买通道关闭
-      if (this.is_buy || this.is_free_license || this.CourseData.price === 0) {
+      if (this.is_buy) {
         return this.$router.push('/');
       }
       if (!this.backTime) {
@@ -586,6 +589,7 @@ export default {
         color: #fff;
 
         .tip:not(.p1) {
+          height: 20px;
           margin-top: 36px;
         }