var businessT = require('../../../../tool/business-tool.js') var sysT = require('../../../../tool/sys-tool.js') var businessType = require('../../../../public/business-type.js') var p = require('../../public/model/public.js') import PurchaseOrder from '../../public/model/purchaseOrder.js' Page({ /** * 页面的初始数据 */ data: { citys: { t: ['北京', '上海', '广州', '深圳', '杭州'], s: '0', a: {}, c: [['贷款买房前,必须已连续足额缴存', '12个月', '住房公积金,申请公积金贷款时须正常缴存。'], ['贷款买房前,已连续', '6个月', '正常缴存住房公积金,即可申请公积金贷款。'], ['本市户籍职工', '必须连续足额缴存', '1年', '(含)以上,', '非本市户籍职工', '必须连续足额缴存', '2年', '(含)以上,即可申请公积金贷款。'], ['贷款买房前,已连续足额缴存', '6个月', '(含)以上住房公积金,即可申请公积金贷款。'], ['贷款买房前,按规定正常足额缴存住房公积金,且在申请公积金贷款时,已连续缴存', '6个月', '(含)以上']] }, bgScrollView: { scroll: false, left: 0 }, tab: { t: 'a',//s社保a公积金 s: '0', i: ['公积金权益', '公积金缴存', '公积金查询'] } }, goToPurchase: businessT.action(function (sender) { wx.navigateTo({ url: '../purchase-a-details/purchase-a-details?isSupplementaryPay=0', }) }), changeCity: businessT.action(function (sender) { businessT.debugLog(sender.currentTarget.id) if (sender.currentTarget.id == this.data.citys.s) { return } this.data.citys.s = sender.currentTarget.id var x = sender.currentTarget.id * 120 * sysT.rpxToPx() businessT.debugLog(x) var animation = wx.createAnimation({ duration: 300, timingFunction: 'ease', }) animation.translateX(x).step() this.data.citys.a = animation.export() this.setData({ citys: this.data.citys }) }), tabAction: businessT.action(function (sender) { if (sender.currentTarget.id == this.data.tab.s) { return } this.chageTabAction(sender.currentTarget.id) }), chageTabAction: function (index) { this.data.bgScrollView.scroll = true; this.setData({ bgScrollView: this.data.bgScrollView }) var animation = wx.createAnimation({ duration: 300, timingFunction: 'ease', }) var w = sysT.sysInfo().windowWidth var s = index animation.translateX(s * w / 3).step() this.data.bgScrollView.left = s * sysT.sysInfo().windowWidth this.data.tab.s = index this.data.bgScrollView.scroll = false; this.setData({ tab: this.data.tab, bgScrollView: this.data.bgScrollView }) }, /** * 生命周期函数--监听页面加载 */ onLoad: function (options) { if (options.page) { this.chageTabAction(options.page) } }, /** * 生命周期函数--监听页面初次渲染完成 */ onReady: function () { }, /** * 生命周期函数--监听页面显示 */ onShow: function () { var order = new PurchaseOrder() order.setCity() p.setOrder(order) }, /** * 生命周期函数--监听页面隐藏 */ onHide: function () { }, /** * 生命周期函数--监听页面卸载 */ onUnload: function () { }, /** * 页面相关事件处理函数--监听用户下拉动作 */ onPullDownRefresh: function () { }, /** * 页面上拉触底事件的处理函数 */ onReachBottom: function () { }, /** * 用户点击右上角分享 */ onShareAppMessage: function () { return { path: '/page/home/index', imageUrl: '../../../../icon/public/share_img.png', title: '自助缴社保公积金,覆盖200多个城市,专业团队操作' } } })