1 Star 0 Fork 20

Aurora / rentHouse

forked from LiangSenCheng / rentHouse 
加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
克隆/下载
贡献代码
同步代码
取消
提示: 由于 Git 不支持空文件夾,创建文件夹后会生成空的 .keep 文件
Loading...
README
LGPL-3.0

基于微信小程序云开发-租房微信小程序-带管理员后台

image image image image image

image image image

项目地址:https://github.com/lx164/house

如需小程序定制「包括但不限于课设、毕设等」可联系我,联系方式请点击> 博客园< 的首页;

温馨提醒

如需商用升级版,请联系我微信,微信二维码在这里的右上角: https://www.cnblogs.com/LiangSenCheng/p/11083714.html

备用联系方式:点击这里

本项目使用 MIT License协议,仅适用于学习交流,并且不提供无偿的不提供无偿的不提供无偿的 维护修改服务(但可提issue)。若直接将本项目用于商用,因本项目带来的所有后果由使用者自行承担。

在此奉劝某些人,请尊重作者的劳动成果,做人积点德吧!最近发现有人拿我的源码进行二次分发,不但不标注源码出处,甚至以此牟利。如果你花了钱购买本程序,请积极举报!

不要只是白嫖 ,如果帮到你了麻烦点个Start (不管github点这里, 还是gitee点这里都可以)

发现有问题?欢迎加我微信一起探讨,或者直接提Issues 无法下载或者下载太慢?可以直接找我要安装包;

联系方式在这里的首页:https://www.cnblogs.com/LiangSenCheng/p/11083714.html

阿里云优惠活动

  • [其他开源项目]
  1. 表白墙 https://github.com/lx164/SayLove
  2. https://www.cnblogs.com/LiangSenCheng/p/12543230.html
  • [2021-04-06] 更新说明:

最近有不少反馈说,为什么已经注册成功了,在首页还是一直弹窗提示要注册,这个问题是因为上个月微信改了授权规则了,这里的授权规则需要你自己修改一下。官方具体公告请参考这里

  • [2020-10-24] 更新说明:

有反馈说,按照配置无法正常使用管理员,请注意看配置过程第6步; 主要问题是由于集合AdminStator中管理员信息与集合UserList中注册用户的信息不一致造成的请注意看配置过程第6步

  • [2020-06-27] 更新说明:
  1. 根据反馈,解决了首页公告无法更新的问题。
  2. 根据反馈,以下问题可以进行优化:
  • 登录的逻辑可能无法过审核,后面会进行更新。

  • 详情页面的跳转问题

  • [2020-06-10] 更新说明:

有反馈说,按照配置无法正常使用,删除了原来我的云环境ID,更改成了自动识别云环境ID。使用时只需修改app.js里初始化云环境ID的代码即可,后面的配置过程有说明。

项目简介

本项目是2019年12月份左右的产物,花了大概一个月时间做完之后一直遗忘在了硬盘里,这几天才想起来,故顺便整理一下开源了。

项目虽然没有做的很完整,但是整体的数据架构还算是可以的,可以很容易进行功能完善和添加新功能。里面还有很多可以完善的地方,比如 公司资质 页面可以做的更加精细一些,房子详情页 可以添加地图之类的内容等。

原本是别人找我帮一家中介小店些的一个租房小程序,对方没给设计图、也没有提具体需求,只是让我凭感觉来做。由于没有写过这方面的小程序,也没有很好的规划页面布局,所以UI方面稍微差了点。在项目快完成的时候,介绍的那个人跑路了,所以就没有后续了,想着与其直接删除还不如开源分享给大家一起讨论学习。

这个项目的经历也让我明白了一些事情,就是如果别人委托自己帮做项目的时候,不管项目的规模如何,在接受委托前一定要考虑清楚。特别是没有付定金的这种委托,一定要谨慎,不要期望那种说你先做着后面再谈钱,哪怕是跟你认识的人也是一样要谨慎。还有就是不提明确需求的也不要轻易接受,这种人很容易中途变卦的。如果不想清楚的话,机会浪费时间又浪费精力。

本程序已经经过测试,拿来按照说明简单配置就可以直接使用,界面可以自己进行修改。本人热爱小程序,目前上线并维护的有两个,后面看情况再找时间进行开源。 由于本人的能力有限,还有很多地方没法完善,望指正!

目录结构

|--|-- cloudfunctions 云函数
|--|--|--|-- AdminManage
|--|--|--|-- Entrust
|--|--|--|-- HouseInfo
|--|--|--|-- InitInfo
|--|--|--|-- Manager
|--|--|--|-- PublishEntrust
|--|-- miniprogram 小程序页面
|--|--|--Adminpackage 管理员后台(分包)
|--|--|--|--略
|--|--|--CalculatorPackage 房贷计算器(分包)
|--|--|--|--略
|--|--|--Companypackage 主要页面(分包)
|--|--|--|--略
|--|--|--dist 一些用到的组件,只用到了一小部分
|--|--|--pages 主包(主要是底部NaviBar页面)
|--|--|--|--略
|--|--其他页面略
|--README.md

