postage.js 1.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100
  1. // pages/postage/postage.js
  2. const getReq = require('../../config.js').getReq
  3. let appInstance = getApp()
  4. Page({
  5. /**
  6. * 页面的初始数据
  7. */
  8. data: {
  9. currentIndex: 0,
  10. rechargeGearActiveIndex: 0,
  11. tabsData: [
  12. { id: 0, icon: '/image/postage/sinopec.png', title: '中国石化', tips: '选择油卡:(一人最多十张油卡)' },
  13. { id: 1, icon: '/image/postage/petrochina.png', title: '中国石油', tips: '选择油卡:(一人最多八张油卡)' }
  14. ],
  15. selectArray: [{
  16. "id": "10",
  17. "text": "9066666888"
  18. }, {
  19. "id": "21",
  20. "text": "25288888556"
  21. }],
  22. gearData: [
  23. { faceValue: 100, price: 95 },
  24. { faceValue: 200, price: 190 },
  25. { faceValue: 500, price: 475 },
  26. { faceValue: 1000, price: 950 }
  27. ]
  28. },
  29. handlerClickTabItem(e) {
  30. this.setData({
  31. currentIndex: e.currentTarget.dataset.activeindex
  32. });
  33. },
  34. handlerClickRechargeGear(e) {
  35. this.setData({
  36. rechargeGearActiveIndex: e.currentTarget.dataset.activeindex
  37. });
  38. },
  39. handlerClickAdd(e){
  40. wx.showToast({
  41. title: '尚未实现',
  42. icon: 'none',
  43. duration: 2000,
  44. mask: true
  45. });
  46. },
  47. /**
  48. * 生命周期函数--监听页面加载
  49. */
  50. onLoad: function (options) {
  51. },
  52. /**
  53. * 生命周期函数--监听页面初次渲染完成
  54. */
  55. onReady: function () {
  56. },
  57. /**
  58. * 生命周期函数--监听页面显示
  59. */
  60. onShow: function () {
  61. },
  62. /**
  63. * 生命周期函数--监听页面隐藏
  64. */
  65. onHide: function () {
  66. },
  67. /**
  68. * 生命周期函数--监听页面卸载
  69. */
  70. onUnload: function () {
  71. },
  72. /**
  73. * 页面相关事件处理函数--监听用户下拉动作
  74. */
  75. onPullDownRefresh: function () {
  76. },
  77. /**
  78. * 页面上拉触底事件的处理函数
  79. */
  80. onReachBottom: function () {
  81. }
  82. })