123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217 |
- import Taro, { Component } from '@tarojs/taro'
- import { Provider } from '@tarojs/redux'
- import Index from './pages/index'
- import configStore from './store'
- import 'taro-ui/dist/style/index.scss'
- import './app.scss'
- import api from './api'
- Taro.api = api
- import * as tools from './utils/tool'
- import * as mixins from './mixins'
- Taro.$msg = tools.msgBase
- Taro.$CR = tools.configRight
- Taro.$msgConfirm = tools.confirmMsgFn
- Taro.$AHU = mixins.addHistoryUrl
- Taro.$getLvIcon = mixins.getLvIcon
- Taro.$initBaseData = mixins.initBaseData
- // 如果需要在 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',
- ],
- subPackages: [
- {
- root: 'pagesHouse/',
- pages: [
- 'index',
- 'list',
- 'indexDtl',
- 'indexDtlMore',
- 'indexDtlAround',
- // 'indexDtlMap',
- 'produceType',
- 'vr',
- 'photo',
- 'news',
- 'follow',
- 'history',
- 'search',
- 'pkList',
- 'pkDtl',
- 'pkAdd',
- 'price',
- 'priceChart',
- 'bargain',
- 'cooperate',
- ]
- },
- {
- root: 'pagesMore/',
- pages: [
- 'news/index',
- 'news/list',
- 'news/indexDtl',
- 'news/tpDtl',
- 'news/plan',
- 'news/planDtl',
- 'center/index',
- 'center/group',
- 'center/feedback',
- 'center/loanCalc',
- 'center/webViews',
- 'center/coupon',
- 'center/sxf',
- 'center/saleEdit',
- 'center/userEdit',
- 'center/uploadRoom',
- 'comment/add',
- 'comment/list',
- 'comment/dtl',
- 'qa/list',
- 'qa/add',
- // 'qa/dtl',
- 'test/index',
- ]
- },
- {
- root: 'pagesPlan/',
- pages: [
- 'apply',
- 'apply2',
- 'yanfang',
- 'discountGroup',
- 'queryBuyHouse',
- ]
- },
- {
- root: 'pagesSchool/',
- pages: [
- 'index',
- 'indexDtl',
- 'houseList',
- 'class',
- 'theme',
- 'area',
- ]
- },
- {
- root: 'pagesQa/',
- pages: [
- 'index',
- 'add',
- 'dtl',
- 'dtlSub',
- 'msg/index',
- 'msg/chat',
- 'msg/message',
- // 'todayNews',
- 'area',
- 'areaImg',
- 'areaSub',
- 'areaEstate',
- 'yhBaike',
- ]
- },
- {
- root: 'pagesRoom/',
- pages: [
- 'estate',
- 'list',
- 'dtl',
- 'roomPrice',
- 'roomPriceImg',
- 'roomPriceList',
- // 'card/index',
- 'follow/list',
- 'follow/user',
- 'follow/add',
- 'follow/history',
- 'follow/lineup',
- 'follow/lineup2',
- 'follow/lineupRecord',
- 'follow/lineupRecord2',
- ]
- },
- {
- root: 'pagesOther/',
- pages: [
- 'index',
- 'integralRecord',
- 'channel/index',
- 'foodout/index',
- 'map/dtl',
- 'map/dtl2',
- 'map/metro',
- 'map/vr',
- 'bankRate/index',
- 'brand/index'
- ]
- },
-
- ],
- window: {
- backgroundTextStyle: 'light',
- navigationBarBackgroundColor: '#fff',
- navigationBarTitleText: 'WeChat',
- navigationBarTextStyle: 'black'
- },
- plugins: {
- // "chooseLocation": {
- // "version": "1.0.9",
- // "provider": "wx76a9a06e5b4e693e"
- // },
- "live-player-plugin": {
- "version": "1.3.4",
- "provider": "wx2b03c6e691cd7370"
- }
- },
- permission: {
- "scope.userLocation": {
- "desc": "你的位置信息将用于小程序定位"
- }
- }
- }
- componentWillMount () {
- // Taro.loadFontFace({
- // global: true,
- // family: 'pf',
- // source: 'url("http://h5.honglounews.com/PF.TTF")',
- // })
- mixins.initBaseData()
- }
- componentDidMount () {}
- componentDidShow () {}
- componentDidHide () {}
- componentDidCatchError () {}
- // 在 App 类中的 render() 函数没有实际作用
- // 请勿修改此函数
- render () {
- return (
- <Provider store={store}>
- <Index />
- </Provider>
- )
- }
- }
- Taro.render(<App />, document.getElementById('app'))
|