gcj 3 éve
szülő
commit
8075b7c306

BIN
src/assets/doc-Q.png


BIN
src/assets/pdf-Q.png


BIN
src/assets/ppt-Q.png


BIN
src/assets/xls-Q.png


+ 41 - 4
src/components/Personalcenter/Mycollect.vue

@@ -28,7 +28,7 @@
           $t("Key75")
         }}</el-menu-item>
         <el-menu-item index="jiaoyan" v-if="userType != 'STUDENT'">{{
-          $t("Key64")
+          $t("Key214")
         }}</el-menu-item>
         <!-- 字词 -->
         <el-menu-item index="hanzi">{{ $t("Key476") }}</el-menu-item>
@@ -108,11 +108,45 @@
                   class="check-img"
                 />
               </div>
-              <div class="coverUrl">
+              <div
+                :class="[
+                  'coverUrl',
+                  item.goods_type != 401 ? 'coverUrl-border' : '',
+                ]"
+              >
                 <template v-if="item.goods_type != 401">
                   <img :src="item.goods_picture_url" />
                 </template>
-                <template v-else>{{ item.goods_type_name }}</template>
+                <template v-else>
+                  <template
+                    v-if="
+                      item.goods_detail_type == 'doc' ||
+                      item.goods_detail_type == 'docx'
+                    "
+                  >
+                    <img src="../../assets/doc-Q.png" />
+                  </template>
+                  <template
+                    v-if="
+                      item.goods_detail_type == 'xls' ||
+                      item.goods_detail_type == 'xlsx'
+                    "
+                  >
+                    <img src="../../assets/xls-Q.png" />
+                  </template>
+                  <template v-if="item.goods_detail_type == 'pdf'">
+                    <img src="../../assets/pdf-Q.png" />
+                  </template>
+
+                  <template
+                    v-if="
+                      item.goods_detail_type == 'ppt' ||
+                      item.goods_detail_type == 'pptx'
+                    "
+                  >
+                    <img src="../../assets/ppt-Q.png" />
+                  </template>
+                </template>
               </div>
               <div class="order-infor">
                 <p class="name">{{ item.goods_name }}</p>
