zhangzengfei
2020-08-13 1a72b3138c3ffc9adf8408d0132b9d38dc308eac
src/pages/search/index/App.vue
@@ -32,6 +32,10 @@
      screenHeight: 0,
    }
  },
  created() {
    // this.parseUrl();
  },
  mounted() {
    this.screenHeight = document.documentElement.clientHeight - 20;
    window.onresize = () => {
@@ -40,25 +44,10 @@
      })();
    };
    this.parseUrl();
  },
  methods: {
    parseUrl() {
      if (this.getUrlKey("showType")) {
        this.VideoPhotoData.uploadDiaplay = true;
        console.log("别处跳过来的以图搜图");
        this.VideoPhotoData.picUrl = this.getUrlKey("picSmUrl");
        this.VideoPhotoData.uploadImg = this.getUrlKey("picSmUrl");
        this.VideoPhotoData.uploadType = true
        this.VideoPhotoData.compTargetId = this.getUrlKey("targetId")
        this.VideoPhotoData.compTargetType = this.getUrlKey("compType")
        this.VideoPhotoData.size = 30
        this.VideoPhotoData.compareTabs = ["esData"];
        this.VideoPhotoData.findPerson2(); // 查找此人
      }
    },
    getUrlKey(name) {
      return decodeURIComponent((new RegExp('[?|&]' + name + '=' + '([^&;]+?)(&|#|;|$)').exec(location.href) || [, ""])[1].replace(/\+/g, '%20')) || null
    }
  }
};