buyad.js 1.2 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253
  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(100 * arrProduct[i].Period[0].Price) / 100,
  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.navigateBack({
  41. delta: 1
  42. });
  43. },
  44. onShareAppMessage: function () {
  45. return {
  46. title: app.globalData.ShareTitle,
  47. path: app.globalData.SharePath + '?UserID=' + app.globalData.userInfo.UserID,
  48. imageUrl: app.globalData.ShareImage,
  49. }
  50. },
  51. })