youyawu 5 år sedan
förälder
incheckning
0a04d74824
2 ändrade filer med 4 tillägg och 4 borttagningar
  1. 2 2
      src/utils/request.ts
  2. 2 2
      src/views/mall/index.vue

+ 2 - 2
src/utils/request.ts

@@ -6,8 +6,8 @@ import md5 from "js-md5";
 import { getErrMsg } from "@/utils";
 const instance = axios.create({
   baseURL: process.env.VUE_APP_BASE_API,
-  timeout: 3000
-  // withCredentials: true
+  timeout: 3000,
+  withCredentials: true
 });
 const appKey = "cd72c223-923f-44a3-aede-b9f07dcd56b8";
 const plat = "steelfurniture";

+ 2 - 2
src/views/mall/index.vue

@@ -3,7 +3,7 @@
     <div class="banner">
       <img src="@assets/zxsc-banner.png" alt="" />
     </div>
-    <div class="container ">
+    <div class="container" v-if="params">
       <div class="category">
         <div class="dalei">
           <div class="flag ">
@@ -126,7 +126,7 @@ export default class extends Vue {
   @Prop(String) private kw!: string;
 
   activated() {
-    const { id, pid } = this.$route.query;
+    const { id = 0, pid = 0 } = this.$route.query;
     this.currPid = Number(pid) | 0;
     this.params = {
       name: this.kw,