邹能昇 3 сар өмнө
parent
commit
8bc999cfe3

+ 8 - 8
nova-tourism/components/collect/index.wxml

@@ -4,7 +4,7 @@
     <image class="img2" src="https://file-cloud.fmode.cn/EbxZUK5lBI/20241121/jc17lo114657420.jpg"></image>
     <van-tabs active="{{ active }}" color='#B2CEB9' title-inactive-color='#969696' title-active-color='#B2CEB9'>
         <van-tab title="云上风物">
-            <view class="box">
+            <!-- <view class="box">
                 <view class="taps">
                     <block wx:for="{{taps}}">
                         <view class="tap">
@@ -22,13 +22,13 @@
                             </swiper-item>
                         </block>
                     </swiper>
-                </view>
+                </view> -->
                 <!-- 望仙礼遇 -->
-                <view class="wangbox">
+                <!-- <view class="wangbox">
                     <view class="wang">望仙礼遇</view>
                     <view class="wang2">望日w望月w来望仙w</view>
-                </view>
-                <view class="picturebox">
+                </view> -->
+                <!-- <view class="picturebox">
                     <swiper autoplay="{{true}}" indicator-dots='{{true}}' indicator-color='#D9D9D9' indicator-active-color='#F8DA7F' interval="{{3000}}" circular duration="{{500}}" class="img" bindchange="onSwiperChange">
                         <block wx:for="{{imageUrls}}" wx:key="index" wx:for-item="img">
                             <swiper-item class="img">
@@ -36,9 +36,9 @@
                             </swiper-item>
                         </block>
                     </swiper>
-                </view>
+                </view> -->
 
-                <view class="wang-cardbox">
+                <!-- <view class="wang-cardbox">
                     <block wx:for="{{4}}">
                         <view class="wang-card"  bindtap="gourl2">
                             <image src="https://file-cloud.fmode.cn//tmp/srFPqGFAzeT5958c828d985e451ed4c0b452e39ff57a.jpeg"></image>
@@ -63,7 +63,7 @@
                 </view>
 
 
-            </view>
+            </view> -->
         </van-tab>
         <!-- 我的收藏 -->
         <van-tab title="我的收藏">

+ 17 - 2
nova-tourism/components/homestay/index.js

@@ -18,6 +18,7 @@ Component({
         customHeight: 0,
         bottomNavHeight: 0,
         contentHeight: 0,
+        topheight:0,
 
         date_start: '',
         date_end: '',
@@ -39,7 +40,7 @@ Component({
         loadedItems: 0,
         pageSize: 5,
         noMoreItems: false,
-
+        scrollTop:0
     },
     lifetimes: {
         detached: function () {},
@@ -52,13 +53,16 @@ Component({
             const bottomNavHeight = systemInfo.screenHeight - systemInfo.safeArea.bottom || 0;
 
             const contentHeight = (screenHeight - bottomNavHeight - 50 - statusBarHeight - customHeight) * 750 / systemInfo.windowWidth;
+            const topheight = (statusBarHeight + customHeight-2 )* 750 / systemInfo.windowWidth
             this.setData({
                 statusBarHeight,
                 screenHeight,
                 customHeight,
                 bottomNavHeight,
-                contentHeight
+                contentHeight,
+                topheight
             });
+            console.log(topheight);
             this.getcurrentdate();
             this.gethomestar()
         },
@@ -347,5 +351,16 @@ Component({
                 await this.gethomestar()
             }
         },
+        onScroll(event) {
+            wx.createSelectorQuery()
+              .select('#scroller')
+              .boundingClientRect((res) => {
+                this.setData({
+                  scrollTop: event.detail.scrollTop,
+                });
+                console.log(this.data.scrollTop);
+              })
+              .exec();
+          },
     }
 });

+ 57 - 51
nova-tourism/components/homestay/index.less

@@ -19,73 +19,79 @@
         }
 
     }
