提交 819ea912 authored 作者: xiaotuoluo's avatar xiaotuoluo

修改

上级 88e85b9f
......@@ -107,6 +107,9 @@ const router = createRouter({
],
},
],
scrollBehavior(to, from, savedPosition) {
return { left: 0, top: 0 }
},
})
export default router
......@@ -9,7 +9,7 @@
<div class="flex flex-row items-center justify-center w-[50%]">
<div class="flex flex-row items-center h-full">
<img class="h-[50%] bg-black hover:opacity-50 ml-0.5" v-for="value in imgList" :src="value" alt="">
<img @click="tapChat(index)" class="h-[50%] bg-black hover:opacity-50 ml-0.5" v-for="(value,index) in imgList" :src="value" alt="">
</div>
<div class="h-10 w-px bg-[#7a7a7a] ml-5"></div>
<span class="hover:opacity-90 text-[12px] ml-5">PERTANYAAN YANG SERING DIAJUKAN</span>
......@@ -62,7 +62,7 @@
<!-- phone -->
<div class="lg:hidden sm:block bg-black h-10 w-full text-white items-center flex p-4 text-[12px]">
<div class="flex flex-row items-center h-full">
<img class="h-5 bg-black hover:opacity-50" v-for="value in imgList" :src="value" alt="">
<img @click="tapChat(index)" class="h-5 bg-black hover:opacity-50" v-for="(value,index) in imgList" :src="value" alt="">
</div>
</div>
<div
......@@ -88,19 +88,19 @@
<div class="flex w-full justify-between h-[50px] flex-row text-[13px]">
<!-- <div @click="tapTit(0)" :class="{titleIndex == 0 ? 'text-[#666666] bg-[#999999] border-b':''}" class="text-[#909090] bg-[#f8f8f8] w-[50%] flex items-center justify-center">MENU</div>
<div @click="tapTit(1)" :class="{titleIndex == 1 ? 'text-[#666666] bg-[#999999] border-b':''}" class="text-[#909090] bg-[#f8f8f8] w-[50%] flex items-center justify-center">KATEGORI</div> -->
<div @click="tapTit(0)" :class="titleIndex === 0
<!-- <div @click="tapTit(0)" :class="titleIndex === 0
? 'text-[#666666] bg-[#f3f3f3] border-b-2 border-[#666666]'
: 'text-[#909090] bg-[#f9f9f9]'"
class="w-[50%] flex items-center justify-center transition-all duration-300">
MENU
</div>
</div> -->
<div @click="tapTit(1)" :class="titleIndex === 1
<!-- <div @click="tapTit(1)" :class="titleIndex === 1
? 'text-[#666666] bg-[#f3f3f3] border-b-2 border-[#666666]'
: 'text-[#909090] bg-[#f9f9f9]'"
class="w-[50%] flex items-center justify-center transition-all duration-300">
KATEGORI
</div>
</div> -->
</div>
<div @click="tapItem(index)" v-for="(value, index) in titleList"
class="h-[50px] border-b border-[#f1f1f1] flex items-center pl-4">
......@@ -263,6 +263,13 @@ const syncByPath = (p) => {
else nowIndex.value = -1
}
const tapChat = (index) => {
if(index == 0){
window.open('https://www.facebook.com/PTUmraza/')
}
}
// 1) 首次挂载时同步(解决刷新后为 0 的问题)
onMounted(() => syncByPath(route.path))
......
......@@ -159,7 +159,7 @@
KLIK UNTUK RESERVASI
</div>
<div class="flex flex-row h-10 mt-5">
<img class="w-10 ml-1.5 hover:opacity-40" v-for="value in chatsImg" :src="value" alt="">
<img @click="clickChat(index)" class="w-10 ml-1.5 hover:opacity-40" v-for="(value,index) in chatsImg" :src="value" alt="">
</div>
</div>
<img class="lg:w-[400px] w-[300px]" :src="bottomRight" alt="">
......@@ -332,6 +332,11 @@ const bottomList = [
const chatAction = () => {
}
const clickChat = (index) => {
if(index == 0){
window.open('https://www.facebook.com/PTUmraza/')
}
}
</script>
......
......@@ -12,9 +12,14 @@
<div><strong><span>Telepon: </span></strong> <span>+62 823 1070 3173</span></div>
</div>
<div class="lg:w-[70%] lg:mt-0 mt-10">
<!-- <div class="lg:w-[70%] lg:mt-0 mt-10">
<div id="map" style="width: 100%; height: 400px;"></div>
</div> -->
<div class="lg:w-[70%] lg:mt-0 mt-10">
<div id="map" style="width: 100%; height: 400px; overflow: hidden;"></div>
</div>
</div>
<div class="w-[90%] mb-10">
......@@ -83,7 +88,7 @@ const titList = [
onMounted(() => {
// 创建地图并设置初始视图
const map = L.map('map').setView([24.70126, 46.65354], 15); // King Khalid Grand Mosque 的坐标
const map = L.map('map',{attributionControl: false}).setView([24.70126, 46.65354], 15); // King Khalid Grand Mosque 的坐标
// 设置 OpenStreetMap 图层
L.tileLayer('https://{s}.tile.openstreetmap.org/{z}/{x}/{y}.png', {
......@@ -123,4 +128,9 @@ onMounted(() => {
line-height: 1.6 !important;
padding: 8px 16px !important;
}
#map {
position: relative;
z-index: 1;
}
</style>
\ No newline at end of file
......@@ -24,7 +24,7 @@
<span>Ikuti Kami</span>
<!-- <div class="lg:w-[100px] w-0 bg-red-600 h-5"></div> -->
<div class="flex flex-row items-center h-full">
<img class="h-5 bg-black hover:opacity-50 ml-1.5" v-for="value in imgList" :src="value" alt="">
<img @click="clickChat(index)" class="h-5 bg-black hover:opacity-50 ml-1.5" v-for="(value,index) in imgList" :src="value" alt="">
</div>
</div>
</div>
......@@ -83,7 +83,7 @@
</div>
<!-- <div class="w-[100px] bg-red-700 h-10 mt-5"></div> -->
<div class="flex flex-row items-center h-full mt-4">
<img class="h-5 bg-black hover:opacity-50 ml-1.5" v-for="value in imgList" :src="value" alt="">
<img @click="clickChat(index)" class="h-5 bg-black hover:opacity-50 ml-1.5" v-for="(value,index) in imgList" :src="value" alt="">
</div>
</div>
</div>
......@@ -106,4 +106,10 @@ const imgList = [
you,
whats
]
const clickChat = (index) => {
if(index == 0){
window.open('https://www.facebook.com/PTUmraza/')
}
}
</script>
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论