help.js 1.2 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344
  1. import common from '../../utils/util';
  2. import server from '../../utils/main';
  3. const app = getApp();
  4. Page({
  5. data: {
  6. },
  7. onLoad: function (options) {
  8. var that = this;
  9. this.setData({
  10. Containnerheight: server.getWindowHeight(),
  11. });
  12. for (var i = 0; i < 9; i++)
  13. wx.removeStorageSync("HelpHidden" + i);
  14. common.getStorageValue(this, "HelpHidden0", false, function () {
  15. that.showHelp();
  16. });
  17. },
  18. goto:function(){
  19. wx.setStorageSync("HelpHidden0", true);
  20. this.audioCtx = wx.createAudioContext('myAudio');
  21. this.audioCtx.pause();
  22. wx.setStorageSync("IsStart", true);
  23. wx.redirectTo({
  24. url: '../main/default',
  25. })
  26. },
  27. showHelp: function () {
  28. if (!this.data.HelpHidden1) {
  29. this.audioCtx = wx.createAudioContext('myAudio');
  30. var str = "欢迎来到数学之星——迈思星球。我是陪你一道练习的小伙伴“算算”。怎么练习?看看上面的介绍吧!";
  31. server.playAudio(this.audioCtx, str);
  32. }
  33. },
  34. onShareAppMessage: function () {
  35. return {
  36. title: app.globalData.ShareTitle,
  37. path: 'pages/index/index?UserID=' + app.globalData.userInfo.UserID,
  38. imageUrl: app.globalData.ShareImage,
  39. }
  40. },
  41. });