-    .infobox{
-        width: 94%;
-        height: 217rpx;
-        background-color: white;
+    .Inforbox{
+        width: 100%;
         display: flex;
         justify-content: center;
-        flex-direction: column;
         align-items: center;
-        border-radius: 20rpx;
-        position: absolute;
-        left: 3%;
-        top: 375rpx;
-        z-index: 10;
-        border: solid #e5e5e5 2rpx;
-        box-shadow: 0 2rpx 4rpx rgba(0,0,0,0.2);
-        .seach{
-            width: 80%;
-            height: 96rpx;
+        margin-top: -62rpx;
+        .infobox{
+            width: 94%;
+            height: 217rpx;
             background-color: white;
             display: flex;
             justify-content: center;
+            flex-direction: column;
             align-items: center;
-
-            .input{
-                width: 358rpx;
-                height: 60rpx;
-                margin-left: 31rpx;
-            }
-        }
-        .datebox{
-            width: 90%;
-            height: 132rpx;
-            display: flex;
-            align-items: center;
-            font-size: 32rpx;
-            border-top: solid #e5e5e5 2rpx;
-            .today{
-                font-size: 28rpx;
-                color: gray;
-                margin-left: 10rpx;
-                display: flex;
-                justify-content: flex-end;
-            }
-            .start{
-                display: flex;
-                justify-content: flex-end;
-            }
-            .day{
+            border-radius: 20rpx;
+            
+            z-index: 10;
+            border: solid #e5e5e5 2rpx;
+            box-shadow: 0 2rpx 4rpx rgba(0,0,0,0.2);
+            .seach{
+                width: 80%;
+                height: 96rpx;
+                background-color: white;
                 display: flex;
                 justify-content: center;
                 align-items: center;
-                margin-left: auto;
-                width: 90rpx;
-                height: 42rpx;
-                background-color: #ECECEC;
-                font-size: 25rpx;
-                color: black;
+    
+                .input{
+                    width: 358rpx;
+                    height: 60rpx;
+                    margin-left: 31rpx;
+                }
             }
-            .end{
-                margin-left: auto;
+            .datebox{
+                width: 90%;
+                height: 132rpx;
+                display: flex;
+                align-items: center;
+                font-size: 32rpx;
+                border-top: solid #e5e5e5 2rpx;
+                .today{
+                    font-size: 28rpx;
+                    color: gray;
+                    margin-left: 10rpx;
+                    display: flex;
+                    justify-content: flex-end;
+                }
+                .start{
+                    display: flex;
+                    justify-content: flex-end;
+                }
+                .day{
+                    display: flex;
+                    justify-content: center;
+                    align-items: center;
+                    margin-left: auto;
+                    width: 90rpx;
+                    height: 42rpx;
+                    background-color: #ECECEC;
+                    font-size: 25rpx;
+                    color: black;
+                }
+                .end{
+                    margin-left: auto;
+                }
             }
+            
         }
-        
     }
 
+
     .Legendary-Information{
-        margin-top: 166rpx;
+        margin-top: 12rpx;
         width: 100%;
         background-color: white;
         overflow-y: hidden;

+ 16 - 19
nova-tourism/components/homestay/index.wxml

@@ -1,5 +1,5 @@
 <nav type="title" background-color="#ffffff" frontColor="#000000" title="云上望仙" />
-<scroll-view class="all" id="scroller" bind:scroll="onScroll" scroll-y="true" bindscrolltolower="loadMoreData" style="height: {{contentHeight}}rpx;">
+<scroll-view class="all"  id="scroller" bindscroll="onScroll" scroll-y="true" bindscrolltolower="loadMoreData" style="height: {{contentHeight}}rpx;">
     <view class="picturebox">
         <view class="img">
             <image src="https://file-cloud.fmode.cn/EbxZUK5lBI/20241121/jc17lo114657420.jpg"></image>
@@ -7,26 +7,23 @@
     </view>
 
     <!-- 日期 -->
-    <view class="infobox">
-        <view class="seach">
-            <!-- <van-search input-class='a' shape="round" model:value="{{ value }}" placeholder="请输入地点/门店名称/关键词" bind:search="search" bind:change="change" bind:clear='clear' /> -->
-            <van-icon name="search" size='40rpx' />
-            <input class="input" bindinput='change' bindconfirm='search' model:value='{{value}}' type="text" placeholder="搜索地点/门店名称/关键词" placeholder-style="font-size: 26rpx;" />
-        </view>
-        <view class="datebox" bindtap="onDisplay">
-            <view class="start">{{date_start}}</view>
-            <view class="today" wx:if="{{istoday}}">今天</view>
-            <view class="day">共{{daysBetween}}晚</view>
-            <view class="end">{{date_end}}</view>
-            <view class="today" wx:if="{{istoday}}">明天</view>
+    <view class="Inforbox" style="{{scrollTop > 162 ? 'position: fixed; top: ' + topheight + 'rpx;margin-top: 0rpx;' : ''}}">
+        <view class="infobox" >
+            <view class="seach">
+                <!-- <van-search input-class='a' shape="round" model:value="{{ value }}" placeholder="请输入地点/门店名称/关键词" bind:search="search" bind:change="change" bind:clear='clear' /> -->
+                <van-icon name="search" size='40rpx' />
+                <input class="input" bindinput='change' bindconfirm='search' model:value='{{value}}' type="text" placeholder="搜索地点/门店名称/关键词" placeholder-style="font-size: 26rpx;" />
+            </view>
+            <view class="datebox" bindtap="onDisplay">
+                <view class="start">{{date_start}}</view>
+                <view class="today" wx:if="{{istoday}}">今天</view>
+                <view class="day">共{{daysBetween}}晚</view>
+                <view class="end">{{date_end}}</view>
+                <view class="today" wx:if="{{istoday}}">明天</view>
+            </view>
+            <van-calendar show="{{ show }}" show-confirm="{{ true }}" confirm-text="完成" confirm-disabled-text='完成' type="range" bind:close="onClose" bind:confirm="onConfirm" color='#46a9a4' position='top' />
         </view>
-        <van-calendar show="{{ show }}" show-confirm="{{ true }}" confirm-text="完成" confirm-disabled-text='完成' type="range" bind:close="onClose" bind:confirm="onConfirm" color='#46a9a4' position='top' />
     </view>
-
-
-
-
-
     <!-- 卡片 -->
     <view class="Legendary-Information" wx:if="{{storeList.length!=0}}">
         <block>

Файлын зөрүү хэтэрхий том тул дарагдсан байна
+ 0 - 0
nova-tourism/components/homestay/index.wxss


Энэ ялгаанд хэт олон файл өөрчлөгдсөн тул зарим файлыг харуулаагүй болно