
https://github.com/zce/weapp-demo
2:微信小程序移动端商城
https://github.com/liuxuanqiang/wechat-weapp-mall
3:Gank微信小程序
https://github.com/lypeer/wechat-weapp-gank
4:微信小程序高仿QQ应用
https://github.com/xiehui999/SmallAppForQQ
5:微信中的知乎
https://github.com/RebeccaHanjw/weapp-wechat-zhihu
6:实现一个移动端小商城
https://github.com/skyvow/m-mall
7:微信小程序demo
https://github.com/web-Marker/wechat-Development
8: 跑步微信小程序Demo
https://github.com/alanwangmodify/weChatApp-Run
9:简单的v2ex微信小程序
https://github.com/jectychen/wechat-v2ex
10:腾讯云微信小程序
https://github.com/tencentyun/weapp-client-demo
11:微信小程序-微票
https://github.com/wangmingjob/weapp-weipiao
12:微信小程序慧码demo 仿手机淘宝
https://github.com/ChangQing666/wechat-weapp-taobao
13:一个为微信小程序开发准备的基础骨架
https://github.com/zce/weapp-boilerplate
14:巴爷微信商城的简单版本
https://github.com/bayetech/wechat_mall_applet
15:微信小程序 - 电影推荐
https://github.com/yesifeng/wechat-weapp-movie
16:微信小程序-知乎日报
https://github.com/myronliu347/wechat-app-zhihudaily
17:微信小程序: 音乐播放器
https://github.com/eyasliu/wechat-app-music
18:使用微信小程序实现分答这款APP的基础功能
https://github.com/davedavehong/fenda-mock
19:微信小程序开发demo-地图定位
https://github.com/giscafer/wechat-weapp-mapdemo
:20:微信小程序 - 豆瓣电影
https://github.com/hingsir/weapp-douban-film
21:wepy仿微信聊天界面
https://github.com/wepyjs/wepy-wechat-demo
22:仿 「ONE · 一个」 的微信小程序
https://github.com/ahonn/weapp-one
23:微信小程序集成Redux实前旁哪现的Todo list
https://github.com/charleyw/wechat-weapp-redux-todos
24: 基于Zhihu Live数据的微信小程序
https://github.com/dongweiming/weapp-zhihulive
25:微信小程序之小熊の日记
https://github.com/harveyqing/BearDiary
26:仿网易云音启竖乐APP的微信小程序
https://github.com/sqaiyan/netmusic-app
27:微信小程序的Flex布局demo
https://github.com/icindy/wxflex
28:番茄时钟微信小程序版
https://github.com/kraaas/timer
29:Wafer 服务端 Demo
https://github.com/tencentyun/weapp-node-server-demo
30:微信小程序版聊天室
https://github.com/ericzyh/wechat-chat
31:微信小程序版简易计算器,适合入门练手
https://github.com/dunizb/wxapp-sCalc
32:微信小程序示例一笔到底
https://github.com/CFETeam/weapp-demo-session
33:基于面包旅行 API 制作的微信小程序示例
https://github.com/romoo/weapp-demo-breadtrip
34:新闻阅读器
https://github.com/vace/wechatapp-news-reader
35:一个简单的微信小程序购物车DEMO
https://github.com/SeptemberMaples/wechat-weapp-demo
36:微信小程序-公众号热门文章信息流
https://github.com/hijiangtao/weapp-newsapp
37:通过Node.js实现的妹子照片爬虫微信小程序
https://github.com/litt1e-p/weapp-girls
38:从FlexLayout布局开始学习微信小程序
https://github.com/hardog/wechat-app-flexlayout
39:HiApp 微信小程序版
https://github.com/BelinChung/wxapp-hiapp
40:微信小程序的简单尝试
https://github.com/zhengxiaowai/weapp-github
41:集美大学图书馆的便捷工具
https://github.com/ToadWoo/bookbox-wxapp
42:微信小程序版妹纸图
https://github.com/brucevanfdm/WeChatMeiZhi
43:V2ex 微信小程序版
https://github.com/bestony/weapp-V2ex
44:微信小程序仿百思不得姐
https://github.com/SureZhangHW/WXBaiSi
45:微信小程序音乐播放器应用
https://github.com/xingbofeng/wx-audio
46:医药网原生APP的微信小程序DEMO
https://github.com/jiabinxu/yiyaowang-wx
47:微信小程序跟读
https://github.com/gxmzjxk/wxreading
48:微信小程序瀑布流布局模式
https://github.com/icindy/WxMasonry
49:微信小程序HotApp云笔记
https://github.com/hotapp888/hotapp-notepad
50:小程序模仿——网易云音乐
https://github.com/MengZhaoFly/wechatApp-netease_cloudmusic
51:微信小程序商城demo
https://github.com/lin-xin/wxapp-mall
52:微信小程序版的扫雷
https://github.com/jsongo/wx-mime
53:专注管理时间的微信小程序
https://github.com/SeaHub/PigRaising
54:微信小程序版干货集中营
https://github.com/iwgang/GankCamp-WechatAPP
55:英雄联盟(LOL)战绩查询
https://github.com/xiaowenxia/weapp-lolgame
56:微信小程序首字母排序选择表
https://github.com/icindy/wxSortPickerView
57:微信小程序版豆瓣电影
https://github.com/David-Guo/weapp-douban-movie
58:简单的实现了1024的游戏规则
https://github.com/RedLove/WexinApp_1024
59:微信小程序试玩
https://github.com/uniquexiaobai/wechat-app-githubfeed
60:微信小程序逗乐
https://github.com/mkxiansheng/doule
61:一步步开发微信小程序
https://github.com/Gavin-YYC/wxApp
62:一个 meteor 的 React todo list 例子
https://github.com/leijing7/wx-mina-meteor
63:微信小程序健康菜谱
https://github.com/bestTao/caipu_weixin
64: jspapa微信小程序版本
https://github.com/biggerV/jspapa-wx
65:微信小程序版的CNodeJs中文社区
https://github.com/Shaman05/CNodeJs-WXAPP
66:LeanCloud 的微信小程序用户登陆Demo
https://github.com/bestony/weapp-LeanCloud
67: 微笑话微信小程序
https://github.com/zszdevelop/wejoke
68:微信小程序开发的App
https://github.com/chongbenben/liwushuoapp
69:体育新闻微信小程序
https://github.com/havenxie/weapp-sportsnews
70:基于Labrador和mobx构建的小程序开发demo
https://github.com/spacedragon/labrador_mobx_example
第65篇
极客时间《9小时搞定微信小程序开发》第五课:原生API。
小程序API最后一部分,课程中没有详细去讲,因为当时开放的API还没有现在这么多,而且这部分API偏于后台控制,大多是后期逐步新增的。
wx.getUpdateManager 获取 全局唯一 的版本更新管理器,用于管理小程序更新
UpdateManager对象用来管理更新,有强制小程序重启并使用新版本、监听小程序版本更新事件等方法。
一些异步处理的任务,可以放置于 Worker 中运行,待运行结束后,再把结果返回到小程序主线程。Worker 运行于一个单独的全局上下文与线程中,不能直接调用主线程的方法。
Worker 最大并发数量限制为 1 个,创建下一个前需要结束当前 Worker;Worker 与主线程之间的数据传输,双方使用 Worker.postMessage()来发送数据,Worker.onMessage()来接收数据,传输的数据并不是直接共享,而是被复制的。
wx.reportMonitor,自定义业务数据监控上报接口,最多可以创建128个监控事件
监听或取消监听小程序切歼烂换前后台、错误事件
wx.canIUse:判断小程序的API,回调,参数,组件等是否在当前版本可用
绘图相关的API,主要是对CanvasContent对象的使用,实现各种颜色、线条、内容填充的控制
可以用以下几种方式来表示 canvas 中使用的颜色:
RGB 颜色: 如 'rgb(255, 0, 0)'
RGBA 颜色:如 'rgba(255, 0, 0, 0.3)'
16 进制颜色: 如 '#FF0000'
预定义的颜色: 如 'red'
其中预定义颜色有148个: 自定义颜色
调试开关喊和和日志管理器的API,console可以向调试面板打印debug\error\info\log\warn共5类日志,logmanager最多保存5M的日志内容,超过5M后,旧的日志内容会被删除。
获取第三方平台的自定义的数据字段。小程序运营者可以郑改盯一键授权给第三方平台,通过第三方平台完成业务。
第三方平台有单独的说明,参见: 第三方平台
创建 map 上下文 MapContext 对象,MapContext实现以下功能
对小程序框架中的路由控制进行扩充,实现关闭页面后返回或跳转到其他页面的 *** 作。
对小程序转发功能的控制,就是小程序右上角关闭按钮旁边3个小白点里的『转发』。
获取系统信息,主要包括以下信息:
设定或取消定时器,按照指定周期或在定时到期之后执行注册的回调函数
IntersectionObserver 对象,用于推断某些节点是否可以被用户看见、有多大比例可以被用户看见
SelectorQuery,查询节点信息的对象
小程序开发框架提供的API变得越来越多,通过这些微信原生的API,可以快速方便的调用微信的能力,比如文件的控制、图片视频的控制、数据的缓存、微信支付等,从而实现更加复杂多样的业务。
我们发现,小程序里面大部分API都是异步接口,这根它的双线程模型有很大关系。
以下举一个标准的异步接口 showToast 。
在logic层,我们调用了 showToast 方法:
实际上此春陵这接口发到 master 层森渗去处理的:
考虑到我们的接口都是异步回调,在 master 层处理完毕后需要通知回 logic 层:
上面我们看到了一个 msgId,这是各层间传递信息标识的唯一id,而 logic 层还需要处理回调结果森戚,我们完善一下:
在API调用的时候,把自身的回调函数缓存起来,等收到回调的信息时,执行相应的回调,再把缓存删掉。
在一些接口上,也能提供同步的接口,比如: getStorageSync 。
这个比较好理解,因为 localStorage 无论在父级页面或者iframe中都能取到,而且本身也是一个同步方法,所以可以在 master 层和 logic 层都实现一遍。
我们还发现,小程序的 setStorage 比 web 上的 localStorage 似乎可以写入的格式多一些,还支持Date格式类型,方法是通过写入JSON来实现,参照 LocalStorage
上一篇
欢迎分享,转载请注明来源:内存溢出
微信扫一扫
支付宝扫一扫
评论列表(0条)