微信小程序云开发|基于微信小程序实现房产中介平台系统(二)

简介: 微信小程序云开发|基于微信小程序实现房产中介平台系统

微信小程序云开发|基于微信小程序实现房产中介平台系统(一)https://developer.aliyun.com/article/1423386


设置管理员

房源管理:可以设置为首页推荐

公司信息管理

四,核心代码展示

用户登录

<!--pages/login/login.wxml-->
<view wx:if="{{showform&!showAuth}}">
  <van-nav-bar title="注册登录" left-text="返回首页" bind:click-left="onClickLeft" />
</view>
<view class="form-box" wx:if="{{showform&!showAuth}}">
  <!-- 输入框 -->
  <view class="cu-form-group border-top-left-radius">
    <view class='title'>
      <text decode="true">&nbsp;&nbsp;<text decode="true" style="color:#EE0A24;">*</text>姓名:</text>
    </view>
    <input placeholder="输入你的真实姓名" class='radius' id="name" type="text" maxlength='5' style='color:#0080ff;' bindinput="InputData"></input>
  </view>
  <!-- 输入框 -->
  <view class="cu-form-group">
    <view class='title'>
      <text decode="true">&nbsp;&nbsp;<text decode="true" style="color:#EE0A24;">*</text>手机:</text>
    </view>
    <input placeholder="输入你的手机号码" class='radius' id="phone" type="number" maxlength='11' style='color:#0080ff;' bindinput="InputData"></input>
  </view>
  <!-- 说明 -->
  <view class="desc">
    <text decode='true'>说明:请填写你的真实姓名和有效的手机号,方便我们及时联系到您。</text>
  </view>
  <!-- 按钮 -->
  <view class="cu-form-group" style="margin-top:10px;">
    <button class="cu-btn" style="background-color:#1989fa;color:#ffffff;" bindtap="SubmitRegister">注 册</button>
  </view>
</view>
<!-- <view wx:if="{{showAuth}}">
  <button open-type="getUserInfo" lang="zh_CN" bindgetuserinfo="onGotUserInfo">获取用户信息</button>
</view> -->
<view class="auth-box" wx:if="{{showAuth}}">
  <view class="card-box">
    <view class="card-content">
      <button open-type="getUserInfo" lang="zh_CN" bindgetuserinfo="onGotUserInfo">确 定</button>
    </view>
    <image src='../image/modal.png'></image>
  </view>
</view>

首页布局

<!--pages/home/home.wxml-->
<!-- 功能选项a -->
<view class="select-box">
  <view data-url="../../Companypackage/newHouse/newHouse" bindtap="Navigate">
    <image src="../image/newHouse.png"></image>
  </view>
  <view data-url="../../Companypackage/secondHandHouse/secondHandHouse" bindtap="Navigate">
    <image src="../image/secondHand.png"></image>
  </view>
  <view data-url="../../Companypackage/rentingHouse/rentingHouse" bindtap="Navigate">
    <image src="../image/rentinghouse.png"></image>
  </view>
</view>
<!-- 功能选项b -->
<view class="header-box">
  <view class="header-row">
    <view class="header-cell" wx:for="{{headerList}}" wx:key='key' data-url="{{item.url}}" bindtap="Navigate">
      <view>
        <image src="{{item.icon}}"></image>
      </view>
      <view class="font-size-12 text-color">{{item.text}}</view>
    </view>
  </view>
</view>
<!-- bannner -->
<view class="banner-box">
  <image src="../image/banner.png"></image>
</view>
<!-- 公告 -->
<view class="noticeBar-box">
  <van-notice-bar class="noticeBar" left-icon="volume-o" color="#181818;" backgroundColor="#ffffff" text="{{notice}}" />
</view>
<view class="recommendation-box">
  <view class="recommendation-text">店长推荐</view>
