53

莲米粒:一个前后端都有的、开源的小程序信息流(类推特)应用

 6 years ago
source link: https://github.com/easychen/lianmilite?amp%3Butm_medium=referral
Go to the source link to view the article. You can view the picture content, updated content and better typesetting reading experience. If the link is broken, please click the button below to view the snapshot at that time.
neoserver,ios ssh client

莲米粒 :balloon: LianmiLite

莲米粒是一个基于PHP+MySQL+微信小程序技术栈的、拥有用户登入、发布、修改、删除和转发信息、以及私信聊天模块的信息流应用。

eYjyeaE.gif

其目的有两个,首先是作为二次开发的基础项目。绝大部分应用、即使是工具类的,一旦用户变多以后,就会有添加私信和信息流系统的需求。你可以在这个系统上加上业务模块,很快的修改出一个可用的、带社会化属性的产品。

其次,用于教学和演示。目前市面上的绝大部分小程序教程,都只是找一个现成的API,主要讲解如何构建界面。莲米粒是一个同时实现了前后端的应用,不但包括了后端实现,更处理了微信用户和系统自有用户整合、自动登入等让新人棘手的流程,是一个不错的参考。希望能帮到大家。

安装说明

首先配置数据库

api/docs/lianmilite.sql
api/config/database.php

启动API

API 需要rewrite。

本地测试时:

cd api
config/hide.php
<?php
$GLOBALS['lpconfig']['wechat_miniapp_id'] = '小程序appid';
$GLOBALS['lpconfig']['wechat_miniapp_secret'] = '小程序appsecret';

3.启动测试服务器 php -S localhost:8000 route.php 注意要带 route.php 参数,不然不支持 rewrite。

线上部署时

修改 api/sample.htaccess.htaccess 后可用于 Apache 配置。

小程序部分

启动

用微信开发者工具打开 mini 目录,修改 appid 即可。

修改API接口地址

如要修改API地址,打开 mini/app.js 修改最后一行。

机翻英文 | English intro that machine translated

莲米粒 :balloon: LianmiLite

LianmiLite is a timeline application based on the PHP+MySQL+WeChat mini programe stack with user login, publish, modify, delete and retweet feed, and private message chat module.

eYjyeaE.gif

Its purpose is two, first of all as a basic project for secondary development. Most applications, even those of the tool category, will have the need to add private messages and timeline function once the number of users has increased. You can add business modules to this system and quickly modify a product that is available with social attributes.

Second, for teaching and presentation. Most of the small program tutorials on the market today are just looking for a ready-made API that explains how to build an interface. lianmilite is an application that realizes both front and back ends. It not only includes the back-end implementation, but also handles the process of making WeChat users and system users integrated, automatic login and so on. It is a good reference. I hope I can help you.

Installation Notes

First configure the database

api/docs/lianmilite.sql
api/config/database.php

Launch API

The API requires rewrite.

When testing locally:

cd api
config/hide.php
<?php
$GLOBALS['lpconfig']['wechat_miniapp_id'] = 'small appid';
$GLOBALS['lpconfig']['wechat_miniapp_secret'] = 'small appsecret';
  1. Start the test server php -S localhost:8000 route.php Note that you should bring the route.php parameter, otherwise rewrite is not supported.

Online deployment

Modify api/sample.htaccess to .htaccess for Apache configuration.

mini program

start up

Open the mini directory with the WeChat Developer tool and modify appid .

Modify API interface address

To modify the API address, open mini/app.js to modify the last line.


Recommend

  • 49

    2016年 Spring Boot 还没有被广泛使用,在网上查找相关开源软件的时候没有发现几个,到了现在经过2年的发展,很多互联网公司已经将 Spring Boot 搬上了生产,而使用 Spring Boot 的开源软件在 Github/码云 上面已有不少,这

  • 110

    程序员 - @v2410117 - 感觉现在腰啊、脖子啊,到处都有些不舒服,感觉自己这身体怕是以后真的会多病,想现在给自己弄点保险,但是自己又没有这方面的经验,网上搜也五花八门,求各位程序猿以亲身经历来推荐一下,万分感谢!

  • 51

    新&ldquo;计算机&rdquo;比一粒大米还小。图片来源:美国密歇根大学官网科技日报北京6月25日电(记者刘霞)据美国密歇根大学官网近日报道,该校科研人员制造出一种边长仅0.3毫米的计算设备&mdash;&mdash;比一粒大米还小,在微计算方面打败了国际商...

  • 74

    松哥的书里边,其实有涉及到 Vue,但是并没有详细说过,原因很简单,Vue 的资料都是中文的,把 Vue.js 官网的资料从头到尾浏览一遍该懂的基本就懂了,个人感觉这个是最好的 Vue.js 学习资料 ,因此在我的书里边就没有多说。但是最近总结小...

  • 25

    By 超神经 内容提要:来自蒙特利尔、卡内基梅隆大学的团队, 在 ICRA 2020 上发表的论文中所提出的  ∇SLAM ,解决了当下 SLAM 系统普遍所面临的一个开放性问题。 关键词:...

  • 7

    机械手表也能自己组装!零件米粒大小,潮酷好玩,千元可入手-极果 机械手表也能自己组装!零件米粒大小,潮酷好玩,千元可...

  • 10

    在广告投放的时候,一个好的素材可能是什么样子?什...

  • 9

          我08年毕业,大学跟着老师培训班学习的C#,那时(2003-2010)它很是时髦,毕业后也就从事了winform窗体应用程序开发。慢慢的web网站兴起,就转到asp.net开发,再到后来就上了另一艘大船(java),前端app混合开发。近三年从事web站点运维,从linux基础+docker,...

  • 5

    开源一整套记账程序,包括后端,前端和 App 1 条回复  •  2023-06-04 12:45:33 +08:00 xubeiyan

  • 2

    近期,支付宝对违规租赁小程序进行了整治,租赁市场存在各种乱象,一不小心就会踩坑。一起来看看租赁小程序都存在哪些猫腻,支付宝又是如何整治的吧。

About Joyk


Aggregate valuable and interesting links.
Joyk means Joy of geeK