- 烦请各位大佬指导一下,我使用云数据库管理模板管理小程序后台,请问如何新增导出功能导出云数据库数据?
[图片][图片]
06-18 - 清空页面数据
[代码]doInsert: function (e) {[代码][代码] [代码][代码]console.log([代码][代码]'form发生了submit事件,携带数据为:'[代码][代码], e.detail.value)[代码][代码] [代码][代码]var name = e.detail.value.name;[代码][代码] [代码][代码]var id = e.detail.value.id;[代码][代码] [代码][代码]var password = e.detail.value.password;[代码][代码] [代码][代码]var gender = e.detail.value.gender;[代码][代码] [代码][代码]var phone = e.detail.value.phone;[代码][代码] [代码][代码]var postbox = e.detail.value.postbox;[代码][代码] [代码][代码]var power = e.detail.value.power;[代码][代码] [代码][代码]if (power){[代码][代码] [代码][代码]power = [代码][代码]0[代码] [代码] [代码][代码]}else{[代码][代码] [代码][代码]power = [代码][代码]1[代码][代码] [代码][代码]}[代码][代码] [代码][代码]var that = this;[代码][代码] [代码][代码]if (name.length == [代码][代码]0[代码] [代码]|| id.length == [代码][代码]0[代码] [代码]|| password.length == [代码][代码]0[代码][代码]) {[代码][代码] [代码][代码]wx.showToast({[代码][代码] [代码][代码]title: [代码][代码]'姓名、编号、密码不能为空!'[代码][代码],[代码][代码] [代码][代码]icon: [代码][代码]'none'[代码][代码],[代码][代码] [代码][代码]duration: [代码][代码]500[代码][代码] [代码][代码]})[代码][代码] [代码][代码]}else{[代码][代码] [代码][代码]wx.request({[代码][代码] [代码][代码]url: [代码][代码]'http://www.test.com/insert.php'[代码][代码],[代码][代码] [代码][代码]data: {[代码][代码] [代码][代码]name: name,[代码][代码] [代码][代码]id: id,[代码][代码] [代码][代码]password: password,[代码][代码] [代码][代码]gender: gender,[代码][代码] [代码][代码]phone: phone,[代码][代码] [代码][代码]postbox: postbox,[代码][代码] [代码][代码]power: power[代码][代码] [代码][代码]},[代码][代码] [代码][代码]header: {[代码][代码] [代码][代码]'content-type'[代码][代码]: [代码][代码]'applicationjson'[代码][代码] [代码][代码]},[代码][代码] [代码][代码]success: function (res) {[代码][代码] [代码][代码]console.log(res.data);[代码][代码] [代码][代码]if (res.data == [代码][代码]1[代码][代码]){[代码][代码] [代码][代码]wx.showToast({ [代码][代码] [代码][代码]title: [代码][代码]'添加成功'[代码][代码],[代码][代码] [代码][代码]icon: [代码][代码]'success'[代码][代码],[代码][代码] [代码][代码]duration: [代码][代码]1000[代码][代码] [代码][代码]});[代码][代码] [代码][代码]}else{[代码][代码] [代码][代码]wx.showToast({[代码][代码] [代码][代码]title: [代码][代码]'添加失败,请重新添加'[代码][代码],[代码][代码] [代码][代码]icon: [代码][代码]'none'[代码][代码],[代码][代码] [代码][代码]duration: [代码][代码]500[代码][代码] [代码][代码]});[代码][代码] [代码][代码]}[代码][代码] [代码][代码]that.setData({[代码][代码] [代码][代码]name: [代码][代码]''[代码][代码],[代码][代码] [代码][代码]id: [代码][代码]''[代码][代码],[代码][代码] [代码][代码]password: [代码][代码]''[代码][代码],[代码][代码] [代码][代码]gender: [代码][代码]''[代码][代码],[代码][代码] [代码][代码]phone: [代码][代码]''[代码][代码],[代码][代码] [代码][代码]postbox: [代码][代码]''[代码][代码],[代码][代码] [代码][代码]})[代码][代码] [代码][代码]}[代码][代码] [代码][代码]})[代码][代码] [代码][代码]}[代码][代码] [代码][代码]},[代码]能请问一下大佬们,我这样写为什么提交过后不能清空页面数据呀?十分感谢!!!
2019-05-07 - 如何改变文字字符宽度,使文字对齐
[图片] 有没有老哥解答一下,怎样把上下文字对齐。十分感谢!!!
2019-04-20 - 小程序连接Mysql数据库
求求大佬们,救救弟弟!!!万分感激 小程序怎样连接数据库?通过小程序对数据库做一些添加、查询、更新、删除的操作。
2019-04-02