Merge branch 'feature_20210317'

This commit is contained in:
2023-08-30 10:26:54 +08:00
8 changed files with 86 additions and 77 deletions

View File

@@ -34,9 +34,12 @@
"backgroundColor": "#252330"
},
"sitemapLocation": "sitemap.json",
"requiredPrivateInfos": [
"getFuzzyLocation"
],
"permission": {
"scope.userLocation": {
"desc": "需要获取您的地理位置,请确认授权,否则地图功能将无法使用"
"scope.userFuzzyLocation": {
"desc": "为更好体验,需要获取您的地理位置,请确认授权"
}
}
}

View File

@@ -275,6 +275,7 @@ Page({
this.setData({
isShowAuth: false
})
this.onCancel()
}
},
@@ -311,7 +312,7 @@ Page({
includePoints: list,
})
let that = this;
wx.getLocation({
wx.getFuzzyLocation({
type: 'gcj02',
success: function(res) {
that.setData({
@@ -325,12 +326,16 @@ Page({
});
},
fail: function(res) {
console.log(res);
if (res.errMsg == 'getLocation:fail auth deny' || res.errMsg == 'getLocation:fail:auth denied') {
that.setData({
isShowAuth: true
})
}
console.log(res)
that.setData({
latitude: 31.2336800000,
longitude: 121.4715700000,
})
that.getData({
latitude: that.data.latitude,
longitude: that.data.longitude,
zoom: 1
});
},
})
},
@@ -480,15 +485,44 @@ Page({
})
},
// 回到开始
// 由原来的回到开始改为定位
goFrist() {
let list = [{
longitude: this.data.longitude,
latitude: this.data.latitude
}];
// this.data.includePoints
let that = this;
wx.getFuzzyLocation({
type: 'gcj02',
success: function(res) {
that.setData({
latitude: res.latitude,
longitude: res.longitude,
})
that.getData({
latitude: res.latitude,
longitude: res.longitude,
zoom: 1
});
let list = [{
longitude: that.data.longitude,
latitude: that.data.latitude
}];
// this.data.includePoints
that.setData({
includePoints: list
})
},
fail: function(res) {
console.log(res.errMsg)
if (res.errMsg == 'getFuzzyLocation:fail auth deny' || res.errMsg == 'getFuzzyLocation:fail:auth denied' || res.errMsg == 'getFuzzyLocation:fail no permission') {
that.setData({
isShowAuth: true
})
}
},
})
},
onCancel(e){
console.log(e)
this.setData({
includePoints: list
isShowAuth: false
})
}
})

View File

@@ -112,4 +112,4 @@
</view>
</view>
<confirm-dialog title="{{'提示'}}" message="{{'需要获取使用地理位置权限'}}" bindopensetting="setAuthSuccess" wx:if="{{isShowAuth}}" isAuth="{{true}}" show-cancel="{{false}}"></confirm-dialog>
<confirm-dialog title="{{'提示'}}" message="{{'需要获取使用地理位置权限'}}" bindopensetting="setAuthSuccess" wx:if="{{isShowAuth}}" isAuth="{{true}}" show-cancel="{{true}}" bind:cancelselect="onCancel"></confirm-dialog>

View File

@@ -7,11 +7,10 @@
<text>{{memberLessonTicket.venueLesson.name}}</text>
</view>
<!-- <view class='state'>{{memberLessonTicket.status == 0 ? "已预约" : (memberLessonTicket.status == 1 ? "已完成" : "已取消")}}</view> -->
<view class='state' wx:if="{{memberLessonTicket.status == 0}}">预约成功</view>
<view class='state' wx:if="{{memberLessonTicket.status == 0}}">预约</view>
<view class='state' wx:if="{{memberLessonTicket.status == 3}}">未签到</view>
<view class='state' wx:if="{{memberLessonTicket.status == 1}}">已签到</view>
<view class='state' wx:if="{{memberLessonTicket.status == 2}}">已取消</view>
<view class='state' wx:if="{{memberLessonTicket.status == 4}}">待审核</view>
</view>
<view class='cell'>
<image src='../../images/42@3x.png' mode='aspectFit'></image>
@@ -54,7 +53,7 @@
</view>
<view class='footer-box' wx:if="{{memberLessonTicket.status == 0}}">
<!-- {{isSignIn ? "" : "isActive"}} -->
<!-- {{isSignIn ? "" : "isActive"}} -->
<view class='footer-btn ' bindtap='cancelBooking'>取消预约</view>
<!-- {{isSignIn ? "isActive" : ""}} -->
<view class='footer-btn isActive' bindtap='signIn'>我要签到</view>
@@ -62,4 +61,4 @@
</view>
<confirm-dialog title="{{'提示'}}" message="{{'退款成功后将于2个工作日内到达微信账号或余额中每天只有一次机会取消订单'}}" bindcancelselect="cancelDeleteDialog" bindconfirmselect="confirmDeleteDialog" wx:if="{{showDeleteDialog}}"></confirm-dialog>
<confirm-dialog title="{{'提示'}}" message="{{'退款成功后将于2个工作日内到达微信账号或余额中每天只有一次机会取消订单'}}" bindcancelselect="cancelDeleteDialog" bindconfirmselect="confirmDeleteDialog" wx:if="{{showDeleteDialog}}"></confirm-dialog>

