Browse Source

修改样式和bug

秦鹏 3 years ago
parent
commit
ade41c8058

+ 1 - 1
src/api/api.js

@@ -66,7 +66,7 @@ export function materiallist(data) {
         data,
     })
 }
-// 查询学习资料详情 
+// 查询学习资料详情
 export function materialdetail(data) {
     return request({
         url: `/GCLSTCServer/material/detail?UserCode=${UserCode}&UserType=${UserType}&SessionID=${SessionID}`,

BIN
src/assets/teacherdev/Frame 1.png


BIN
src/assets/teacherdev/Frame 2.png


BIN
src/assets/teacherdev/exceil.png


BIN
src/assets/teacherdev/moreImage.png


BIN
src/assets/teacherdev/pdf.png


BIN
src/assets/teacherdev/ppt.png


+ 9 - 1
src/components/payment/Confirmorder.vue

@@ -49,7 +49,10 @@
       </p>
       <p class="p2">
         <span> 优惠折扣: </span>
-        <span class="co-value">-¥{{ discount_money }}</span>
+        <span
+          v-text="changediscount_money(this.discount_money)"
+          class="co-value"
+        ></span>
       </p>
       <p class="p3">
         <span> 应付: </span>
@@ -87,6 +90,11 @@ export default {
   watch: {},
   //方法集合
   methods: {
+    changediscount_money(value) {
+      if (value == 0) {
+        return "-¥" + value + ".00";
+      }
+    },
     //   根据不同的文件类型展示不同图片
     getimgurl(item) {
       let index = item.tag.indexOf("downloadable");

+ 9 - 1
src/components/payment/Payment.vue

@@ -45,7 +45,10 @@
       </p>
       <p class="p2">
         <span> 优惠折扣: </span>
-        <span class="co-value">-¥{{ data.discount_money }}</span>
+          <span
+            v-text="changediscount_money(this.discount_money)"
+            class="co-value"
+          ></span>
       </p>
       <p class="p4">
         <span></span>
@@ -93,6 +96,11 @@ export default {
   watch: {},
   //方法集合
   methods: {
+    changediscount_money(value) {
+      if (value == 0) {
+        return "-¥" + value + ".00";
+      }
+    },
     //   根据不同的文件类型展示不同图片
     getimgurl(item) {
       let index = item.tag.indexOf("downloadable");

+ 21 - 22
src/components/teacher-dev/Teaching.vue

@@ -4,15 +4,10 @@
     <div class="top" v-if="!type">
       <div class="title">
         <span class="text"> 教学 </span>
-        <span class="more" @click="goMore">
-          查看更多
-          <img src="../../assets/teacherdev/moreright.png" alt="" />
-          <img
-            class="moreimg2"
-            src="../../assets/teacherdev/moreright.png"
-            alt=""
-          />
-        </span>
+        <div class="more" @click="goMore">
+          <span> 查看更多 </span>
+          <img src="../../assets/teacherdev/moreImage.png" alt="" />
+        </div>
       </div>
     </div>
     <div class="class_list">
@@ -32,7 +27,11 @@
           :src="require('../../assets/teacherdev/' + getimgurl(item) + '.png')"
           alt=""
         ></el-image> -->
-        <p class="one_name">{{ item.name }}</p>
+        <p class="one_name">
+          {{
+            item.name
+          }}
+        </p>
         <p class="price">
           <span class="price_1" v-text="changePrice('1', item.price)"></span>
@@ -123,10 +122,9 @@ export default {
   .top {
     width: 1200px;
     margin: 0 auto;
-    height: 100px;
     .title {
       width: 100%;
-      height: 100%;
+      height: 90px;
       display: flex;
       justify-content: space-between;
       align-items: center;
@@ -136,16 +134,16 @@ export default {
         font-weight: bold;
       }
       .more {
-        font-size: 16px;
-        opacity: 0.4;
         cursor: pointer;
-        img {
-          width: 19px;
-          position: relative;
-          top: 4px;
+        font-size: 16px;
+        display: flex;
+        align-items: center;
+        span {
+          opacity: 0.4;
         }
-        .moreimg2 {
-          right: 10px;
+        img {
+          width: 25px;
+          height: 19px;
         }
       }
     }
@@ -169,8 +167,9 @@ export default {
       cursor: pointer;
       margin-bottom: 32px;
       .one_name {
-        height: 40px;
-        margin-top: 10px;
+        height: 48px;
+        margin-top: 16px;
+        line-height: 150%;
         word-break: break-all;
         display: -webkit-box;
         -webkit-box-orient: vertical;

+ 16 - 20
src/components/teacher-dev/Textbook.vue

@@ -4,15 +4,10 @@
     <div class="top">
       <div class="title">
         <span class="text"> 教材 </span>
-        <span class="more" @click="goMore">
-          查看更多
-          <img src="../../assets/teacherdev/moreright.png" alt="" />
-          <img
-            class="moreimg2"
-            src="../../assets/teacherdev/moreright.png"
-            alt=""
-          />
-        </span>
+        <div class="more" @click="goMore">
+          <span> 查看更多 </span>
+          <img src="../../assets/teacherdev/moreImage.png" alt="" />
+        </div>
       </div>
     </div>
     <div class="class_list">
@@ -123,10 +118,10 @@ export default {
     width: 1200px;
     margin: 0 auto;
     display: flex;
-    height: 100px;
     justify-content: space-between;
     .title {
       width: 100%;
+      height: 90px;
       display: flex;
       justify-content: space-between;
       align-items: center;
@@ -136,16 +131,16 @@ export default {
         font-weight: bold;
       }
       .more {
-        font-size: 16px;
-        opacity: 0.4;
         cursor: pointer;
-        img {
-          width: 19px;
-          position: relative;
-          top: 4px;
+        font-size: 16px;
+        display: flex;
+        align-items: center;
+        span {
+          opacity: 0.4;
         }
-        .moreimg2 {
-          right: 10px;
+        img {
+          width: 25px;
+          height: 19px;
         }
       }
     }
@@ -169,8 +164,9 @@ export default {
       cursor: pointer;
       margin-bottom: 32px;
       .one_name {
-        height: 40px;
-        margin-top: 10px;
+        height: 48px;
+        margin-top: 16px;
+        line-height: 150%;
         word-break: break-all;
         display: -webkit-box;
         -webkit-box-orient: vertical;

+ 0 - 1
src/router/index.js

@@ -31,7 +31,6 @@ const routes = [{
                 text: '跳转中...'
             });
             if (to.query.goods_type == 401) {
-                // 直播课
                 next({
                     path: "/Preview",
                     query: {

+ 6 - 0
src/views/teacher-dev/Preview.vue

@@ -194,15 +194,20 @@ export default {
     // 处理价格
     changePrice(type, item) {
       if (item.indexOf(".") != -1) {
+        this.data.price = item.split(".")[0] + "." + item.split(".")[1];
         if (type == 1) {
           return item.split(".")[0];
         } else if (type == 2) {
           return "." + item.split(".")[1];
         }
       } else {
+        this.data.price = item + ".00";
         if (type == 1) {
           return item;
         }
+        if (type == 2) {
+          return ".00";
+        }
       }
     },
     // 获取pdf的页数
@@ -300,6 +305,7 @@ export default {
             });
             this.data.fileType = this.data.tag[this.data.tag.length - 1];
             this.attachment = JSON.parse(res.data.result.attachment);
+            this.changePrice(this.data.price)
             this.loading = false;
             if (this.attachment[0].fileType == "pdf") {
               // this.attachment[0].fileRelativePath =