userbook.js 4.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139
  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. PanelShow: 0,
  47. },
  48. onLoad: function () {
  49. var that = this;
  50. var productServiceTime = common.formatDateCHS(common.formatTime(new Date(app.globalData.userInfo.ProductServiceTime)));
  51. var arr=[];
  52. for(var i=arrInformation.length-1;i>=1;i--){
  53. arr.push(arrInformation[i]);
  54. }
  55. that.setData({
  56. Containnerheight: main.getWindowHeight(),
  57. NickName: app.globalData.userInfo.NickName,
  58. AvatarUrl: app.globalData.userInfo.AvatarUrl,
  59. ProductServiceTime: productServiceTime,
  60. ArrInformation: arr,
  61. });
  62. },
  63. onPullDownRefresh: function () {
  64. this.onLoad();
  65. wx.stopPullDownRefresh();
  66. },
  67. onShow:function(){
  68. var that=this;
  69. var panelShow=0;
  70. if (app.globalData.userInfo.Subscribe == 1 && app.globalData.userInfo.IsProbation==1){
  71. panelShow = 1;
  72. if (app.globalData.userInfo.IsMember == 1){
  73. panelShow = 2;
  74. main.getData('GetClassList?ClassID=' + app.globalData.userInfo.ClassID, function (data) {
  75. if (data) {
  76. var ClassTimeStart=common.formatDateCHS(data[0].StartDate);
  77. var ClassTimeEnd =common.formatDateCHS(data[0].EndDate);
  78. panelShow = 3;
  79. var earlyBirdTimeStart = common.formatDateCHS(common.formatTime(common.addDate("d", 5,new Date(data[0].StartDate))));
  80. var earlyBirdTimeEnd = common.formatDateCHS(common.formatTime(common.addDate("d", 11, new Date(data[0].StartDate))));
  81. var ClassDayNumber = common.diffDate("d",new Date(data[0].StartDate),new Date());
  82. console.log("ClassDayNumber:" + ClassDayNumber);
  83. that.setData({
  84. ClassTimeStart: ClassTimeStart,
  85. ClassTimeEnd: ClassTimeEnd,
  86. EarlyBirdTimeStart: earlyBirdTimeStart,
  87. EarlyBirdTimeEnd: earlyBirdTimeEnd,
  88. PanelShow: panelShow,
  89. ClassDayNumber: ClassDayNumber,
  90. });
  91. }
  92. });
  93. }
  94. }
  95. that.setData({
  96. PanelShow:panelShow,
  97. });
  98. },
  99. copyManager: function () {
  100. wx.setClipboardData({
  101. data: "changyibzr",
  102. success(res) {
  103. wx.showModal({
  104. title: '已复制',
  105. showCancel: false,
  106. content: "请在微信添加用户中长按粘贴。",
  107. confirmText: "知道了",
  108. });
  109. }
  110. })
  111. },
  112. goto:function(e){
  113. var url = e.currentTarget.dataset.url;
  114. wx.navigateTo({
  115. url: url,
  116. });
  117. },
  118. onShareAppMessage: function () {
  119. return {
  120. title: app.globalData.ShareTitle,
  121. path: app.globalData.SharePath + '?UserID=' + app.globalData.userInfo.UserID,
  122. imageUrl: app.globalData.ShareImage,
  123. }
  124. },
  125. })