share.js 1.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263
  1. const util = require('../../utils/util.js');
  2. const app = getApp()
  3. Page({
  4. data: {
  5. cloudId: 0
  6. },
  7. onLoad: function(option){
  8. this.setData({
  9. cloudId: option.id
  10. })
  11. },
  12. backList: function(){
  13. setTimeout(function() {
  14. wx.reLaunch({
  15. url: '../cloud/cloud'
  16. })
  17. }, 200)
  18. },
  19. onShareAppMessage: function(res){
  20. return {
  21. title: '接收人确认',
  22. path: 'pages/detail/receiver?id=' + this.data.cloudId , // 分享后打开的页面
  23. imageUrl: '/images/share/timg.png',
  24. success: function(res){
  25. // wx.reLaunch({
  26. // url: '../cloud/cloud'
  27. // })
  28. setTimeout(function() {
  29. wx.reLaunch({
  30. url: '../cloud/cloud'
  31. })
  32. }, 200)
  33. // var that = this;
  34. // wx.request({
  35. // url: app.globalData.serverUrl + '/cloudcard/orderChecking?id=' + that.data.cloudId,
  36. // data: {
  37. // id : that.data.cloudId
  38. // },
  39. // method:"GET",
  40. // success(res) {
  41. // wx.reLaunch({
  42. // url: '../cloud/cloud'
  43. // })
  44. // },
  45. // fail: function (res) {
  46. // wx.reLaunch({
  47. // url: '../cloud/cloud'
  48. // })
  49. // }
  50. // })
  51. },
  52. fail: function(res){
  53. setTimeout(function() {
  54. wx.reLaunch({
  55. url: '../cloud/cloud'
  56. })
  57. }, 200)
  58. }
  59. }
  60. }
  61. })