search
Homephp教程php手册模仿《今日头条》 mcm实例源码 项目全 分享

模仿《今日头条》 mcm实例源码 项目全 分享
在apicloud论坛看到一篇不错的源码,分享给大家

这个应用是我工作空闲的时间做的,第一次自己前端+后台的全部实现、特别是数据库各种数据间的关联,虽然之前有简单接触过一些,但对于我这个前端菜鸟的来说,这次做表的之间的关联还是废了我不少脑细胞呢, 下边是我自个觉得自己自我突破的小小难点。 你看了以后觉着哪里有不对的欢迎你直接来修改。 ( https://github.com/iWenli/topLine )

1,所有类似的界面公用一个html模版。( 首页group所有页面公用article-list.html、部分页面头部以及底部header.html等…)
2,整个应用内各个页面只要首次网络加载过的数据二次都可以离线访问。
3,所有数据都使用的平台mcm。
4,用户与收藏文章间的关联, 用户与频道间的关联等…。
5,在api.js中新增自己项目的公共方法。

部署到自己的应用中,首先你必须.

1,将modelClass导入到你的Database中.
2,将fs、weibo模块添加到你的应用中.
3,将widget包文件->的config文件中的id配置为你自己的应用ID.
4,将widget包文件->的config文件中的weibo配置为你自己应用的对应key等信息.
5,将api.js中的$api.ajax中appId、key换成你自己的应用对应值.

导入MCM class表的话参考这个就行:(http://community.apicloud.com/bbs/forum.php?mod=viewthread&tid=291)

附:
模仿《今日头条》 mcm实例源码 项目全 分享

github下载地址:https://github.com/iWenli/topLine.git
topLine/
├── classJson/
│ ├── article.json 文章数据
│ ├── channel.json 频道数据
│ ├── comment.json 评论数据
│ ├── file.json 图片数据
│ ├── interest.json 兴趣爱好数据
│ └── modelClass.json class表结构
└── widget 项目源码包

原文链接: http://community.apicloud.com/bbs/forum.php?mod=viewthread&tid=12225

附件 topLine.rar ( 1.01 MB 下载:73 次 )

AD:真正免费,域名+虚机+企业邮箱=0元

Statement
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn

Hot AI Tools

Undresser.AI Undress

Undresser.AI Undress

AI-powered app for creating realistic nude photos

AI Clothes Remover

AI Clothes Remover

Online AI tool for removing clothes from photos.

Undress AI Tool

Undress AI Tool

Undress images for free

Clothoff.io

Clothoff.io

AI clothes remover

Video Face Swap

Video Face Swap

Swap faces in any video effortlessly with our completely free AI face swap tool!

Hot Article

Hot Tools

Dreamweaver Mac version

Dreamweaver Mac version

Visual web development tools

SublimeText3 Mac version

SublimeText3 Mac version

God-level code editing software (SublimeText3)

EditPlus Chinese cracked version

EditPlus Chinese cracked version

Small size, syntax highlighting, does not support code prompt function

MinGW - Minimalist GNU for Windows

MinGW - Minimalist GNU for Windows

This project is in the process of being migrated to osdn.net/projects/mingw, you can continue to follow us there. MinGW: A native Windows port of the GNU Compiler Collection (GCC), freely distributable import libraries and header files for building native Windows applications; includes extensions to the MSVC runtime to support C99 functionality. All MinGW software can run on 64-bit Windows platforms.

SecLists

SecLists

SecLists is the ultimate security tester's companion. It is a collection of various types of lists that are frequently used during security assessments, all in one place. SecLists helps make security testing more efficient and productive by conveniently providing all the lists a security tester might need. List types include usernames, passwords, URLs, fuzzing payloads, sensitive data patterns, web shells, and more. The tester can simply pull this repository onto a new test machine and he will have access to every type of list he needs.