1.工具下载官网
https://mp.weixin.qq.com/debug/wxadoc/dev/?t=1476434677599
该网站有开发工具下载,及简易教程
第一步,申请开发者账号,进行APPID 的申请。
第二步,打开开发工具,填写信息,进行小程序的创建。(无APPID也可以进行创建,不过功能受限,可以作为测试所用)
第三步,新建项目

红线处的文件为新建项目,系统便默认有的文件。
index是默认的首页
app前缀的则是整个app的一些配置,样式,JS文件
我们主要对pages下面的文件进行操作
第四步,新建属于自己的文件夹(如上图的login)

login文件下面的文件如上图所示
在app之中对页面进行注册

第五步,编写布局文件

第六步,在index之中进行跳转


触发点击事件时,调用页面跳转方法
第七步,login.js文件编写(相当于MVC之中的C)
以下则是样式文件,和

page是页面声明,
data里面是变量
下面则是声明的方法。
以下则是样式文件,和H5之中的css文件类似

第一个自定义页面完成。
网友评论