</view>
<!-- 推荐列表 -->
<view class="recommendation-list-box" wx:for="{{HouseList}}" wx:key='key' data-url="{{item.url}}" data-id="{{item._id}}" bindtap="NavigateToDetail">
  <view class="card">
    <view class="card-left">
      <image mode="scaleToFill" src="{{item.photoInfo[0]}}"></image>
      <view class="card-tag-box card-tag card-tag-mark card-tag-bg">推荐</view>
    </view>
    <view class="card-right">
      <view class="card-title">{{item.title}}</view>
      <view class="card-content-box">
        <view class="card-content-box-row-top">
          <view class="content-row">
            <view class="float-left font-weight">{{item.FormData.roomStyle}} {{item.FormData.area}}㎡</view>
            <view class="float-right price-text">{{item.FormData.totalPrice}}{{item.EntrustType=='sale'?'万':'元/月'}}</view>
          </view>
          <view class="content-row">
            <view class="float-left text-grey">{{item.FormData.location}}</view>
            <view class="float-right text-grey">{{item.EntrustType=='sale'?item.FormData.averagePrice:''}}{{item.EntrustType=='sale'?'元/㎡':''}}</view>
          </view>
        </view>
        <view class="card-content-box-row-bottom">
          <view class="content-tag bg-tag bg-cyan light" wx:for="{{item.FormData.Tags}}" wx:for-item="tag" wx:key='key'>{{tag}}</view>
        </view>
      </view>
    </view>
  </view>
</view>
<!-- 占位 -->
<view style="height:20px;"></view>

个人中心

<!--pages/mypage/mypage.wxml-->
<!-- 背景图 -->
<view class="bg-box">
  <image src="../image/mypagebg.png"></image>
</view>
<!-- 为登录 -->
<view wx:if="{{!UserLogin}}" class="head-box" bindtap="NavigateToLogin">
  <view class="userAvatar-box">
    <open-data type="userAvatarUrl"></open-data>
  </view>
  <view class="userlogin">
    <view>登录/注册 (点击登录)</view>
    <view class="font-size-12" style="color:grey;">需要先完成注册登录才能使用哦!</view>
  </view>
</view>
<!-- 已登录 -->
<view wx:else class="head-box" bindtap="ScanPage">
  <view class="userAvatar-box">
    <open-data type="userAvatarUrl"></open-data>
  </view>
  <view class="userlogin">
    <view style="font-weight:bold;">欢迎,{{userInfo.name}}</view>
    <view class="font-size-12" style="color:grey;">{{userInfo.nickName}} {{userInfo.phone}}</view>
  </view>
</view>
<view class="content-box">
  <view class="content-title font-size-16 ">我的服务</view>
  <!-- <view class="content-row" wx:if='{{Adminstator}}' data-id="managerHome" data-url="../../Adminpackage/managerHome/managerHome" bindtap="Navigate">
        <view class="content-icon float-left">
            <image src="../image/adminstor.png"></image>
        </view>
        <view class="content-text font-size-14">管理员</view>
    </view> -->
  <view class="content-row" data-id="mypage" data-url="../../Companypackage/myentrust/myentrust" bindtap="Navigate">
    <view class="content-icon float-left">
      <image src="../image/entrust.png"></image>
    </view>
    <view class="content-text font-size-14">我的委托</view>
  </view>
  <view class="content-row" data-id="mycollection" data-url="../../Companypackage/mycollection/mycollection" bindtap="Navigate">
    <view class="content-icon float-left">
      <image src="../image/mycollection.png"></image>
    </view>
    <view class="content-text font-size-14">我的收藏</view>
  </view>
</view>
<view class="content-box">
  <view class="content-title font-size-16 ">设置</view>
  <view class="content-row">
    <view class="content-icon float-left">
      <image src="../image/address.png"></image>
    </view>
    <view class="content-text font-size-14">
      <button open-type='contact' style="color:black;height:35px;line-height:35px;font-weight: lighter;padding:0;width:100%;border:none;background:#fff;font-size:14px;text-align:left;">在线客服</button>
    </view>
  </view>
  <view class="content-row" bindtap="CleanInfo">
    <view class="content-icon float-left">
      <image src="../image/history.png"></image>
    </view>
    <view class="content-text font-size-14">清除记录</view>
  </view>
  <!-- <view class="content-row">
        <view class="content-icon float-left">
            <image src="../image/longout.png"></image>
        </view>
        <view class="content-text font-size-14">退出登录</view>
    </view> -->
