| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172 |
- import common from '../../utils/util';
- import main from '../../utils/main';
- const app = getApp();
- Page({
- data: {
- IsShow: 0,
- HasSound: true,
- ShowUserID:"000000000"
- },
- onLoad: function (options) {
- var that = this;
-
- that.setData({
- Containnerheight: main.getWindowHeight(),
- ProgramName: app.globalData.ProgramName,
- Version: app.globalData.Version,
- IsShow: app.globalData.userInfo.isShow,
- ShowUserID:app.globalData.userInfo.ShowUserID,
- IsPromoter:app.globalData.userInfo.IsPromoter,
- });
- common.getStorageValue(this, "HasSound", true, function () {
- wx.setStorageSync("HasSound", that.data.HasSound);
- });
- },
- onShow:function(){
- var that = this;
- var messageInfo="关闭";
- if (app.globalData.userInfo.IsMessage)
- messageInfo="每天"+app.globalData.userInfo.MessageTime;
-
- that.setData({
- MessageInfo: messageInfo,
- });
- },
- 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,
- })
- }
- },
- switch1Change(e) {
- var that = this;
- that.data.HasSound = e.detail.value;
- that.setData({
- HasSound: that.data.HasSound,
- });
- wx.setStorageSync("HasSound", that.data.HasSound);
- },
- resetTodayTask:function(){
- main.ResetTodayTask();
- },
- onShareAppMessage: function () {
- return {
- title: app.globalData.ShareTitle,
- path: app.globalData.SharePath + '?UserID=' + app.globalData.userInfo.UserID,
- imageUrl: app.globalData.ShareImage,
- }
- },
- })
|