Browse Source

// 创建了两个新的页面 修改下主页,主页还要修改

master
xjw123456 1 year ago
parent
commit
dd9ea54ecf
5 changed files with 213 additions and 78 deletions
  1. +18
    -2
      pages.json
  2. +125
    -76
      pages/index/index.vue
  3. +23
    -0
      pages/notice/notice.vue
  4. +46
    -0
      pages/search/search.vue
  5. +1
    -0
      project.config.json

+ 18
- 2
pages.json View File

@ -19,6 +19,22 @@
}, },
{ {
"path": "pages/login/login" "path": "pages/login/login"
},
{
"path" : "pages/search/search",
"style" :
{
"navigationBarTitleText" : "",
"enablePullDownRefresh" : false
}
},
{
"path" : "pages/notice/notice",
"style" :
{
"navigationBarTitleText" : "公告",
"enablePullDownRefresh" : false
}
} }
], ],
"globalStyle": { "globalStyle": {
@ -28,8 +44,8 @@
"backgroundColor": "#F8F8F8", "backgroundColor": "#F8F8F8",
"app-plus": { "app-plus": {
"titleNView": false "titleNView": false
},
"navigationStyle": "custom"
}
// "navigationStyle": "custom" //
} }
, ,
"easycom": { "easycom": {


+ 125
- 76
pages/index/index.vue View File

@ -1,6 +1,7 @@
<template> <template>
<view class="container"> <view class="container">
<!-- </view> -->
<view class="ant-banner-box"> <view class="ant-banner-box">
<!-- banner 部分 --> <!-- banner 部分 -->
<swiper class="swiper " circular indicator-dots autoplay :interval="2000" <swiper class="swiper " circular indicator-dots autoplay :interval="2000"
@ -17,47 +18,61 @@
<p class="ant-font-24">超多房源等你来挑</p> <p class="ant-font-24">超多房源等你来挑</p>
</view> --> </view> -->
</view> </view>
<view class="ant-float">
<!-- <view class="ant-float">
<view class="ant-flex-line"> <view class="ant-flex-line">
<view class="ant-select">江华</view> <view class="ant-select">江华</view>
<!-- <input class="ant-input" value="" placeholder="试试输入你想住的地点"/> -->
</view> </view>
</view>
<view class="ant-menu-card">
<view class="ant-flex-line">
<view class="ant-icon-menu">
<view class="ant-icon">
<image :src="image"></image>
</view> -->
<view class="card_box">
<view class="ant-menu-card">
<view class="ant-flex-line">
<view class="ant-icon-menu">
<view class="ant-icon">
<image :src="image"></image>
</view>
<view class="ant-text">整租</view>
</view> </view>
<view class="ant-text">整租</view>
</view>
<view class="ant-icon-menu">
<view class="ant-icon">
<image :src="image"></image>
<view class="ant-icon-menu">
<view class="ant-icon">
<image :src="image"></image>
</view>
<view class="ant-text">新房源</view>
</view> </view>
<view class="ant-text">新房源</view>
</view>
<view class="ant-icon-menu">
<view class="ant-icon">
<image :src="image"></image>
<view class="ant-icon-menu">
<view class="ant-icon">
<image :src="image"></image>
</view>
<view class="ant-text">合租</view>
</view> </view>
<view class="ant-text">合租</view>
</view>
<view class="ant-icon-menu">
<view class="ant-icon">
<image :src="image"></image>
<view class="ant-icon-menu">
<view class="ant-icon">
<image :src="image"></image>
</view>
<view class="ant-text">转租</view>
</view> </view>
<view class="ant-text">转租</view>
</view> </view>
</view> </view>
</view> </view>
<!-- 吸顶搜索地址栏 -->
<u-sticky enable h5-nav-height="44" offset-top="88">
<view class="sticky">
<view class="city">
长沙
</view>
<view class="search_btn">
<u-search placeholder="请输入您要搜索的城市" v-model="keyword" @search="toSearch" @focus="toSearch"></u-search>
</view>
</view>
</u-sticky>
<!-- 滚动公告 -->
<view class="notice">
<u-notice-bar :volume-icon="false" autoplay is-circular more-icon :speed="200" mode="horizontal" :text="noticeList" url="/pages/notice/notice"></u-notice-bar>
</view>
<view class="ant-content"> <view class="ant-content">
<view class="ant-content-page"> <view class="ant-content-page">
<view class="ant-flex-line"> <view class="ant-flex-line">
<view class="ant-page-title">好房源</view> <view class="ant-page-title">好房源</view>
<view class="ant-page-span">平台甄选</view> <view class="ant-page-span">平台甄选</view>
@ -121,6 +136,7 @@
classList: [], classList: [],
hotList: [], hotList: [],
list: [], list: [],
noticeList: '这是一个通知栏!!!',
lock: true, lock: true,
size: 20, size: 20,
page: 1, page: 1,
@ -137,6 +153,7 @@
this.getClassList(); this.getClassList();
this.getHotList(); this.getHotList();
this.getHouseListPage(); this.getHouseListPage();
//
}, },
// //
onPullDownRefresh() { onPullDownRefresh() {
@ -160,7 +177,7 @@
// h5 // h5
onReady() { onReady() {
}, },
methods: { methods: {
toItem(index){ toItem(index){
@ -285,12 +302,19 @@
// console.log(res.records) // console.log(res.records)
// }) // })
}
},
// //
// //
//
toSearch(){
uni.navigateTo({
url: '/pages/search/search'
})
}
} }
} }
@ -299,14 +323,34 @@
<style lang="scss">
<style lang="scss" scoped >
.container { .container {
background-color: #FFF !important; background-color: #FFF !important;
position: relative;
// position: relative;
}
/deep/ .u-sticky{
display: flex;
justify-content: center;
.sticky{
display: flex;
align-items: center;
.city{
padding-right: 20rpx;
}
}
}
.notice{
width: 92%;
margin: 0 30rpx;
/deep/ .u-notice-bar{
border-radius: 25rpx;
}
/deep/ .u-notice__content{
height: 100%;
}
} }
.ant-float { .ant-float {
position: fixed;
// position: fixed;
top: 60rpx; top: 60rpx;
left: 24rpx; left: 24rpx;
z-index: -2; z-index: -2;
@ -352,7 +396,6 @@
} }
.ant-banner-box { .ant-banner-box {
position: fixed;
top: 0; top: 0;
z-index: -3; z-index: -3;
background-color: #FFF; background-color: #FFF;
@ -386,59 +429,65 @@
} }
} }
.ant-menu-card {
position: absolute;
top: -40rpx;
z-index: 1;
margin: 0 24rpx;
width: calc(100vw - 96rpx);
background-color: #FFF;
border-radius: 16rpx;
min-height: 100rpx;
padding: 24rpx;
box-shadow: 10rpx 10rpx 20rpx rgba(134, 136, 136, 0.2);
.ant-icon-menu {
width: 150rpx;
flex: 1;
.ant-icon {
width: 80rpx;
height: 80rpx;
margin: 8rpx auto;
border-radius: 50%;
// border: 1rpx dashed red;
image {
.card_box{
// position: absolute;
width: 100%;
margin-top: 24rpx;
height: 140rpx;
.ant-menu-card {
// position: absolute;
// top: -40rpx;
z-index: 1;
margin: 0 24rpx;
width: calc(100vw - 96rpx);
background-color: #FFF;
border-radius: 16rpx;
min-height: 100rpx;
padding: 24rpx;
box-shadow: 10rpx 10rpx 20rpx rgba(134, 136, 136, 0.2);
.ant-icon-menu {
width: 150rpx;
flex: 1;
.ant-icon {
width: 80rpx; width: 80rpx;
height: 80rpx; height: 80rpx;
margin: 8rpx auto;
border-radius: 50%; border-radius: 50%;
// border: 1rpx dashed red;
image {
width: 80rpx;
height: 80rpx;
border-radius: 50%;
}
}
.ant-text {
width: 100%;
font-size: 22rpx;
color: #222;
font-weight: bold;
line-height: 40rpx;
text-align: center;
} }
}
.ant-text {
width: 100%;
font-size: 22rpx;
color: #222;
font-weight: bold;
line-height: 40rpx;
text-align: center;
} }
} }
} }
.ant-content { .ant-content {
margin-top: 520rpx;
padding: 120rpx 24rpx 20rpx;
margin-top: 24rpx;
padding: 48rpx 24rpx 20rpx;
width: calc(100vw - 48rpx); width: calc(100vw - 48rpx);
overflow: hidden; overflow: hidden;
.ant-content-page { .ant-content-page {
border-radius: 16rpx; border-radius: 16rpx;
min-height: 100rpx; min-height: 100rpx;
padding: 24rpx 0;
// padding: 24rpx 0;
margin-bottom: 24rpx; margin-bottom: 24rpx;
.scroll-view_H { .scroll-view_H {


+ 23
- 0
pages/notice/notice.vue View File

@ -0,0 +1,23 @@
<template>
<view>
<!-- 公告页面 -->
这是一个公告页面
</view>
</template>
<script>
export default {
data() {
return {
}
},
methods: {
}
}
</script>
<style>
</style>

+ 46
- 0
pages/search/search.vue View File

@ -0,0 +1,46 @@
<template>
<view>
<!-- 搜索栏 -->
<u-sticky class="sticky_box" enable h5-nav-height="44" offset-top="88">
<view class="sticky">
<view class="city">
长沙
</view>
<view class="search_btn">
<u-search placeholder="请输入您要搜索的城市" v-model="keyword" @search="toSearch" @focus="toSearch"></u-search>
</view>
</view>
</u-sticky>
<view class="search_box">
</view>
</view>
</template>
<script>
export default {
data() {
return {
}
},
methods: {
}
}
</script>
<style lang="scss" scoped>
/deep/ .u-sticky{
display: flex;
justify-content: center;
.sticky{
display: flex;
align-items: center;
.city{
padding-right: 20rpx;
}
}
}
</style>

+ 1
- 0
project.config.json View File

@ -29,6 +29,7 @@
"disablePlugins": [], "disablePlugins": [],
"outputPath": "" "outputPath": ""
}, },
"ignoreUploadUnusedFiles":false,
"enableEngineNative": false, "enableEngineNative": false,
"bundle": false, "bundle": false,
"useIsolateContext": true, "useIsolateContext": true,


Loading…
Cancel
Save