// pages/list/list.js var authGET = require('../../utils/authGET') var authRESULT = require('../../utils/authRESULT') const { $Message } = require('../../dist/base/index'); const app = getApp() function formatNumber(n) { n = n.toString() return n[1] ? n : '0' + n } Page({ data: { taskid:new Array,taskidstring:'', taskddllist:new Array, taskbeginlist:new Array, planid:new Array,planidstring:'', planddllist:new Array, planbeginlist:new Array, taskNULL:false, current: 'tab1',current_scroll: 'tab1', visible2: false,toggle : false,toggle2 : false, actions : [ { name : '删除', width : 100, color : '#fff', fontsize : '20', icon : 'trash', background : '#ed3f14' }, ], press : false, loading: true }, listenPress: function (res) { this.setData({ press: true, }) let that = this; setTimeout(function(){ that.setData({ press: false, }) },15) }, onLoad: function (e) { }, onReady: function () { }, onShow:function(){ let that = this; app.listenLoading(function (res) { that.Query() }) }, onPullDownRefresh: function () { let that = this; app.listenLoading(function (res) { that.Query() }) }, stopPullDownRefresh(){ wx.stopPullDownRefresh() $Message({ content: '拉取数据成功', type: 'success' }); }, Query:function(){ this.onRESULTS() }, onRESULTS: function () { var that = this authRESULT.authRESULTS({ url : "task", success: function (res) { console.log("results",res) if(res.data!=""){ var _taskid=[] var _taskddlist = [] var _taskbeginlist = [] for(var i = 0;i