webview.js 779 B

12345678910111213141516171819202122232425262728293031323334
  1. import common from '../../utils/util';
  2. import main from '../../utils/main';
  3. const app = getApp();
  4. Page({
  5. data: {
  6. },
  7. onLoad: function (options) {
  8. var that = this;
  9. that.setData({
  10. PageID:options.PageID,
  11. });
  12. },
  13. onUnload:function(){
  14. },
  15. onShareAppMessage: function () {
  16. var imageUrl = app.globalData.uploadImageUrl +"web/program_screenshot_lesson_c0"+this.data.PageID+".png";
  17. var path = "/pages/index/index?type=webview&PageID="+this.data.PageID;
  18. var title ="《秒过学习法》课外课";
  19. if (this.data.PageID==="0"){
  20. imageUrl = "../images/program_screenshot_mustread.png";
  21. title="《秒过学习法》家长必读";
  22. }
  23. return {
  24. title: title,
  25. path: path,
  26. imageUrl: imageUrl,
  27. }
  28. },
  29. })