Initial commit
This commit is contained in:
@@ -0,0 +1,22 @@
|
||||
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: '',
|
||||
});
|
||||
},
|
||||
});
|
||||
Reference in New Issue
Block a user