guide.js 1.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142
  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. common.getStorageValue(this, "HelpHidden0", false, function () {
  13. that.showHelp();
  14. });
  15. },
  16. goto:function(){
  17. wx.setStorageSync("HelpHidden0", true);
  18. this.audioCtx = wx.createAudioContext('myAudio');
  19. this.audioCtx.pause();
  20. wx.setStorageSync("IsStart", true);
  21. wx.redirectTo({
  22. url: '../main/default',
  23. })
  24. },
  25. showHelp: function () {
  26. if (!this.data.HelpHidden1) {
  27. this.audioCtx = wx.createAudioContext('myAudio');
  28. var str = "欢迎来到数学之星——迈思星球。我是陪你一道练习的小伙伴“算算”。怎么练习?看看上面的介绍吧!";
  29. server.playAudio(this.audioCtx, str);
  30. }
  31. },
  32. onShareAppMessage: function () {
  33. return {
  34. title: app.globalData.ShareTitle,
  35. path: 'pages/index/index?UserID=' + app.globalData.userInfo.UserID,
  36. imageUrl: app.globalData.ShareImageUrl,
  37. }
  38. },
  39. });