// component/tabSort/tabSort.js
var app = getApp()
const wxService = require('../../utils/wxService')
const utils = require('../../utils/util')
const envInfo = require('../../config/index').envInfo

Component({
	/**
	 * 组件的属性列表
	 */
	properties: {
		categorys:{
      type: Array,
      value: []
    }
	},
	attached() {
	
	},
	/**
	 * 组件的初始数据
	 */
	data: {
		currentTab: 0
	},
	/**
	 * 组件的方法列表
	 */
	methods: {
		handelToVipCode() {
      wxService.router(`/pages/memberOfOwn/memberOfOwn`)
		},
		// 设置tab active
		switchNav(event) {
			const ev = event.currentTarget.dataset;
			let cur = ev.current
			let redirectid = ev.redirectid
			console.log('redirectid', redirectid)
			if (this.data.currentTab == cur) {
				return false
			} else {
				this.setData({
					currentTab: cur,
				})
			}
		},
		switchTab(event) {
			var cur = event.detail.current
			this.setData({
				currentTab: cur			
			})
		}
	}
})
