123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186 |
- 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: {
- rights: {
- t: ['养老', '医疗', '失业', '工伤', '生育'],
- s: '0',
- a: {},
- },
- citys: {
- t: ['北京', '上海', '广州', '深圳', '杭州'],
- s: '0',
- a: {},
- c: [
- { c1: ['购房必须在本市连续缴纳', '5年社保', '或个税,具体还需根据办理时的要求而定。若因工作变动等原因造成未缴或补缴税款且不超过3个月,视为连续缴纳。'], c2: ['买车摇号须在本市连续缴纳', '5年社保', '不能断月(如有断月,补缴后有效)'] },
- { c1: ['购房必须在本市63个月内连续缴纳', '60个月', '的社保或个税'], c2: ['买车摇号必须在本市连续缴纳满', '3年社保'] },
- { c1: ['购房必须在本市连续缴纳', '5年社保', '或个税'], c2: ['买车摇号必须在本市连续缴纳满', '2年社保', '(不含补缴)'] },
- { c1: ['购房须在本市连续缴纳', '5年社保', '或个税,中间无间断'], c2: ['买车摇号必须在本市连续缴纳满', '2年社保', '(不含补缴)'] },
- { c1: ['购房须在杭州市购房之日起,前3年内连续缴纳', '2年社保', ',断缴不能超过3个月'], c2: ['买车摇号必须在本市连续缴纳满', '2年社保', '(不含补缴)'] }
- ]
- },
- bgScrollView: {
- scroll: false,
- left: 0
- },
- tab: {
- t: 's',//s社保a公积金
- s: '0',
- i: ['社保权益', '社保缴纳', '社保查询']
- },
-
- },
- goToPurchase: businessT.action(function (sender) {
- wx.navigateTo({
- url: '../purchase-s-details/purchase-s-details?isSupplementaryPay=0',
- })
- }),
- goToCalculate: businessT.action(function (sender) {
- businessT.debugLog('goToCalculate')
- wx.navigateToMiniProgram({
- appId: 'wxcb0ec6ae8c422c3b',
- })
- }),
- changeRights: businessT.action(function (sender) {
- businessT.debugLog(sender.currentTarget.id)
- if (sender.currentTarget.id == this.data.rights.s) {
- return
- }
- this.data.rights.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.rights.a = animation.export()
- this.setData({
- rights: this.data.rights
- })
- }),
- 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多个城市,专业团队操作'
- }
- }
- })
|