|  |  | @@ -12,6 +12,7 @@ Page({ | 
		
	
		
			
			|  |  |  | answerflag: "", | 
		
	
		
			
			|  |  |  | flagsex: 0, | 
		
	
		
			
			|  |  |  | useImg:0, | 
		
	
		
			
			|  |  |  | disabled:false, | 
		
	
		
			
			|  |  |  | showReceiptUrl:false, | 
		
	
		
			
			|  |  |  | receiptUrl:"", | 
		
	
		
			
			|  |  |  | items: [{ | 
		
	
	
		
			
				|  |  | @@ -77,6 +78,9 @@ Page({ | 
		
	
		
			
			|  |  |  | }, | 
		
	
		
			
			|  |  |  | formSubmit: function(e) { | 
		
	
		
			
			|  |  |  | let that = this; | 
		
	
		
			
			|  |  |  | that.setData({ | 
		
	
		
			
			|  |  |  | disabled:true | 
		
	
		
			
			|  |  |  | }) | 
		
	
		
			
			|  |  |  | /** | 
		
	
		
			
			|  |  |  | * sex | 
		
	
		
			
			|  |  |  | * 0 保密 | 
		
	
	
		
			
				|  |  | @@ -160,11 +164,17 @@ Page({ | 
		
	
		
			
			|  |  |  | data: data | 
		
	
		
			
			|  |  |  | }) | 
		
	
		
			
			|  |  |  | .then(res => { | 
		
	
		
			
			|  |  |  | that.setData({ | 
		
	
		
			
			|  |  |  | disabled: false | 
		
	
		
			
			|  |  |  | }) | 
		
	
		
			
			|  |  |  | wx.reLaunch({ | 
		
	
		
			
			|  |  |  | url: `/pages/radetail/success/index?activityId=${that.data.activityId}`, | 
		
	
		
			
			|  |  |  | }) | 
		
	
		
			
			|  |  |  | }) | 
		
	
		
			
			|  |  |  | .catch(err => { | 
		
	
		
			
			|  |  |  | that.setData({ | 
		
	
		
			
			|  |  |  | disabled: false | 
		
	
		
			
			|  |  |  | }) | 
		
	
		
			
			|  |  |  | wx.showToast({ | 
		
	
		
			
			|  |  |  | title: err.message, | 
		
	
		
			
			|  |  |  | icon: 'none', | 
		
	
	
		
			
				|  |  | @@ -186,6 +196,7 @@ Page({ | 
		
	
		
			
			|  |  |  | */ | 
		
	
		
			
			|  |  |  | onLoad: function(options) { | 
		
	
		
			
			|  |  |  | let that = this; | 
		
	
		
			
			|  |  |  | that.getLocation(); | 
		
	
		
			
			|  |  |  | if (options && options.activityId) { | 
		
	
		
			
			|  |  |  | that.setData({ | 
		
	
		
			
			|  |  |  | activityId: options.activityId | 
		
	
	
		
			
				|  |  | @@ -270,5 +281,40 @@ Page({ | 
		
	
		
			
			|  |  |  | mask: false | 
		
	
		
			
			|  |  |  | }) | 
		
	
		
			
			|  |  |  | }) | 
		
	
		
			
			|  |  |  | } | 
		
	
		
			
			|  |  |  | }, | 
		
	
		
			
			|  |  |  | /** | 
		
	
		
			
			|  |  |  | * 获得经纬度 | 
		
	
		
			
			|  |  |  | */ | 
		
	
		
			
			|  |  |  | getLocation() { | 
		
	
		
			
			|  |  |  | let that = this; | 
		
	
		
			
			|  |  |  | wx.getLocation({ | 
		
	
		
			
			|  |  |  | type: "wgs84", | 
		
	
		
			
			|  |  |  | success: function (res) { | 
		
	
		
			
			|  |  |  | console.log(res) | 
		
	
		
			
			|  |  |  | if (res && res.longitude && res.latitude) { | 
		
	
		
			
			|  |  |  | Http.post({ | 
		
	
		
			
			|  |  |  | url: config.api.updateLBS, | 
		
	
		
			
			|  |  |  | data: { | 
		
	
		
			
			|  |  |  | latitude: res.latitude, | 
		
	
		
			
			|  |  |  | longitude: res.longitude | 
		
	
		
			
			|  |  |  | } | 
		
	
		
			
			|  |  |  | }).then(res => { | 
		
	
		
			
			|  |  |  | console.log(res) | 
		
	
		
			
			|  |  |  | }) | 
		
	
		
			
			|  |  |  | } | 
		
	
		
			
			|  |  |  | }, | 
		
	
		
			
			|  |  |  | fail: error => { | 
		
	
		
			
			|  |  |  | console.log(error); | 
		
	
		
			
			|  |  |  | wx.showModal({ | 
		
	
		
			
			|  |  |  | title: '提醒', | 
		
	
		
			
			|  |  |  | content: '您拒绝了地理位置的授权,将无法参加报名活动,请删除小程序重新登录', | 
		
	
		
			
			|  |  |  | showCancel:false, | 
		
	
		
			
			|  |  |  | success:function(res){ | 
		
	
		
			
			|  |  |  | if (res.confirm){ | 
		
	
		
			
			|  |  |  | } | 
		
	
		
			
			|  |  |  | } | 
		
	
		
			
			|  |  |  | }) | 
		
	
		
			
			|  |  |  | } | 
		
	
		
			
			|  |  |  | }) | 
		
	
		
			
			|  |  |  | }, | 
		
	
		
			
			|  |  |  | }) |