master
linyongLynn 19 hours ago
parent da8324adc8
commit 2acfb9e405

@ -1,268 +1,269 @@
{
"easycom": {
"^u-(.*)": "uview-ui/components/u-$1/u-$1.vue"
},
"pages": [ //pageshttps://uniapp.dcloud.io/collocation/pages
{
"path": "pages/index/index",
"style": {
"navigationBarTitleText": "中共苏州独立支部旧址",
"navigationStyle": "custom",
"enablePullDownRefresh": false
}
},{
"path": "pages/vr/vrpage",
"style": {
"navigationBarTitleText": "",
"navigationStyle": "custom",
"enablePullDownRefresh": false
}
}, {
"path": "pages/guide/index",
"style": {
"navigationBarTitleText": "参观指南",
"enablePullDownRefresh": false
}
}, {
"path": "pages/mine/index",
"style": {
"navigationBarTitleText": "个人中心",
"navigationStyle": "custom",
"enablePullDownRefresh": false
}
}, {
"path": "pages/map/map",
"style": {
"navigationBarTitleText": "展馆导航",
"enablePullDownRefresh": false
}
}, {
"path": "pages/visit/index",
"style": {
"navigationBarTitleText": "参观预约",
"enablePullDownRefresh": false
}
}, {
"path": "pages/activity/index",
"style": {
"navigationBarTitleText": "活动列表",
"enablePullDownRefresh": false
}
}, {
"path": "pages/visit/book",
"style": {
"navigationBarTitleText": "个人预约",
"enablePullDownRefresh": false
}
}, {
"path": "pages/visit/teambook",
"style": {
"navigationBarTitleText": "团体预约",
"enablePullDownRefresh": false
}
}, {
"path": "pages/activity/info",
"style": {
"navigationBarTitleText": "活动详情",
"enablePullDownRefresh": false
}
}, {
"path": "pages/activity/book",
"style": {
"navigationBarTitleText": "活动预约",
"enablePullDownRefresh": false
}
}, {
"path": "pages/order/visitorder",
"style": {
"navigationBarTitleText": "参观预约订单",
"enablePullDownRefresh": false
}
}, {
"path": "pages/order/parkorder",
"style": {
"navigationBarTitleText": "车位预约",
"enablePullDownRefresh": false
}
}, {
"path": "pages/park/index",
"style": {
"navigationBarTitleText": "停车场预约",
"enablePullDownRefresh": false
}
}, {
"path": "pages/order/visitorderinfo",
"style": {
"navigationBarTitleText": "参观预约详情",
"enablePullDownRefresh": false
}
}, {
"path": "pages/park/book",
"style": {
"navigationBarTitleText": "停车场预约",
"enablePullDownRefresh": false
}
}
,{
"path" : "pages/success/success",
{
"easycom": {
"^u-(.*)": "uview-ui/components/u-$1/u-$1.vue"
},
"pages": [ //pageshttps://uniapp.dcloud.io/collocation/pages
{
"path": "pages/index/index",
"style": {
"navigationBarTitleText": "中共苏州独立支部旧址",
"navigationStyle": "custom",
"enablePullDownRefresh": false
}
},{
"path": "pages/vr/vrpage",
"style": {
"navigationBarTitleText": "",
"navigationStyle": "custom",
"enablePullDownRefresh": false
}
}, {
"path": "pages/guide/index",
"style": {
"navigationBarTitleText": "参观指南",
"enablePullDownRefresh": false
}
}, {
"path": "pages/mine/index",
"style": {
"navigationBarTitleText": "个人中心",
"navigationStyle": "custom",
"enablePullDownRefresh": false
}
}, {
"path": "pages/map/map",
"style": {
"navigationBarTitleText": "展馆导航",
"enablePullDownRefresh": false,
"navigationStyle": "custom"
}
}, {
"path": "pages/visit/index",
"style": {
"navigationBarTitleText": "参观预约",
"enablePullDownRefresh": false
}
}, {
"path": "pages/activity/index",
"style": {
"navigationBarTitleText": "活动列表",
"enablePullDownRefresh": false
}
}, {
"path": "pages/visit/book",
"style": {
"navigationBarTitleText": "个人预约",
"enablePullDownRefresh": false
}
}, {
"path": "pages/visit/teambook",
"style": {
"navigationBarTitleText": "团体预约",
"enablePullDownRefresh": false
}
}, {
"path": "pages/activity/info",
"style": {
"navigationBarTitleText": "活动详情",
"enablePullDownRefresh": false
}
}, {
"path": "pages/activity/book",
"style": {
"navigationBarTitleText": "活动预约",
"enablePullDownRefresh": false
}
}, {
"path": "pages/order/visitorder",
"style": {
"navigationBarTitleText": "参观预约订单",
"enablePullDownRefresh": false
}
}, {
"path": "pages/order/parkorder",
"style": {
"navigationBarTitleText": "车位预约",
"enablePullDownRefresh": false
}
}, {
"path": "pages/park/index",
"style": {
"navigationBarTitleText": "停车场预约",
"enablePullDownRefresh": false
}
}, {
"path": "pages/order/visitorderinfo",
"style": {
"navigationBarTitleText": "参观预约详情",
"enablePullDownRefresh": false
}
}, {
"path": "pages/park/book",
"style": {
"navigationBarTitleText": "停车场预约",
"enablePullDownRefresh": false
}
}
,{
"path" : "pages/success/success",
"style" :
{
"navigationBarTitleText": "预约成功",
"enablePullDownRefresh": false
}
}
,{
"path" : "pages/order/parkorderinfo",
}
,{
"path" : "pages/order/parkorderinfo",
"style" :
{
"navigationBarTitleText": "停车场预约",
"enablePullDownRefresh": false
}
}
,{
"path" : "pages/order/activityorder",
}
,{
"path" : "pages/order/activityorder",
"style" :
{
"navigationBarTitleText": "活动预约",
"enablePullDownRefresh": false
}
}
,{
"path" : "pages/order/activityorderinfo",
}
,{
"path" : "pages/order/activityorderinfo",
"style" :
{
"navigationBarTitleText": "活动预约详情",
"enablePullDownRefresh": false
}
}
,{
"path" : "pages/guide/list",
}
,{
"path" : "pages/guide/list",
"style" :
{
"navigationBarTitleText": "参观指南",
"enablePullDownRefresh": false
}
}
,{
"path" : "pages/guide/info",
}
,{
"path" : "pages/guide/info",
"style" :
{
"navigationBarTitleText": "参观指南",
"enablePullDownRefresh": false
}
}
,{
"path" : "pages/mine/recommend",
}
,{
"path" : "pages/mine/recommend",
"style" :
{
"navigationBarTitleText": "分享预约小程序",
"enablePullDownRefresh": false
}
}
,{
"path" : "pages/guide/feedback",
}
,{
"path" : "pages/guide/feedback",
"style" :
{
"navigationBarTitleText": "投诉建议",
"enablePullDownRefresh": false
}
}
,{
"path" : "pages/guide/contact",
}
,{
"path" : "pages/guide/contact",
"style" :
{
"navigationBarTitleText": "联系我们",
"enablePullDownRefresh": false
}
}
,{
"path" : "pages/order/shareQR",
}
,{
"path" : "pages/order/shareQR",
"style" :
{
"navigationBarTitleText": "分享二维码",
"enablePullDownRefresh": false
}
},
// {
// "path" : "pages/vr/vrpagegm",
// {
// "path" : "pages/vr/vrpagegm",
// "style" :
// {
// "navigationBarTitleText": "",
// "enablePullDownRefresh": false
// }
// }
{
"path" : "pages/guide/feedbackinfo",
// }
{
"path" : "pages/guide/feedbackinfo",
"style" :
{
"navigationBarTitleText": "意见建议详情",
"enablePullDownRefresh": false
}
}
],
"globalStyle": {
"navigationBarTextStyle": "black",
"navigationBarTitleText": "中共苏州独立支部旧址",
"navigationBarBackgroundColor": "#F8F8F8",
"backgroundColor": "#F8F8F8"
},
"tabBar": {
"color": "#351C1B",
"selectedColor": "#351C1B",
"backgroundColor": "#fdf9f5",
"list": [{
"pagePath": "pages/index/index",
"text": "首页",
"iconPath": "/static/img/icon_nav_home.png",
"selectedIconPath": "/static/img/icon_nav_home_on.png"
},
{
"pagePath": "pages/guide/index",
"text": "参观指南",
"iconPath": "/static/img/icon_nav_guide.png",
"selectedIconPath": "/static/img/icon_nav_guide_on.png"
},
{
"pagePath": "pages/map/map",
"text": "展馆导航",
"iconPath": "/static/img/icon_nav_map.png",
"selectedIconPath": "/static/img/icon_nav_map_on.png"
},
{
"pagePath": "pages/mine/index",
"text": "个人中心",
"iconPath": "/static/img/icon_nav_user.png",
"selectedIconPath": "/static/img/icon_nav_user_on.png"
}
]
}
}
],
"globalStyle": {
"navigationBarTextStyle": "black",
"navigationBarTitleText": "中共苏州独立支部旧址",
"navigationBarBackgroundColor": "#F8F8F8",
"backgroundColor": "#F8F8F8"
},
"tabBar": {
"color": "#351C1B",
"selectedColor": "#351C1B",
"backgroundColor": "#fdf9f5",
"list": [{
"pagePath": "pages/index/index",
"text": "首页",
"iconPath": "/static/img/icon_nav_home.png",
"selectedIconPath": "/static/img/icon_nav_home_on.png"
},
{
"pagePath": "pages/guide/index",
"text": "参观指南",
"iconPath": "/static/img/icon_nav_guide.png",
"selectedIconPath": "/static/img/icon_nav_guide_on.png"
},
{
"pagePath": "pages/map/map",
"text": "展馆导航",
"iconPath": "/static/img/icon_nav_map.png",
"selectedIconPath": "/static/img/icon_nav_map_on.png"
},
{
"pagePath": "pages/mine/index",
"text": "个人中心",
"iconPath": "/static/img/icon_nav_user.png",
"selectedIconPath": "/static/img/icon_nav_user_on.png"
}
]
}
}

@ -1,128 +1,152 @@
<template>
<view>
<!-- H5环境嵌入iframe地图 -->
<view v-if="isH5" class="h5-map-container">
<iframe
:src="getMapUrl()"
width="100%"
height="100vh"
frameborder="0"
class="h5-map-iframe">
</iframe>
</view>
<!-- 小程序环境使用uni-app地图组件 -->
<map v-else style="width: 100%; height: 100vh;position: relative;" @markertap="markertap" :latitude="info.latitude"
:longitude="info.longitude" :markers="covers"></map>
</view>
</template>
<script>
export default {
data() {
return {
info: {},
covers: [],
isH5: false // H5
}
},
onLoad() {
//
this.isH5 = typeof window !== 'undefined' && window.location
this.loadInfo();
},
onShareAppMessage() {
return this.util.shareInfo
},
methods: {
// H5URL
getMapUrl() {
if (this.info.latitude && this.info.longitude) {
// 使
const url = `https://apis.map.qq.com/uri/v1/marker?marker=coord:${this.info.latitude},${this.info.longitude};title:${encodeURIComponent(this.info.name || '展馆')};addr:${encodeURIComponent(this.info.address || '')}&referer=myapp`;
return url;
}
// 使
return 'https://apis.map.qq.com/uri/v1/marker?marker=coord:31.299893,120.626022;title:苏州革命博物馆;addr:苏州市姑苏区&referer=myapp';
},
markertap() {
this.openlocation();
},
openlocation() {
if (this.isH5) {
// H5使JS-SDK
if (typeof wx !== 'undefined' && wx.openLocation) {
// JS-SDK
wx.openLocation({
latitude: this.info.latitude,
longitude: this.info.longitude,
name: this.info.name,
address: this.info.address,
scale: 14
});
} else {
// 使
const mapUrl = `https://apis.map.qq.com/uri/v1/marker?marker=coord:${this.info.latitude},${this.info.longitude};title:${encodeURIComponent(this.info.name)};addr:${encodeURIComponent(this.info.address)}&referer=myapp`;
window.open(mapUrl, '_blank');
}
} else {
// 使uni.openLocation
uni.openLocation({
latitude: this.info.latitude,
longitude: this.info.longitude,
name: this.info.name,
address: this.info.address
});
}
},
loadInfo(cb) {
var that = this;
this.util.request({
api: '/api/mobile/visit/introduce',
utilSuccess: function(res) {
res.latitude = parseFloat(res.latitude);
res.longitude = parseFloat(res.longitude);
that.info = res;
//
if (!that.isH5) {
that.covers.push({
latitude: res.latitude,
longitude: res.longitude,
width: 70,
height: 70,
iconPath: '/static/img/location.png'
});
}
//
if (cb) {
cb(res);
}
},
utilFail: function(res) {
}
})
},
}
}
</script>
<style>
/* H5地图iframe容器样式 */
.h5-map-container {
width: 100%;
height: 100vh;
position: relative;
background: #f5f5f5;
}
.h5-map-iframe {
width: 100%;
height: 100%;
border: none;
display: block;
}
</style>
<template>
<view>
<!-- H5环境嵌入iframe地图 -->
<view v-if="isH5" class="page-body">
<view class="page-section page-section-gap">
<view class="h5-map-container">
<iframe
:src="getMapUrl()"
width="100%"
height="100vh"
frameborder="0"
class="h5-map-iframe">
</iframe>
</view>
</view>
</view>
<!-- 小程序环境使用uni-app地图组件 -->
<map v-else style="width: 100%; height: 100vh;position: relative;" @markertap="markertap" :latitude="info.latitude"
:longitude="info.longitude" :markers="covers"></map>
</view>
</template>
<script>
export default {
data() {
return {
info: {
latitude: 31.299893,
longitude: 120.626022,
name: '苏州革命博物馆',
address: '苏州市姑苏区'
},
covers: [],
isH5: false // H5
}
},
onLoad() {
//
this.isH5 = typeof window !== 'undefined' && window.location
this.loadInfo();
},
onShareAppMessage() {
return this.util.shareInfo
},
methods: {
// H5URL
getMapUrl() {
if (this.info.latitude && this.info.longitude) {
// 使
const url = `https://apis.map.qq.com/uri/v1/marker?marker=coord:${this.info.latitude},${this.info.longitude};title:${encodeURIComponent(this.info.name || '展馆')};addr:${encodeURIComponent(this.info.address || '')}&referer=myapp`;
return url;
}
// 使
return 'https://apis.map.qq.com/uri/v1/marker?marker=coord:31.299893,120.626022;title:苏州革命博物馆;addr:苏州市姑苏区&referer=myapp';
},
markertap() {
this.openlocation();
},
openlocation() {
if (this.isH5) {
// H5使JS-SDK
if (typeof wx !== 'undefined' && wx.openLocation) {
// JS-SDK
wx.openLocation({
latitude: this.info.latitude,
longitude: this.info.longitude,
name: this.info.name,
address: this.info.address,
scale: 14
});
} else {
// 使
const mapUrl = `https://apis.map.qq.com/uri/v1/marker?marker=coord:${this.info.latitude},${this.info.longitude};title:${encodeURIComponent(this.info.name)};addr:${encodeURIComponent(this.info.address)}&referer=myapp`;
window.open(mapUrl, '_blank');
}
} else {
// 使uni.openLocation
uni.openLocation({
latitude: this.info.latitude,
longitude: this.info.longitude,
name: this.info.name,
address: this.info.address
});
}
},
loadInfo(cb) {
var that = this;
this.util.request({
api: '/api/mobile/visit/introduce',
utilSuccess: function(res) {
res.latitude = parseFloat(res.latitude);
res.longitude = parseFloat(res.longitude);
that.info = res;
//
if (!that.isH5) {
that.covers.push({
latitude: res.latitude,
longitude: res.longitude,
width: 70,
height: 70,
iconPath: '/static/img/location.png'
});
}
//
if (cb) {
cb(res);
}
},
utilFail: function(res) {
}
})
},
}
}
</script>
<style>
/* H5地图iframe容器样式 */
.h5-map-container {
width: 100%;
height: 100vh;
position: relative;
background: #f5f5f5;
}
.h5-map-iframe {
width: 100%;
height: 100%;
border: none;
display: block;
}
.page-body {
width: 100%;
height: 100vh;
position: relative;
}
.page-section {
width: 100%;
height: 100%;
}
.page-section-gap {
padding: 0;
}
</style>

@ -11,7 +11,7 @@
</view>
<view class="mine-box">
<view class="mine-box-user">
<view class="user_avator">
<view class="user_avator" @click="showEditForm">
<u-avatar :src="info.headimgurl" size="61"></u-avatar>
</view>
<view class="user_info">
@ -60,7 +60,7 @@
<view class="list-item" @click="toPage(4)">
<view class="list-item-left">
<text class="iconfont icon-fenxiang"></text>
<text class="list-item-lefttxt">推荐预约管理系统</text>
<text class="list-item-lefttxt">系统</text>
</view>
<view class="list-item-right">
<u-icon name="arrow-right" color="#ccc"></u-icon>
@ -162,6 +162,25 @@
});
},
methods: {
//
showEditForm() {
//
const isH5 = typeof window !== 'undefined' && window.location
if (isH5) {
// H5
this.showAuthorization = true;
//
this.form.name = this.info.nickname || '';
this.form.avatar = this.info.headimgurl || '';
} else {
//
this.showform = true;
//
this.form.name = this.info.nickname || '';
this.form.avatar = this.info.headimgurl || '';
}
},
closeInfo() {
this.showAuthorization = false;
},
@ -337,6 +356,16 @@
}
.user_avator {
cursor: pointer;
position: relative;
transition: transform 0.2s;
}
.user_avator:active {
transform: scale(0.95);
}
.user_info {
margin-left: 33rpx;
}

@ -120,7 +120,7 @@ const wxH5AuthLogin = (cb) => {
})
} else {
// 未获取授权码,跳转到微信授权页面
const appId = 'wxbf4862e929ab85b0'
const appId = 'wx90acb6e2aa676977'
const currentUrl = window.location.href
const redirectUri = encodeURIComponent(currentUrl.replace(/#\//, ""));
const scope = 'snsapi_userinfo'

Loading…
Cancel
Save