团队冲刺(9)

明日完成:个人信息展示优化

 

增加,添加记录,删除记录,浏览记录功能

 

    delHistory() {
       let userId = this.userId;
       let data = this.histroy.id;
       this.$store.dispatch("delHistory", {userId, data} );
    },
    //添加历史记录
    addHistory(title, author) {
       let userId = this.userId;
       this.$store.dispatch("addHistory", {title,author,userId} );
    },

 

问题:参数传递加上用户id

let userId = this.userId;
     let data = {
      currentPage: this.currentPage,
      pageSize: this.pageSize, 
    };
    this.$store.dispatch("getHistory", { userId,data} );
    let data=JSON.parse(JSON.stringify(this.$store.state.bro.histroy.content))

 

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