微信小程序学习用dmeo:worklife:(适用1221)

微信小程序学习用dmeo:worklife:(适用1221)由小鱼微信小程序精心整理,并分享给大家。喜欢该资源的小伙伴请下载使用,注册、回复、每日签到、点赞送大量积分,满足您免费下载的愿望

实现了一些简单的页面效果,学习的人会喜欢的;
微信小程序学习用dmeo:worklife:(适用1221) 微信小程序学习用dmeo:worklife:(适用1221) 微信小程序学习用dmeo:worklife:(适用1221)

代码示例:

[AppleScript]
 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   } }) 

项目地址及下载:
https://git.oschina.net/jiues/life
文件下载: 微信小程序学习用dmeo:worklife:(适用1221) wx_xiaochengxu_life.zip (144.4 KB, 下载次数: 37)

小鱼源码网www.51xyyx.com

轻松一刻:

一对情人50年后相见,想到从前,感慨万千,遂欲再亲热一番。半小时后,老头感叹: 一江春水已流干,两座高山成平川,昔日风景今不再, 只剩两颗葡萄干。老太感叹: 枯草堆里到处翻, 始终不见枪和蛋,岁月沧桑不饶人,只见一根萝卜干
本文章内容归小鱼源码网所有,未经允许私自转载者必将追究责任
小鱼源码下载网,商业源码,专业客服,质量保证 » 微信小程序学习用dmeo:worklife:(适用1221)

发表评论

此站点使用Akismet来减少垃圾评论。了解我们如何处理您的评论数据

精品源码,商业服务,发布得积分,VIP免费下

开通会员 发布资源