微信小程序 从零开发房屋租赁平台




数据库课程设计,不知道怎么的就头铁选了小程序来做前端页面(前端0经验选手),于是踩了很多坑……不过多看看别人的代码画葫芦也就能学会了,果然在实践中面向需求学习的效果还是很好的,至少现在的我已经能徒手造想要的样式的轮子了(误

写这篇博客记录一下过程中的一些想法和学到的东西。没提到的页面都在源码里。

源码:https://github.com/irimsky/wechat-houses-rent



预览

主要功能:找房、约看房、发布新房、租房、看帖、发贴

先放点预览图:
在这里插入图片描述
在这里插入图片描述
在这里插入图片描述
在这里插入图片描述

在这里插入图片描述
在这里插入图片描述

全局设置

// app.json

{
   
  "pages": [
    "pages/home/home",
    "pages/Login/Login",
    ... //此处省略
  ],
  "window": {
    
    "backgroundColor": "#F6F6F6",
    "backgroundTextStyle": "light",
    //顶部navigationBar设置
    "navigationBarBackgroundColor": "#F6F6F6",
    "navigationBarTitleText": "Irimsky",
    "navigationBarTextStyle": "black"
  },
  
  "tabBar": {
    //底部tabBar设置
    "selectedColor": "#d81e06",
    "borderStyle": "white",
    "list": [
      {
   
        "pagePath": "pages/home/home",
        "text": "找房",
        "iconPath": "images/tab/me_unselect.png",
        "selectedIconPath": "images/tab/me_select.png"
      },
      {
   
        "pagePath": "pages/post/post",
        "text": "看贴",
        "iconPath": "images/tab/home_unselect.png",
        "selectedIconPath": "images/tab/home_select.png"
      },
      {
   
        "pagePath": "pages/me/me",
        "text": "我的",
        "iconPath": "images/tab/me_unselect2.png",
        "selectedIconPath": "images/tab/me_select3.png"
      }
    ]
  },
  "sitemapLocation": "sitemap.json"
}
/**app.wxss**/

.container {
   
  display: flex;
  flex-direction: column;
  align-items: center;
  box-sizing: border-box;
} 

主页

在这里插入图片描述

搜索栏 和 条件筛选栏

首先要在页面顶部添加搜索栏条件筛选栏,样式借用的是别人的demo:

<!-- wxml 搜索栏和筛选栏 -->
	<view>
		<view class="weui-search-bar">
			<view class="weui-search-bar__form">
				<!-- 搜索框 -->
				<view class="weui-search-bar__box">
					<icon class="weui-icon-search_in-box" type="search" size="14"></icon>
					<input type="text" class=
  • 17
    点赞
  • 79
    收藏
    觉得还不错? 一键收藏
  • 16
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论 16
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值