<input placeholder="请输入" bindinput=“groupName" />
groupName: function(e) {
this.setData({
groupName: e.detail.value,
});
console.log("组名" + this.data.groupName);
},
setGroupName(e) {
var that = this;
wx.request({
url: that.data.editGroupUrl,
method: "get",
header: {
"content-type": ""
},
data: {
name: that.data.groupName
},
success: function(res) {
if (res.status == 1) {
wx.showToast({
title: '修改成功!',
icon: 'success',
})
that.onLoad();
}
else{
wx.showToast({
title: '修改失败!',
icon: 'none',
})
}
},
fail: function(error) {
console.log(error);
}
})