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

Component({
	/**
	 * 组件的属性列表
	 */
	properties: {
		tabList:{
      type: Array,
      type: []
    }
	},
	attached() {
		console.log('----', this.data.tabList)
		this.setData({
			categoryList: this.data.tabList
		})
	},
	/**
	 * 组件的初始数据
	 */
	data: {
		categoryList:[],
		currentTab: 0
	},
	/**
	 * 组件的方法列表
	 */
	methods: {
		// _getUserInfo(res = {}) {
		// 	wxService.nextTick(() => {
		// 		this.triggerEvent('getAuth', res);
		// 	})
		// },
		// handelToCart() {
		// 	wxService.router(`/pages/cart/cart`)
		// },
		// // 设置tab active
		// switchNav(event) {
		// 	utilLink.currentLinkRouter(event, this)
		// },
		switchTab(event) {
			var cur = event.currentTarget.dataset.current
			this.setData({
				currentTab: cur
			})
		}
	}
})
