Provides various official and user-released code examples. For code reference, you are welcome to share and learn to imitate the source code project of mcm instance in toutiao.com.
I saw a good source code on the apicloud forum and shared it with you.
This application was made when I was idle. For the first time, I realized all the front-end and back-end implementations, especially the association between various data in the database. Although I had some simple contact before, however, for my front-end cainiao, the association between tables still wastes many of my brain cells. Below is a small difficulty that I feel self-breakthrough. After reading this, you may feel that something is wrong. You are welcome to modify it directly. Https://github.com/iWenli/topLine)
1. All similar interfaces share an html template. (Article-list.html?### header.html, etc ...)
2. All pages in the application can be accessed offline as long as the data loaded on the network for the first time.
3. All data is on the mcm platform.
4. association between users and favorite articles, and between users and channels ....
5. Add public methods for your project in api. js.
To deploy your application, you must first.
1. Import modelClass to your Database.
2. Add the fs and weibo modules to your application.
3. Configure the id in the config file of the widget package File> as your application ID.
4. Configure weibo in the config file of the widget package File> as the corresponding key of your application.
5. Replace $ api. ajax in api. js with the value of appId and key for your own application.
To import the MCM class table, refer to this on the line :( http://community.apicloud.com/bbs/forum.php? Mod = viewthreads & tid = 291)
Appendix:
Github: https://github.com/iWenli/topLine.git
TopLine/
├ ── ClassJson/
│ ├ ── Article. json document data
│ ── Channel. json channel Data
│ ── Comment. json comment data
│ ── File. json image data
│ ├ ── Interest. json interests data
│ ── ModelClass. json class Table Structure
└ ── Widget project source code package
Http://community.apicloud.com/bbs/forum.php? Mod = viewthread & tid = 12225.
TopLine.rar (1.01 MB download: 73 times)
AD: truly free, domain name + VM + enterprise mailbox = 0 RMB