东风启辰小程序端
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

76 line
1.3KB

  1. // pages/guessPoster/guessPoster.js
  2. const app = getApp()
  3. Page({
  4. /**
  5. * 页面的初始数据
  6. */
  7. data: {
  8. imgUrl: app.globalData.urlStatic,//图片路径
  9. selectType:2,//选中的分享类型
  10. },
  11. /**
  12. * 生命周期函数--监听页面加载
  13. */
  14. onLoad: function (options) {
  15. app.globalData.nowPage = 3;
  16. },
  17. /**
  18. * 生命周期函数--监听页面初次渲染完成
  19. */
  20. onReady: function () {
  21. },
  22. /**
  23. * 生命周期函数--监听页面显示
  24. */
  25. onShow: function () {
  26. },
  27. /**
  28. * 生命周期函数--监听页面隐藏
  29. */
  30. onHide: function () {
  31. },
  32. /**
  33. * 生命周期函数--监听页面卸载
  34. */
  35. onUnload: function () {
  36. },
  37. /**
  38. * 页面相关事件处理函数--监听用户下拉动作
  39. */
  40. onPullDownRefresh: function () {
  41. },
  42. /**
  43. * 页面上拉触底事件的处理函数
  44. */
  45. onReachBottom: function () {
  46. },
  47. /**
  48. * 用户点击右上角分享
  49. */
  50. onShareAppMessage: function () {
  51. return {
  52. title: '您有一份启辰星专属礼品待领取',
  53. imageUrl: this.data.imgUrl + "/newImages3/28_" + (this.data.swiperCurrent+1)+".png?v=004",
  54. path: "/pages/coupon/coupon?scene=" + app.globalData.openid
  55. }
  56. },
  57. changeType:function(){//切换分享类型
  58. this.setData({
  59. selectType:this.data.selectType==1?2:1
  60. })
  61. }
  62. })