Commit 3eff23d8 by lirandong

整合 rn 平台

parent 9e392700
...@@ -28,20 +28,27 @@ ...@@ -28,20 +28,27 @@
"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", "nerv-devtools": "^1.4.0",
"nervjs": "^1.4.0", "nervjs": "^1.4.0",
"react": "16.3.1",
"react-native": "0.55.4",
"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",
......
...@@ -2,7 +2,7 @@ ...@@ -2,7 +2,7 @@
// import { concatParam } from '@/utils/utils' // import { concatParam } from '@/utils/utils'
import { concatParam } from '../common/utils' import { concatParam } from '../common/utils'
// import $config, { message, requestCode, tokens } from '@/config' // import $config, { message, requestCode, tokens } from '@/config'
import { axios, CancelTokenStatic, AxiosInstance } from 'taro-axios' import axios, { CancelTokenStatic, AxiosInstance } from 'axios'
import { BASE_URL, FETCH_TIME_OUT, INTERFACE_REPEAT } from '@/common' import { BASE_URL, FETCH_TIME_OUT, INTERFACE_REPEAT } from '@/common'
import token from '../common/token' import token from '../common/token'
......
@import '~taro-ui/dist/style/components/swipe-action.scss'; // @import '~taro-ui/dist/style/components/swipe-action.scss';
// view { // view {
// // display: flex; // // display: flex;
// // box-sizing: border-box; // // box-sizing: border-box;
......
...@@ -8,7 +8,6 @@ import configStore from './store' ...@@ -8,7 +8,6 @@ import configStore from './store'
import token from './common/token' import token from './common/token'
import './app.scss' import './app.scss'
// import 'taro-ui/dist/style/index.scss'
// 如果需要在 h5 环境中开启 React Devtools // 如果需要在 h5 环境中开启 React Devtools
// 取消以下注释: // 取消以下注释:
......
...@@ -213,7 +213,8 @@ class MyDevice extends Component { ...@@ -213,7 +213,8 @@ class MyDevice extends Component {
return ( return (
<View className="my-device"> <View className="my-device">
<ScrollView> <ScrollView>
{list.map(item => ( <Text>22222233</Text>
{/* {list.map(item => (
<AtSwipeAction <AtSwipeAction
autoClose autoClose
key={item.equipmentId} key={item.equipmentId}
...@@ -235,7 +236,7 @@ class MyDevice extends Component { ...@@ -235,7 +236,7 @@ class MyDevice extends Component {
> >
<DeviceItem {...item} /> <DeviceItem {...item} />
</AtSwipeAction> </AtSwipeAction>
))} ))} */}
</ScrollView> </ScrollView>
<View className="add-device" onClick={this.selectAddDevice}> <View className="add-device" onClick={this.selectAddDevice}>
<Text className="icon">添加</Text> <Text className="icon">添加</Text>
......
...@@ -5,7 +5,7 @@ import { connect } from '@tarojs/redux' ...@@ -5,7 +5,7 @@ import { connect } from '@tarojs/redux'
import { showMyToast } from '@/common/utils' import { showMyToast } from '@/common/utils'
import Taro, { Component } from '@tarojs/taro' import Taro, { Component } from '@tarojs/taro'
import { changeDeviceList } from '@/actions/counter' import { changeDeviceList } from '@/actions/counter'
import { View, ScrollView } from '@tarojs/components' import { View, ScrollView, Text } from '@tarojs/components'
import FilmListItem from '@/conpoments/film_list_item' import FilmListItem from '@/conpoments/film_list_item'
import './index.scss' import './index.scss'
...@@ -100,7 +100,8 @@ class Films extends Component { ...@@ -100,7 +100,8 @@ class Films extends Component {
return ( return (
<View className="films"> <View className="films">
<ScrollView className="scroll-view" scrollY> <ScrollView className="scroll-view" scrollY>
{list.map(item => ( <Text>1222222</Text>
{/* {list.map(item => (
<AtSwipeAction <AtSwipeAction
autoClose autoClose
key={item.filmId} key={item.filmId}
...@@ -116,7 +117,7 @@ class Films extends Component { ...@@ -116,7 +117,7 @@ class Films extends Component {
> >
<FilmListItem onClick={() => this.goDetail(item)} {...item} /> <FilmListItem onClick={() => this.goDetail(item)} {...item} />
</AtSwipeAction> </AtSwipeAction>
))} ))} */}
</ScrollView> </ScrollView>
</View> </View>
) )
......
@import '@styles/var.scss'; @import '@styles/var.scss';
@import '~taro-ui/dist/style/components/tabs.scss'; // @import '~taro-ui/dist/style/components/tabs.scss';
...@@ -5,7 +5,7 @@ import { AtTabs, AtTabsPane } from 'taro-ui' ...@@ -5,7 +5,7 @@ import { AtTabs, AtTabsPane } from 'taro-ui'
import Taro, { Component, Config } from '@tarojs/taro' import Taro, { Component, Config } from '@tarojs/taro'
import './index.scss' import './index.scss'
import { View } from '@tarojs/components' import { View, Text } from '@tarojs/components'
type PageStateProps = {} type PageStateProps = {}
...@@ -46,20 +46,23 @@ class Device extends Component { ...@@ -46,20 +46,23 @@ class Device extends Component {
} }
render() { render() {
const { current, windowHeight } = this.state // const { current, windowHeight } = this.state
return ( return (
<AtTabs current={current} tabList={tabList} onClick={this.changePage} swipeable={false}> <View>
<AtTabsPane current={current} index={0}> <Text>11111</Text>
<View style={{ height: `${windowHeight}px` }}>
<FilmList />
</View> </View>
</AtTabsPane> // <AtTabs current={current} tabList={tabList} onClick={this.changePage} swipeable={false}>
<AtTabsPane className="at-tabs-page" current={current} index={1}> // <AtTabsPane current={current} index={0}>
<View style={{ height: `${windowHeight}px` }}> // <View style={{ height: `${windowHeight}px` }}>
<DeviceList /> // <FilmList />
</View> // </View>
</AtTabsPane> // </AtTabsPane>
</AtTabs> // <AtTabsPane className="at-tabs-page" current={current} index={1}>
// <View style={{ height: `${windowHeight}px` }}>
// <DeviceList />
// </View>
// </AtTabsPane>
// </AtTabs>
) )
} }
} }
......
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