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.
17 lines
486 B
17 lines
486 B
// pages/camel/camel.js
|
|
Page({
|
|
formSubmit: function(e) {
|
|
// 表单返回的所有数据
|
|
var formData = e.detail.value
|
|
// 获取上一个页面的对象
|
|
var pages = getCurrentPages()
|
|
var prevPage = pages[pages.length - 2]
|
|
// 调用上一个页面的 setData() 方法,把数据存到上一个页面中去
|
|
prevPage.setData({
|
|
username: formData.username,
|
|
gender: formData.gender
|
|
})
|
|
// 返回到上一个页面
|
|
wx.navigateBack()
|
|
}
|
|
}) |