From e8d81c53d6370587c91fa1390f3c1eda89f0152f Mon Sep 17 00:00:00 2001 From: meo <18801474720@163.com> Date: Wed, 3 Jul 2019 17:36:48 +0800 Subject: [PATCH] =?UTF-8?q?[=E6=B4=BB=E5=8A=A8=E6=8A=A5=E5=90=8D=EF=BC=8C?= =?UTF-8?q?=E4=BC=98=E6=83=A0=E5=88=B8][=E4=BF=AE=E6=94=B9]:[=E6=A0=B7?= =?UTF-8?q?=E5=BC=8F=E7=9A=84=E4=BF=AE=E6=94=B9]?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- pages/coupon/detail/index.wxss | 2 +- pages/radetail/joinActivity/edit.js | 48 ++++++++++++++++++++++++++- pages/radetail/joinActivity/edit.wxml | 2 +- 3 files changed, 49 insertions(+), 3 deletions(-) diff --git a/pages/coupon/detail/index.wxss b/pages/coupon/detail/index.wxss index 0629b80..0ae52c3 100644 --- a/pages/coupon/detail/index.wxss +++ b/pages/coupon/detail/index.wxss @@ -231,7 +231,7 @@ button::after { display: flex; padding: 20rpx 0; background: #fff; - z-index: 10000; + z-index: 10; } .posi_logo view:nth-child(1) { diff --git a/pages/radetail/joinActivity/edit.js b/pages/radetail/joinActivity/edit.js index 7a1113e..aa0ef32 100644 --- a/pages/radetail/joinActivity/edit.js +++ b/pages/radetail/joinActivity/edit.js @@ -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){ + } + } + }) + } + }) + }, }) \ No newline at end of file diff --git a/pages/radetail/joinActivity/edit.wxml b/pages/radetail/joinActivity/edit.wxml index 0489122..5c54a47 100644 --- a/pages/radetail/joinActivity/edit.wxml +++ b/pages/radetail/joinActivity/edit.wxml @@ -40,5 +40,5 @@ + - + \ No newline at end of file