Commit d7ad02ee authored by 余成's avatar 余成

修改首页样式

parent e7bcb2f3
...@@ -6,4 +6,6 @@ ...@@ -6,4 +6,6 @@
swiper swiper
周四专享 顺序位 周四专享 顺序位
\ No newline at end of file
首页切图
\ No newline at end of file
This diff is collapsed.
...@@ -10,6 +10,8 @@ ...@@ -10,6 +10,8 @@
content="width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=0,viewport-fit=cover" /> content="width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=0,viewport-fit=cover" />
<script type="text/javascript" src="https://api.map.baidu.com/api?v=2.0&ak=DD279b2a90afdf0ae7a3796787a0742e"></script> <script type="text/javascript" src="https://api.map.baidu.com/api?v=2.0&ak=DD279b2a90afdf0ae7a3796787a0742e"></script>
<script src="https://cdn.bootcdn.net/ajax/libs/Swiper/6.8.1/swiper-bundle.min.js"></script>
<link href="https://cdn.bootcdn.net/ajax/libs/Swiper/6.8.1/swiper-bundle.min.css" rel="stylesheet">
<!-- 这里是浏览器适配 --> <!-- 这里是浏览器适配 -->
<script> <script>
!(function (e, i) { !(function (e, i) {
...@@ -212,24 +214,25 @@ ...@@ -212,24 +214,25 @@
<!-- 首页样式 --> <!-- 首页样式 -->
<style> <style>
.independent { .independent {
width: 6.89rem; width: 7.06rem;
position: absolute; position: absolute;
pointer-events: auto; pointer-events: auto;
left: 50%;transform: translateX(-50%); left: 50%;
transform: translateX(-50%);
border-radius: 0.15rem; border-radius: 0.15rem;
height: 2rem; height: 2rem;
} }
.huadongrequ { .huadongrequ {
top: 1.55rem; top: .2rem;
height: 1.8rem; height: 1.85rem;
} }
.remenhuodong { .remenhuodong {
top: 4.35rem; top: 3.1rem;
} }
.change-place { .change-place {
top: 6.32rem; top: 5.32rem;
position: absolute; position: absolute;
width: 7.5rem; width: 7.5rem;
height: 6rem; height: 6rem;
...@@ -291,13 +294,13 @@ ...@@ -291,13 +294,13 @@
} }
.bottom-container { .bottom-container {
position: absolute; position: absolute;
top: 15.4rem; top: 14.3rem;
width: 7.5rem; width: 7.5rem;
height: 9.8rem; height: 9.8rem;
} }
.shape { .shape {
position: absolute; position: absolute;
width: 3.3rem; width: 3.37rem;
height: 1.65rem; height: 1.65rem;
border-radius: .15rem; border-radius: .15rem;
} }
...@@ -305,7 +308,7 @@ ...@@ -305,7 +308,7 @@
left: .32rem; left: .32rem;
} }
.right-shape { .right-shape {
right: .32rem; right: .2rem;
} }
.top-55 { .top-55 {
top: .55rem; top: .55rem;
...@@ -326,10 +329,15 @@ ...@@ -326,10 +329,15 @@
left: .3rem; left: .3rem;
} }
.center-square { .center-square {
left: 2.7rem; left: 2.8rem;
} }
.right-square { .right-square {
right: .32rem; right: .25rem;
}
.swiper-img {
width: 100%;
height: 100%;
object-fit:contain;
} }
</style> </style>
<!-- 二级页面 每日品牌好券 --> <!-- 二级页面 每日品牌好券 -->
...@@ -437,16 +445,23 @@ ...@@ -437,16 +445,23 @@
<div class="bgBox"> <div class="bgBox">
<img class="bg" src="home_bg.png" /> <img class="bg" src="home_bg.png" />
</div> </div>
<!-- 滑动热区 --> <!-- 滑动热区 -->
<div class="independent huadongrequ"></div> <div class="independent huadongrequ swiper-container">
<div class="swiper-wrapper">
<div class="swiper-slide">
<img class="swiper-img" src="baner_card.png" alt="" srcset="">
</div>
<div class="swiper-slide">255</div>
<div class="swiper-slide">277772</div>
</div>
</div>
<!-- 热门活动 --> <!-- 热门活动 -->
<div onclick="jumpUrl('home',7)" class="independent remenhuodong"></div> <div onclick="jumpUrl('home',7)" class="independent remenhuodong"></div>
<!-- 位置可换的div --> <!-- 位置可换的div -->
<div class="change-place"> <div class="change-place">
<!-- 周四专享 --> <!-- 周四专享 -->
<div class="zhousizhuanxiang" id="thursday_top"> <div class="zhousizhuanxiang" id="thursday_top">
<img src="./mode_thursday.png"> <img src="mode_thursday.png">
<span class="btn-click" onclick="showPop('ThursdayPage')"></span> <span class="btn-click" onclick="showPop('ThursdayPage')"></span>
</div> </div>
<!-- 精选大牌 --> <!-- 精选大牌 -->
...@@ -461,7 +476,7 @@ ...@@ -461,7 +476,7 @@
</div> </div>
<!-- 周四专享 --> <!-- 周四专享 -->
<div class="zhousizhuanxiang" id="thursday_bottom"> <div class="zhousizhuanxiang" id="thursday_bottom">
<img src="./mode_thursday.png"> <img src="mode_thursday.png">
<span class="btn-click" onclick="showPop('ThursdayPage')"></span> <span class="btn-click" onclick="showPop('ThursdayPage')"></span>
</div> </div>
</div> </div>
...@@ -541,7 +556,25 @@ ...@@ -541,7 +556,25 @@
</div> </div>
</body> </body>
<!-- 初始化swiper相关 -->
<script> <script>
var swiper = new Swiper('.huadongrequ', {
autoplay: true,
delay: 3000,
loop: true,
on: {
slideChangeTransitionStart: async (e) => {
console.log('onSlideChange ', e.realIndex)
},
}
})
</script>
<script>
console.log('swiper',Swiper)
// 这里进行星期四判断 只做顺序 // 这里进行星期四判断 只做顺序
const thursday_top = document.getElementById("thursday_top"); const thursday_top = document.getElementById("thursday_top");
const thursday_bottom = document.getElementById("thursday_bottom"); const thursday_bottom = document.getElementById("thursday_bottom");
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment