/* * 搜索结果页面 */ import React, { Component } from "react"; import { Platform, StyleSheet, Text, View, Image, TouchableOpacity, ImageBackground, Button, StatusBar, Modal, TouchableHighlight, DeviceEventEmitter, FlatList, TextInput } from "react-native"; import BasePage from "./BasePage"; import Dimensions from './utils/dimensions'; import ShopBox from "./components/ShopBox"; import TopicTitle from './components/TopicTitle'; import ScrollRow from './components/ScrollRow'; import CourseTitle from './components/CourseTitle'; export default class SearchResult extends BasePage { componentDidMount() { const { searchText } = this.props.navigation.state.params; console.log('searchText',searchText) this.setState({ text: searchText }) // courseDetails.getCourseDetails(courseId).then(res => { // console.log('列表',res.data) // const courseList = res.data.course; // const wareList = res.data.wareList; // this.setState({ // courseList, // wareList, // uri: wareList[0].playUrl // }) // }).catch(err => { // console.log(err) // }); } state = { text: '' }; searchBox = () => { return ( this.setState({ text })} value={this.state.text} renderItem={item => this.renderItem(item)} /> ) } renderItem = (item) =>{ return ( ) } render() { return ( this.goBack()} // backPress={() => alert("左侧按钮")} /> {/* this.searchBox()} /> */} ) } } const styles = StyleSheet.create({ searchBox: { width: Dimensions.width, height: 60, alignItems: 'center', justifyContent: 'center', backgroundColor: '#f6f7f8' }, searchInput: { width: '88.5%', height: 40, borderRadius: 20, backgroundColor: '#fff', paddingLeft: 15 } })