123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130 |
- // pages/tabber/news/index.js
- Page({
- /**
- * 页面的初始数据
- */
- data: {
- selectInfo: {},
- latticelist: [
- {
- num: 1,
- status: '待收',
- color: '#FF7300',
- },
- {
- num: 2,
- status: '待收',
- color: '#FF7300',
- },
- {
- num: 3,
- status: '已存',
- color: '#408FED',
- },
- {
- num: 4,
- status: '暂存',
- color: '#8B5728',
- },
- {
- num: 5,
- status: '冻结',
- color: '#D1011D',
- },
- {
- num: 6,
- status: '空闲',
- color: '#55BE19',
- },
- {
- num: 7,
- status: '空闲',
- color: '#55BE19',
- },
- {
- num: 8,
- status: '空闲',
- color: '#55BE19',
- },
- {
- num: 9,
- status: '空闲',
- color: '#55BE19',
- },
- ],
- state:"",
- detashow:true,
- show:true,
- },
- /**
- * 生命周期函数--监听页面加载
- */
- 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()
- },
- //点击变色 显示按钮
- seled:function(e){
- this.setData({
- state: e.currentTarget.dataset.key,
- });
-
- },
- deta:function(){
-
- if(this.data.detashow){
- this.setData({
- detashow: false,
- });
- }else{
- this.setData({
- detashow: true,
- });
- }
-
-
- },
- show:function(){
-
- if(this.data.detashow){
- this.setData({
- show: false,
- });
- }else{
- this.setData({
- show: true,
- });
- }
-
-
- }
- })
|