Merge branch 'feature_20210317'
This commit is contained in:
7
app.json
7
app.json
@@ -34,9 +34,12 @@
|
|||||||
"backgroundColor": "#252330"
|
"backgroundColor": "#252330"
|
||||||
},
|
},
|
||||||
"sitemapLocation": "sitemap.json",
|
"sitemapLocation": "sitemap.json",
|
||||||
|
"requiredPrivateInfos": [
|
||||||
|
"getFuzzyLocation"
|
||||||
|
],
|
||||||
"permission": {
|
"permission": {
|
||||||
"scope.userLocation": {
|
"scope.userFuzzyLocation": {
|
||||||
"desc": "需要获取您的地理位置,请确认授权,否则地图功能将无法使用"
|
"desc": "为更好体验,需要获取您的地理位置,请确认授权"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -275,6 +275,7 @@ Page({
|
|||||||
this.setData({
|
this.setData({
|
||||||
isShowAuth: false
|
isShowAuth: false
|
||||||
})
|
})
|
||||||
|
this.onCancel()
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
|
||||||
@@ -311,7 +312,7 @@ Page({
|
|||||||
includePoints: list,
|
includePoints: list,
|
||||||
})
|
})
|
||||||
let that = this;
|
let that = this;
|
||||||
wx.getLocation({
|
wx.getFuzzyLocation({
|
||||||
type: 'gcj02',
|
type: 'gcj02',
|
||||||
success: function(res) {
|
success: function(res) {
|
||||||
that.setData({
|
that.setData({
|
||||||
@@ -325,12 +326,16 @@ Page({
|
|||||||
});
|
});
|
||||||
},
|
},
|
||||||
fail: function(res) {
|
fail: function(res) {
|
||||||
console.log(res);
|
console.log(res)
|
||||||
if (res.errMsg == 'getLocation:fail auth deny' || res.errMsg == 'getLocation:fail:auth denied') {
|
that.setData({
|
||||||
that.setData({
|
latitude: 31.2336800000,
|
||||||
isShowAuth: true
|
longitude: 121.4715700000,
|
||||||
})
|
})
|
||||||
}
|
that.getData({
|
||||||
|
latitude: that.data.latitude,
|
||||||
|
longitude: that.data.longitude,
|
||||||
|
zoom: 1
|
||||||
|
});
|
||||||
},
|
},
|
||||||
})
|
})
|
||||||
},
|
},
|
||||||
@@ -480,15 +485,44 @@ Page({
|
|||||||
})
|
})
|
||||||
},
|
},
|
||||||
|
|
||||||
// 回到开始
|
// 由原来的回到开始改为定位
|
||||||
goFrist() {
|
goFrist() {
|
||||||
let list = [{
|
let that = this;
|
||||||
longitude: this.data.longitude,
|
wx.getFuzzyLocation({
|
||||||
latitude: this.data.latitude
|
type: 'gcj02',
|
||||||
}];
|
success: function(res) {
|
||||||
// this.data.includePoints
|
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({
|
this.setData({
|
||||||
includePoints: list
|
isShowAuth: false
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
|
|||||||
@@ -112,4 +112,4 @@
|
|||||||
</view>
|
</view>
|
||||||
</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>
|
||||||
|
|||||||
@@ -7,11 +7,10 @@
|
|||||||
<text>{{memberLessonTicket.venueLesson.name}}</text>
|
<text>{{memberLessonTicket.venueLesson.name}}</text>
|
||||||
</view>
|
</view>
|
||||||
<!-- <view class='state'>{{memberLessonTicket.status == 0 ? "已预约" : (memberLessonTicket.status == 1 ? "已完成" : "已取消")}}</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 == 3}}">未签到</view>
|
||||||
<view class='state' wx:if="{{memberLessonTicket.status == 1}}">已签到</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 == 2}}">已取消</view>
|
||||||
<view class='state' wx:if="{{memberLessonTicket.status == 4}}">待审核</view>
|
|
||||||
</view>
|
</view>
|
||||||
<view class='cell'>
|
<view class='cell'>
|
||||||
<image src='../../images/42@3x.png' mode='aspectFit'></image>
|
<image src='../../images/42@3x.png' mode='aspectFit'></image>
|
||||||
@@ -54,7 +53,7 @@
|
|||||||
</view>
|
</view>
|
||||||
|
|
||||||
<view class='footer-box' wx:if="{{memberLessonTicket.status == 0}}">
|
<view class='footer-box' wx:if="{{memberLessonTicket.status == 0}}">
|
||||||
<!-- {{isSignIn ? "" : "isActive"}} -->
|
<!-- {{isSignIn ? "" : "isActive"}} -->
|
||||||
<view class='footer-btn ' bindtap='cancelBooking'>取消预约</view>
|
<view class='footer-btn ' bindtap='cancelBooking'>取消预约</view>
|
||||||
<!-- {{isSignIn ? "isActive" : ""}} -->
|
<!-- {{isSignIn ? "isActive" : ""}} -->
|
||||||
<view class='footer-btn isActive' bindtap='signIn'>我要签到</view>
|
<view class='footer-btn isActive' bindtap='signIn'>我要签到</view>
|
||||||
@@ -62,4 +61,4 @@
|
|||||||
</view>
|
</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>
|
||||||
|
|||||||
@@ -14,11 +14,10 @@
|
|||||||
<view class='cell' wx:for="{{list}}" wx:key="{{index}}" bindtap='clickCell' data-ordersn='{{item.orderSn}}'>
|
<view class='cell' wx:for="{{list}}" wx:key="{{index}}" bindtap='clickCell' data-ordersn='{{item.orderSn}}'>
|
||||||
<view class='top'>
|
<view class='top'>
|
||||||
<text>预约单号: {{item.orderSn}}</text>
|
<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 == 3}}">未签到</text>
|
||||||
<text wx:if="{{item.status == 1}}">已完成</text>
|
<text wx:if="{{item.status == 1}}">已完成</text>
|
||||||
<text wx:if="{{item.status == 2}}">已取消</text>
|
<text wx:if="{{item.status == 2}}">已取消</text>
|
||||||
<text wx:if="{{item.status == 4}}">待审核</text>
|
|
||||||
</view>
|
</view>
|
||||||
<view class='bottom'>
|
<view class='bottom'>
|
||||||
<image src='{{item.lessonImage}}' mode='aspectFill'></image>
|
<image src='{{item.lessonImage}}' mode='aspectFill'></image>
|
||||||
@@ -42,4 +41,4 @@
|
|||||||
<view class='newplot' wx:if="{{list.length == 0 && isShowNewplot}}">
|
<view class='newplot' wx:if="{{list.length == 0 && isShowNewplot}}">
|
||||||
<image src='../../images/noContent.png'></image>
|
<image src='../../images/noContent.png'></image>
|
||||||
<text>暂无预约 ~</text>
|
<text>暂无预约 ~</text>
|
||||||
</view>
|
</view>
|
||||||
|
|||||||
@@ -1,7 +1,7 @@
|
|||||||
// pages/sportsGroundList/index.js
|
// pages/sportsGroundList/index.js
|
||||||
const app = getApp();
|
const app = getApp();
|
||||||
let latitude = 0; // 纬度
|
let latitude = 31.2336800000; // 纬度
|
||||||
let longitude = 0; // 经度
|
let longitude = 121.4715700000; // 经度
|
||||||
let page = 1;
|
let page = 1;
|
||||||
Page({
|
Page({
|
||||||
|
|
||||||
@@ -24,7 +24,7 @@ Page({
|
|||||||
this.setData({
|
this.setData({
|
||||||
state: options.state
|
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) {
|
getData(e) {
|
||||||
wx.showLoading({
|
wx.showLoading({
|
||||||
@@ -144,35 +159,6 @@ Page({
|
|||||||
isShowNewplot: true
|
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
|
|
||||||
})
|
|
||||||
}
|
|
||||||
},
|
|
||||||
})
|
|
||||||
|
|||||||
@@ -34,9 +34,7 @@
|
|||||||
</view>
|
</view>
|
||||||
</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}}">
|
<view class='newplot' wx:if="{{isShowNewplot && venues.length == 0}}">
|
||||||
<image src='../../images/noContent.png'></image>
|
<image src='../../images/noContent.png'></image>
|
||||||
<text>暂无运动场馆 ~</text>
|
<text>暂无运动场馆 ~</text>
|
||||||
</view>
|
</view>
|
||||||
|
|||||||
@@ -1,7 +1,8 @@
|
|||||||
{
|
{
|
||||||
"description": "项目配置文件。",
|
"description": "项目配置文件。",
|
||||||
"packOptions": {
|
"packOptions": {
|
||||||
"ignore": []
|
"ignore": [],
|
||||||
|
"include": []
|
||||||
},
|
},
|
||||||
"setting": {
|
"setting": {
|
||||||
"urlCheck": false,
|
"urlCheck": false,
|
||||||
@@ -42,22 +43,11 @@
|
|||||||
"libVersion": "2.17.0",
|
"libVersion": "2.17.0",
|
||||||
"appid": "wx73eb8a9ed10a029d",
|
"appid": "wx73eb8a9ed10a029d",
|
||||||
"projectname": "%E6%99%BA%E6%85%A7%E4%BA%91%E9%A6%86",
|
"projectname": "%E6%99%BA%E6%85%A7%E4%BA%91%E9%A6%86",
|
||||||
"isGameTourist": false,
|
|
||||||
"simulatorType": "wechat",
|
"simulatorType": "wechat",
|
||||||
"simulatorPluginLibVersion": {},
|
"simulatorPluginLibVersion": {},
|
||||||
"condition": {
|
"condition": {},
|
||||||
"search": {
|
"editorSetting": {
|
||||||
"list": []
|
"tabIndent": "insertSpaces",
|
||||||
},
|
"tabSize": 2
|
||||||
"conversation": {
|
|
||||||
"list": []
|
|
||||||
},
|
|
||||||
"game": {
|
|
||||||
"currentL": -1,
|
|
||||||
"list": []
|
|
||||||
},
|
|
||||||
"miniprogram": {
|
|
||||||
"list": []
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
Reference in New Issue
Block a user