编辑保存婚礼请柬地址信息
// 编辑婚礼信息
router.post('/editInformation', async (req, res, next) => {
let {
names,
time,
seating,
address,
latAndLng,
welcome,
phoneMale,
phoneFemale
} = req.body;
try {
let message = await querySql('update informations set names=?,time=?,seating=?,address=?,latAndLng=?,welcome=?,phoneMale=?,phoneFemale=?', [names, time, seating, address, latAndLng, welcome, phoneMale, phoneFemale]);
res.send({
code: message.affectedRows ? 200 : 100,
msg: message.affectedRows ? '保存成功!' : '保存失败!',
})
} catch (e) {
console.log(e)
next(e)
}
})
© 版权声明
文章版权归作者所有,未经允许请勿转载。