当前位置:网站首页>从零开发小程序和公众号【第三期】
从零开发小程序和公众号【第三期】
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,若对页面单独设置则会覆盖全局的配置,详见 全局配置
以上是我的小程序大概用到的配置,当然有一部分没有用到,但是是一些大家可能会用到的,也列出来给大家。
讲完了小程序的基本配置,接着下一期就是框架的引入和基本布局使用
大家期待下一期吧!
边栏推荐
- Leetcode(69)——x 的平方根
- Summary of leetcode's dynamic programming 5
- 111. Minimum depth of binary tree
- leetcode622. Design cycle queue (C language)
- Research Report on the development trend and competitive strategy of the global facial wrinkle removal and beauty instrument industry
- 2022 PMP project management examination agile knowledge points (6)
- Introduction to distributed transactions (Seata)
- Research Report on the development trend and competitive strategy of the global aviation leasing service industry
- Basic concepts of programming
- 【IoT毕设.上】STM32+机智云AIoT+实验室安全监控系统
猜你喜欢

深度合作 | 涛思数据携手长虹佳华为中国区客户提供 TDengine 强大企业级产品与完善服务保障

"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

How can we protect our passwords?

【IoT毕设.上】STM32+机智云AIoT+实验室安全监控系统

既不是研发顶尖高手,也不是销售大牛,为何偏偏获得 2 万 RMB 的首个涛思文化奖?

How will the surging tide of digitalization overturn the future?

Tdengine connector goes online Google Data Studio app store

SQLAchemy 常用操作

sqlilabs less13

QT community management system
随机推荐
Why did you win the first Taosi culture award of 20000 RMB if you are neither a top R & D expert nor a sales Daniel?
How will the surging tide of digitalization overturn the future?
SWT / anr problem - how to open binder trace (bindertraces) when sending anr / SWT
Journal MySQL
Six years of technology iteration, challenges and exploration of Alibaba's globalization and compliance
【牛客网刷题系列 之 Verilog快速入门】~ 使用函数实现数据大小端转换
2022. Let me take you from getting started to mastering jetpack architecture components - lifecycle
C language ordering management system
自定义注解实现验证信息的功能
Today, with the popularity of micro services, how does service mesh exist?
Texstudio tutorial
Use the npoi package of net core 6 C to read excel Pictures in xlsx cells and stored to the specified server
建立自己的网站(21)
用栈实现队列、用队列实现栈(C语言_leetcode_232+225)
Research Report on the development trend and competitive strategy of the global chemical glassware industry
Research Report on development trend and competitive strategy of global vibration polishing machine industry
当主程架构游戏的时候,防止到处调用减少耦合性,怎么开放接口给其他人调用呢?
[flask] flask starts and implements a minimal application based on flask
MySQL log
【IoT毕设.下】STM32+机智云AIoT+实验室安全监控系统