阅读项目:微信日历小程序插件

Posted hanyeong2019

tags:

篇首语:本文由小常识网(cha138.com)小编为大家整理,主要介绍了阅读项目:微信日历小程序插件相关的知识,希望对你有一定的参考价值。

韩颖 1759110 软工一班      

我在网上找到了一段别人写的微信小程序代码,主题是日历以及签到。由于市面上的小程序鲜少有签到及积分功能,此款程序内容完备且观点新颖,因此值得我们学习与借鉴。

-----------------------------------------------------------    

以下是小程序插件的代码链接

https://www.cnblogs.com/zengxuelan/p/10030598.html

-----------------------------------------------------------

一 .代码方面:

-----------------------------------------------------------------------

1.签到日历出现及消失 onAppear: function () { // this.clockIn(); this.setData({ display: "block", }) }, onhide: function () { this.setData({ display: "none", })

},

 

2.监听页面加载;根据屏幕宽度变化自动设置宽度 onLoad: function (options) { currentPageUrl = this.route //当前页面url if (Object.keys(options).length != 0) { currentPageOption = util.route(options); } var that = this; uid = wx.getStorageSync("userid"); this.clockIn(); // this.SignRule(); this.getPic(); this.dataScore(); this.setNowDate(); // this.getProWeekList() this.dataTime(); var res = wx.getSystemInfoSync(); this.setData({ sysW: 60, marLet: this.data.firstDay, nowDay: this.data.getDate, getDate: this.data.getDate, judge: 1, month: this.data.month, });

},

 

3.打卡 clockIn:function(){ var that=this; var params = { "uid": uid, "signPosition":‘‘ } util.requestLoading(‘/api/Users/SignIn‘, ‘GET‘, params, ‘‘, function (res) { console.log(res); // that.dataInit(); that.dataScore(); // //console.log(res) var msg = JSON.parse(res).Msg; setTimeout(function(){ wx.showToast({ title: msg, icon: ‘none‘, duration: 3000 }); },1500) }, function (err) { })

},

 

4.打卡 dataScore: function () { var that = this; var params = { "uid": uid } util.requestLoading(‘/test‘, ‘GET‘, params, ‘‘, function (res) { // //console.log(res) that.setData({ allScore: JSON.parse(res).Data.coin }) }, function (err) { })

},

 

5.获取积分规则 SignRule: function () { var that = this; util.requestLoading(‘/test3‘, ‘GET‘, ‘‘, ‘‘, function (res) { // //console.log("积分规则",JSON.parse(res)); var data = JSON.parse(res).Data; for(var i=1;i<data.length;i++){ // //console.log(data[i].daysNum, data[i].score) if (that.data.signInCount == data[i].daysNum-1){ that.setData({ addScore: data[i].score }) }else{ that.setData({ addScore: data[0].score }) } } that.setData({ rules: data }) }, function (err) {

})

----------------------------------------------------------

二.用户体验方面

1.用户在页面上可以看到图片以及激励性质的名人名言,有趣味性。

 

2.当天的日期被放大后在首页上显示,清晰直观。积分和累计签到次数简洁明了,排版比较成功。

 

3.用户在签到过后,当日日期颜色会加深,当月历史签到成功的页面会一并显示,方便用户查看。

 

4.积分机制是这款小程序的一大特色,但是内容亟待改进。积分的累计和奖惩需要进一步的完善。

 

5.由于微信的页面比较简单,没有多余的功能,所以我认为添加一些实用的小功能可以增加用户体验,比如添加当日指定地理位置的天气,或者每日推荐书目等等,增强用户依赖性。

--------------------------------------------------------------------------------

以上是关于阅读项目:微信日历小程序插件的主要内容,如果未能解决你的问题,请参考以下文章

微信小程序日历插件,适用于酒店订房类小程序

小程序手写日历

钉钉小程序如何做出日历选择器的效果?

微信小程序 第三方插件的使用

微信小程序——极点日历使用方法

微信小程序-vant-weapp日历组件的使用(年月日)