|
|
@@ -58,21 +58,21 @@ Page({ |
|
|
|
index1: e.detail.value |
|
|
|
}) |
|
|
|
}, |
|
|
|
address: function() { |
|
|
|
let that = this; |
|
|
|
wx.chooseLocation({ |
|
|
|
success: function(res) { |
|
|
|
that.setData({ |
|
|
|
address: res.name + '(' + res.address + ')', |
|
|
|
addressStr: JSON.stringify(res) |
|
|
|
}) |
|
|
|
}, |
|
|
|
fail: function(error) { |
|
|
|
console.log(error) |
|
|
|
}, |
|
|
|
complete: function(data) {} |
|
|
|
}) |
|
|
|
}, |
|
|
|
// address: function() { |
|
|
|
// let that = this; |
|
|
|
// wx.chooseLocation({ |
|
|
|
// success: function(res) { |
|
|
|
// that.setData({ |
|
|
|
// address: res.name + '(' + res.address + ')', |
|
|
|
// addressStr: JSON.stringify(res) |
|
|
|
// }) |
|
|
|
// }, |
|
|
|
// fail: function(error) { |
|
|
|
// console.log(error) |
|
|
|
// }, |
|
|
|
// complete: function(data) {} |
|
|
|
// }) |
|
|
|
// }, |
|
|
|
change(value){ |
|
|
|
console.log(value) |
|
|
|
}, |
|
|
@@ -89,11 +89,11 @@ Page({ |
|
|
|
} else { |
|
|
|
var sex = that.data.sex; |
|
|
|
} |
|
|
|
if (that.data.addressStr) { |
|
|
|
var address = that.data.addressStr; |
|
|
|
} else { |
|
|
|
var address = null; |
|
|
|
} |
|
|
|
// if (that.data.addressStr) { |
|
|
|
// var address = that.data.addressStr; |
|
|
|
// } else { |
|
|
|
// var address = null; |
|
|
|
// } |
|
|
|
if (e.detail.value.username) { |
|
|
|
var username = e.detail.value.username; |
|
|
|
} else if (that.data.username) { |
|
|
@@ -134,7 +134,7 @@ Page({ |
|
|
|
}); |
|
|
|
} |
|
|
|
|
|
|
|
if (username == null || address == null || sex == 0 || birthday == null) { |
|
|
|
if (username == null || sex == 0 || birthday == null) { |
|
|
|
wx.showToast({ |
|
|
|
title: '请输入完整的用户信息', |
|
|
|
icon: "none" |
|
|
@@ -148,7 +148,7 @@ Page({ |
|
|
|
let data ={}; |
|
|
|
data = { |
|
|
|
sex: sex, |
|
|
|
address: address, |
|
|
|
// address: address, |
|
|
|
name: username, |
|
|
|
birthday: birthday, |
|
|
|
answer: JSON.stringify(that.data.answer), |
|
|
|