setting.js 1.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869
  1. import common from '../../utils/util';
  2. import main from '../../utils/main';
  3. const app = getApp();
  4. const arrClickType = ["专属按钮", "点击空白", "两种方式"];
  5. Page({
  6. data: {
  7. },
  8. onLoad: function () {
  9. var that = this;
  10. that.setData({
  11. Containnerheight: main.getWindowHeight(),
  12. });
  13. },
  14. onShow: function () {
  15. var that = this;
  16. var colorIndex = wx.getStorageSync("ColorIndexArr");
  17. if (!colorIndex || colorIndex.length > 1) {
  18. this.setData({
  19. ColorName: "多色变换",
  20. });
  21. }
  22. else {
  23. var color = main.getDetailColor(colorIndex[0]);
  24. this.setData({
  25. ColorName: color.Name,
  26. });
  27. }
  28. that.setData({
  29. ClickTypeName: arrClickType[app.globalData.ClickType],
  30. });
  31. common.getStorageValue(that, "CardType", 0, function () {});
  32. },
  33. setColorPlan: function () {
  34. wx.navigateTo({
  35. url: './colorplan',
  36. })
  37. },
  38. setPattern: function () {
  39. wx.navigateTo({
  40. url: './pattern',
  41. })
  42. },
  43. setClickType: function () {
  44. wx.navigateTo({
  45. url: './clicktype',
  46. })
  47. },
  48. goto: function (e) {
  49. var url = e.currentTarget.dataset.url;
  50. wx.navigateTo({
  51. url: url,
  52. });
  53. },
  54. onShareAppMessage: function () {
  55. return {
  56. title: app.globalData.ShareTitle,
  57. path: app.globalData.SharePath + '?UserID=' + app.globalData.userInfo.UserID,
  58. imageUrl: app.globalData.ShareImage,
  59. }
  60. },
  61. });