You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
guoxinyu_project/scr/wechat-weapp-mapdemo-master/wechat-weapp-mapdemo-master.../miniprogram/pages/updateusers/index.js

46 lines
1.0 KiB

// pages/updateusers/index.js
Page({
//修改数据(改)
inputupdateID:function(e){
this.setData({
updateUser_ID:e.detail.value
})
},
inputupdateCollege:function(e){
this.setData({
updateUser_College:e.detail.value
})
},
inputupdateKey:function(e){
this.setData({
updateUser_Key:e.detail.value
})
},
updateDataFn(){
wx.cloud.callFunction({
name: 'useroption',
data: {
option: 'update',
updateUser_ID:this.data.updateUser_ID,
updateUser_College:this.data.updateUser_College,
updateUser_Key:this.data.updateUser_Key
},
success: res => {
wx.showToast({
title: '用户修改成功',
})
console.log(res)
},
fail:err => {
wx.showToast({
title: '用户修改失败',
})
}
})
},
getback:function(){
wx.navigateBack({
delta:1,
})
}
})