payfinish.js 1.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657
  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 paytype = options.paytype;
  9. this.setData({
  10. Containnerheight: common.getSystemHeight(),
  11. Paytype: paytype
  12. });
  13. wx.showLoading({
  14. title: '请勿退出',
  15. mask:true,
  16. });
  17. setTimeout(function(){
  18. wx.hideLoading();
  19. },5000);
  20. if (paytype=="3"){
  21. app.globalData.userInfo.IsMember = 1;
  22. app.globalData.IsLocked=0;
  23. }
  24. },
  25. onUnload: function () {
  26. if (this.data.Paytype == "4")
  27. app.globalData.IsRefresh = true;
  28. },
  29. gotoDefault: function() {
  30. wx.redirectTo({
  31. url: "../../pages/main/default",
  32. });
  33. },
  34. goto: function () {
  35. if (this.data.Paytype == "3") {
  36. wx.redirectTo({
  37. url: "./limited?IsShowButton=1",
  38. });
  39. }
  40. if (this.data.Paytype == "5") {
  41. wx.redirectTo({
  42. url: "./giftlist",
  43. });
  44. }
  45. },
  46. onShareAppMessage: function () {
  47. return {
  48. title: app.globalData.ShareTitle,
  49. path: app.globalData.SharePath + '?UserID=' + app.globalData.userInfo.UserID,
  50. imageUrl: app.globalData.ShareImage,
  51. }
  52. },
  53. })