mirror of
https://gitee.com/ShopeX/ECShopX_mobile-frontend
synced 2026-08-14 17:41:45 +08:00
72 lines
1.5 KiB
JavaScript
72 lines
1.5 KiB
JavaScript
import Taro, { Component } from '@tarojs/taro'
|
|
import '@tarojs/async-await'
|
|
import { Provider } from '@tarojs/redux'
|
|
import configStore from '@/store'
|
|
import Index from './pages/index'
|
|
|
|
import './app.scss'
|
|
|
|
// 如果需要在 h5 环境中开启 React Devtools
|
|
// 取消以下注释:
|
|
// if (process.env.NODE_ENV !== 'production' && process.env.TARO_ENV === 'h5') {
|
|
// require('nerv-devtools')
|
|
// }
|
|
|
|
const store = configStore()
|
|
|
|
class App extends Component {
|
|
config = {
|
|
pages: [
|
|
'pages/index/index',
|
|
'pages/home/index',
|
|
'pages/item/list',
|
|
'pages/item/detail',
|
|
'pages/cart/index',
|
|
'pages/cart/checkout',
|
|
|
|
'pages/category/index',
|
|
|
|
'pages/auth/login',
|
|
'pages/auth/reg',
|
|
'pages/auth/forgotpwd',
|
|
|
|
'pages/cashier/index',
|
|
|
|
'pages/member/index',
|
|
'pages/member/favorite',
|
|
'pages/member/integral',
|
|
'pages/member/pay',
|
|
'pages/member/recharge',
|
|
'pages/trade/list',
|
|
'pages/trade/detail',
|
|
'pages/trade/rate'
|
|
],
|
|
window: {
|
|
backgroundTextStyle: 'light',
|
|
navigationBarBackgroundColor: '#fff',
|
|
navigationBarTitleText: 'WeChat',
|
|
navigationBarTextStyle: 'black'
|
|
}
|
|
}
|
|
|
|
componentDidMount () {}
|
|
|
|
componentDidShow () {}
|
|
|
|
componentDidHide () {}
|
|
|
|
componentDidCatchError () {}
|
|
|
|
// 在 App 类中的 render() 函数没有实际作用
|
|
// 请勿修改此函数
|
|
render () {
|
|
return (
|
|
<Provider store={store}>
|
|
<Index />
|
|
</Provider>
|
|
)
|
|
}
|
|
}
|
|
|
|
Taro.render(<App />, document.getElementById('app'))
|