master
linyongLynn 2 days ago
parent da8324adc8
commit 2acfb9e405

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

@ -1,7 +1,9 @@
<template> <template>
<view> <view>
<!-- H5环境嵌入iframe地图 --> <!-- 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 <iframe
:src="getMapUrl()" :src="getMapUrl()"
width="100%" width="100%"
@ -10,6 +12,8 @@
class="h5-map-iframe"> class="h5-map-iframe">
</iframe> </iframe>
</view> </view>
</view>
</view>
<!-- 小程序环境使用uni-app地图组件 --> <!-- 小程序环境使用uni-app地图组件 -->
<map v-else style="width: 100%; height: 100vh;position: relative;" @markertap="markertap" :latitude="info.latitude" <map v-else style="width: 100%; height: 100vh;position: relative;" @markertap="markertap" :latitude="info.latitude"
@ -21,7 +25,12 @@
export default { export default {
data() { data() {
return { return {
info: {}, info: {
latitude: 31.299893,
longitude: 120.626022,
name: '苏州革命博物馆',
address: '苏州市姑苏区'
},
covers: [], covers: [],
isH5: false // H5 isH5: false // H5
} }
@ -125,4 +134,19 @@
border: none; border: none;
display: block; display: block;
} }
.page-body {
width: 100%;
height: 100vh;
position: relative;
}
.page-section {
width: 100%;
height: 100%;
}
.page-section-gap {
padding: 0;
}
</style> </style>

@ -11,7 +11,7 @@
</view> </view>
<view class="mine-box"> <view class="mine-box">
<view class="mine-box-user"> <view class="mine-box-user">
<view class="user_avator"> <view class="user_avator" @click="showEditForm">
<u-avatar :src="info.headimgurl" size="61"></u-avatar> <u-avatar :src="info.headimgurl" size="61"></u-avatar>
</view> </view>
<view class="user_info"> <view class="user_info">
@ -60,7 +60,7 @@
<view class="list-item" @click="toPage(4)"> <view class="list-item" @click="toPage(4)">
<view class="list-item-left"> <view class="list-item-left">
<text class="iconfont icon-fenxiang"></text> <text class="iconfont icon-fenxiang"></text>
<text class="list-item-lefttxt">推荐预约管理系统</text> <text class="list-item-lefttxt">系统</text>
</view> </view>
<view class="list-item-right"> <view class="list-item-right">
<u-icon name="arrow-right" color="#ccc"></u-icon> <u-icon name="arrow-right" color="#ccc"></u-icon>
@ -162,6 +162,25 @@
}); });
}, },
methods: { 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() { closeInfo() {
this.showAuthorization = false; 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 { .user_info {
margin-left: 33rpx; margin-left: 33rpx;
} }

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

Loading…
Cancel
Save