摘要:
1. 获取系统信息 wx.getSystemInfo(OBJECT) wx.getSystemInfoSync() 同步获取系统信息 回调常用参数 model(手机型号) pixelRatio, screenWidth , screenHeight, windowWidth ,widnowHeigh 阅读全文
摘要:
事件分类 1. 冒泡事件: 当一个组件上的事件被触发后,该事件会向父节点传递。 2. 非冒泡事件: 当一个组件上的事件被触发后,该事件不会向父节点传递。 常见的冒泡事件 ① touchstart 手指触摸 ② tap ③ longtap 长按事件 事件绑定 关键字 bind catch 以 key 阅读全文
摘要:
exports 关键字 .wxs 通过该属性,可以对外共享本模块的私有变量与函数 使用步骤 1. 在 .wxs后缀文件 exports定义参数 var foo = "'hello world' from comm.wxs"; var bar = function(d) { return d; } m 阅读全文
摘要:
1. 文件目录 使用微信, 长度单位使用 rpx 可以避免不同设备的样式调试问题 经验总结,之前一直使用px ,发现换了测试机就崩了 2. index.wxml页面设置video控件 <video id="myVideo" style="height:{{videoHeight}}px;width: 阅读全文
摘要:
1. wx.request 接口 可在文件 wxs中操作,连接服务器处理数据 参数 ① url ② data ③ header ④ method ⑤ dataType 回调 success, fail , complete success 回调参数 data, header, statusCode 阅读全文
摘要:
微信小程序导航 navigator open-type 属性 navigate default 默认 switchTab 切换页面 redirect 当前页打开 navigateBack 返回上一页 媒体组件 audio 重要属性 src ,loop ,controls ( poster(封面图片来 阅读全文
摘要:
Python有五个标准的数据类型: Numbers(数字) String(字符串) List(列表) Tuple(元组) Dictionary(字典) ① List 列表 和 Tuple 元组 Tuple 与 list 相似 #!/usr/bin/python # -*- coding: UTF-8 阅读全文