提交 87d9c2bb 编写于 作者: YYYTDMS's avatar YYYTDMS

330_合并地图完成

上级 ef3ecccb
......@@ -10,7 +10,6 @@
android:roundIcon="@mipmap/ic_launcher_round"
android:usesCleartextTraffic="true"
android:allowBackup="false"
android:usesCleartextTraffic="true"
android:theme="@style/AppTheme">
<activity
android:name=".MainActivity"
......
......@@ -16,7 +16,7 @@ class MyHeader extends Component {
backgroundColor="transparent"
barStyle="dark-content"
/>
<Divider style={styles.divider} />
{/*<Divider style={styles.divider} />*/}
<Header
backgroundColor={'#CE9561'}
centerComponent={{
......
......@@ -6,12 +6,14 @@ import {
View,
Text,
StyleSheet,
TouchableOpacity,
TouchableOpacity, ToastAndroid,
} from 'react-native';
const deviceWidthDp = Dimensions.get('window').width;
const deviceHeightDp = Dimensions.get('window').height;
import DropDownModal from '../SingleComponent/DropDownModal';
import RadioView from '../SingleComponent/RadioView';
import {PanResponder} from 'react-native';
/**
* 偏好设置界面
......@@ -26,6 +28,35 @@ class SettingView extends Component {
buildsListsetting: null,
};
}
_panResponder = PanResponder.create({
onStartShouldSetPanResponder: () => true,
onMoveShouldSetPanResponder: () => true,
onPanResponderGrant: () => {
// console.log('开始移动:');
},
onPanResponderMove: (evt, gs) => {
// console.log('正在移动:X轴:' + gs.dx + ',Y轴:' + gs.dy);
},
onPanResponderRelease: (evt, gs) => {
// console.log('结束移动:X轴移动了:' + gs.dx + ',Y轴移动了:' + gs.dy);
if (gs.dx > 50) {
// console.log('由左向右');
} else if (gs.dx < -50) {
// console.log('由右向左');
} else if (gs.dy > 50) {
// console.log('由上向下');
} else if (gs.dy < -50) {
// console.log('由下向上');
// this.props.navigation.back();
this.props.navigation.goBack()
}
},
});
checkCallBack = id => {
this.setState({
flag: id,
......@@ -43,6 +74,7 @@ class SettingView extends Component {
floor: index + 1,
});
};
componentDidMount() {
const {buildsListsort} = this.props.route.params;
const {x1, x2, x3, zl, d1, d2, d3, w1, w2, w3, w4} =
......@@ -62,13 +94,14 @@ class SettingView extends Component {
});
}
}
render() {
const {navigation} = this.props;
const {buildsListsort} = this.props.route.params;
// console.log('pppppp', this.state.buildsListsetting);
// console.log('处理后', buildsListsort);
return (
<View style={styles.container}>
<View style={styles.container} {...this._panResponder.panHandlers}>
<View style={styles.box1}>
<Image
source={require('../../../images/Map/Behavior.png')}
......@@ -129,7 +162,7 @@ class SettingView extends Component {
onCheck={this.checkCallBack}
checked={this.state.flag === 2}
/>
<View style={{flex: 1.5}} />
<View style={{flex: 1.5}}/>
</View>
<View style={styles.box5}>
<TouchableOpacity
......@@ -150,7 +183,8 @@ class SettingView extends Component {
this.state.building == null ||
this.state.floor == null
) {
alert('请设置偏好,微笑');
ToastAndroid.show('请设置偏好~~(^v^)', 500);
} else {
navigation.navigate('RecommendView', {
list: this.state.buildsListsetting,
......@@ -175,6 +209,7 @@ class SettingView extends Component {
);
}
}
const styles = StyleSheet.create({
container: {
flexDirection: 'column',
......
......@@ -11,6 +11,7 @@ class Home extends Component {
}
UNSAFE_componentWillMount() {
if (Platform.OS === 'android') {
BackHandler.addEventListener('hardwareBackPress', this.onBackAndroid);
}
......@@ -24,6 +25,7 @@ class Home extends Component {
onBackAndroid = () => {
//禁用返回键
if (this.lastBackPressed && this.lastBackPressed + 2000 >= Date.now()) {
BackHandler.exitApp(); //直接退出APP
......
......@@ -4513,6 +4513,11 @@ jsonify@~0.0.0:
array-includes "^3.1.4"
object.assign "^4.1.2"
kdbush@^3.0.0:
version "3.0.0"
resolved "https://registry.npmmirror.com/kdbush/-/kdbush-3.0.0.tgz#f8484794d47004cc2d85ed3a79353dbe0abc2bf0"
integrity sha512-hRkd6/XW4HTsA9vjVpY9tuXJYLSlelnkTmVFu4M9/7MIYQtFcHpbugAU7UbOfjOiVSVYl2fqgBuJ32JUmRo5Ew==
kind-of@^3.0.2, kind-of@^3.0.3, kind-of@^3.2.0:
version "3.2.2"
resolved "https://registry.npmmirror.com/kind-of/-/kind-of-3.2.2.tgz"
......@@ -5034,6 +5039,11 @@ mkdirp@^0.5.1:
dependencies:
minimist "^1.2.6"
moment@^2.29.3:
version "2.29.3"
resolved "https://registry.npmmirror.com/moment/-/moment-2.29.3.tgz#edd47411c322413999f7a5940d526de183c031f3"
integrity sha512-c6YRvhEo//6T2Jz/vVtYzqBzwvPT95JBQ+smCytzf7c50oMZRsR/a4w88aD34I+/QVSfnoAnSBFPJHItlOMJVw==
ms@2.0.0:
version "2.0.0"
resolved "https://registry.npmmirror.com/ms/-/ms-2.0.0.tgz"
......@@ -5596,7 +5606,7 @@ prompts@^2.0.1, prompts@^2.4.0:
kleur "^3.0.3"
sisteransi "^1.0.5"
prop-types@*, prop-types@^15.5.10, prop-types@^15.6.0, prop-types@^15.7.2, prop-types@^15.8.1:
prop-types@*, prop-types@^15.5.10, prop-types@^15.5.8, prop-types@^15.6.0, prop-types@^15.7.2, prop-types@^15.8.1:
version "15.8.1"
resolved "https://registry.npmmirror.com/prop-types/-/prop-types-15.8.1.tgz#67d87bf1a694f48435cf332c24af10214a3140b5"
integrity sha512-oj87CgZICdulUohogVAR7AjlC0327U4el4L6eAvOqCeudMDVU0NThNaV+b9Df4dXgSP1gXMTnPdhfe/2qDH5cg==
......@@ -5683,6 +5693,13 @@ react-native-action-button@^2.8.5:
dependencies:
prop-types "^15.5.10"
react-native-amap3d@^3.0.7:
version "3.0.7"
resolved "https://registry.npmmirror.com/react-native-amap3d/-/react-native-amap3d-3.0.7.tgz#51c38ef14d15d55abf52ac0dd34d762a0b88eabd"
integrity sha512-bvER80OSLh/vQe8blY0Cr0NZCD3Yc0pcddOZU+51wS9r8z75QqDFW7lATvDsk3d5PDn+hUYK1XPyKG7rdBf8qw==
dependencies:
supercluster "^7.1.4"
react-native-codegen@^0.0.13:
version "0.0.13"
resolved "https://registry.npmmirror.com/react-native-codegen/-/react-native-codegen-0.0.13.tgz"
......@@ -5693,6 +5710,19 @@ react-native-codegen@^0.0.13:
jscodeshift "^0.13.1"
nullthrows "^1.1.1"
react-native-common-date-picker@^2.3.7:
version "2.3.7"
resolved "https://registry.npmmirror.com/react-native-common-date-picker/-/react-native-common-date-picker-2.3.7.tgz#c9fc6759a36e99e5ab230e9bd3171cad7472e4e3"
integrity sha512-XAell1MdBDjOkmHl6PxkNRstUvdrQmj36tu2zgTPR/EA3Db0Sr/LhwO+pdcA3XlJ7bPWt89tNantM16obzBz6Q==
react-native-drawer@^2.5.1:
version "2.5.1"
resolved "https://registry.npmmirror.com/react-native-drawer/-/react-native-drawer-2.5.1.tgz#08b9314184f48c724f1b467f8859797369798654"
integrity sha512-cxcQNbSWy5sbGi7anSVp6EDr6JarOBMY9lbFOeLFeVYbONiudoqRKbgEsSDgSw3/LFCLvUXK5zdjXCOedeytxQ==
dependencies:
prop-types "^15.5.8"
tween-functions "^1.0.1"
react-native-elements@^3.4.2:
version "3.4.2"
resolved "https://registry.npmmirror.com/react-native-elements/-/react-native-elements-3.4.2.tgz"
......@@ -5774,6 +5804,11 @@ react-native-tab-navigator@^0.3.4:
immutable "^3.8.1"
prop-types "^15.5.10"
react-native-table-component@^1.2.2:
version "1.2.2"
resolved "https://registry.npmmirror.com/react-native-table-component/-/react-native-table-component-1.2.2.tgz#1c9bdcd8f1fd7edf10d1e93ebc3b7877ecd74def"
integrity sha512-7bbsi5431iWcjj3toASh8lFHGi6AG/+MTd4M7GuksXKxx/CFs/Qwv1Ys7D2wgyuYKe3hxWNfSVrteFj0tOYXYw==
react-native-vector-icons@^9.1.0:
version "9.1.0"
resolved "https://registry.npmmirror.com/react-native-vector-icons/-/react-native-vector-icons-9.1.0.tgz#52eaa205f5954d567b7048eb93d58ac854a2c59e"
......@@ -6619,6 +6654,13 @@ sudo-prompt@^9.0.0:
resolved "https://registry.npmmirror.com/sudo-prompt/-/sudo-prompt-9.2.1.tgz"
integrity sha512-Mu7R0g4ig9TUuGSxJavny5Rv0egCEtpZRNMrZaYS1vxkiIxGiGUwoezU3LazIQ+KE04hTrTfNPgxU5gzi7F5Pw==
supercluster@^7.1.4:
version "7.1.5"
resolved "https://registry.npmmirror.com/supercluster/-/supercluster-7.1.5.tgz#65a6ce4a037a972767740614c19051b64b8be5a3"
integrity sha512-EulshI3pGUM66o6ZdH3ReiFcvHpM3vAigyK+vcxdjpJyEbIIrtbmBdY23mGgnI24uXiGFvrGq9Gkum/8U7vJWg==
dependencies:
kdbush "^3.0.0"
supports-color@^5.3.0:
version "5.5.0"
resolved "https://registry.npmmirror.com/supports-color/-/supports-color-5.5.0.tgz"
......@@ -6804,6 +6846,11 @@ tsutils@^3.17.1:
dependencies:
tslib "^1.8.1"
tween-functions@^1.0.1:
version "1.2.0"
resolved "https://registry.npmmirror.com/tween-functions/-/tween-functions-1.2.0.tgz#1ae3a50e7c60bb3def774eac707acbca73bbc3ff"
integrity sha512-PZBtLYcCLtEcjL14Fzb1gSxPBeL7nWvGhO5ZFPGqziCcr8uvHp0NDmdjBchp6KHL+tExcg0m3NISmKxhU394dA==
type-check@^0.4.0, type-check@~0.4.0:
version "0.4.0"
resolved "https://registry.npmmirror.com/type-check/-/type-check-0.4.0.tgz"
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册