midAutumnFestival.js 1.1 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950
  1. // pages/midAutumnFestival/midAutumnFestival.js
  2. var app = getApp();
  3. Page({
  4. data: {
  5. urlHttp : '',
  6. shareFlag : 0
  7. },
  8. onLoad: function (options) {
  9. var that = this;
  10. var host = getApp().globalData.servsers;
  11. var shareFlag = options.shareFlag;
  12. if (shareFlag != '' && shareFlag != null && shareFlag != undefined) {
  13. that.setData({
  14. shareFlag: options.shareFlag
  15. })
  16. }
  17. that.setData({
  18. urlHttp: host
  19. })
  20. },
  21. //分享
  22. onShareAppMessage: function (res) {
  23. var that = this;
  24. var host = getApp().globalData.servsers;
  25. if (res.from === 'button') {
  26. // 来自页面内转发按钮
  27. console.log(res.target)
  28. }
  29. return {
  30. title: '大良造-精良之选,用心造物!',
  31. path: '/pages/midAutumnFestival/midAutumnFestival?shareFlag=1',
  32. success: function (res) {
  33. },
  34. fail: function (res) {
  35. // 转发失败
  36. }
  37. }
  38. },
  39. //返回首页
  40. backIndex: function (e) {
  41. wx.switchTab({
  42. url: '/pages/index/index',
  43. })
  44. }
  45. })
  46. var that;
  47. var Util = require('../../utils/util.js');