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
    }
原文地址:https://www.cnblogs.com/benbendu/p/9244212.html