邹能昇 2 dias atrás
pai
commit
e94ab870a1

+ 1 - 1
config.js

@@ -1,5 +1,5 @@
 export default {
-    appid: "wx9e378ea72244da67",//o2o
+    appid: "wx37db90fff9e68f1f",//智慧沙石(后续换)
     company: "EbxZUK5lBI",
     rootPage: "/nova-tourism/pages/index/index",
     theme: {

+ 23 - 0
nova-tourism/components/collect/index.js

@@ -0,0 +1,23 @@
+// nova-tourism/components/collect/index.js
+Component({
+    /**
+     * 组件的属性列表
+     */
+    properties: {
+
+    },
+
+    /**
+     * 组件的初始数据
+     */
+    data: {
+
+    },
+
+    /**
+     * 组件的方法列表
+     */
+    methods: {
+
+    }
+})

+ 4 - 0
nova-tourism/components/collect/index.json

@@ -0,0 +1,4 @@
+{
+    "component": true,
+    "usingComponents": {}
+}

+ 2 - 0
nova-tourism/components/collect/index.wxml

@@ -0,0 +1,2 @@
+<!--nova-tourism/components/collect/index.wxml-->
+<text>收藏</text>

+ 1 - 0
nova-tourism/components/collect/index.wxss

@@ -0,0 +1 @@
+/* nova-tourism/components/collect/index.wxss */

+ 0 - 7
nova-tourism/components/home/index.json

@@ -1,7 +0,0 @@
-{
-    "component": true,
-    "usingComponents": {
-        "van-icon": "@vant/weapp/icon/index",
-        "van-calendar": "@vant/weapp/calendar/index"
-    }
-}

+ 0 - 169
nova-tourism/components/home/index.less

@@ -1,169 +0,0 @@
-
-/* nova-caipu/pages/new-app/index.wxss */
-.all{
-    width: 100vw;
-    height: 100vh;
-    background-color: #f7f7f7;
-    position: relative;
-    .picturebox{
-        width: 100%;
-        height: 480rpx;
-        position: relative;
-        .img{
-            width: 100%;
-            height: 480rpx;
-            image{
-                width: 100%;
-                height: 100%;
-
-            }
-        }
-        .numberbox{
-            position: absolute;
-            bottom: 40rpx;
-            right: 20rpx;
-            border-radius: 45%;
-            z-index: 10;
-            color: white;
-            width: 70rpx;
-            height: 45rpx;
-            font-size: 24rpx;
-            display: flex;
-            justify-content: center;
-            align-items: center;
-            background-color: rgba(12, 12, 12, 0.5);
-        }
-    }
-    .Legendary-Information{
-        width: 100%;
-        background-color: white;
-        border-top-left-radius: 20px; /* 左上角圆角 */
-        border-top-right-radius: 20px; /* 右上角圆角 */
-        position: absolute;
-        top: 455rpx;
-        padding-top: 20rpx;
-        padding-left: 25rpx;
-        padding-right: 20rpx;
-        z-index: 10;
-        overflow-y: hidden;
-        padding-bottom: 20rpx;
-        .text{
-            width: 100%;
-            height: 100rpx;
-            display: flex;
-            
-            margin-top: 10rpx;
-            .namebox{
-                width: 75%;
-                height: 100rpx;
-                .name{
-                    font-size: 35rpx;
-                    font-weight: 500;
-                }
-                .adress{
-                    font-size: 30rpx;
-                    white-space: nowrap; /* 不换行 */
-                    overflow: hidden; /* 隐藏超出部分 */
-                    text-overflow: ellipsis; /* 超出部分显示省略号 */
-                }
-            }
-            .markerbox{
-                width: 25%;
-                height: 100%;
-                display: flex;
-                justify-content: center;
-                align-items: center;
-            }
-
-        }
-        .datebox{
-            width: 100%;
-            height: 90rpx;
-            background-color: #f7f7f7;
-            display: flex;
-            padding-left: 20rpx;
-            padding-right: 20rpx;
-            align-items: center;
-            color: orange;
-            font-size: 32rpx;
-            .start{
-                display: flex;
-                justify-content: flex-end;
-            }
-            .day{
-                display: flex;
-                justify-content: center;
-                align-items: center;
-                margin-left: auto;
-                width: 90rpx;
-                height: 42rpx;
-                border-radius: 40rpx;
-                border: gray solid 1px;
-                font-size: 25rpx;
-                color: black;
-            }
-            .end{
-                margin-left: auto;
-            }
-        }
-        .cardbox{
-            .card{
-                width: 100%;
-                height: 620rpx;
-                background-color: white;
-                margin-top: 15rpx;
-                .img{
-                    width: 100%;
-                    height: 480rpx;
-                }
-                .name{
-                    font-size: 30rpx;
-                }
-                .intruduce{
-                    font-size: 28rpx;
-                }
-                .buttombox{
-                    width: 100%;
-                    height: 60rpx;
-                    color: red;
-                    display: flex;
-                    align-items: center;
-
-                    .salary{
-                        width: 50%;
-                        height: 100%;
-                        display: flex;
-                        
-                        .symbol{
-                            height: 100%;
-                            font-size: 28rpx;
-                            display: flex;
-                            align-items: flex-end;
-                        }
-                        .number{
-                            height: 100%;
-                            display: flex;
-                            align-items: flex-end;
-                            font-size: 35rpx;
-                        }
-                    }
-                    .buttom{
-                        width: 130rpx;
-                        height: 50rpx;
-                        font-size: 30rpx;
-                        color: white;
-                        background-color: red;
-                        border-radius: 48rpx;
-                        display: flex;
-                        justify-content: center;
-                        align-items: center;
-                        margin-left: auto;
-                    }
-
-                }
-            }
-        }
-
-    }
-
-}

+ 0 - 53
nova-tourism/components/home/index.wxml

@@ -1,53 +0,0 @@
-<nav type="title" background-color="#ffffff" frontColor="#000000" title="望仙谷" wx:if="{{showNav}}" />
-<scroll-view class="all" scroll-y="true" bindscroll="onScroll" style="padding-bottom: {{50+bottomNavHeight}}px;">
-    <!-- 轮播图 -->
-    <view class="picturebox">
-        <swiper autoplay="{{true}}" interval="{{3000}}" duration="{{500}}" class="img" bindchange="onSwiperChange">
-            <block wx:for="{{imageUrls}}" wx:key="index" wx:for-item="img">
-                <swiper-item class="img">
-                    <image src="{{img}}" mode="aspectFill"></image>
-                </swiper-item>
-            </block>
-        </swiper>
-        <view class="numberbox">{{index}}/{{imageUrls.length}}</view>
-    </view>
-    <!-- 滑动条bug -->
-    <!-- 民宿信息 -->
-    <view class="Legendary-Information">
-        <view class="text">
-            <view class="namebox">
-                <view class="name">望·三清艺术部落 ></view>
-                <view class="adress">地点地点地点地点地点地点地点地点地点地点地点地点地点地点地点地点地点地点</view>
-            </view>
-            <view class="markerbox">
-                <view>
-                    <van-icon name="location-o" size='25px' />
-                    |
-                    <van-icon name="phone-o" size='25px' />
-                </view>
-            </view>
-        </view>
-        <!-- 日期 -->
-        <view class="datebox" bindtap="onDisplay">
-            <view class="start">{{date_start}}</view>
-            <view class="day">共4晚</view>
-            <view class="end">{{date_end}}</view>
-        </view>
-        <van-calendar show="{{ show }}"  show-confirm="{{ true }}" confirm-text="完成" confirm-disabled-text='完成' type="range" bind:close="onClose" bind:confirm="onConfirm" color='#ff0000' position='top' />
-        <!-- 卡片 -->
-        <view class="cardbox" wx:for="{{cardarr}}">
-            <view class="card">
-                <image class="img" src='https://tse4-mm.cn.bing.net/th/id/OIP-C.3r1vguZyWFUJ80A2Nf2k3AHaEK?rs=1&pid=ImgDetMain'></image>
-                <view class="name">彩虹木屋</view>
-                <view class="intruduce">整房1室·1床·适用2人</view>
-                <view class="buttombox">
-                    <view class="salary">
-                        <view class="symbol">¥</view>
-                        <view class="number">0.00</view>
-                    </view>
-                    <view class="buttom">预定</view>
-                </view>
-            </view>
-        </view>
-    </view>
-</scroll-view>

Diferenças do arquivo suprimidas por serem muito extensas
+ 0 - 0
nova-tourism/components/home/index.wxss


+ 5 - 24
nova-tourism/components/home/index.js → nova-tourism/components/homestay/index.js

@@ -17,12 +17,7 @@ Component({
         customHeight: 0, // 自定义导航栏高度(如小程序右上角胶囊按钮)
         bottomNavHeight: 0, // 底部导航栏高度
         contentHeight: 0, // 可用内容高度
-        //
-        showNav: false, // 控制导航栏的显示与隐藏
-        scrollTop: 0, // 当前滚动位置
         //  轮播图数组
-        imageUrls: ['https://tse4-mm.cn.bing.net/th/id/OIP-C.3r1vguZyWFUJ80A2Nf2k3AHaEK?rs=1&pid=ImgDetMain', 'https://ts1.cn.mm.bing.net/th/id/R-C.9881613a29f26488b40938427aa585e4?rik=fim4XvDejjHE%2fQ&riu=http%3a%2f%2fn.sinaimg.cn%2fsinakd20220516ac%2f797%2fw2048h1149%2f20220516%2fb0aa-5aca29fe2dfa69c385118bbc74d039de.jpg&ehk=tzq%2bJP6uMipI0aIHY3bMSVO7lS7ZQM6TKMlwZ5CFP4s%3d&risl=&pid=ImgRaw&r=0', 'https://pic3.zhimg.com/v2-5fb13110e1de13d4c11e6e7f5b8026da_r.jpg', 'https://desk-fd.zol-img.com.cn/t_s960x600c5/g5/M00/02/04/ChMkJ1bKyEyIMaKUAAhskHwWGqUAALIAAM2KsIACGyo249.jpg'],
-        index: 1,
         //卡片数组
         cardarr: [1, 2, 3, 4, 5, 6, 7],
         //日历
@@ -47,37 +42,23 @@ Component({
             const customHeight = custom.height + 10 + 2 || 0;
             const bottomNavHeight = systemInfo.screenHeight - systemInfo.safeArea.bottom || 0;
 
-            const contentHeight = (statusBarHeight +customHeight) * 750 / systemInfo.windowWidth;
-
+            const contentpadding = (statusBarHeight + customHeight) * 750 / systemInfo.windowWidth;
+            const contentHeight = (screenHeight - bottomNavHeight - 50 - statusBarHeight - customHeight) * 750 / systemInfo.windowWidth;
             this.setData({
                 statusBarHeight,
                 screenHeight,
                 customHeight,
                 bottomNavHeight,
-                contentHeight
+                contentHeight,
+                contentpadding
             });
-            console.log(this.data.bottomNavHeight);
+            console.log(this.data.contentHeight);
         },
     },
     /**
      * 组件的方法列表
      */
     methods: {
-        //滑动显示导航栏
-        onScroll: function (event) {
-            const scrollTop = event.detail.scrollTop; // 获取当前滚动位置
-            this.setData({
-                scrollTop: scrollTop,
-                showNav: scrollTop > 295 // 当滚动超过  时显示导航栏
-            });
-        },
-        //随轮播图变化而变化
-        onSwiperChange: function (event) {
-            const currentIndex = event.detail.current; // 获取当前索引
-            this.setData({
-                index: currentIndex + 1
-            })
-        },
 
         //选择日期
         //打开日历

+ 8 - 0
nova-tourism/components/homestay/index.json

@@ -0,0 +1,8 @@
+{
+    "component": true,
+    "usingComponents": {
+        "van-icon": "@vant/weapp/icon/index",
+        "van-calendar": "@vant/weapp/calendar/index",
+        "van-search": "@vant/weapp/search/index"
+    }
+}

+ 164 - 0
nova-tourism/components/homestay/index.less

@@ -0,0 +1,164 @@
+
+/* nova-caipu/pages/new-app/index.wxss */
+.all{
+    width: 100vw;
+    height: 100vh;
+    background-color: #f7f7f7;
+    .picturebox{
+        width: 100%;
+        height: 430rpx;
+        position: relative;
+        .img{
+            width: 100%;
+            height: 430rpx;
+            image{
+                width: 100%;
+                height: 100%;
+
+            }
+        }
+        .infobox{
+            width: 94%;
+            height: 250rpx;
+            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;
+                }
+            }
+            .datebox{
+                width: 90%;
+                height: 132rpx;
+                display: flex;
+                align-items: center;
+                font-size: 32rpx;
+                border-top: solid #e5e5e5 2rpx;
+                .start{
+                    display: flex;
+                    justify-content: flex-end;
+                }
+                .day{
+                    display: flex;
+                    justify-content: center;
+                    align-items: center;
+                    margin-left: auto;
+                    width: 90rpx;
+                    height: 42rpx;
+                    border-radius: 40rpx;
+                    border: gray solid 1px;
+                    font-size: 25rpx;
+                    color: black;
+                }
+                .end{
+                    margin-left: auto;
+                }
+            }
+            
+        }
+    }
+
+    .Legendary-Information{
+        margin-top: 186rpx;
+        width: 100%;
+        background-color: white;
+        overflow-y: hidden;
+        padding-left: 3%;
+        padding-right: 3%;
+        display: flex;
+        justify-content: space-between;
+        flex-wrap: wrap;
+        padding-bottom: 40rpx;
+        .picbox {
+            width: 48%;
+            height: 280rpx;
+            background-image: url('https://file-cloud.fmode.cn/EbxZUK5lBI/20241121/01atf5032703958.png?imageView2/1/w/200/h/200');
+            background-size: cover; /* 使背景图片覆盖整个容器 */
+            background-position: center; /* 使背景图片居中显示 */
+            background-repeat: no-repeat; /* 防止背景图片重复 */
+            margin-top: 20rpx;
+        }
+        .cardbox {
+            width: 48%;
+            height: 495rpx;
+            margin-top: 20rpx;
+            .pic{
+                width: 100%;
+                height: 275rpx;
+            }
+            .textobx{
+                width: 100%;
+                height: 220rpx;
+                padding-top: 10rpx;
+                padding-left: 20rpx;
+                padding-right: 20rpx;
+                background-color: #f7f7f7;
+                .title{
+                    width: 100%;
+                    height: 50rpx;
+                    display: flex;
+                    align-items: center;
+                    .til{
+                        font-size: 30rpx;
+                        font-weight: 600;
+                    }
+                    .collect{
+                        width: 50rpx;
+                        height: 50rpx;
+                        margin-left: auto;
+                    }
+                }
+                .miaosu{
+                    width: 100%;
+                    height: 80rpx; /* 设置固定高度 */
+                    font-size: 28rpx;
+                    overflow: hidden; /* 隐藏超出部分 */
+                    display: -webkit-box; /* 使用弹性盒子布局 */
+                    -webkit-box-orient: vertical; /* 垂直排列 */
+                    -webkit-line-clamp: 2; /* 限制显示的行数,这里设置为3行 */
+                    text-overflow: ellipsis; /* 超出部分显示省略号 */
+                }
+                .bottom{
+                    width: 100%;
+                    height: 80rpx;
+                    display: flex;
+                    align-items: center;
+                    .qian{
+                        color: #C5262Ced;
+                        display: flex;
+                        .numbox{
+                            margin-left: 6rpx;
+                        }
+                    }
+                    .soucang{
+                        width: 104rpx;
+                        height: 48rpx;
+                        font-size: 26rpx;
+                        background-color: #343027;
+                        border-radius: 40rpx;
+                        color: white;
+                        margin-left: auto;
+                        display: flex;
+                        justify-content: center;
+                        align-items: center;
+                    }
+                }
+            }
+        }
+    }
+
+}

+ 55 - 0
nova-tourism/components/homestay/index.wxml

@@ -0,0 +1,55 @@
+<nav type="title" background-color="#ffffff" frontColor="#000000" title="望仙谷" />
+<scroll-view class="all" scroll-y="true" bindscroll="onScroll" style="height: {{contentHeight}}rpx;">
+    <!-- 轮播图 -->
+    <view class="picturebox">
+        <view class="img">
+            <image src="https://file-cloud.fmode.cn/EbxZUK5lBI/20241121/jc17lo114657420.jpg?imageView2/1/w/200/h/200"></image>
+        </view>
+        <!-- 日期 -->
+        <view class="infobox">
+            <view class="seach">
+                <van-search shape="round" value="{{ value }}" placeholder="请输入地点/门店名称/关键词" />
+            </view>
+            <view class="datebox" bindtap="onDisplay">
+                <view class="start">{{date_start}}</view>
+                <view class="day">共4晚</view>
+                <view class="end">{{date_end}}</view>
+            </view>
+            <van-calendar show="{{ show }}" show-confirm="{{ true }}" confirm-text="完成" confirm-disabled-text='完成' type="range" bind:close="onClose" bind:confirm="onConfirm" color='#ff0000' position='top' />
+        </view>
+    </view>
+    <view class="Legendary-Information">
+        <block wx:for="{{6}}">
+            <view class="picbox" wx:if="{{index==2}}">
+
+            </view>
+            <view class="cardbox">
+                <image class="pic" src="https://file-cloud.fmode.cn/EbxZUK5lBI/20241121/jc17lo114657420.jpg?imageView2/1/w/200/h/200"></image>
+                <view class="textobx">
+                    <view class="title">
+                        <view class="til">剑仙居</view>
+                        <image class="collect" src="https://file-cloud.fmode.cn/EbxZUK5lBI/20241121/2gcp1e030048570.png?imageView2/1/w/200/h/200"></image>
+                    </view>
+
+                    <view class="miaosu">
+                        剑仙居描述剑仙居描述剑仙居描述剑仙居描述剑仙居描述
+                    </view>
+
+                    <view class="bottom">
+                        <view class="qian">
+                            ¥
+                            <view class="numbox">
+                                10000.00
+                            </view>
+                        </view>
+                        <view class="soucang">收藏</view>
+                    </view>
+                </view>
+            </view>
+        </block>
+
+
+    </view>
+
+
+</scroll-view>

Diferenças do arquivo suprimidas por serem muito extensas
+ 0 - 0
nova-tourism/components/homestay/index.wxss


+ 23 - 0
nova-tourism/components/my/index.js

@@ -0,0 +1,23 @@
+// nova-tourism/components/my/index.js
+Component({
+    /**
+     * 组件的属性列表
+     */
+    properties: {
+
+    },
+
+    /**
+     * 组件的初始数据
+     */
+    data: {
+
+    },
+
+    /**
+     * 组件的方法列表
+     */
+    methods: {
+
+    }
+})

+ 4 - 0
nova-tourism/components/my/index.json

@@ -0,0 +1,4 @@
+{
+    "component": true,
+    "usingComponents": {}
+}

+ 2 - 0
nova-tourism/components/my/index.wxml

@@ -0,0 +1,2 @@
+<!--nova-tourism/components/my/index.wxml-->
+<text>我的</text>

+ 1 - 0
nova-tourism/components/my/index.wxss

@@ -0,0 +1 @@
+/* nova-tourism/components/my/index.wxss */

+ 3 - 1
nova-tourism/pages/index/index.json

@@ -1,5 +1,7 @@
 {
   "usingComponents": {
-    "home":"../../components/home/index"
+    "homestay":"../../components/homestay/index",
+    "collect":"../../components/collect/index",
+    "my":"../../components/my/index"
   }
 }

+ 6 - 9
nova-tourism/pages/index/index.wxml

@@ -10,17 +10,14 @@
 	</block>
 </view>
 
-<template name="nova-home">
-	<home id="comp{{id}}" />
+<template name="nova-homestay">
+	<homestay id="comp{{id}}" /> 
 </template>
-<template name="nova-cart">
-	<!-- <cart id="comp{{id}}" take="{{takeAddress}}" give="giveAddress" /> -->
+<template name="nova-collect">
+	<collect id="comp{{id}}" /> 
 </template>
-<template name="nova-cate">
-	<!-- <cate id="comp{{id}}" bind:cart="toCart" /> -->
-</template>
-<template name="nova-my">
-	<!-- <my id="comp{{id}}" /> -->
+<template name="nova-my"> 
+	<my id="comp{{id}}" />
 </template>
 <!-- 底部导航 -->
 <van-tabbar

+ 1 - 1
project.config.json

@@ -49,7 +49,7 @@
     },
     "compileType": "miniprogram",
     "libVersion": "2.27.3",
-    "appid": "wx9e378ea72244da67",
+    "appid": "wx37db90fff9e68f1f",
     "projectname": "nova-wapp",
     "cloudfunctionTemplateRoot": "",
     "editorSetting": {

Alguns arquivos não foram mostrados porque muitos arquivos mudaram nesse diff