userbook.js 6.6 KB

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