This commit is contained in:
2023-07-28 15:32:13 +08:00
5 changed files with 230 additions and 211 deletions

View File

@@ -1,13 +1,15 @@
<template>
<div class="returnTop flexcenter" @click="screenroll()">
<div class="returnTop flexcenter" @click="screenroll()" v-if="show">
<img class="icon" src="@/assets/img/publicImage/back-icon.png">
</div>
</template>
<script setup>
// onMounted(() => {
// window.addEventListener('scroll', handleScroll);
// });
import { onMounted, onUnmounted, ref } from 'vue'
let show = ref(false)
onMounted(() => {
window.addEventListener('scroll', handleScroll);
});
// onUnmounted(() => {
// window.removeEventListener('scroll', handleScroll);
@@ -15,17 +17,9 @@
const handleScroll = () => {
if (Math.random() > 0.3) return
// for (let i = 0; i < navList.value.length; i++) {
// let element = navList.value[i]
// const rect = eval(element.value).value.getBoundingClientRect();
// const distanceToTop = rect.top;
// if (distanceToTop >= 0) {
// navTab.value = element.value
// break;
// }
// }
const scrolledDistance = window.scrollY || window.pageYOffset;
if (scrolledDistance >= 500 && !show.value) show.value = true
if (scrolledDistance < 500 && show.value) show.value = false
}
const screenroll = () => {
@@ -39,7 +33,7 @@ const screenroll = () => {
<style lang="less" scoped>
@media screen and (max-width: 1360px) {
.returnTop {
right: 0 !important;
right: 20px !important;
}
}
@@ -47,8 +41,8 @@ const screenroll = () => {
position: fixed;
right: calc((100vw - 1200px) / 2 - 75px);
bottom: 18px;
width: 50px;
height: 50px;
width: 60px;
height: 60px;
background-color: #323232;
box-shadow: 0px 0px 10px rgba(0, 0, 0, 0.11764706);
border-radius: 50%;
@@ -56,8 +50,8 @@ const screenroll = () => {
cursor: pointer;
.icon {
width: 24px;
height: 24px;
width: 28px;
height: 28px;
}
}
</style>

View File

@@ -30,10 +30,19 @@ let circleState = ref(false)
</script>
<style lang="less" scoped>
@media screen and (max-width: 1360px) {
.circle-btn {
right: 20px !important;
}
}
.circle-btn {
position: fixed;
bottom: 58px;
right: 58px;
bottom: 98px;
// right: 58px;
right: calc((100vw - 1200px) / 2 - 75px);
width: 60px;
height: 60px;
background-color: #50e3c2;

View File

@@ -27,6 +27,7 @@ const { wechat } = toRefs(store.state);
<style lang="less" scoped>
.QRcode-box {
width: 304px;
font-family: 'PingFangSC-Semibold', 'PingFang SC Semibold', 'PingFang SC', sans-serif;
// height: 304px;
background-color: rgba(255, 255, 255, 1);
border: 1px solid rgba(235, 235, 235, 1);

View File

@@ -29,6 +29,7 @@ const props = defineProps({
let key = ref("MVNBZ-PEFWI-O4OGT-5ADVJ-7QAYJ-NBFY4")
const initMap = () => {
console.log("props.latlng",props.latlng);
let center = new TMap.LatLng(props.latlng['latitude'], props.latlng['longitude']);
let map = new TMap.Map("container", {
zoom: 15,