功能说明

  1. 新房、租房、二手房
  2. 房贷计算器
  3. 公司介绍
  4. 公告
  5. 管理员

1-4 点都没啥好说的,下面主要介绍一下 管理员后台的实现

管理员后台集成在了小程序端,入口隐藏在 个人中心 页面 连续点击5次 头像名字那里,就可以进入到管理员后台,进入后台的时候会在 云函数AdminManage进行管理员鉴权:

  • 如果不是管理员,会跳转到扫码加入管理员;
  • 如果是管理员,那就跳转到管理员后台;

由于管理员数据库设置了权限为 所有用户不可读写 ,因此鉴权是只能在云函数里面进行,这是第一道防线;后面在管理员后台的操作都是在云函数完成的,即使是小程序被反编译了,也不可能突破权限,安全性上还是经得住考验的。

配置过程

  1. 直接下载源码,源码地址:https://github.com/lx164/house 或者clone项目 git clone https://github.com/lx164/house.git

  2. 打开微信开发者工具,导入项目(导入的时候请选择 APP 文件夹);

  3. 填写APPID;

  4. 开通云开发环境(请参考官方文档);

  5. 新建以下数据库集合,一行为一个集合名(不要写错):

    AdminStator
    Collections
    CompanyInfo
    ContactList
    Entrust
    NewHouse
    Recommend
    RentingHouse
    SecondHouse
    TempCllection
    UserList

「注意」: 集合AdminStator权限设置为所有用户不可读写,其余的集合权限修改为:所有用户可读,仅创建者可读写

  1. 设置第一个初始的管理员信息,在 AdminStator 新建一条记录,把以下的字段内容添加到该记录中,下面()里的内容根据你的实际情况填写:
    "level":0,
    "avatarUrl":"(头像)",
    "updatetime":"(2020/06/01 06:01:18)",
    "_openid":"(管理员的openid)",
    "name":"(管理员名字)",
    "phone":"(管理员手机)"

注意 这一点必须要格外注意:

  1. level字段数据类型为Number,值主要有:0 (代表超级管理员,具有添加管理员的权限)、1 (代表普通管理员,没有添加管理员权限);

  2. _openidname 必须要跟 集合UserList 里管理员注册的信息一致;

  3. 后面如果还要添加其他管理员的话,按以下的步骤添加即可:“个人中心”——>“连续点击5次头像”——>"扫码(管理员进入后台生成的二维码)";

  4. 设置公告初始数据,在 CompanyInfo 新建一条记录,把以下的字段内容添加到该记录中,下面()里的内容根据你的实际情况填写:

    "_id":"cb37e58c-f634-49d3-93b9-5aebec00a23a(可以不修改)",
    "introduce":"(平台/公司介绍,根据实际填写)",
    "updatetime":"2020/06/27 14:22:31",
    "editer":"(编辑人,后面会自动修改的)",
    "phone":"(编辑人手机号码,后面会自动修改的)",
    "notice":"(首页滚动公告内容) "
  1. 上传 cloudfunctions 文件夹下所有的云函数,上传时选择 上传并部署:云端安装依赖

  2. 修改 app.js 大约第8行的代码,如下:

    wx.cloud.init({
        env: '(填写你自己云环境的ID)',
        traceUser: true,
    })
  1. 编译运行。

界面预览

首页业主委托我的房子列表房子详情房子详情-联系中介 发布委托设置首页推荐房贷计算器设置员工信息添加管理员添加管理员二维码新管理员扫描二维码房源管理发布委托的状态

结语

欢迎一起探讨,如果你觉得还可以,您可以给我点一个start,或者赞赏我 zanshang

Strat趋势

Stargazers over time

