payfinish.js 1.4 KB

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