编辑代码

function origin(){
    return new Promise( (resolve, reject) =>{
	        resolve ({"id": 1,
			"avatar":2,
			"name":"jack"
		   })
    })
}

function changeid(res){
    
    return new Promise( (resolve,reject) =>{
        let obj = {
            ...res,
            "id":"changed"
        }
        resolve(obj)
    })
}

function changeAvatar(res){
    return new Promise( (resolve,reject)=>{
        resolve ({
            ...res,
            "avatar":"changed"
        })
    })
}


origin().then(res=>{return changeid(res)}).then(res=>{return changeAvatar(res)}).then(res=>{
    console.log(res)
})