Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

小程序开发指南(二) #7

Open
gaowei1012 opened this issue Jul 23, 2017 · 0 comments
Open

小程序开发指南(二) #7

gaowei1012 opened this issue Jul 23, 2017 · 0 comments

Comments

@gaowei1012
Copy link
Owner

gaowei1012 commented Jul 23, 2017

上一篇我们把基本配置以及项目框架,下面我们进入实战:

一. 小程序框架
1.1 主体部分主要有3个文件构成
1). app.js 小程序逻辑层
2).app.json 配置, (导航,窗口,页面http请求跳转)
3).app.wxss 公共样式配置
主要配置完成之后,就是对应的业务开发,也就是开发者最长接触到的部分,小程序开发遵循MVC(model view controller)模型,视图,控制器;
1.2 页面由4个文件构成
1). js页面逻辑, 相当于控制层(C),也包括数据层(M)
2).wxml 页面结构区, 视图(V)
3).vxss 页面样式表,定义页面样式
4).json 页面配置区,主要配置一些展示数据
app.json 配置(pages 页面载入, window窗体颜色, tarBar窗体下导航栏,networkTimeout 配置各种网络请求超时)
具体详见开发者手册!(https://mp.weixin.qq.com/debug/wxadoc/dev/api)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant