邹能昇 4 months ago
parent
commit
d0814b2787

+ 4 - 3
nova-tourism/components/homestay/index.js

@@ -36,6 +36,7 @@ Component({
         loadedItems:0,
         pageSize:5,
         noMoreItems:false,
+
     },
     lifetimes: {
         detached: function () {},
@@ -311,13 +312,13 @@ Component({
 
         //搜索功能
         search(e) {
-            const value = e.detail;
+            const value = e.detail.value;
             console.log(value);
             this.getRooms(value)
         },
         //清零后
         change(e) {
-            const value = e.detail;
+            const value = e.detail.value;
             if (!value) {
                 console.log('运行');
                 this.clear()
@@ -382,6 +383,6 @@ Component({
             if(!this.data.noMoreItems){
                 await this.gethomestar()
             }
-        }
+        },
     }
 });

+ 2 - 1
nova-tourism/components/homestay/index.json

@@ -4,6 +4,7 @@
         "van-icon": "@vant/weapp/icon/index",
         "van-calendar": "@vant/weapp/calendar/index",
         "van-search": "@vant/weapp/search/index",
-        "van-empty": "@vant/weapp/empty/index"
+        "van-empty": "@vant/weapp/empty/index",
+        "van-sticky": "@vant/weapp/sticky/index"
     }
 }

+ 69 - 63
nova-tourism/components/homestay/index.less

@@ -4,82 +4,88 @@
     width: 100vw;
     height: 100vh;
     color: #382E2E;
+    position:relative;
     .picturebox{
         width: 100%;
-        height: 430rpx;
-        position: relative;
+        height: 438rpx;
         .img{
             width: 100%;
-            height: 430rpx;
+            height: 438rpx;
             image{
                 width: 100%;
                 height: 100%;
 
             }
         }
-        .infobox{
-            width: 94%;
-            height: 250rpx;
+
+    }
+    .infobox{
+        width: 94%;
+        height: 217rpx;
+        background-color: white;
+        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;
             background-color: white;
             display: flex;
             justify-content: center;
-            flex-direction: column;
             align-items: center;
-            border-radius: 20rpx;
-            position: absolute;
-            left: 3%;
-            bottom: -186rpx;
-            z-index: 10;
-            border: solid #e5e5e5 2rpx;
-            box-shadow: 0 4rpx 10rpx rgba(0, 0, 0, 0.2);
-            .seach{
-                width: 80%;
-                height: 110rpx;
-                background-color: white;
-                .a{
-                    background-color: white;
-                    padding: auto;
-                }
+
+            .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;
             }
-            .datebox{
-                width: 90%;
-                height: 132rpx;
+            .day{
                 display: flex;
+                justify-content: center;
                 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;
-                }
+                margin-left: auto;
+                width: 90rpx;
+                height: 42rpx;
+                background-color: #ECECEC;
+                font-size: 25rpx;
+                color: black;
+            }
+            .end{
+                margin-left: auto;
             }
-            
         }
+        
     }
 
     .Legendary-Information{
-        margin-top: 204rpx;
+        margin-top: 166rpx;
         width: 100%;
         background-color: white;
         overflow-y: hidden;
@@ -100,7 +106,6 @@
                 height: 280rpx;
                 width: 100%; /* 根据需要调整宽度 */
                 background-image: url('https://file-cloud.fmode.cn/EbxZUK5lBI/20241121/01atf5032703958.png?imageView2/1/w/200/h/200');
-                margin-top: 20rpx;
                 margin-bottom: 20rpx;
                 break-inside: avoid;
                 float: left;
@@ -135,12 +140,13 @@
                 // float: left;
                 .pic{
                     width: 100%;
-                    height: 275rpx;
+                    height: 206rpx;
+                    border-radius: 10rpx;
                 }
                 .textobx{
                     width: 100%;
                     height: auto;
-                    padding-top: 10rpx;
+                    // padding-top: 6rpx;
                     padding-left: 20rpx;
                     padding-right: 20rpx;
                     .title{
@@ -149,7 +155,7 @@
                         display: flex;
                         align-items: center;
                         .til{
-                            font-size: 30rpx;
+                            font-size: 28rpx;
                             font-weight: 600;
                         }
                         .collect{
@@ -160,7 +166,7 @@
                     }
                     .miaosu{
                         width: 100%;
-                        height: 80rpx; /* 设置固定高度 */
+                        height: 72rpx; /* 设置固定高度 */
                         font-size: 28rpx;
                         overflow: hidden; /* 隐藏超出部分 */
                         display: -webkit-box; /* 使用弹性盒子布局 */
@@ -174,7 +180,7 @@
                     }
                     .bottom{
                         width: 100%;
-                        height: 80rpx;
+                        height: 68rpx;
                         display: flex;
                         align-items: center;
                         .qian{
@@ -185,9 +191,9 @@
                             }
                         }
                         .soucang{
-                            width: 104rpx;
-                            height: 48rpx;
-                            font-size: 26rpx;
+                            width: 110rpx;
+                            height: 46rpx;
+                            font-size: 25rpx;
                             background-color: #343027;
                             border-radius: 40rpx;
                             color: white;

+ 17 - 13
nova-tourism/components/homestay/index.wxml

@@ -4,21 +4,25 @@
         <view class="img">
             <image src="https://file-cloud.fmode.cn/EbxZUK5lBI/20241121/jc17lo114657420.jpg"></image>
         </view>
-        <!-- 日期 -->
-        <view class="infobox">
-            <view class="seach">
-                <van-search shape="round" model:value="{{ value }}" placeholder="请输入地点/门店名称/关键词" bind:search="search" bind:change="change" bind:clear='clear'/>
-            </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>
+    <!-- 日期 -->
+    <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>
+
+
     <!-- 卡片 -->
     <view class="Legendary-Information" wx:if="{{storeList.length!=0}}">
         <block>

File diff suppressed because it is too large
+ 0 - 0
nova-tourism/components/homestay/index.wxss


Some files were not shown because too many files changed in this diff