</view>

五,项目总结

主要实现的功能:

  1. 新房、租房、二手房 信息发布及管理
  2. 房贷计算器
  3. 公司介绍
  4. 公告
  5. 管理员:房屋发布审核、员工管理、房产首页推荐、管理员添加
相关文章
|
5天前
|
小程序 JavaScript Java
基于SpringBoot+Vue+uniapp微信小程序的电子商城购物平台的详细设计和实现
基于SpringBoot+Vue+uniapp微信小程序的电子商城购物平台的详细设计和实现
59 3
|
5天前
|
小程序 JavaScript Java
基于SpringBoot+Vue+uniapp微信小程序的英语学习交流平台的详细设计和实现
基于SpringBoot+Vue+uniapp微信小程序的英语学习交流平台的详细设计和实现
35 2
|
5天前
|
小程序 JavaScript Java
基于SpringBoot+Vue+uniapp微信小程序的移动学习平台的详细设计和实现
基于SpringBoot+Vue+uniapp微信小程序的移动学习平台的详细设计和实现
37 1
|
5天前
|
小程序 JavaScript Java
基于SpringBoot+Vue+uniapp微信小程序的科创微应用平台的详细设计和实现
基于SpringBoot+Vue+uniapp微信小程序的科创微应用平台的详细设计和实现
29 0
|
5天前
|
小程序 JavaScript Java
基于SpringBoot+Vue+uniapp微信小程序的医院核酸检测服务系统的详细设计和实现
基于SpringBoot+Vue+uniapp微信小程序的医院核酸检测服务系统的详细设计和实现
39 0
|
5天前
|
小程序 JavaScript Java
基于SpringBoot+Vue+uniapp微信小程序的购物系统平台的详细设计和实现
基于SpringBoot+Vue+uniapp微信小程序的购物系统平台的详细设计和实现
34 0
|
5天前
|
小程序 数据库
【微信小程序7】云开发中实时聊天系统的实现方法
【微信小程序7】云开发中实时聊天系统的实现方法
25 0
|
5天前
|
人工智能 小程序 Java
Java智慧校园系统源码 微信小程序+电子班牌
通过设备管理对百纳智慧校园的智慧班牌以及百纳智慧屏(校牌)进行统一集中式管理,支持浏览所有设备的基本信息以及在离线状态,支持添加设备、设备一键开关机、一键重启、设置节假日开关机时间、设置日常开关机时间、远程班牌截屏、远程班牌升级等操作。
24 0
|
5天前
|
小程序 前端开发 API
微信小程序全栈开发中的异常处理与日志记录
【4月更文挑战第12天】本文探讨了微信小程序全栈开发中的异常处理和日志记录,强调其对确保应用稳定性和用户体验的重要性。异常处理涵盖前端(网络、页面跳转、用户输入、逻辑异常)和后端(数据库、API、业务逻辑)方面;日志记录则关注关键操作和异常情况的追踪。实践中,前端可利用try-catch处理异常,后端借助日志框架记录异常,同时采用集中式日志管理工具提升分析效率。开发者应注意安全性、性能和团队协作,以优化异常处理与日志记录流程。
|
5天前
|
小程序 安全 数据安全/隐私保护
微信小程序全栈开发中的身份认证与授权机制
【4月更文挑战第12天】本文探讨了微信小程序全栈开发中的身份认证与授权机制。身份认证包括手机号验证、微信登录和第三方登录,而授权机制涉及角色权限控制、ACL和OAuth 2.0。实践中,开发者可利用微信登录获取用户信息,集成第三方登录,以及实施角色和ACL进行权限控制。注意点包括安全性、用户体验和合规性,以保障小程序的安全运行和良好体验。通过这些方法,开发者能有效掌握小程序全栈开发技术。

热门文章

最新文章