master
linyongLynn 1 day ago
parent da8324adc8
commit 2acfb9e405

@ -38,7 +38,8 @@
"path": "pages/map/map",
"style": {
"navigationBarTitleText": "展馆导航",
"enablePullDownRefresh": false
"enablePullDownRefresh": false,
"navigationStyle": "custom"
}
}, {

@ -1,7 +1,9 @@
<template>
<view>
<!-- H5环境嵌入iframe地图 -->
<view v-if="isH5" class="h5-map-container">
<view v-if="isH5" class="page-body">
<view class="page-section page-section-gap">
<view class="h5-map-container">
<iframe
:src="getMapUrl()"
width="100%"
@ -10,6 +12,8 @@
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"
@ -21,7 +25,12 @@
export default {
data() {
return {
info: {},
info: {
latitude: 31.299893,
longitude: 120.626022,
name: '苏州革命博物馆',
address: '苏州市姑苏区'
},
covers: [],
isH5: false // H5
}
@ -125,4 +134,19 @@
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