JSON遇到的问题

  JSON.stringfy

  JSON.parse

报错:unexpected token u in position 0

if (sessionStorage.getItem('houseIdList')) {
      this.formData.houseIds = JSON.parse(sessionStorage.getItem('houseIdList')).houseIds
    }

改为

if (sessionStorage.getItem('houseIdList')) {
      this.formData.houseIds = JSON.parse(JSON.stringify(sessionStorage.getItem('houseIdList'))).houseIds
    }

 

posted @ 2018-06-29 16:43  小番茄酱  阅读(182)  评论(0编辑  收藏  举报