View File

@@ -14,11 +14,10 @@
<view class='cell' wx:for="{{list}}" wx:key="{{index}}" bindtap='clickCell' data-ordersn='{{item.orderSn}}'>
<view class='top'>
<text>预约单号: {{item.orderSn}}</text>
<text class='isActive' wx:if="{{item.status == 0}}">预约成功</text>
<text class='isActive' wx:if="{{item.status == 0}}">预约</text>
<text wx:if="{{item.status == 3}}">未签到</text>
<text wx:if="{{item.status == 1}}">已完成</text>
<text wx:if="{{item.status == 2}}">已取消</text>
<text wx:if="{{item.status == 4}}">待审核</text>
</view>
<view class='bottom'>
<image src='{{item.lessonImage}}' mode='aspectFill'></image>
@@ -42,4 +41,4 @@
<view class='newplot' wx:if="{{list.length == 0 && isShowNewplot}}">
<image src='../../images/noContent.png'></image>
<text>暂无预约 ~</text>
</view>
</view>

View File

@@ -1,7 +1,7 @@
// pages/sportsGroundList/index.js
const app = getApp();
let latitude = 0; // 纬度
let longitude = 0; // 经度
let latitude = 31.2336800000; // 纬度
let longitude = 121.4715700000; // 经度
let page = 1;
Page({
@@ -24,7 +24,7 @@ Page({
this.setData({
state: options.state
})
this.getLocation();
this.getLocationDistance();
},
/**
@@ -106,6 +106,21 @@ Page({
}
},
getLocationDistance(){
let that = this;
wx.getFuzzyLocation({
type: 'gcj02',
success: function(res) {
latitude = res.latitude;
longitude = res.longitude;
that.getData()
},
fail: function(res) {
that.getData()
},
})
},
// 获取数据
getData(e) {
wx.showLoading({
@@ -144,35 +159,6 @@ Page({
isShowNewplot: true
})
})
},
}
// 活动当前坐标
getLocation() {
let that = this;
wx.getLocation({
type: 'gcj02',
success: function(res) {
latitude = res.latitude;
longitude = res.longitude;
that.getData()
},
fail: function(res) {
if (res.errMsg == 'getLocation:fail auth deny' || res.errMsg == 'getLocation:fail:auth denied') {
that.setData({
isShowAuth: true
})
}
},
})
},
// 获取授权
setAuthSuccess(e) {
if (e.detail.authSetting['scope.userLocation']) {
this.getLocation();
this.setData({
isShowAuth: false
})
}
},
})
})

View File

@@ -34,9 +34,7 @@
</view>
</view>
<confirm-dialog title="{{'提示'}}" message="{{'需要获取使用地理位置权限'}}" bindopensetting="setAuthSuccess" wx:if="{{isShowAuth}}" isAuth="{{true}}" show-cancel="{{false}}"></confirm-dialog>
<view class='newplot' wx:if="{{isShowNewplot && venues.length == 0}}">
<image src='../../images/noContent.png'></image>
<text>暂无运动场馆 ~</text>
</view>
</view>

View File

@@ -1,7 +1,8 @@
{
"description": "项目配置文件。",
"packOptions": {
"ignore": []
"ignore": [],
"include": []
},
"setting": {
"urlCheck": false,
@@ -42,22 +43,11 @@
"libVersion": "2.17.0",
"appid": "wx73eb8a9ed10a029d",
"projectname": "%E6%99%BA%E6%85%A7%E4%BA%91%E9%A6%86",
"isGameTourist": false,
"simulatorType": "wechat",
"simulatorPluginLibVersion": {},
"condition": {
"search": {
"list": []
},
"conversation": {
"list": []
},
"game": {
"currentL": -1,
"list": []
},
"miniprogram": {
"list": []
}
"condition": {},
"editorSetting": {
"tabIndent": "insertSpaces",
"tabSize": 2
}
}