| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081 |
- import common from '../../utils/util';
- import main from '../../utils/main';
- const app = getApp();
- const arrSortType = ["以前落下的笔记", "近期到期的笔记"]
- Page({
- data: {
- CardNumber: [],
-
- },
- onLoad: function () {
- wx.hideShareMenu();
- var that = this;
- for (var i = 5; i <= 200; i++) {
- that.data.CardNumber.push(i);
- }
- that.setData({
- Containnerheight: main.getWindowHeight(),
- CardNumber: that.data.CardNumber,
- MinSecond: 10,
- TimeSecond: 60,
- });
- common.getStorageValue(this, "CardMaxNumberNew", 10, function () {
- that.setData({
- CardMaxNumberNewIndex: that.data.CardMaxNumberNew - 5,
- });
- });
- common.getStorageValue(this, "CardMaxNumberHistory", 30, function () {
- that.setData({
- CardMaxNumberHistoryIndex: that.data.CardMaxNumberHistory - 5,
- });
- });
- common.getStorageValue(this, "SortTypeIndex", 0, function () {
- that.setData({
- SortType: arrSortType[that.data.SortTypeIndex],
- });
- });
- },
- bindUpdateCardNumberNewMax: function (e) {
- this.data.CardMaxNumberNewIndex = e.detail.value;
- this.setData({
- CardMaxNumberNewIndex: this.data.CardMaxNumberNewIndex,
- CardMaxNumberNew: this.data.CardNumber[this.data.CardMaxNumberNewIndex],
- });
- wx.setStorageSync("CardMaxNumberNew", this.data.CardNumber[this.data.CardMaxNumberNewIndex]);
- },
- bindUpdateCardNumberHistoryMax: function (e) {
- this.data.CardMaxNumberHistoryIndex = e.detail.value;
- this.setData({
- CardMaxNumberHistoryIndex: this.data.CardMaxNumberHistoryIndex,
- CardMaxNumberHistory: this.data.CardNumber[this.data.CardMaxNumberHistoryIndex],
- });
- wx.setStorageSync("CardMaxNumberHistory", this.data.CardNumber[this.data.CardMaxNumberHistoryIndex]);
- },
- setSortType:function(){
- var that=this;
- wx.showActionSheet({
- itemList: arrSortType,
- success(res) {
- that.setData({
- SortType: arrSortType[res.tapIndex],
- });
- wx.setStorageSync("SortTypeIndex", res.tapIndex);
- },
- fail(res) {
- console.log(res.errMsg)
- }
- })
- },
- onShareAppMessage: function () {
- return {
- title: app.globalData.ShareTitle,
- path: app.globalData.SharePath + '?UserID=' + app.globalData.userInfo.UserID,
- imageUrl: app.globalData.ShareImage,
- }
- },
- });
|