12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152 |
- // pages/tabber/news/index.js
- Page({
- /**
- * 页面的初始数据
- */
- data: {
- selectInfo: {}
- },
- /**
- * 生命周期函数--监听页面加载
- */
- onLoad: function (options) {
- class Select {
- in = 1
- getSelet(){
- console.log(2);
- return 10
- }
- }
- var b = new Select();
- console.log(b.getSelet());
- },
- /**
- * 生命周期函数--监听页面初次渲染完成
- */
- onReady: function () {
- const query = wx.createSelectorQuery()
- query.select('#nav').boundingClientRect((res) => {
- console.log(res);
- this.setData({
- selectInfo: res
- })
- })
- query.exec()
- },
- saoma:function(){
- wx.scanCode({
- onlyFromCamera: true,
- success (res) {
- wx.navigateTo({
- url: '/pages/take/lattice',
- })
- }
-
- })
- }
- })
|