|  |  | @@ -10,6 +10,7 @@ Page({ | 
		
	
		
			
			|  |  |  | data: { | 
		
	
		
			
			|  |  |  | navigationBarHeight, | 
		
	
		
			
			|  |  |  | date: '1988-03-12', | 
		
	
		
			
			|  |  |  | selectques: { "sex": 0, "name": 0, "birth": 0, "phone": 0, "address": 0 }, | 
		
	
		
			
			|  |  |  | flag: 1, | 
		
	
		
			
			|  |  |  | answerflag: "", | 
		
	
		
			
			|  |  |  | flagsex: 0, | 
		
	
	
		
			
				|  |  | @@ -60,21 +61,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) | 
		
	
		
			
			|  |  |  | }, | 
		
	
	
		
			
				|  |  | @@ -91,11 +92,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) { | 
		
	
	
		
			
				|  |  | @@ -136,12 +137,13 @@ Page({ | 
		
	
		
			
			|  |  |  | }); | 
		
	
		
			
			|  |  |  | } | 
		
	
		
			
			|  |  |  | 
 | 
		
	
		
			
			|  |  |  | if (username == null || sex == 0 || birthday == null) { | 
		
	
		
			
			|  |  |  | if ((username == null && this.data.selectques.name == 1) || (sex == 0 && this.data.selectques.sex == 1) || (birthday == null && this.data.selectques.birthday == 1)) { | 
		
	
		
			
			|  |  |  | wx.showToast({ | 
		
	
		
			
			|  |  |  | title: '请输入完整的用户信息', | 
		
	
		
			
			|  |  |  | icon: "none" | 
		
	
		
			
			|  |  |  | }) | 
		
	
		
			
			|  |  |  | } else { | 
		
	
		
			
			|  |  |  | } | 
		
	
		
			
			|  |  |  | else { | 
		
	
		
			
			|  |  |  | if (this.data.answerflag == 'noanswer'){ | 
		
	
		
			
			|  |  |  | }else{ | 
		
	
		
			
			|  |  |  | that.setData({ | 
		
	
	
		
			
				|  |  | @@ -150,7 +152,7 @@ Page({ | 
		
	
		
			
			|  |  |  | let data ={}; | 
		
	
		
			
			|  |  |  | data = { | 
		
	
		
			
			|  |  |  | sex: sex, | 
		
	
		
			
			|  |  |  | // address: address, | 
		
	
		
			
			|  |  |  | address: address, | 
		
	
		
			
			|  |  |  | name: username, | 
		
	
		
			
			|  |  |  | birthday: birthday, | 
		
	
		
			
			|  |  |  | answer: JSON.stringify(that.data.answer), | 
		
	
	
		
			
				|  |  | @@ -266,7 +268,8 @@ Page({ | 
		
	
		
			
			|  |  |  | if (res && res.data && res.data.activity) { | 
		
	
		
			
			|  |  |  | this.setData({ | 
		
	
		
			
			|  |  |  | useImg: res.data.activity.useImg, | 
		
	
		
			
			|  |  |  | imgDetail: res.data.activity.imgDetail | 
		
	
		
			
			|  |  |  | imgDetail: res.data.activity.imgDetail, | 
		
	
		
			
			|  |  |  | selectques: JSON.parse(res.data.activity.selectques) | 
		
	
		
			
			|  |  |  | }) | 
		
	
		
			
			|  |  |  | if (res.data && res.data.activity && res.data.activity.question) { | 
		
	
		
			
			|  |  |  | that.setData({ | 
		
	
	
		
			
				|  |  | 
 |