index.js 1.7 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879
  1. import common from '../../utils/util';
  2. import server from '../../utils/main';
  3. const app = getApp();
  4. Page({
  5. data: {
  6. Version: app.globalData.Version,
  7. ListProgram: [
  8. {
  9. ImageUrl: "03001.png",
  10. ImageUrl2: "02018.png",
  11. appId: 'wx46a7b4c420e6d38f',
  12. path: 'pages/index/start?SourceID=106',
  13. },
  14. {
  15. ImageUrl: "03002.png",
  16. ImageUrl2: "02020.png",
  17. appId: 'wxb54a6d5aff836ee3',
  18. path: 'pages/index/index?SourceID=106',
  19. },
  20. {
  21. ImageUrl: "03003.png",
  22. ImageUrl2: "02019.png",
  23. appId: 'wx331e8dd070f01d0e',
  24. path: 'pages/index/index?SourceID=106',
  25. },
  26. {
  27. ImageUrl: "03004.png",
  28. ImageUrl2: "02021.png",
  29. appId: 'wxa5e33c61fe37dd01',
  30. path: 'pages/index/index?SourceID=106',
  31. },
  32. ],
  33. NickName: "陌生用户",
  34. IsMember: false,
  35. AvatarUrl: "",
  36. DayNumber: "0",
  37. ReviewCount: "0",
  38. FinishedCount: "0",
  39. IsAccredit: false,
  40. NavClass1: "",
  41. NavClass2: "nav2",
  42. IsRemind: false,
  43. },
  44. onReady: function (e) {
  45. },
  46. onLoad: function () {
  47. this.setData({
  48. Height: common.getSystemHeight(),
  49. indexImage: common.random(0, 2),
  50. });
  51. },
  52. selectNav: function (e) {
  53. var id = e.currentTarget.dataset.id;
  54. //console.log(id);
  55. if (id == "1") {
  56. this.setData({
  57. NavClass1: "",
  58. NavClass2: "nav2",
  59. })
  60. }
  61. else if (id == "2") {
  62. this.setData({
  63. NavClass1: "nav2",
  64. NavClass2: "nav3",
  65. IsRemind: false,
  66. })
  67. wx.setStorageSync('IsRemind', false);
  68. }
  69. },
  70. goto: function (e) {
  71. var id = e.currentTarget.dataset.id;
  72. wx.navigateTo({
  73. url: "./list?id="+id,
  74. });
  75. },
  76. })