GNU LESSER GENERAL PUBLIC LICENSE Version 3, 29 June 2007 Copyright (C) 2007 Free Software Foundation, Inc. <https://fsf.org/> Everyone is permitted to copy and distribute verbatim copies of this license document, but changing it is not allowed. This version of the GNU Lesser General Public License incorporates the terms and conditions of version 3 of the GNU General Public License, supplemented by the additional permissions listed below. 0. Additional Definitions. As used herein, "this License" refers to version 3 of the GNU Lesser General Public License, and the "GNU GPL" refers to version 3 of the GNU General Public License. "The Library" refers to a covered work governed by this License, other than an Application or a Combined Work as defined below. An "Application" is any work that makes use of an interface provided by the Library, but which is not otherwise based on the Library. Defining a subclass of a class defined by the Library is deemed a mode of using an interface provided by the Library. A "Combined Work" is a work produced by combining or linking an Application with the Library. The particular version of the Library with which the Combined Work was made is also called the "Linked Version". The "Minimal Corresponding Source" for a Combined Work means the Corresponding Source for the Combined Work, excluding any source code for portions of the Combined Work that, considered in isolation, are based on the Application, and not on the Linked Version. The "Corresponding Application Code" for a Combined Work means the object code and/or source code for the Application, including any data and utility programs needed for reproducing the Combined Work from the Application, but excluding the System Libraries of the Combined Work. 1. Exception to Section 3 of the GNU GPL. You may convey a covered work under sections 3 and 4 of this License without being bound by section 3 of the GNU GPL. 2. Conveying Modified Versions. If you modify a copy of the Library, and, in your modifications, a facility refers to a function or data to be supplied by an Application that uses the facility (other than as an argument passed when the facility is invoked), then you may convey a copy of the modified version: a) under this License, provided that you make a good faith effort to ensure that, in the event an Application does not supply the function or data, the facility still operates, and performs whatever part of its purpose remains meaningful, or b) under the GNU GPL, with none of the additional permissions of this License applicable to that copy. 3. Object Code Incorporating Material from Library Header Files. The object code form of an Application may incorporate material from a header file that is part of the Library. You may convey such object code under terms of your choice, provided that, if the incorporated material is not limited to numerical parameters, data structure layouts and accessors, or small macros, inline functions and templates (ten or fewer lines in length), you do both of the following: a) Give prominent notice with each copy of the object code that the Library is used in it and that the Library and its use are covered by this License. b) Accompany the object code with a copy of the GNU GPL and this license document. 4. Combined Works. You may convey a Combined Work under terms of your choice that, taken together, effectively do not restrict modification of the portions of the Library contained in the Combined Work and reverse engineering for debugging such modifications, if you also do each of the following: a) Give prominent notice with each copy of the Combined Work that the Library is used in it and that the Library and its use are covered by this License. b) Accompany the Combined Work with a copy of the GNU GPL and this license document. c) For a Combined Work that displays copyright notices during execution, include the copyright notice for the Library among these notices, as well as a reference directing the user to the copies of the GNU GPL and this license document. d) Do one of the following: 0) Convey the Minimal Corresponding Source under the terms of this License, and the Corresponding Application Code in a form suitable for, and under terms that permit, the user to recombine or relink the Application with a modified version of the Linked Version to produce a modified Combined Work, in the manner specified by section 6 of the GNU GPL for conveying Corresponding Source. 1) Use a suitable shared library mechanism for linking with the Library. A suitable mechanism is one that (a) uses at run time a copy of the Library already present on the user's computer system, and (b) will operate properly with a modified version of the Library that is interface-compatible with the Linked Version. e) Provide Installation Information, but only if you would otherwise be required to provide such information under section 6 of the GNU GPL, and only to the extent that such information is necessary to install and execute a modified version of the Combined Work produced by recombining or relinking the Application with a modified version of the Linked Version. (If you use option 4d0, the Installation Information must accompany the Minimal Corresponding Source and Corresponding Application Code. If you use option 4d1, you must provide the Installation Information in the manner specified by section 6 of the GNU GPL for conveying Corresponding Source.) 5. Combined Libraries. You may place library facilities that are a work based on the Library side by side in a single library together with other library facilities that are not Applications and are not covered by this License, and convey such a combined library under terms of your choice, if you do both of the following: a) Accompany the combined library with a copy of the same work based on the Library, uncombined with any other library facilities, conveyed under the terms of this License. b) Give prominent notice with the combined library that part of it is a work based on the Library, and explaining where to find the accompanying uncombined form of the same work. 6. Revised Versions of the GNU Lesser General Public License. The Free Software Foundation may publish revised and/or new versions of the GNU Lesser General Public License from time to time. Such new versions will be similar in spirit to the present version, but may differ in detail to address new problems or concerns. Each version is given a distinguishing version number. If the Library as you received it specifies that a certain numbered version of the GNU Lesser General Public License "or any later version" applies to it, you have the option of following the terms and conditions either of that published version or of any later version published by the Free Software Foundation. If the Library as you received it does not specify a version number of the GNU Lesser General Public License, you may choose any version of the GNU Lesser General Public License ever published by the Free Software Foundation. If the Library as you received it specifies that a proxy can decide whether future versions of the GNU Lesser General Public License shall apply, that proxy's public statement of acceptance of any version is permanent authorization for you to choose that version for the Library.

简介

基于微信小程序云开发的租房平台类微信小程序,用户可以发布新房、二手房、租房等委托,中介机构审核发布、推荐,客户挑好房子后可以直接中介或者房源发布者。小程序带完整的管理员后台,使用云开发独特的身份鉴权方式对管理员身份进行验证。快速完成微信小程序前后端的搭建,后台完全使用微信小程序云开发,不依赖服务器,无需购买服务器即可使用。 展开 收起
JavaScript
LGPL-3.0
取消

发行版

暂无发行版

贡献者

全部

近期动态

加载更多
不能加载更多了
JavaScript
1
https://gitee.com/cx0217/rentHouse.git
git@gitee.com:cx0217/rentHouse.git
cx0217
rentHouse
rentHouse
master

搜索帮助