payfinish.js 1.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263
  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 == "4") {
  21. wx.setStorageSync("HasActivate", 1);
  22. }
  23. else if (paytype=="3"){
  24. app.globalData.userInfo.IsMember = 1;
  25. }
  26. },
  27. onUnload: function () {
  28. if (this.data.Paytype == "4")
  29. app.globalData.IsRefresh = true;
  30. },
  31. gotoDefault: function() {
  32. wx.redirectTo({
  33. url: "../../pages/main/default",
  34. });
  35. },
  36. goto: function () {
  37. if (this.data.Paytype == "3") {
  38. wx.redirectTo({
  39. url: "./limited?IsShowButton=1",
  40. });
  41. }
  42. if (this.data.Paytype == "4") {
  43. wx.redirectTo({
  44. url: "./activate",
  45. });
  46. }
  47. if (this.data.Paytype == "5") {
  48. wx.redirectTo({
  49. url: "./giftlist",
  50. });
  51. }
  52. },
  53. onShareAppMessage: function () {
  54. return {
  55. title: app.globalData.ShareTitle,
  56. path: app.globalData.SharePath + '?UserID=' + app.globalData.userInfo.UserID,
  57. imageUrl: app.globalData.ShareImage,
  58. }
  59. },
  60. })