buyad.js 1.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354
  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. this.setData({
  9. Containnerheight: common.getSystemHeight(),
  10. });
  11. this.init();
  12. },
  13. init:function(){
  14. var that=this;
  15. var arrProduct = wx.getStorageSync("ProductPrice");
  16. for (var i = 0; i < arrProduct.length; i++) {
  17. if (arrProduct[i].ProductNum == app.globalData.ProgramID) {
  18. that.setData({
  19. Price: Math.floor(arrProduct[i].Period[0].Price),
  20. });
  21. }
  22. }
  23. },
  24. gotoOrder: function () {
  25. wx.navigateTo({
  26. url: "./order?id="+app.globalData.ProgramID+"&paytype=3",
  27. });
  28. },
  29. gotoPackList: function () {
  30. wx.navigateTo({
  31. url: "./list?IsGift=0",
  32. });
  33. },
  34. gotoGiftList: function () {
  35. wx.navigateTo({
  36. url: "./list?IsGift=1",
  37. });
  38. },
  39. closePage:function(){
  40. wx.setStorageSync("NoRefreshList", true);
  41. wx.navigateBack({
  42. delta: 1
  43. });
  44. },
  45. onShareAppMessage: function () {
  46. return {
  47. title: app.globalData.ShareTitle,
  48. path: app.globalData.SharePath + '?UserID=' + app.globalData.userInfo.UserID,
  49. imageUrl: app.globalData.ShareImage,
  50. }
  51. },
  52. })