团队作业-冲刺二(5)

 

继续搞高级搜索

   search () {
        
        console.log(this.type1)
        console.log(this.type2)
        console.log(this.type3)
        console.log(this.title)
        console.log(this.author)
        console.log(this.content)
        console.log(this.wentype)
       let { title, author, content,searchTypeOfTitle, searchTypeOfAuthor,searchTypeOfContent,  linkOfAuthor,linkOfContent,currentPage,pageSize } = this;
        searchTypeOfTitle=this.sw(searchTypeOfAuthor)
        searchTypeOfAuthor=this.sw(searchTypeOfAuthor)
        searchTypeOfContent=this.sw(searchTypeOfContent)
        console.log(searchTypeOfAuthor)
        console.log(linkOfAuthor)
        console.log(linkOfContent)
       this.$store
           .dispatch("getSearchListMock", { title, author, content,searchTypeOfTitle, searchTypeOfAuthor,searchTypeOfContent,linkOfAuthor,linkOfContent,currentPage,pageSize })
           .then(() => {
              //var temp = this.$store.state.search.highsearchList;
              var temp = this.$store.state.search.searchList;
              console.log(temp)
              let data=JSON.parse(JSON.stringify(temp))
              this.bookList = data.splice(
                  (this.currentPage - 1) * this.pageSize,
                  this.pageSize
              )
              this.total=temp.length
              console.log(this.bookList)
              console.log(this.total)
           });
    },

 

posted @ 2023-05-12 21:28  旺旺大菠萝  阅读(8)  评论(0编辑  收藏  举报