share.js 994 B

123456789101112131415161718192021222324252627282930313233343536373839404142434445
  1. import common from '../../utils/util';
  2. import server from '../../utils/main';
  3. const app = getApp();
  4. Page({
  5. data: {
  6. PayList: null,
  7. },
  8. onLoad: function (options) {
  9. this.setData({
  10. Containnerheight: common.getSystemHeight(),
  11. IsShowShare:true,
  12. });
  13. var that=this;
  14. server.getData('GetShareText500?Version=' + app.globalData.Version + '&ProgramID=' + app.globalData.ProgramID, function (data) {
  15. if (data) {
  16. that.setData({
  17. Data: data,
  18. });
  19. }
  20. });
  21. },
  22. onClose:function(e){
  23. if (e.currentTarget.dataset.id==1){
  24. wx.setStorageSync("IsShare", 1);
  25. }
  26. wx.navigateBack({
  27. delta: 1
  28. });
  29. },
  30. onClose2: function () {
  31. this.setData({
  32. IsShowShare:false,
  33. });
  34. },
  35. onShareAppMessage: function () {
  36. return {
  37. title: app.globalData.ShareTitle,
  38. path: app.globalData.SharePath + '?UserID=' + app.globalData.userInfo.UserID,
  39. imageUrl: app.globalData.ShareImage,
  40. }
  41. },
  42. });