|
@@ -163,7 +163,7 @@
|
|
|
|
|
|
<template slot="footer">
|
|
<template slot="footer">
|
|
<view class="footer-btn-group">
|
|
<view class="footer-btn-group">
|
|
- <u-button text="报名记录" @tap="toList"></u-button>
|
|
|
|
|
|
+ <u-button text="活动记录" @tap="toList"></u-button>
|
|
<u-button type="primary" text="提交" @click="submitData" v-if="!isDisabled"></u-button>
|
|
<u-button type="primary" text="提交" @click="submitData" v-if="!isDisabled"></u-button>
|
|
</view>
|
|
</view>
|
|
</template>
|
|
</template>
|
|
@@ -456,28 +456,27 @@ export default {
|
|
|
|
|
|
// 地图选点
|
|
// 地图选点
|
|
getLocation() {
|
|
getLocation() {
|
|
- let that = this
|
|
|
|
uni.chooseLocation({
|
|
uni.chooseLocation({
|
|
success: async res => {
|
|
success: async res => {
|
|
// uni.setStorageSync('formData',{name: this.name,phone: this.phone,address: res.address})
|
|
// uni.setStorageSync('formData',{name: this.name,phone: this.phone,address: res.address})
|
|
let addressData = await this.getRegionByLatLng(res.latitude, res.longitude)
|
|
let addressData = await this.getRegionByLatLng(res.latitude, res.longitude)
|
|
- that.address = addressData.provinceName + addressData.cityName + addressData.areaName + res.address
|
|
|
|
|
|
+ this.address = addressData.provinceName + addressData.cityName + addressData.areaName + res.address
|
|
},
|
|
},
|
|
- fail: function (res) {
|
|
|
|
|
|
+ fail: res => {
|
|
uni.getSetting({
|
|
uni.getSetting({
|
|
- success: function (res) {
|
|
|
|
|
|
+ success: res => {
|
|
if (!res.authSetting['scope.userLocation']) {
|
|
if (!res.authSetting['scope.userLocation']) {
|
|
uni.showModal({
|
|
uni.showModal({
|
|
title: '是否授权当前位置',
|
|
title: '是否授权当前位置',
|
|
content: '需要获取您的地理位置,请确认授权,否则地图功能将无法使用',
|
|
content: '需要获取您的地理位置,请确认授权,否则地图功能将无法使用',
|
|
- success(tip) {
|
|
|
|
|
|
+ success: tip => {
|
|
if (tip.confirm) {
|
|
if (tip.confirm) {
|
|
uni.openSetting({
|
|
uni.openSetting({
|
|
- success: function (data) {
|
|
|
|
|
|
+ success: data => {
|
|
if (data.authSetting['scope.userLocation'] === true) {
|
|
if (data.authSetting['scope.userLocation'] === true) {
|
|
- that.$successToast('授权成功')
|
|
|
|
|
|
+ this.$successToast('授权成功')
|
|
setTimeout(() => {
|
|
setTimeout(() => {
|
|
- that.getLocation()
|
|
|
|
|
|
+ this.getLocation()
|
|
}, 1000)
|
|
}, 1000)
|
|
}
|
|
}
|
|
}
|
|
}
|