标签:form success syn define hat nbsp cti time ret
setData function is not defined 这个问题只会出现在
具体替代吗吧!写日志真的不是我的强项
//logs.js var util = require(‘../../utils/util.js‘) Page({ data: { logs: [], array: [] }, onLoad: function () { var that = this this.setData({ logs: (wx.getStorageSync(‘logs‘) || []).map(function (log) { return util.formatTime(new Date(log)) }) }), wx.request({ url: ‘http://www.micuer.com/xiaochengxu.php‘, data: { x: ‘1‘, y: ‘1‘ }, header: { ‘content-type‘: ‘application/json‘ }, success: function (res) { that.setData({array : res.data.data }) wx.showToast({ title: ‘成功‘ + res.data.msg, icon: ‘success‘, duration: 2000 }) } }) } })
标签:form success syn define hat nbsp cti time ret
原文地址:http://www.cnblogs.com/keli/p/7299650.html