payfinish.js 1.3 KB

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