瀏覽代碼

fix 问题

dusenyao 3 年之前
父節點
當前提交
2ed35b6202

+ 17 - 7
src/components/payment/Audit.vue

@@ -14,21 +14,21 @@
         </p>
       </div>
       <div class="price">
-        <p>¥ {{ data.price }}</p>
+        <p>¥ {{ data.price | priceFormat }}</p>
       </div>
     </div>
     <div class="total">
       <p class="total-price">
         <span> 一件商品,总金额: </span>
-        <span class="co-value">¥ {{ data.price }}</span>
+        <span class="co-value">¥ {{ data.price | priceFormat }}</span>
       </p>
       <p class="discount">
         <span> 优惠折扣: </span>
-        <span class="co-value">-¥ {{ discount_money }}</span>
+        <span class="co-value">-¥ {{ discount_money | priceFormat }}</span>
       </p>
       <p class="payable">
         <span> 应付: </span>
-        <span class="co-value">¥ {{ receivables_money }}</span>
+        <span class="co-value">¥ {{ receivables_money | priceFormat }}</span>
       </p>
     </div>
     <div class="submitBtn">
@@ -65,6 +65,16 @@
 import { ApplyJoinCourse } from '@/api/course';
 
 export default {
+  filters: {
+    priceFormat(val) {
+      let price = String(val);
+      if (price.includes('.')) {
+        const list = price.split('.');
+        return `${list[0]}.${list[1].length <= 1 ? `${list[1]}0` : list[1]}`;
+      }
+      return `${price}.00`;
+    }
+  },
   props: {
     data: {
       default: () => {
@@ -77,15 +87,15 @@ export default {
       type: String
     },
     goodsType: {
-      default: '201',
-      type: String
+      default: 201,
+      type: Number
     }
   },
   data() {
     return {
       visible: false,
       discount_code: '', // 优惠码
-      discount_money: 0.0, // 优惠金额
+      discount_money: 0, // 优惠金额
       receivables_money: this.data.price // 应收款
     };
   },

+ 1 - 3
src/icons/svg/check-mark-small.svg

@@ -1,3 +1 @@
-<svg width="10" height="10" viewBox="0 0 10 10" fill="none" xmlns="http://www.w3.org/2000/svg">
-<path fill-rule="evenodd" clip-rule="evenodd" d="M8.62804 2.62204C8.79076 2.78476 8.79076 3.04858 8.62804 3.21129L4.46138 7.37796C4.29866 7.54068 4.03484 7.54068 3.87212 7.37796L1.78879 5.29463C1.62607 5.13191 1.62607 4.86809 1.78879 4.70537C1.95151 4.54265 2.21532 4.54265 2.37804 4.70537L4.16675 6.49408L8.03879 2.62204C8.20151 2.45932 8.46532 2.45932 8.62804 2.62204Z" fill="currentColor" stroke="currentColor" stroke-width="0.5" stroke-linecap="round" stroke-linejoin="round"/>
-</svg>
+<svg width="10" height="10" fill="none" xmlns="http://www.w3.org/2000/svg"><path fill-rule="evenodd" clip-rule="evenodd" d="M8.628 2.622a.417.417 0 0 1 0 .59L4.461 7.377a.417.417 0 0 1-.589 0L1.79 5.295a.417.417 0 0 1 .589-.59l1.789 1.79 3.872-3.873a.417.417 0 0 1 .589 0Z" fill="currentColor" stroke="currentColor" stroke-width=".5" stroke-linecap="round" stroke-linejoin="round"/></svg>

+ 1 - 5
src/icons/svg/closed.svg

@@ -1,5 +1 @@
-<svg width="16" height="16" viewBox="0 0 16 16" fill="none" xmlns="http://www.w3.org/2000/svg">
-<path d="M8.00065 14.6663C11.6826 14.6663 14.6673 11.6816 14.6673 7.99967C14.6673 4.31777 11.6826 1.33301 8.00065 1.33301C4.31875 1.33301 1.33398 4.31777 1.33398 7.99967C1.33398 11.6816 4.31875 14.6663 8.00065 14.6663Z" fill="#C4C4C4"/>
-<path d="M9.88549 6.11426L6.11426 9.88549" stroke="white" stroke-linecap="round" stroke-linejoin="round"/>
-<path d="M6.11426 6.11426L9.88549 9.88549" stroke="white" stroke-linecap="round" stroke-linejoin="round"/>
-</svg>
+<svg width="16" height="16" fill="none" xmlns="http://www.w3.org/2000/svg"><path d="M8 14.666A6.667 6.667 0 1 0 8 1.333a6.667 6.667 0 0 0 0 13.333Z" fill="#C4C4C4"/><path d="m9.885 6.114-3.77 3.771M6.114 6.114l3.771 3.771" stroke="#fff" stroke-linecap="round" stroke-linejoin="round"/></svg>

+ 1 - 1
src/icons/svg/collection-solid.svg

@@ -1 +1 @@
-<svg class="icon" viewBox="0 0 1024 1024" xmlns="http://www.w3.org/2000/svg" width="200" height="200"><path d="M292.717 936.427c-16.663 0-33.205-6.69-46.462-16.664-23.232-19.947-36.49-53.152-33.205-83.073l36.489-195.945-139.51-132.82c-23.23-23.23-26.515-59.841-23.23-86.357 9.973-36.489 36.488-59.841 66.409-63.125l192.661-36.49 86.357-185.971c19.948-29.92 46.463-46.463 79.668-46.463 33.205 0 59.842 16.664 76.383 46.463l86.357 185.972 192.662 33.205c29.92 6.69 56.436 29.92 66.41 59.841 9.973 29.921 3.283 59.842-16.664 86.357L774.25 640.745l33.205 195.945c3.284 33.205-6.69 63.126-33.205 83.073-16.663 9.974-29.921 16.664-49.868 16.664-16.664 0-33.205-6.69-36.49-9.974l-175.997-93.047-179.404 89.641c-13.258 9.974-26.515 13.38-39.773 13.38z" fill="#f90"/><path d="M511.894 139.266c-13.258 0-23.232 6.69-29.921 19.947l-99.615 205.92-219.176 43.178c-19.948 3.284-23.232 16.663-26.516 26.515 0 9.974 0 29.92 9.974 39.895l159.335 152.766-43.179 215.893c-3.284 13.258 3.284 26.515 13.258 36.489 9.973 6.69 23.231 6.69 33.205 0l199.23-103.02 199.228 103.02c3.284 3.284 9.974 3.284 16.664 3.284s13.257 0 19.947-6.69c9.974-6.69 13.258-23.231 13.258-36.489L717.69 617.392l159.457-156.05c6.69-9.974 9.973-23.232 6.69-39.895-3.285-13.258-16.664-23.232-26.516-26.516L638.145 355.16l-99.614-205.92c-3.406-3.283-13.38-9.973-26.637-9.973z" fill="#f90"/></svg>
+<?xml version="1.0" standalone="no"?><!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd"><svg class="icon" width="200px" height="200.00px" viewBox="0 0 1024 1024" version="1.1" xmlns="http://www.w3.org/2000/svg"><path fill="#ff9900" d="M511.936 49.728 671.872 370.56 996.992 402.88 740.352 645.056 811.776 974.272 511.936 787.968 212.288 974.272 283.648 645.056 27.008 402.88 352.128 370.56 511.936 49.728Z" /></svg>

+ 1 - 1
src/icons/svg/collection.svg

@@ -1 +1 @@
-<svg class="icon" viewBox="0 0 1024 1024" xmlns="http://www.w3.org/2000/svg" width="200" height="200"><path d="M292.717 936.427c-16.663 0-33.205-6.69-46.462-16.664-23.232-19.947-36.49-53.152-33.205-83.073l36.489-195.945-139.51-132.82c-23.23-23.23-26.515-59.841-23.23-86.357 9.973-36.489 36.488-59.841 66.409-63.125l192.661-36.49 86.357-185.971c19.948-29.92 46.463-46.463 79.668-46.463 33.205 0 59.842 16.664 76.383 46.463l86.357 185.972 192.662 33.205c29.92 6.69 56.436 29.92 66.41 59.841 9.973 29.921 3.283 59.842-16.664 86.357L774.25 640.745l33.205 195.945c3.284 33.205-6.69 63.126-33.205 83.073-16.663 9.974-29.921 16.664-49.868 16.664-16.664 0-33.205-6.69-36.49-9.974l-175.997-93.047-179.404 89.641c-13.258 9.974-26.515 13.38-39.773 13.38z" fill="#fff"/><path d="M511.894 139.266c-13.258 0-23.232 6.69-29.921 19.947l-99.615 205.92-219.176 43.178c-19.948 3.284-23.232 16.663-26.516 26.515 0 9.974 0 29.92 9.974 39.895l159.335 152.766-43.179 215.893c-3.284 13.258 3.284 26.515 13.258 36.489 9.973 6.69 23.231 6.69 33.205 0l199.23-103.02 199.228 103.02c3.284 3.284 9.974 3.284 16.664 3.284s13.257 0 19.947-6.69c9.974-6.69 13.258-23.231 13.258-36.489L717.69 617.392l159.457-156.05c6.69-9.974 9.973-23.232 6.69-39.895-3.285-13.258-16.664-23.232-26.516-26.516L638.145 355.16l-99.614-205.92c-3.406-3.283-13.38-9.973-26.637-9.973z" fill="#fff"/></svg>
+<?xml version="1.0" standalone="no"?><!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd"><svg class="icon" width="200px" height="200.00px" viewBox="0 0 1024 1024" version="1.1" xmlns="http://www.w3.org/2000/svg"><path fill="#fff" d="M510 172.5l104.7 212 8.6 17.5 19.4 2.8 234 34L707.3 604l-14 13.6 3.3 19.3 40 233.1-209.3-110-17.3-9.1-17.3 9.1-209.3 110 40-233.1 3.3-19.3-14-13.7-169.4-165 234-34 19.4-2.8 8.6-17.5L510 172.5m0-84L372 368.1 63.3 413l223.4 217.7L234 938l276-145.1L786 938l-52.7-307.4L956.6 413 648 368.1 510 88.5z"  /></svg>

+ 8 - 8
src/views/course_details/index.vue

@@ -326,7 +326,7 @@ export default {
       }
 
       if (type === '2') {
-        return str.includes('.') ? str.split('.')[1] : '.00';
+        return str.includes('.') ? `.${str.split('.')[1]}` : '.00';
       }
     },
     // 收藏
@@ -358,13 +358,13 @@ export default {
     // 购买   需要先加入课程 审核 审核通过之后才能购买课程
     getPurchase() {
       // 购买通道关闭
-      if (this.is_buy) {
-        return this.$router.push('/');
-      }
-      if (!this.backTime) {
-        this.$message.warning('购买渠道已关闭');
-        return;
-      }
+      // if (this.is_buy) {
+      //   return this.$router.push('/');
+      // }
+      // if (!this.backTime) {
+      //   this.$message.warning('购买渠道已关闭');
+      //   return;
+      // }
       this.auditShow = true;
     },
     closeaudit() {

+ 2 - 2
src/views/main/components/calendarData.js

@@ -83,11 +83,11 @@ const monthList = [
 const modeList = [
   {
     type: 'DAY',
-    name: 'Key310'
+    name: 'Key311'
   },
   {
     type: 'MONTH',
-    name: 'Key311'
+    name: 'Key310'
   }
 ];
 

+ 1 - 1
src/views/teacher/create_course/step_table/CourseInfo.vue

@@ -150,7 +150,7 @@ export default {
         student_count_max: '',
         is_auto_close: false,
         student_enter_control_type: 0,
-        price: '',
+        price: '0.00',
         is_enable_KHPJ: false,
         is_enable_XYZP: false
       },

+ 1 - 1
src/views/teacher/create_course/step_table/NewTask.vue

@@ -266,7 +266,7 @@ export default {
       id: params.id,
       task_id: query.task_id,
       time_type: params.time_type,
-      cs_item_id: params.cs_item_id,
+      cs_item_id: params.curItemID,
       is_template,
       // 任务所属课节
       curItemID: params.curItemID,