import Taro, {Component} from '@tarojs/taro'
import Index from './pages/index'
import './app.scss'

class App extends Component {
config = {
pages: [
'pages/index/index',
'pages/me/index',
'pages/category/index'
],
window: {
navigationBarBackgroundColor: '#000000',
backgroundTextStyle: 'light',
navigationBarBackgroundColor: '#fff',
navigationBarTitleText: 'application name',
navigationBarTextStyle: 'black',
navigationStyle: 'default/custom',
backgroundTextStyle: 'dark/light',
backgroundColorTop: '#ffffff',
backgroundColorBottom: '#ffffff',
enablePullDownRefresh: true,
onReachBottomDistance: 50,
pageOrientation: 'auto/portrait/landscape'
},
tabBar: {
color: '#aabbcc',
selectedColor: '#ffffff',
backgroundColor: '#000000',
borderStyle: 'black/white',
list: [
{
pagePath: '/pages/index/index',
text: 'home',
iconPath: '', // max 40kb, 81px*81px
selectedIconPath: '', // max 40kb, 81px*81px
}
],
postion: 'bottom/top',
custom: true/false
},
networkTimeout: {
request: 60000, // Taro.request
connectSocket: 60000, // Taro.connectSocket
uploadFile: 60000, // Taro.uploadFile
downloadFile: 60000 // Taro.downloadFile
},
debug: true,
functionalPages: true,
subPackages: [
],
workers: '/worker/path/',
requiredBackgroundModes: ['sound'],
plugins: {

},
preloadRule: {

},
resizable: true,
navigateToMiniProgramAppIdList: [
'appid001','appid02'
],
usingComponents: {

},
permission:{
'scope.userLocation': {
desc: '你的位置信息将用于小程序接口的效果展示'
}
}
}

componentWillMount(){
const {path, scene, query, shareTicket, referrerInfo} = this.$router.params
const {appId, extraData, sourceServiceId} = referrerInfo
}

componentDidMount(){
const {path, scene, query, shareTicket, referrerInfo} = this.$router.params
const {appId, extraData, sourceServiceId} = referrerInfo
}

// 对应小程序的 onShow()
componentDidShow(){
const {path, scene, query, shareTicket, referrerInfo} = this.$router.params
const {appId, extraData, sourceServiceId} = referrerInfo
}

// 对应小程序 onHide()
componentDidHide(){

}

// 对应小程序的 onError()
componentDidCatchError(String error){

}

// 对应小程序的 onPageNotFound()
componentDidNotFound(Object){
const {path, query, isEntryPage} = Object
}

}