import common from '../../utils/util'; import main from '../../utils/main'; const app = getApp(); Page({ onLoad: function (options) { var that = this; this.setData({ Containnerheight: main.getWindowHeight(), ChildUserID: app.globalData.userInfo.ChildUserID, CurrentUserID: app.globalData.userInfo.CurrentUserID, UserID:app.globalData.userInfo.UserID, }); }, resetTodayTask:function(){ main.ResetTodayTask(); }, deleteAll:function(){ wx.showModal({ title: '提醒', content: "该操作将删除所有题卡。删除的题卡可在90天内前往回收站恢复。删除所有题卡后必须创建新题卡方可开始练习。", confirmText:'删除所有', complete: (res) => { if (res.confirm) { main.getData("DeleteAllMiaoguoCard?UserID=" + app.globalData.userInfo.UserID, function (data) { wx.showToast({ title: "删除完成", duration: 2000, }); }); } } }); }, goto: function (e) { var url = e.currentTarget.dataset.url; var gotoType = e.currentTarget.dataset.type; if (!gotoType) { wx.navigateTo({ url: url, }); } else { wx.redirectTo({ url: url, }) } }, onShareAppMessage: function () { return { title: app.globalData.ShareTitle, path: app.globalData.SharePath + '?UserID=' + app.globalData.userInfo.UserID, imageUrl: app.globalData.ShareImage, } }, })