当前位置:网站首页>从零开发小程序和公众号【第三期】
从零开发小程序和公众号【第三期】
2022-07-01 14:21:00 【sky-coder】
大家好,我们主要的内容从今天开始,感谢大家的关注。本来说这几天持续更新来着,奈何工作太忙,实在没有挤出时间来写文章,在这里和大家说声抱歉!
好了,废话不多说了,直接进入我们今天的主题:小程序的基本配置
注意:再开始前,大家需要先了解一些前端只是,不需要太多,只要会布局、会写css就行,虽然前端框架不需要你做过多调整,但还是需要根据自己的业务情况,在框架基础上做一些微调。如果你有vue基础的话,有助于你更快熟悉小程序!
首先是小程序的基本配置,主要讲解我的项目用到的配置,大家可以关注:倒腾怪 体验小程序的完整功能
全局app.json配置
entryPagePath:
指定小程序的默认启动路径(首页),常见情景是从微信聊天列表页下拉启动、小程序列表启动等。如果不填,将默认为
pages列表的第一项。不支持带页面路径参数。
pages:
用于指定小程序由哪些页面组成,每一项都对应一个页面的 路径(含文件名) 信息。文件名不需要写文件后缀,框架会自动去寻找对应位置的
.json,.js,.wxml,.wxss四个文件进行处理。
window
“navigationBarBackgroundColor”: “#fff”, // 导航栏背景颜色,如
#000000“navigationBarTitleText”: “倒腾怪”, // 小程序的名称
“navigationBarTextStyle”: “black”, // 导航栏标题颜色,仅支持
black/white
tabBar
如果小程序是一个多 tab 应用(客户端窗口的底部或顶部有 tab 栏可以切换页面),可以通过 tabBar 配置项指定 tab 栏的表现,以及 tab 切换时显示的对应页面。
大家根绝情况来写,我没有用到所以这里就不多讲了,大家可以参考链接:https://developers.weixin.qq.com/miniprogram/dev/reference/configuration/app.html#tabBar
usingComponents
全局 自定义组件(下一期会跟大家讲到)
页面配置
navigationBarBackgroundColor 导航栏背景颜色,如
#000000navigationBarTitleText 导航栏标题文字内容
navigationStyle 导航栏样式,仅支持以下值:
default默认样式,custom自定义导航栏,只保留右上角胶囊按钮。visualEffectInBackground 切入系统后台时,隐藏页面内容,保护用户隐私。支持
hidden/none,若对页面单独设置则会覆盖全局的配置,详见 全局配置
以上是我的小程序大概用到的配置,当然有一部分没有用到,但是是一些大家可能会用到的,也列出来给大家。
讲完了小程序的基本配置,接着下一期就是框架的引入和基本布局使用
大家期待下一期吧!
边栏推荐
- Details of appium key knowledge
- Today, with the popularity of micro services, how does service mesh exist?
- 如何看待国企纷纷卸载微软Office改用金山WPS?
- "National defense seven sons" funding soared, with Tsinghua reaching 36.2 billion yuan, ranking second with 10.1 billion yuan. The 2022 budget of national colleges and universities was made public
- 玩转MongoDB—搭建MongoDB集群
- What "hard core innovations" does Intel have in the first half of 2022? Just look at this picture!
- Leetcode (69) -- square root of X
- Research Report on development trend and competitive strategy of global 4-aminodiphenylamine industry
- Oracle-数据库对象的使用
- Force deduction solution summary 241- design priority for operation expression
猜你喜欢

How to view the state-owned enterprises have unloaded Microsoft office and switched to Kingsoft WPS?

Basis of target detection (NMS)

WebSocket(简单体验版)

Tdengine connector goes online Google Data Studio app store

2022年PMP项目管理考试敏捷知识点(6)

Use the right scene, get twice the result with half the effort! Full introduction to the window query function and usage scenarios of tdengine

户外LED显示屏应该考虑哪些问题?

Après avoir été licencié pendant trois mois, l'entrevue s'est effondrée et l'état d'esprit a commencé à s'effondrer.

After being laid off for three months, the interview ran into a wall everywhere, and the mentality has begun to collapse

What "hard core innovations" does Intel have in the first half of 2022? Just look at this picture!
随机推荐
[IOT design. Part I] stm32+ smart cloud aiot+ laboratory security monitoring system
Après avoir été licencié pendant trois mois, l'entrevue s'est effondrée et l'état d'esprit a commencé à s'effondrer.
基于算力驱动、数据与功能协同的分布式动态(协同)渲染/功能运行时
[commercial terminal simulation solution] Shanghai daoning brings you Georgia introduction, trial and tutorial
玩转gRPC—不同编程语言间通信
Error:Kotlin: Module was compiled with an incompatible version of Kotlin. The binary version of its
phpcms实现订单直接支付宝支付功能
Fiori applications are shared through the enhancement of adaptation project
光環效應——誰說頭上有光的就算英雄
Error:Kotlin: Module was compiled with an incompatible version of Kotlin. The binary version of its
2022. Let me take you from getting started to mastering jetpack architecture components - lifecycle
leetcode622. Design cycle queue (C language)
博文推荐 | 深入研究 Pulsar 中的消息分块
如何看待国企纷纷卸载微软Office改用金山WPS?
Research Report on development trend and competitive strategy of global consumer glassware industry
微服务大行其道的今天,Service Mesh是怎样一种存在?
sqlilabs less10
Use of Oracle database objects
Halo effect - who says that those with light on their heads are heroes
MySQL日志