This article mainly introduces the information about the development of simple examples (readers) of small programs. For more information about the development of simple examples of small program readers, see the following article, for more information, see
Today, I chatted with my friends about the mini-app and read the book. then we got a demo of the mini-book, and now I will share it with you.
I. first come:
First, let's talk about the tabBar below. The project uses data configuration in json format. I have to say that this is a trend now ,. net core configuration is also in this way (exposure I am. net camp ).
Many students have found that many colors do not work. Yes, valid colors are restricted. for details, refer to the official document. A few tabbars are required, so you can write a few in the list. There are three in this article, so you have read three. The above iconPath is the tabBar icon, which is also limited in size, 40 KB. Then, pagePath is the page link corresponding to the tabBar. Text is the restricted content.
"TabBar": {"color": "# dddddddd", "selectedColor": "# d92121", "borderStyle": "white", "backgroundColor": "# fff ", "list": [{"pagePath": "pages/index", "iconPath": "images/main.png", "selectedIconPath": "images/main-s.png", "text ": "homepage" },{ "pagePath": "pages/layout/hot", "iconPath": "images/hot.png", "selectedIconPath": "images/hot-s.png ", "text": "Most Popular" },{ "pagePath": "pages/layout/new", "iconPath": "images/new.png", "selectedIconPath ": "images/new-s.png", "text": "latest"}]},
Open the project code directory as follows:
Code:
// App. jsApp ({getBanner: function () {var bannerUrl = [".. /images/banner.jpg "]; return bannerUrl;}, getOneBook: function (id) {var abook; var books = [{id:" 1 ", bookUrl :".. /images/img1.jpg ", bookName:" History of Western Philosophy ", bookInfor:" About Philosophy "}, {id:" 2 ", bookUrl :".. /images/tmd.jpg ", bookName:" tamude ", bookInfor:" about faith "}, {id:" 3 ", bookUrl :".. /images/holy.jpg ", bookName:" Bible ", bookInfor:" about faith "}, {id:" 4 ", bookUrl :".. /images/yuz.jpg ", bookName:" universe in the Shell ", bookInfor:" About Science "},{ id:" 5 ", bookUrl :".. /images/dream.jpg ", bookName:" Ideal country ", bookInfor:" About Philosophy "}, {id:" 6 ", bookUrl :".. /images/out.jpg ", bookName:" out of control ", bookInfor:" About Economics "}]; for (I = 0; I
Then the about page
The above is the details of the simple instance development of the mini-app reader. For more information, see other related articles in the first PHP community!