userbook.js 5.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168
  1. import common from '../../utils/util';
  2. import main from '../../utils/main';
  3. var app = getApp();
  4. var arrInformation = [
  5. {},
  6. {
  7. PageID: 1,
  8. text1: "课外课",
  9. text2: "如何制作合格的题卡——添加题卡 资料格式篇",
  10. text3: "制作题卡的操作步骤,各种常用的题卡格式,利用秒过的+资料功能怎么快速完成文科内容的题卡制作。"
  11. },
  12. {
  13. PageID: 2,
  14. text1: "课外课",
  15. text2: "如何制作合格的题卡——添加题卡 便捷操作篇",
  16. text3: "录入长篇幅内容,比如文字较多没有算式的概念题、英语例句等内容的技巧,重复利用手机的强大能力。"
  17. },
  18. {
  19. PageID: 3,
  20. text1: "课外课",
  21. text2: "如何制作合格的题卡——内容写法 语文篇",
  22. text3: "“大而全”的题卡是极其不适宜的做法,做题卡是有讲究的。怎么做既有效率又能帮助孩子理出头绪更有成效呢?"
  23. },
  24. {
  25. PageID: 4,
  26. text1: "课外课",
  27. text2: "如何制作合格的题卡——内容写法 数学英语篇",
  28. text3: "数学计算题、应用题,英语单词、语法、辩词的具体写法。检验孩子是不是在单纯背诵答案选项?如何避免与应对。"
  29. },
  30. {
  31. PageID: 5,
  32. text1: "课外课",
  33. text2: "怎么开展学习——流程篇",
  34. text3: "题卡的作用是促使孩子通过“回想”记住知识。不能容纳庞大繁复的书本内容,对摘录方法有一定的要求。"
  35. },
  36. {
  37. PageID: 6,
  38. text1: "课外课",
  39. text2: "怎么开展学习——要点篇",
  40. text3: "在学习中怎么打分,记忆评价的使用;用工具栏实现快捷操作控制学习进度;调节任务量灵活控制学习时间。"
  41. },
  42. ]
  43. Page({
  44. data: {
  45. ImagePath: app.globalData.uploadImageUrl,
  46. officialAccounts:app.globalData.officialAccounts,
  47. PanelShow: -2,
  48. },
  49. onPullDownRefresh: function () {
  50. wx.reLaunch({
  51. url: '../../pages/index/index?type=userbook',
  52. })
  53. wx.stopPullDownRefresh();
  54. },
  55. onLoad: function () {
  56. var that = this;
  57. var productServiceTime="";
  58. var endDate="";
  59. if (app.globalData.userInfo.ProductServiceTime){
  60. productServiceTime = common.formatDateCHS(common.formatTime(new Date(app.globalData.userInfo.ProductServiceTime)));
  61. endDate=common.formatTime(common.addDate("y", 1, new Date(app.globalData.userInfo.ProductServiceTime)));
  62. }
  63. var arr = [];
  64. for (var i = arrInformation.length - 1; i >= 1; i--) {
  65. arr.push(arrInformation[i]);
  66. }
  67. that.setData({
  68. Containnerheight: main.getWindowHeight(),
  69. ProductServiceTime: productServiceTime,
  70. EndDate: endDate,
  71. ArrInformation: arr,
  72. IsShow: app.globalData.userInfo.IsShow,
  73. IsMember: app.globalData.userInfo.IsMember,
  74. IsPay: app.globalData.userInfo.IsPay,
  75. IsLoseEfficacy: app.globalData.userInfo.IsLoseEfficacy,
  76. ClassTotalDayNumber: app.globalData.userInfo.ClassTotalDayNumber,
  77. ChildUserID: app.globalData.userInfo.ChildUserID,
  78. MainUserID: app.globalData.userInfo.MainUserID,
  79. UserID:app.globalData.userInfo.UserID,
  80. });
  81. that.init();
  82. wx.setNavigationBarColor({
  83. frontColor: "#ffffff",
  84. backgroundColor: "#FF9F33",
  85. });
  86. },
  87. init: function () {
  88. var that = this;
  89. var panelShow = 0;
  90. if (app.globalData.userInfo.Subscribe == 1 && app.globalData.userInfo.IsProbation == 1) {
  91. panelShow = 1;
  92. if (app.globalData.userInfo.IsMember == 1 && app.globalData.userInfo.ClassID > 0) {
  93. var ClassTimeStart = common.formatDateCHS(app.globalData.userInfo.ClassStartDate);
  94. var ClassTimeEnd = common.formatDateCHS(app.globalData.userInfo.ClassEndDate);
  95. var earlyBirdTimeStart = common.formatDateCHS(common.formatTime(common.addDate("d", that.data.ClassTotalDayNumber-4, new Date(app.globalData.userInfo.ClassStartDate))));
  96. var earlyBirdTimeEnd = common.formatDateCHS(common.formatTime(common.addDate("d", that.data.ClassTotalDayNumber-1, new Date(app.globalData.userInfo.ClassStartDate))));
  97. var ClassDayNumber = app.globalData.userInfo.ClassDayNumber;
  98. //console.log("ClassDayNumber:" + ClassDayNumber);
  99. that.setData({
  100. ClassTimeStart: ClassTimeStart,
  101. ClassTimeEnd: ClassTimeEnd,
  102. EarlyBirdTimeStart: earlyBirdTimeStart,
  103. EarlyBirdTimeEnd: earlyBirdTimeEnd,
  104. ClassDayNumber: ClassDayNumber,
  105. });
  106. panelShow = 2;
  107. }
  108. }
  109. else if (app.globalData.userInfo.Subscribe == 0) {
  110. panelShow = -1;
  111. }
  112. if (panelShow==0){
  113. wx.redirectTo({
  114. url: '../other/newuser',
  115. })
  116. }
  117. else{
  118. that.setData({
  119. PanelShow: panelShow,
  120. });
  121. }
  122. },
  123. onShow:function(){
  124. var that=this;
  125. that.setData({
  126. NickName: app.globalData.userInfo.NickName,
  127. AvatarUrl: app.globalData.userInfo.AvatarUrl,
  128. });
  129. },
  130. goto: function (e) {
  131. var url = e.currentTarget.dataset.url;
  132. wx.navigateTo({
  133. url: url,
  134. });
  135. },
  136. gotoIndex: function () {
  137. wx.reLaunch({
  138. url: '../index/index?type=userbook',
  139. })
  140. },
  141. updateMember: function () {
  142. if (!this.data.ChildUserID && this.data.UserID==this.data.MainUserID){
  143. wx.navigateTo({
  144. url: '../index/accredit',
  145. });
  146. }
  147. },
  148. onShareAppMessage: function () {
  149. return {
  150. title: "用户手册",
  151. path: app.globalData.SharePath + '?type=userbook&UserID=' + app.globalData.userInfo.UserID,
  152. imageUrl: app.globalData.uploadImageUrl +"web/program_screenshot_usermanual.png",
  153. }
  154. },
  155. })