worklife

worklife

2021-03-16
¥ 0 终身VIP免费 升级终身VIP
下载不了?请联系网站客服提交链接错误!
增值服务: 安装指导 环境配置 二次开发 网站建设 模板修改 源码安装 LOGO设计 图片设计
worklife
最近更新 2021年03月16日
资源编号 17882

worklife

郑重承诺丨总裁主题提供安全交易、信息保真!
增值服务:
安装指导
环境配置
二次开发
网站建设
模板修改
源码安装
¥ 0 (终身VIP免费 升级终身VIP开通VIP尊享优惠特权
立即下载 升级会员 最新活动
详情介绍

worklife

worklife worklife worklife

代码示例:

001
002
003
004
005
006
007
008
009
010
011
012
013
014
015
016
017
018
019
020
021
022
023
024
025
026
027
028
029
030
031
032
033
034
035
036
037
038
039
040
041
042
043
044
045
046
047
048
049
050
051
052
053
054
055
056
057
058
059
060
061
062
063
064
065
066
067
068
069
070
071
072
073
074
075
076
077
078
079
080
081
082
083
084
085
086
087
088
089
090
091
092
093
094
095
096
097
098
099
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
var app = getApp()
Page({
  data: {
     dataList : []
  },
  initData : function(){
     return [
       {
         id : 1,
         title : ‘紧急任务’,
         themes :[{
            id : 11,
            selected : true,
            interact : false,
            partake : true,
            complete :’Page() 函数用来注册一个页面。接受一个 object 参数,其指定页面的初始数据、生命周期函数、事件处理函数等。’,
            partakes :[
              ‘../../images/1.jpg’,
              ‘../../images/2.jpg’,
              ‘../../images/3.jpg’,
              ‘../../images/4.png’,
              ‘../../images/5.jpg’,
              ‘../../images/0.jpg’]
         },{
            id : 12,
            selected : false,
            interact : false,
            partake : true,
            complete :’在组件上使用wx:for控制属性绑定一个数组,即可使用数组中各项的数据重复渲染该组件。’,
            partakes :[
              ‘../../images/1.jpg’,
              ‘../../images/2.jpg’,
              ‘../../images/3.jpg’]
         }]
       },{
         id : 2,
         title : ‘延期任务’,
         themes :[{
            id : 21,
            selected : false,
            interact : false,
            partake : true,
            complete :’App() 函数用来注册一个小程序。接受一个 object 参数,其指定小程序的生命周期函数等。’,
            partakes :[
              ‘../../images/2.jpg’,
              ‘../../images/3.jpg’,
              ‘../../images/4.png’,
              ‘../../images/5.jpg’,
              ‘../../images/0.jpg’]
         }]
       }
     ]
  },
  //事件处理函数
  bindViewTap: function() {
    wx.navigateTo({
      url: ‘../logs/logs’
    })
  },
  onLoad: function () {
    var that = this
    wx.showNavigationBarLoading()
    that.setData({
       dataList : that.initData()
    })
    wx.hideNavigationBarLoading()
  },
  onPullDownRefresh : function(){ //下拉刷新
      var that = this
      wx.showNavigationBarLoading()
      that.setData({
        dataList : that.initData()
      })
      wx.hideNavigationBarLoading()
      wx.stopPullDownRefresh()
  },
  onReachBottom : function(){ //下拉底部分页
      var that = this
      wx.showNavigationBarLoading()
      that.setData({
        dataList : that.initData()
      })
      wx.stopPullDownRefresh()
      wx.hideNavigationBarLoading()
  },
  onSelected : function(e){ //处理
     wx.showNavigationBarLoading()
     var that = this
     var value = e.detail.value[0]
     var themeId = e.target.dataset.id
     var dataId = e.target.dataset.parentId
     var selectItem = that.lgGetThemeItemById(dataId, themeId)
     var dataItem = that.lgGetDataItemById(dataId)
     selectItem.selected = !selectItem.selected
     console.log(selectItem)
      wx.hideNavigationBarLoading()
  },
  onThemeInfo : function(e){ //详情
      var themeId = e.target.dataset.id
      wx.navigateTo({
        url: ‘../work-info/work-info?id=’+themeId
      })
  },
  lgGetDataList : function(){ //逻辑处理
     var that = this
     return that.data.dataList
  },
  lgGetDataItemById : function(id){
      var that = this
      var dataList = that.lgGetDataList()
      var i = 0 , len = dataList.length
      var retItem = null
      for(; i < len; ++i){
        var item = dataList[i]
        if(id == item.id){
          retItem = item
          break
        }
      }
      return retItem
  },
  lgGetThemes : function(dataId){
     var that = this
     return that.lgGetDataItemById(dataId).themes
  },
  lgGetThemeItemById : function(dataId, themeId){
     var that = this
     var themes = that.lgGetThemes(dataId)
     console.log(themes)
     var i = 0, len = themes.length
     var retItem = null
     for(; i < len; ++i){
        var item = themes[i]
        if(themeId == item.id){
           retItem = item
           break
        }
     }
     return retItem
  }
})
资源下载此资源仅限注册用户下载,请先
客服QQ:3482249445
收藏 (0) 打赏

感谢您的支持,我会继续努力的!

打开微信/支付宝扫一扫,即可进行扫码打赏哦,分享从这里开始,精彩与您同在
点赞 (0)

所有文章为演示数据,不提供下载地址,版权归原作者所有,仅提供演示效果!

小程序网 小程序 worklife https://www.10000ii.com/17882.html

下一篇: 大乐个学
常见问题
  • 本站所有资源版权均属于原作者所有,这里所提供资源均只能用于参考学习用,请勿直接商用。若由于商用引起版权纠纷,一切责任均由使用者承担。
查看详情
  • 最常见的情况是下载不完整: 可对比下载完压缩包的与网盘上的容量,若小于网盘提示的容量则是这个原因。这是浏览器下载的bug,建议用
查看详情

相关文章

worklife-海报

分享本文封面