小程序是一种新的开放能力,开发者可以快速地开发一个小程序。小程序可以在微信内被便捷地获取和传播,同时具有出色的使用体验。
网址
简易教程:https://developers.weixin.qq.com/miniprogram/dev/index.html
框架:https://developers.weixin.qq.com/miniprogram/dev/framework/MINA.html
组件:https://developers.weixin.qq.com/miniprogram/dev/component/
API:https://developers.weixin.qq.com/miniprogram/dev/api/
开发工具:https://developers.weixin.qq.com/miniprogram/dev/devtools/devtools.html
社区:https://developers.weixin.qq.com/
weui-wxss:https://github.com/Tencent/weui-wxss
演示小程序:https://github.com/Tencent/weui-wxss
一、安装开发工具和开发工具的使用
https://developers.weixin.qq.com/miniprogram/dev/devtools/devtools.html
https://developers.weixin.qq.com/miniprogram/dev/devtools/debug.html#network-panel
二、开发
1.代码构成
JSON 配置文件(project.config.json app.json page.json)
WXML 模板文件 page.wxml
WXSS 样式文件 app.wxss page.wxss
JS 脚本逻辑文件(app.js page.js)
2.注册程序(app)
https://developers.weixin.qq.com/miniprogram/dev/quickstart/basic/framework.html#%E5%B0%8F%E7%A8%8B%E5%BA%8F%E7%9A%84%E5%90%AF%E5%8A%A8
https://developers.weixin.qq.com/miniprogram/dev/framework/app-service/app.html
3.注册页面(page)
https://developers.weixin.qq.com/miniprogram/dev/quickstart/basic/framework.html#%E7%A8%8B%E5%BA%8F%E4%B8%8E%E9%A1%B5%E9%9D%A2
https://developers.weixin.qq.com/miniprogram/dev/framework/app-service/page.html
4.路由
https://developers.weixin.qq.com/miniprogram/dev/framework/app-service/route.html
5.交互
https://developers.weixin.qq.com/miniprogram/dev/quickstart/basic/file.html#WXML-%E6%A8%A1%E6%9D%BF
6.设计
https://developers.weixin.qq.com/miniprogram/design/index.html?t=201859
https://developers.weixin.qq.com/miniprogram/dev/framework/view/wxss.html
7.登录
8.查询数据
三、小程序能力
1.组件
视图容器
基础内容
表单
导航
媒体
地图
画布
开放能力
2.API
界面
开放接口
网络
媒体
位置
设备
四、与web开发的相同点
1.都是js编写 语法相同
2.WXSS 具有 CSS 大部分的特性
五、与web开发的区别
https://developers.weixin.qq.com/miniprogram/dev/quickstart/basic/file.html#WXML-%E6%A8%A1%E6%9D%BF
1.无法使用jquery,bootstrap等库文件,更无法使用js插件
2.没有window对象和dom对象
3.只能数据绑定,无法直接获取元素
4.没有div span a 等标签,只能使用小程序的组件