Commit d95c2a97 by lirandong

fix

parent 8d86221b
const config = { const config = {
projectName: 'Vmatrix-client-taro', projectName: 'taroDemo',
date: '2019-8-6', date: '2019-8-12',
designWidth: 750, designWidth: 750,
deviceRatio: { deviceRatio: {
'640': 2.34 / 2, '640': 2.34 / 2,
......
...@@ -28,59 +28,51 @@ ...@@ -28,59 +28,51 @@
"author": "", "author": "",
"license": "MIT", "license": "MIT",
"dependencies": { "dependencies": {
"@react-native-community/async-storage": "^1.6.1",
"@tarojs/async-await": "1.3.12", "@tarojs/async-await": "1.3.12",
"@tarojs/components": "1.3.12", "@tarojs/components": "1.3.12",
"@tarojs/components-rn": "^1.3.12",
"@tarojs/redux": "1.3.12", "@tarojs/redux": "1.3.12",
"@tarojs/redux-h5": "1.3.12", "@tarojs/redux-h5": "1.3.12",
"@tarojs/router": "1.3.12", "@tarojs/router": "1.3.12",
"@tarojs/taro": "1.3.12", "@tarojs/taro": "1.3.12",
"@tarojs/taro-alipay": "1.3.12", "@tarojs/taro-alipay": "1.3.12",
"@tarojs/taro-h5": "1.3.12", "@tarojs/taro-h5": "1.3.12",
"@tarojs/taro-redux-rn": "^1.3.12",
"@tarojs/taro-rn": "^1.3.12",
"@tarojs/taro-router-rn": "^1.3.12",
"@tarojs/taro-swan": "1.3.12", "@tarojs/taro-swan": "1.3.12",
"@tarojs/taro-tt": "1.3.12", "@tarojs/taro-tt": "1.3.12",
"@tarojs/taro-weapp": "1.3.12", "@tarojs/taro-weapp": "1.3.12",
"axios": "^0.19.0", "axios": "^0.19.0",
"nerv-devtools": "^1.4.0",
"nervjs": "^1.4.0", "nervjs": "^1.4.0",
"react": "16.3.1", "nerv-devtools": "^1.4.0",
"react-native": "0.59.8",
"redux": "^4.0.0", "redux": "^4.0.0",
"redux-logger": "^3.0.6", "redux-logger": "^3.0.6",
"redux-thunk": "^2.3.0", "redux-thunk": "^2.3.0",
"tslib": "^1.8.0" "tslib": "^1.8.0"
}, },
"devDependencies": { "devDependencies": {
"@types/react": "^16.4.8",
"@types/webpack-env": "^1.13.6",
"@tarojs/plugin-babel": "1.3.12", "@tarojs/plugin-babel": "1.3.12",
"@tarojs/plugin-csso": "1.3.12", "@tarojs/plugin-csso": "1.3.12",
"@tarojs/plugin-less": "1.3.12", "@tarojs/plugin-less": "1.3.12",
"@tarojs/plugin-uglifyjs": "1.3.12", "@tarojs/plugin-uglifyjs": "1.3.12",
"@tarojs/webpack-runner": "1.3.12", "@tarojs/webpack-runner": "1.3.12",
"@types/react": "^16.4.8",
"@types/react-native": "^0.60.3",
"@types/webpack-env": "^1.13.6",
"@typescript-eslint/parser": "^1.6.0",
"babel-eslint": "^8.2.3",
"babel-plugin-transform-class-properties": "^6.24.1", "babel-plugin-transform-class-properties": "^6.24.1",
"babel-plugin-transform-decorators-legacy": "^1.3.4", "babel-plugin-transform-decorators-legacy": "^1.3.4",
"babel-plugin-transform-jsx-stylesheet": "^0.6.5", "babel-plugin-transform-jsx-stylesheet": "^0.6.5",
"babel-plugin-transform-object-rest-spread": "^6.26.0", "babel-plugin-transform-object-rest-spread": "^6.26.0",
"babel-preset-env": "^1.6.1", "babel-preset-env": "^1.6.1",
"babel-eslint": "^8.2.3",
"eslint": "^5.16.0", "eslint": "^5.16.0",
"eslint-config-taro": "1.3.12", "eslint-config-taro": "1.3.12",
"eslint-plugin-import": "^2.12.0",
"eslint-plugin-react": "^7.8.2", "eslint-plugin-react": "^7.8.2",
"eslint-plugin-react-hooks": "^1.6.1", "eslint-plugin-react-hooks": "^1.6.1",
"eslint-plugin-taro": "1.3.12", "eslint-plugin-import": "^2.12.0",
"husky": "^3.0.2", "husky": "^3.0.2",
"stylelint": "9.3.0", "stylelint": "9.3.0",
"stylelint-config-standard": "^18.3.0", "stylelint-config-standard": "^18.3.0",
"stylelint-config-taro-rn": "1.3.12", "stylelint-config-taro-rn": "1.3.12",
"stylelint-taro-rn": "1.3.12", "stylelint-taro-rn": "1.3.12",
"eslint-plugin-taro": "1.3.12",
"@typescript-eslint/parser": "^1.6.0",
"tslint": "^5.17.0", "tslint": "^5.17.0",
"tslint-react": "^4.0.0", "tslint-react": "^4.0.0",
"typescript": "^3.0.1" "typescript": "^3.0.1"
......
{ {
"miniprogramRoot": "dist/", "miniprogramRoot": "dist/",
"projectname": "Vmatrix-client-taro", "projectname": "taroDemo",
"description": "", "description": "",
"appid": "touristappid", "appid": "touristappid",
"setting": { "setting": {
......
import { ComponentClass } from 'react' import { ComponentClass } from 'react'
import Taro, { Component, Config } from '@tarojs/taro' import Taro, { Component, Config } from '@tarojs/taro'
import TaroRouter from '@tarojs/taro-router-rn' // import TaroRouter from '@tarojs/taro-router-rn'
import pagesTempaltes from './tempaltes' // import pagesTempaltes from './tempaltes'
import pagesDevice from './device' // import pagesDevice from './device'
import pagesUser from './user' // import pagesUser from './user'
import './index.less' import './index.less'
import { View, Text } from '@tarojs/components'
/** RN 的 tabar */ /** RN 的 tabar */
class Index extends Component { class Index extends Component {
confog: Config = { confog: Config = {
navigationStyle: 'custom' // navigationStyle: 'custom',
} pages: ['pages/home/device/index', 'pages/home/user/index'],
render() {
return <RootStack />
}
}
const RootStack = TaroRouter.initRouter(
[
['pages/home/tempaltes/index', pagesTempaltes],
['pages/home/device/index', pagesDevice],
['pages/home/user/index', pagesUser]
],
Taro,
{
tabBar: { tabBar: {
list: [ list: [
{ {
pagePath: 'pages/home/tempaltes/index',
text: '模板市场',
iconPath: '../../constants/images/market.png',
selectedIconPath: '../../constants/images/market_ac.png'
},
{
pagePath: 'pages/home/device/index', pagePath: 'pages/home/device/index',
text: '设备与视片', text: '设备与视片'
iconPath: '../../constants/images/device.png', // iconPath: './constants/images/device.png',
selectedIconPath: '../../constants/images/device_ac.png' // selectedIconPath: './constants/images/device_ac.png'
}, },
{ {
pagePath: 'pages/home/user/index', pagePath: 'pages/home/user/index',
text: '个人中心', text: '个人中心'
iconPath: '../../constants/images/personal.png', // iconPath: './constants/images/personal.png',
selectedIconPath: '../../constants/images/personal_ac.png' // selectedIconPath: './constants/images/personal_ac.png'
} }
] ]
} }
} }
)
render() {
return <Text>11111</Text>
// return process.env.TARO_ENV === 'rn' ? <RootStack /> : <View />
// return <RootStack />
}
}
// const RootStack = TaroRouter.initRouter(
// [
// ['pages/home/tempaltes/index', pagesTempaltes],
// ['pages/home/device/index', pagesDevice],
// ['pages/home/user/index', pagesUser]
// ],
// Taro,
// {
// tabBar: {
// list: [
// {
// pagePath: 'pages/home/tempaltes/index',
// text: '模板市场',
// iconPath: '../../constants/images/market.png',
// selectedIconPath: '../../constants/images/market_ac.png'
// },
// {
// pagePath: 'pages/home/device/index',
// text: '设备与视片',
// iconPath: '../../constants/images/device.png',
// selectedIconPath: '../../constants/images/device_ac.png'
// },
// {
// pagePath: 'pages/home/user/index',
// text: '个人中心',
// iconPath: '../../constants/images/personal.png',
// selectedIconPath: '../../constants/images/personal_ac.png'
// }
// ]
// }
// }
// )
export default Index as ComponentClass export default Index as ComponentClass
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or sign in to comment