|
@@ -195,7 +195,21 @@ export default class RegionModal extends Component<Props> {
|
|
|
</Modal>
|
|
|
);
|
|
|
}
|
|
|
-
|
|
|
+ componentWillMount() {
|
|
|
+ for (var i = 0; i < this.state.cityjson.length; i++) {
|
|
|
+ if (this.props.provinceName === CitysData.provinces[i].provinceName) {
|
|
|
+ this.state.provinces_views_index = i;
|
|
|
+ this.state.click_provinces_name = this.props.provinceName;
|
|
|
+ this.state.city_data = CitysData.provinces[i].citys;
|
|
|
+ for (var j = 0; j < this.state.city_data.length; j++) {
|
|
|
+ if (this.props.citys === this.state.city_data[j].citysName) {
|
|
|
+ this.state.city_views_index = j;
|
|
|
+ this.state.click_city_name = this.props.citys;
|
|
|
+ }
|
|
|
+ }
|
|
|
+ }
|
|
|
+ }
|
|
|
+ }
|
|
|
provinces_onlayout() {
|
|
|
if (this.state.provinces_views_index != -1) {
|
|
|
this.provinces_scroll.scrollTo({
|
|
@@ -294,6 +308,7 @@ export default class RegionModal extends Component<Props> {
|
|
|
this.state.city_views = [];
|
|
|
for (var i = 0; i < citys.length; i++) {
|
|
|
let index = i;
|
|
|
+ console.log("this.state.city_views_index:" + this.state.city_views_index);
|
|
|
if (this.state.city_views_index == i) {
|
|
|
textstyle = styles.item_text_click;
|
|
|
} else {
|