1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374 |
- // pages/tabber/news/index.js
- const app=getApp()
- Page({
- /**
- * 页面的初始数据
- */
- data: {
- selectInfo: {},
- show:false,
- id:0
- },
- /**
- * 生命周期函数--监听页面加载
- */
- onLoad: function (options) {
- this.setData({
- id:options.id,
- })
- this.gettaskdetail(options.id)
- },
- /**
- * 生命周期函数--监听页面初次渲染完成
- */
- onReady: function () {
-
- },
- show:function(){
- if(this.data.show){
- this.setData({
- show:false
- })
- }else{
- this.setData({
- show:true
- })
- }
- },
- gettaskdetail(id){
- var that=this
- app.api.useApi(app.globalData.baseAppUrl + "api/admin/BinDevicesList", {
- id:id,
- }, "post").then(function (res) {
- console.log(res);
- if (res.code != 200) {
- wx.showLoading({
- title: res.message.msg,
- })
- setTimeout(function () {
- wx.hideLoading();
- }, 1000);
-
- } else {
- wx.hideLoading();
- that.setData({
- taskInfo:res.message.data
- })
- }
- }).catch(function (err) {
-
- console.log(222);
- })
-
- },
- goto(){
- wx.navigateTo({
- url: '/pages/cabinet/orderNum/orderNum?id='+this.data.id,
- })
- }
- })
|