瀏覽代碼

书架及订单

natasha 3 天之前
父節點
當前提交
44ead10b0f

+ 13 - 1
src/components/common/BookCard.vue

@@ -22,7 +22,12 @@
         </div>
       </template>
     </el-skeleton>
-    <div class="BookCard" @click="handleLink" v-else>
+    <div
+      class="BookCard"
+      :class="[item.isYD ? 'BookCard-no' : '']"
+      @click="handleLink"
+      v-else
+    >
       <!-- <div
             class="image"
             :style="{height:height?height:'280px'}"
@@ -259,10 +264,17 @@ export default {
   width: 100%;
   cursor: pointer;
   position: relative;
+
   .image {
     width: 100%;
     height: 280px;
   }
+  &-no {
+    cursor: initial;
+    .image {
+      opacity: 0.8;
+    }
+  }
   .bottom {
     // height: 132px;
     padding: 4px 12px 12px;

+ 2 - 2
src/views/bookShelf/articlePeruseDetail.vue

@@ -221,11 +221,11 @@
               ><svg-icon icon-class="support"></svg-icon
               >{{ peruseDetail.ding_count }}</span
             >
-            <span
+            <!-- <span
               :class="['oppose', oppose ? 'active' : '']"
               @click="changeStatus('oppose')"
               ><svg-icon icon-class="oppose"></svg-icon
-            ></span>
+            ></span> -->
           </div>
           <div class="center">
             <!-- <el-button type="text" class="btn-left" @click="handlePage('-')"><svg-icon icon-class="arrow-left-line"></svg-icon>上一篇</el-button>

+ 41 - 31
src/views/personalCenter/components/OrderList.vue

@@ -144,13 +144,23 @@
       </el-table-column>
       <el-table-column prop="status" label="操作" width="140" fixed="right">
         <template slot-scope="scope">
-          <template v-if="scope.row.is_use_discount_code == 'false'">
+          <template
+            v-if="
+              scope.row.is_use_discount_code == 'false' &&
+              scope.row.order_status === 1
+            "
+          >
             <a class="apply" @click="handleApply(scope.row, scope.$index)"
               >申请退款</a
             >
           </template>
           <template
-            v-if="scope.row.order_status === 1 || scope.row.order_status === 2"
+            v-if="
+              scope.row.order_status === 1 ||
+              scope.row.order_status === 2 ||
+              (scope.row.order_status === 3 &&
+                scope.row.order_amount !== scope.row.refund_amount)
+            "
           >
             <a class="apply" @click="handleToShlef">去查看</a>
           </template>
@@ -225,17 +235,17 @@ export default {
           textColor: "#1D2129",
         },
         4: {
-          text: "已撤回",
+          text: "已退款",
           textColor: "#0FC6C2",
           bg: "#0FC6C2",
         },
         5: {
-          text: "已退款",
+          text: "支付失败",
           bg: "#EF21DA",
           textColor: "#EF21DA",
         },
         3: {
-          text: "支付失败",
+          text: "已撤回",
           bg: "#FF7D00",
           textColor: "#1D2129",
         },
@@ -401,21 +411,21 @@ export default {
     },
     // 申请退款
     handleApply(obj, index) {
-      this.$confirm("确定申请退款吗?", "提示", {
-        confirmButtonText: "确定",
-        cancelButtonText: "取消",
-        type: "warning",
-      })
-        .then(() => {
-          let data = {
-            order_id: obj.id,
-          };
-          getLogin(
-            "/ShopServer/Client/OrderManager/CheckOrderIsCanSubmitRefundApply",
-            data
-          ).then((res) => {
-            if (res.status === 1) {
-              if (res.is_can_submit_refund_apply === "true") {
+      let data = {
+        order_id: obj.id,
+      };
+      getLogin(
+        "/ShopServer/Client/OrderManager/CheckOrderIsCanSubmitRefundApply",
+        data
+      ).then((res) => {
+        if (res.status === 1) {
+          if (res.is_can_submit_refund_apply === "true") {
+            this.$confirm("确定申请退款吗?", "提示", {
+              confirmButtonText: "确定",
+              cancelButtonText: "取消",
+              type: "warning",
+            })
+              .then(() => {
                 let Mname =
                   "/ShopServer/Client/OrderManager/SubmitOrderRefundApply";
 
@@ -428,17 +438,17 @@ export default {
                     this.getList();
                   }
                 });
-              } else {
-                this.$confirm(res.cannot_submit_reason, "不可退款原因", {
-                  confirmButtonText: "确定",
-                  showCancelButton: false,
-                  type: "warning",
-                });
-              }
-            }
-          });
-        })
-        .catch(() => {});
+              })
+              .catch(() => {});
+          } else {
+            this.$confirm(res.cannot_submit_reason, "不可退款原因", {
+              confirmButtonText: "确定",
+              showCancelButton: false,
+              type: "warning",
+            });
+          }
+        }
+      });
     },
     handleToShlef() {
       this.$router.push({ path: "/bookShelf" });