1 Star 1 Fork 21

qeyser / SayLove-Tcb云开发表白墙微信小程序

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

校园表白墙微信小程序 SayLove -基于微信云开发-快速搭建,开箱即用

image image image image

image image image

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

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

备用联系方式:点击这里

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

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

阿里云优惠活动

其他开源项目

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

  1. 基于微信小程序云开发-租房微信小程序-带管理员后台 https://github.com/lx164/house
  2. https://www.cnblogs.com/LiangSenCheng/p/12543230.html

Bug修复更新日历

  • [2021-05-12] 更新说明:
  1. 课设毕设参考专用版本 】针对 昵称显示 微信用户、 头像只显示灰色头像等的问题进行了修复,需要了解详情以及新代码的话,请加我微信了解(请备注来源、来意点击这里

  2. 情侣脸功能大家不要使用了,现在阿里云的接口已经要收费了(土豪请随意),官方文档看这里

  • [2021-04-13] 更新说明:

1.适配微信的新授权规则,但是以后没有微信昵称和微信头像了;修改详情请参考点这里

2.简化代码结构,删除不需要的文件;

3.优化初始化云环境的代码,现在只需填写自己的 云环境ID即可;

  • [2021-04-06] 更新说明:

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

  • [2020-09-05] 温馨提示:

情侣脸 功能因阿里云的接口改了,建议直接去掉就好了。

  • [2020-05-22] 小bug修复:

1.修复组件的bug; 2.修复首页showModal导致出错的bug;

  • [2020-04-30] 更新:
  1. 修复“情侣脸”云函数bug;
  2. 优化“情侣脸”交互逻辑,当无法识别时中断当前操作;
  3. 修复“发布表白”、“发布话题”时,没添加图片一直显示加载中的问题;
  4. 删除云函数不必要的依赖包;
  • [2020-05-20] 说明更新:

小程序没有做后台,但是需要后台的可以参考这个官方提供的方案,https://mp.weixin.qq.com/s/HZCVnnau3grmKA06E-M-yghttps://mp.weixin.qq.com/s/TFc2fj-gOVwAvs603WZG_A

注意:

  • 情侣脸”云函数 FaceAPI 的wx-server-sdk依赖需要更新才能正常使用,这里的都是旧版本的,上传云函数前请自行使用npm更新。
  • 登录鉴权:(现在这个不适用了,因为微信小程序的规则改了,这个不符合新规,需要自己根据实际情况修改)
  • 后台管理:暂时没有做后台管理界面,直接在云开发后台即可查看管理,您也可以根据自己需要自己写一个简单的管理界面放在小程序端,然后把入口隐藏起来,限制指定用户使用即可。可以参考这个项目的做法: 点这里

[TOC]

程序结构

|--App 小程序代码目录
|--|-- cloudfunctions 云函数
|--|--|--|-- DeleteMessage 
|--|--|--|-- DeleteMyLike
|--|--|--|-- Deletes
|--|--|--|-- FaceAPI 情侣脸(阿里云人脸识别API封装)
|--|--|--|-- FrofessComment
|--|--|--|-- FrofessZan
|--|--|--|-- Message
|--|--|--|-- SaleComment
|--|--|--|-- SaleZan
|--|--|--|-- ViewNumber
|--|--|--|-- login
|--|-- miniprogram 小程序页面
|--|--|--|-- 略
|--README.md
|--Images 截图

说明

《SayLove》表白墙微信小程序,前台基于校园情书微信小程序进行大量的修改,虽然样式看起来都差不多,但是做了大量的修改。特别是后台部分,后台完全使用微信小程序云开发,不依赖服务器。前台代码由于是在原作者的基础上根据实际情况做了修改,所以跟原来作者的看起来很像,但并没有照搬照抄。

为什么我要改写原作者的小程序?因为我尝试过根据原作者的所写的ReadMe进行配置,发现过程过于复杂,而且依赖因素太多,尝试了很多次都无法成功。在自己的好奇心驱使下,就基于原项目进行的改写,后台改写为微信小程序云开发,使其安装配置变得非常简单,拿来就可以直接使用了。

参考源项目的内容如下:

  • 主要是参考了他的点子,并不是完全照搬照抄
  • 界面的大体布局,比如:板块布局、配色没有修改,
  • 除了大布局上以外,基本所有小布局都有更改(具体见下面的)
  • 【注】:我的初衷目的,并不是为了直接拿别人的项目修修改改,然后就说这是我的成果。
  • 我看到原作者的项目是一个偶然的机会,当时有恰好我在学微信小程序的云开发,所以就参考原作者的项目进行了云开发的修改适配,作为学习成果的验证。除了这个以外并没有其他的目的,也因此把我自己的也开源了。
  • 参考的源项目作者地址为:https://github.com/oubingbing/school_wechat
  • 本项目的地址:https://github.com/lx164/SayLove

重构率超过了60%以上,如果不是借鉴了源项目的点子话,基本上可以说是自己重写的了, 大修改部分如下:

  • 后台:自己构造,完全依赖于云开发,无需搭建后台服务器
  • 所有数据的结构:完全是自己构造的(因为后台不一样,所以数据的构造完全不一样)
  • 登录鉴权:自己重新写的(现在这个不可以用了,因为微信小程序的规则改了,这个不符合新规,需要自己修改)
  • 首页新消息通知:自己重新写的(没有直接使用参考的原项目)
  • 各个板块的点赞、评论:重新根据自己的需要重新编写,对其进行了提升(因为后台不一样,所以数据的结构需要重新构造)
  • 各个板块的图片上传:界面以及逻辑代码是自己重新的(参考的源项目使用的是插件,这里改为了原生的),图片保存在云开发的后台
  • 卖舍友板块:瀑布流重写,没有使用原来的瀑布流
  • 发布话题、发布卖舍友部分重写:根据自己的需要进行了重写
  • 情侣脸板块:自己封装阿里云人脸识别的接口,来适配云开发
  • 个人中心板块重写:自己重新构造了消息通知

本程序已经经过测试,拿来按照说明简单配置就可以直接使用,界面可以自己进行修改。本人热爱小程序,目前上线并维护的有两个,后面看情况再找时间进行开源。

由于本人的能力有限,还有很多地方没法完善,望指正!

附:(微信小程序云函数) 阿里云人脸比对API封装 https://www.cnblogs.com/LiangSenCheng/p/10922979.html

配置过程

别说什么按照配置后不能使用, 请认真看好每一步, 如果连最基本的操作都不会, 麻烦先去看看官方文档学习一下!

  1. 直接下载源码,源码地址:https://github.com/lx164/SayLove/tree/master

或者clone项目 git clone https://github.com/lx164/SayLove/tree/master/App

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

  2. 填写APPID;

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

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

    comment
    message
    mylike
    parise
    posts
    sale_friends
    topics

然后把以上的集合权限修改为:所有用户可读,仅创建者可读写

  1. 填写小程序相关配置信息;

配置文件在 App/miniprogram/config.js ,填写以下的配置信息:

    // 云开发环境ID(必填,填错用不了)
    const CLOUNDID = ''
    // 消息刷新时间,单位:毫秒
    // 默认10秒刷新一次,即10000毫秒
    // 根据实际需要进行调节
    const FLASHTIME = 10000000

如下图:

7.填写阿里云面部识别相关配置信息【选填】:

注意:如果不需要使用 情侣脸 功能的话,请跳过该步骤

  • 7.1 阿里云的AccessKeyAccessKeySecret的获取,以及人脸识别服务的开通请参考官方文档
    // 请填写完整
    // 阿里云的AccessKey
    var ak_id = '';
    // 阿里云的AccessKeySecret 
    var ak_secret = '';

AccessKeyAccessKeySecret的填写位置如图:

  • 7.2 检查云函数 FaceAPI 所需要的依赖是否已安装;
    // 1. 如果已经安装请自行使用npm更新;
    // 2. 如果没有安装,则使用下面命令安装:
    npm install crypto
    npm install request
    npm install url
    npm install wx-server-sdk
  • 7.3 上传云函数 APP/cloudfunctions/FaceAPI,上传时选择 上传并部署:所有文件
  1. 上传 APP/cloudfunctions 文件夹下(除了APP/cloudfunctions/FaceAPI以外)所有的云函数,上传时选择 上传并部署:云端安装依赖

  2. 编译运行。

结语

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

award

程序效果图

Start趋势

Stargazers over time

参考文档

Apache License Version 2.0, January 2004 http://www.apache.org/licenses/ TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION 1. Definitions. "License" shall mean the terms and conditions for use, reproduction, and distribution as defined by Sections 1 through 9 of this document. "Licensor" shall mean the copyright owner or entity authorized by the copyright owner that is granting the License. "Legal Entity" shall mean the union of the acting entity and all other entities that control, are controlled by, or are under common control with that entity. For the purposes of this definition, "control" means (i) the power, direct or indirect, to cause the direction or management of such entity, whether by contract or otherwise, or (ii) ownership of fifty percent (50%) or more of the outstanding shares, or (iii) beneficial ownership of such entity. "You" (or "Your") shall mean an individual or Legal Entity exercising permissions granted by this License. "Source" form shall mean the preferred form for making modifications, including but not limited to software source code, documentation source, and configuration files. "Object" form shall mean any form resulting from mechanical transformation or translation of a Source form, including but not limited to compiled object code, generated documentation, and conversions to other media types. "Work" shall mean the work of authorship, whether in Source or Object form, made available under the License, as indicated by a copyright notice that is included in or attached to the work (an example is provided in the Appendix below). "Derivative Works" shall mean any work, whether in Source or Object form, that is based on (or derived from) the Work and for which the editorial revisions, annotations, elaborations, or other modifications represent, as a whole, an original work of authorship. For the purposes of this License, Derivative Works shall not include works that remain separable from, or merely link (or bind by name) to the interfaces of, the Work and Derivative Works thereof. "Contribution" shall mean any work of authorship, including the original version of the Work and any modifications or additions to that Work or Derivative Works thereof, that is intentionally submitted to Licensor for inclusion in the Work by the copyright owner or by an individual or Legal Entity authorized to submit on behalf of the copyright owner. For the purposes of this definition, "submitted" means any form of electronic, verbal, or written communication sent to the Licensor or its representatives, including but not limited to communication on electronic mailing lists, source code control systems, and issue tracking systems that are managed by, or on behalf of, the Licensor for the purpose of discussing and improving the Work, but excluding communication that is conspicuously marked or otherwise designated in writing by the copyright owner as "Not a Contribution." "Contributor" shall mean Licensor and any individual or Legal Entity on behalf of whom a Contribution has been received by Licensor and subsequently incorporated within the Work. 2. Grant of Copyright License. Subject to the terms and conditions of this License, each Contributor hereby grants to You a perpetual, worldwide, non-exclusive, no-charge, royalty-free, irrevocable copyright license to reproduce, prepare Derivative Works of, publicly display, publicly perform, sublicense, and distribute the Work and such Derivative Works in Source or Object form. 3. Grant of Patent License. Subject to the terms and conditions of this License, each Contributor hereby grants to You a perpetual, worldwide, non-exclusive, no-charge, royalty-free, irrevocable (except as stated in this section) patent license to make, have made, use, offer to sell, sell, import, and otherwise transfer the Work, where such license applies only to those patent claims licensable by such Contributor that are necessarily infringed by their Contribution(s) alone or by combination of their Contribution(s) with the Work to which such Contribution(s) was submitted. If You institute patent litigation against any entity (including a cross-claim or counterclaim in a lawsuit) alleging that the Work or a Contribution incorporated within the Work constitutes direct or contributory patent infringement, then any patent licenses granted to You under this License for that Work shall terminate as of the date such litigation is filed. 4. Redistribution. You may reproduce and distribute copies of the Work or Derivative Works thereof in any medium, with or without modifications, and in Source or Object form, provided that You meet the following conditions: (a) You must give any other recipients of the Work or Derivative Works a copy of this License; and (b) You must cause any modified files to carry prominent notices stating that You changed the files; and (c) You must retain, in the Source form of any Derivative Works that You distribute, all copyright, patent, trademark, and attribution notices from the Source form of the Work, excluding those notices that do not pertain to any part of the Derivative Works; and (d) If the Work includes a "NOTICE" text file as part of its distribution, then any Derivative Works that You distribute must include a readable copy of the attribution notices contained within such NOTICE file, excluding those notices that do not pertain to any part of the Derivative Works, in at least one of the following places: within a NOTICE text file distributed as part of the Derivative Works; within the Source form or documentation, if provided along with the Derivative Works; or, within a display generated by the Derivative Works, if and wherever such third-party notices normally appear. The contents of the NOTICE file are for informational purposes only and do not modify the License. You may add Your own attribution notices within Derivative Works that You distribute, alongside or as an addendum to the NOTICE text from the Work, provided that such additional attribution notices cannot be construed as modifying the License. You may add Your own copyright statement to Your modifications and may provide additional or different license terms and conditions for use, reproduction, or distribution of Your modifications, or for any such Derivative Works as a whole, provided Your use, reproduction, and distribution of the Work otherwise complies with the conditions stated in this License. 5. Submission of Contributions. Unless You explicitly state otherwise, any Contribution intentionally submitted for inclusion in the Work by You to the Licensor shall be under the terms and conditions of this License, without any additional terms or conditions. Notwithstanding the above, nothing herein shall supersede or modify the terms of any separate license agreement you may have executed with Licensor regarding such Contributions. 6. Trademarks. This License does not grant permission to use the trade names, trademarks, service marks, or product names of the Licensor, except as required for reasonable and customary use in describing the origin of the Work and reproducing the content of the NOTICE file. 7. Disclaimer of Warranty. Unless required by applicable law or agreed to in writing, Licensor provides the Work (and each Contributor provides its Contributions) on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied, including, without limitation, any warranties or conditions of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A PARTICULAR PURPOSE. You are solely responsible for determining the appropriateness of using or redistributing the Work and assume any risks associated with Your exercise of permissions under this License. 8. Limitation of Liability. In no event and under no legal theory, whether in tort (including negligence), contract, or otherwise, unless required by applicable law (such as deliberate and grossly negligent acts) or agreed to in writing, shall any Contributor be liable to You for damages, including any direct, indirect, special, incidental, or consequential damages of any character arising as a result of this License or out of the use or inability to use the Work (including but not limited to damages for loss of goodwill, work stoppage, computer failure or malfunction, or any and all other commercial damages or losses), even if such Contributor has been advised of the possibility of such damages. 9. Accepting Warranty or Additional Liability. While redistributing the Work or Derivative Works thereof, You may choose to offer, and charge a fee for, acceptance of support, warranty, indemnity, or other liability obligations and/or rights consistent with this License. However, in accepting such obligations, You may act only on Your own behalf and on Your sole responsibility, not on behalf of any other Contributor, and only if You agree to indemnify, defend, and hold each Contributor harmless for any liability incurred by, or claims asserted against, such Contributor by reason of your accepting any such warranty or additional liability. END OF TERMS AND CONDITIONS APPENDIX: How to apply the Apache License to your work. To apply the Apache License to your work, attach the following boilerplate notice, with the fields enclosed by brackets "[]" replaced with your own identifying information. (Don't include the brackets!) The text should be enclosed in the appropriate comment syntax for the file format. We also recommend that a file or class name and description of purpose be included on the same "printed page" as the copyright notice for easier identification within third-party archives. Copyright [yyyy] [name of copyright owner] Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.

简介

基于微信小程序云开发的SayLove表白墙V1.0微信小程序,快速完成微信小程序前后端的搭建,后台完全使用微信小程序云开发,不依赖服务器,无需购买服务器即可使用。 展开 收起
JavaScript
Apache-2.0
取消

发行版

暂无发行版

贡献者

全部

近期动态

加载更多
不能加载更多了
JavaScript
1
https://gitee.com/qeyser/SayLove.git
git@gitee.com:qeyser/SayLove.git
qeyser
SayLove
SayLove-Tcb云开发表白墙微信小程序
master

搜索帮助