chooseRefundWay.js 1.6 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283
  1. // pages/chooseRefundWay/chooseRefundWay.js
  2. Page({
  3. /**
  4. * 页面的初始数据
  5. */
  6. data: {
  7. refundItem:{},
  8. refundType: 2, //退款类型 1整单 2单个物品
  9. },
  10. /**
  11. * 生命周期函数--监听页面加载
  12. */
  13. onLoad: function (options) {
  14. //拿到上页传来的数据存入本地缓存
  15. var refundItem = wx.getStorageSync("refundItem");
  16. var refundType = options.refundType // 退款类型 1整单 2单个物品
  17. this.setData({
  18. refundItem: refundItem,
  19. refundType: refundType
  20. });
  21. console.log(this.data.refundItem)
  22. console.log('退款类型 1整单 2单个物品:',this.data.refundType)
  23. },
  24. toRefundPage:function(e){
  25. var type = e.currentTarget.dataset.type;
  26. console.log(this.data.refundType)
  27. wx.navigateTo({ //通过wx.redirectTo实现跳转(关闭当前页面,跳转到应用内某个页面)
  28. url: '/pages/applyRefund/applyRefund?type='+ type + '&refundType=' + this.data.refundType,
  29. })
  30. },
  31. /**
  32. * 生命周期函数--监听页面初次渲染完成
  33. */
  34. onReady: function () {
  35. },
  36. /**
  37. * 生命周期函数--监听页面显示
  38. */
  39. onShow: function () {
  40. },
  41. /**
  42. * 生命周期函数--监听页面隐藏
  43. */
  44. onHide: function () {
  45. },
  46. /**
  47. * 生命周期函数--监听页面卸载
  48. */
  49. onUnload: function () {
  50. },
  51. /**
  52. * 页面相关事件处理函数--监听用户下拉动作
  53. */
  54. onPullDownRefresh: function () {
  55. },
  56. /**
  57. * 页面上拉触底事件的处理函数
  58. */
  59. onReachBottom: function () {
  60. },
  61. /**
  62. * 用户点击右上角分享
  63. */
  64. onShareAppMessage: function () {
  65. }
  66. })