setting.js 1.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778
  1. import common from '../../utils/util';
  2. import main from '../../utils/main';
  3. const app = getApp();
  4. Page({
  5. data: {
  6. ShowReset:false,
  7. ImagePath: app.globalData.uploadImageUrl,
  8. },
  9. onLoad: function (options) {
  10. var that = this;
  11. that.setData({
  12. Containnerheight: main.getWindowHeight(),
  13. });
  14. if (options.Type=="ShowReset"){
  15. that.setData({
  16. ShowReset: true,
  17. });
  18. wx.setNavigationBarTitle({
  19. title: '重置',
  20. });
  21. wx.setNavigationBarColor({
  22. frontColor: "#000000",
  23. backgroundColor: "#F8F8F8",
  24. })
  25. }
  26. },
  27. showSetting:function(){
  28. this.setData({
  29. ShowReset: false,
  30. });
  31. wx.setNavigationBarTitle({
  32. title: '模式设置',
  33. });
  34. wx.setNavigationBarColor({
  35. frontColor: "#000000",
  36. backgroundColor: "#ffffff",
  37. })
  38. },
  39. onShow: function () {
  40. var that = this;
  41. common.getStorageValue(that, "CardType", 0, function () {});
  42. },
  43. setColorPlan: function () {
  44. wx.navigateTo({
  45. url: './colorplan',
  46. })
  47. },
  48. setPattern: function () {
  49. wx.navigateTo({
  50. url: './pattern',
  51. })
  52. },
  53. setClickType: function () {
  54. wx.navigateTo({
  55. url: './clicktype',
  56. })
  57. },
  58. goto: function (e) {
  59. var url = e.currentTarget.dataset.url;
  60. wx.navigateTo({
  61. url: url,
  62. });
  63. },
  64. resetTodayTask:function(){
  65. main.ResetTodayTask();
  66. },
  67. onShareAppMessage: function () {
  68. return {
  69. title: app.globalData.ShareTitle,
  70. path: app.globalData.SharePath + '?UserID=' + app.globalData.userInfo.UserID,
  71. imageUrl: app.globalData.ShareImage,
  72. }
  73. },
  74. });