@@ -577,11 +611,14 @@ export default {
           .coverUrl {
             width: 88px;
             height: 88px;
-            border: 1px rgba(0, 0, 0, 0.15) solid;
+            box-sizing: border-box;
             border-radius: 4px;
             display: flex;
             justify-content: center;
             align-items: center;
+            &-border {
+              border: 1px rgba(0, 0, 0, 0.15) solid;
+            }
             > img {
               max-height: 100%;
               max-width: 100%;

+ 46 - 3
src/components/Personalcenter/OrderManage.vue

@@ -57,8 +57,46 @@
           </div>
           <div class="main-content">
             <div class="main-content-left" @click="jump(item)">
-              <div class="coverUrl">
-                <img :src="item.goods_picture_url" />
+              <div
+                :class="[
+                  'coverUrl',
+                  item.goods_type != 401 ? 'coverUrl-border' : '',
+                ]"
+              >
+                <!-- <img :src="item.goods_picture_url" /> -->
+                <template v-if="item.goods_type != 401">
+                  <img :src="item.goods_picture_url" />
+                </template>
+                <template v-else>
+                  <template
+                    v-if="
+                      item.goods_detail_type == 'doc' ||
+                      item.goods_detail_type == 'docx'
+                    "
+                  >
+                    <img src="../../assets/doc-Q.png" />
+                  </template>
+                  <template
+                    v-if="
+                      item.goods_detail_type == 'xls' ||
+                      item.goods_detail_type == 'xlsx'
+                    "
+                  >
+                    <img src="../../assets/xls-Q.png" />
+                  </template>
+                  <template v-if="item.goods_detail_type == 'pdf'">
+                    <img src="../../assets/pdf-Q.png" />
+                  </template>
+
+                  <template
+                    v-if="
+                      item.goods_detail_type == 'ppt' ||
+                      item.goods_detail_type == 'pptx'
+                    "
+                  >
+                    <img src="../../assets/ppt-Q.png" />
+                  </template>
+                </template>
               </div>
               <div class="order-infor">
                 <p class="name">{{ item.goods_name }}</p>
@@ -225,6 +263,7 @@
       :before-close="closePayment"
     >
       <Payment
+        ref="Payment"
         :data="goods_Data"
         :orderNumber="orderNumber"
         :judgePayResult="judgePayResult"
@@ -488,7 +527,7 @@ export default {
     },
     closePayment() {
       this.isPayment = false;
-      this.$refs.Confirmorder.clearData();
+      //this.$refs.Payment.clearData();
     },
     judgePayResult(bool) {
       this.isPayment = false;
@@ -614,6 +653,10 @@ export default {
             display: flex;
             justify-content: center;
             align-items: center;
+            box-sizing: border-box;
+            &-border {
+              border: 1px rgba(0, 0, 0, 0.15) solid;
+            }
             > img {
               max-width: 100%;
               max-height: 100%;

+ 5 - 5
src/components/Personalcenter/TeachMaterial.vue

@@ -145,7 +145,7 @@ export default {
         if (res.goods_list && res.goods_list.length > 0) {
           let list = res.goods_list;
           list = list.map((item) => {
-            let obj = this.handleGoodsType(item.goods_type);
+            let obj = this.handleGoodsType(item.goods_detail_type);
             console.log(obj);
             item.coverUrl = obj.imgUrl;
             item.goods_type_root_name = obj.rootName;
@@ -164,19 +164,19 @@ export default {
       let imgUrl = "",
         rootName = "";
 
-      if (type == 401) {
+      if (type == "doc" || type == "docx") {
         rootName = "Word";
         imgUrl = wordImg;
       }
-      if (type == 402) {
+      if (type == "xls" || type == "xlsx") {
         rootName = "Excel";
         imgUrl = excelImg;
       }
-      if (type == 403) {
+      if (type == "ppt" || type == "pptx") {
         rootName = "PPT";
         imgUrl = pptImg;
       }
-      if (type == 404) {
+      if (type == "pdf") {
         rootName = "PDF";
         imgUrl = pdfImg;
       }

+ 41 - 2
src/components/common/Confirmorder.vue

@@ -2,8 +2,42 @@
   <!-- 未支付 -->
   <div class="Nopyment" v-loading="loading" v-if="data">
     <div class="message">
-      <div class="coverUrl">
-        <img :src="data.goods_picture_url" alt="" />
+      <div
+        :class="['coverUrl', data.goods_type != 401 ? 'coverUrl-border' : '']"
+      >
+        <template v-if="data.goods_type != 401">
+          <img :src="data.goods_picture_url" />
+        </template>
+        <template v-else>
+          <template
+            v-if="
+              data.goods_detail_type == 'doc' ||
+              data.goods_detail_type == 'docx'
+            "
+          >
+            <img src="../../assets/doc-Q.png" />
+          </template>
+          <template
+            v-if="
+              data.goods_detail_type == 'xls' ||
+              data.goods_detail_type == 'xlsx'
+            "
+          >
+            <img src="../../assets/xls-Q.png" />
+          </template>
+          <template v-if="data.goods_detail_type == 'pdf'">
+            <img src="../../assets/pdf-Q.png" />
+          </template>
+
+          <template
+            v-if="
+              data.goods_detail_type == 'ppt' ||
+              data.goods_detail_type == 'pptx'
+            "
+          >
+            <img src="../../assets/ppt-Q.png" />
+          </template>
+        </template>
       </div>
       <div class="text">
         <p class="p1">
@@ -114,6 +148,7 @@ export default {
         goods_name: resData.goods_name, //商品名称
         goods_picture_id: resData.goods_picture_id, //封面图片id
         goods_person_name_desc: resData.goods_person_name_desc, //老师
+        goods_detail_type: resData.goods_detail_type,
         price: resData.price || resData.goods_price, //价格
         discount_code: this.back_discount_code,
       };
@@ -235,6 +270,10 @@ export default {
       display: flex;
       justify-content: center;
       align-items: center;
+      box-sizing: border-box;
+      &-border {
+        border: 1px rgba(0, 0, 0, 0.15) solid;
+      }
       > img {
         max-width: 100%;
         max-height: 100%;

+ 40 - 2
src/components/common/Payment.vue

@@ -2,8 +2,42 @@
   <!-- 支付 -->
   <div class="Nopyment" v-loading="loading" v-if="data">
     <div class="message">
-      <div class="coverUrl">
-        <img :src="data.goods_picture_url" alt="" />
+      <div
+        :class="['coverUrl', data.goods_type != 401 ? 'coverUrl-border' : '']"
+      >
+        <template v-if="data.goods_type != 401">
+          <img :src="data.goods_picture_url" />
+        </template>
+        <template v-else>
+          <template
+            v-if="
+              data.goods_detail_type == 'doc' ||
+              data.goods_detail_type == 'docx'
+            "
+          >
+            <img src="../../assets/doc-Q.png" />
+          </template>
+          <template
+            v-if="
+              data.goods_detail_type == 'xls' ||
+              data.goods_detail_type == 'xlsx'
+            "
+          >
+            <img src="../../assets/xls-Q.png" />
+          </template>
+          <template v-if="data.goods_detail_type == 'pdf'">
+            <img src="../../assets/pdf-Q.png" />
+          </template>
+
+          <template
+            v-if="
+              data.goods_detail_type == 'ppt' ||
+              data.goods_detail_type == 'pptx'
+            "
+          >
+            <img src="../../assets/ppt-Q.png" />
+          </template>
+        </template>
       </div>
       <div class="text">
         <p class="p1">
@@ -238,6 +272,10 @@ export default {
       display: flex;
       justify-content: center;
       align-items: center;
+      box-sizing: border-box;
+      &-border {
+        border: 1px rgba(0, 0, 0, 0.15) solid;
+      }
       > img {
         max-width: 100%;
         max-height: 100%;

+ 2 - 1
src/views/Personalcenter.vue

@@ -456,6 +456,7 @@ export default {
           "Key172",
           "Key210",
           "Key211",
+          "Key214",
           "Key232",
           "Key295",
           "Key361",
@@ -544,7 +545,7 @@ export default {
         },
         {
           id: 4,
-          name: this.$t("Key64"), //"教研材料",
+          name: this.$t("Key214"), //"教研材料",
           imgSrc: "nav5",
           selectSrc: "nav5-1",
         },