WeChat Mini Program Practical Program Simple News Production Method

高洛峰
Release: 2018-05-21 11:29:10
Original
7455 people have browsed it

This article mainly talks about the relevant information about the simple news production method of WeChat Mini Program Practical Program. Friends in need can refer to the

WeChat Mini Program Practical Project:

Simple News production

Let’s take a look at the effect first:

WeChat Mini Program Practical Program Simple News Production Method

The implementation idea data are all local data, Picture是thisMAP片, because I am a hard-working individual developer, I cannot authenticate; the four phenomena of toolbar: news, jokes, today in history and homepage, the centralized homepage uses the default page, add your own Some contents; Data binding, list rendering, conditional rendering and event use; use of some basic View and text, use of some API;


Code structure

WeChat Mini Program Practical Program Simple News Production Method

##DirectoryPurposeimagesStoring local picturespagesStoring pages, today in history, index homepage , joke jokes, utilsapp.jsMini Program Logicapp.Mini Program Public Settingsapp.Mini program public style sheet
news news
toolspackage
json
wxss
Code content, mainly look at the configuration

app.json configuration item list

{
 "pages": [
  "pages/news/news",
  "pages/joke/joke",
  "pages/history/history",
  "pages/index/index"
 ],
 "window": {
  "navigationBarBackgroundColor": "#f85959",
  "navigationBarTextStyle": "white",
  "navigationBarTitleText": "微 看",
  "backgroundColor": "#FFFFFF",
  "backgroundTextStyle": "dark",
  "enablePullDownRefresh": true
 },
 "tabBar": {
  "color": "#626567",
  "selectedColor": "#f85959",
  "backgroundColor": "#FBFBFB",
  "borderStyle": "white",
  "position": "bottom",
  "list": [
   {
    "pagePath": "pages/news/news",
    "text": "新闻",
    "iconPath": "images/discovery.png",
    "selectedIconPath": "images/discovery_focus.png"
   },
   {
    "pagePath": "pages/joke/joke",
    "text": "笑话",
    "iconPath": "images/ring.png",
    "selectedIconPath": "images/ring_focus.png"
   },
   {
    "pagePath": "pages/history/history",
    "text": "历史",
    "iconPath": "images/chat.png",
    "selectedIconPath": "images/chat_focus.png"
   },
   {
    "pagePath": "pages/index/index",
    "text": "主页",
    "iconPath": "images/index.png",
    "selectedIconPath": "images/index_focus.png"
   }
  ]
 },
 "networkTimeout": {
  "request": 10000,
  "downloadFile": 10000
 },
 "debug": true
}
Copy after login

TypeRequiredDescriptionpagesYesSet page pathwindowNo Set the window performance of the default pagetabBarObjectNoSet the bottom tab performancenetworkTimeoutObjectNoSet network timeoutdebug BooleanNoSet whether to enable debug mode##For specific configuration and usage, please refer to the official website:
Attribute
String Array
Object


https://mp.weixin.qq.com/debug/wxadoc/dev/framework/config.html?t=201715

Thanks for reading, I hope it can help everyone, thank you Thank you for your support of this site!

The above is the detailed content of WeChat Mini Program Practical Program Simple News Production Method. For more information, please follow other related articles on the PHP Chinese website!

Related labels:
source:php.cn
Statement of this Website
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
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template
About us Disclaimer Sitemap
php.cn:Public welfare online PHP training,Help PHP learners grow quickly!