// pages/postage/postage.js const getReq = require('../../config.js').getReq let appInstance = getApp() Page({ /** * 页面的初始数据 */ data: { currentIndex: 0, rechargeGearActiveIndex: 0, tabsData: [ { id: 0, icon: '/image/postage/sinopec.png', title: '中国石化', tips: '选择油卡:(一人最多十张油卡)' }, { id: 1, icon: '/image/postage/petrochina.png', title: '中国石油', tips: '选择油卡:(一人最多八张油卡)' } ], selectArray: [{ "id": "10", "text": "9066666888" }, { "id": "21", "text": "25288888556" }], gearData: [ { faceValue: 100, price: 95 }, { faceValue: 200, price: 190 }, { faceValue: 500, price: 475 }, { faceValue: 1000, price: 950 } ] }, handlerClickTabItem(e) { this.setData({ currentIndex: e.currentTarget.dataset.activeindex }); }, handlerClickRechargeGear(e) { this.setData({ rechargeGearActiveIndex: e.currentTarget.dataset.activeindex }); }, handlerClickAdd(e){ wx.showToast({ title: '尚未实现', icon: 'none', duration: 2000, mask: true }); }, /** * 生命周期函数--监听页面加载 */ onLoad: function (options) { }, /** * 生命周期函数--监听页面初次渲染完成 */ onReady: function () { }, /** * 生命周期函数--监听页面显示 */ onShow: function () { }, /** * 生命周期函数--监听页面隐藏 */ onHide: function () { }, /** * 生命周期函数--监听页面卸载 */ onUnload: function () { }, /** * 页面相关事件处理函数--监听用户下拉动作 */ onPullDownRefresh: function () { }, /** * 页面上拉触底事件的处理函数 */ onReachBottom: function () { } })