微信小程序

2020-03-09  本文已影响0人  Love大猪蹄子嘚MM

1.页面之间修改值

1、app.js 文件中定义一个属性 , 在页面中修改 这个属性 app.xxx

2、利用notificationCenter

2.微信列表渲染

wx:for="{{array}}"

{{index}}: {{item.message}}

wx:key 来指定列表中项目的唯一的标识符。

3.微信小程序本地存储

wx.setStorage  存储

wx.removeStorage(Object object) 从本地缓存中移除指定 key  

wx.getStorage(Object object) 从本地缓存中异步获取指定 key 的内容

wx.getStorageInfo(Object object) 异步获取当前storage的相关信息

wx.clearStorage(Object object) 清理本地数据缓存

4.微信小程序通知中心?怎么写?怎么用?

notificationCenter:{   }

是个对象,对象里边有两个方法,on 和 off 

 在通知中心  on  被调用时,有则调用,无则添加

在通知中心  off  被调用时,有则调用,无则添加 

app.notificationCenter.on("play", this.onPlay);

5.微信小程序的视图容器

view   scroll-view   cover-image   cover-view   swiper  swiper-item    movable-view   movable-area

上一篇 下一篇

猜你喜欢

热点阅读