vue中用console.log打印对象时,直接打印对象显示如user:[object Object],使用console.log(JSON.stringify(user)),能把对象中的各个属性以json格式输出,方便调试。