Page({ data: { nameValue: '', }, onLoad(options) { const { name } = options; this.setData({ nameValue: name, }); }, onSubmit() { wx.$util.request(wx.$api.SetPersonInfo, { nickname: this.data.nameValue }, 'POST').then((res) => { console.log(res) wx.navigateBack({ delta: 1 }); }); }, clearContent() { this.setData({ nameValue: '', }); }, });