view beranda
unknown
javascript
4 years ago
27 kB
23
Indexable
<SafeAreaView style={{ flex: 1 }}> <StatusBar barStyle="dark-content" /> {/* <Button title="Show modal" onPress={toggleModal} /> */} <Modal animationIn={"slideInUp"} animationOut={"slideOutDown"} animationInTiming={1000} animationOutTiming={0} backdropColor={"rgba(0,0,0,0.8)"} isVisible={isModalVisible} > <View style={{ flex: 1, justifyContent: "center", alignItems: "center", marginTop: 22}}> <View style={{ width:w*0.94, height:w*0.4, backgroundColor:"white", shadowColor: "#000", shadowOffset: { width: 0, height: 2 }, shadowOpacity: 0.25, shadowRadius: 4, elevation: 5, borderRadius:normalize(12), alignItems:"center", paddingHorizontal:10, paddingTop:normalize(14), paddingBottom:normalize(14), // borderWidth:1, // borderColor:"" }}> <View style={{ flex:1, // justifyContent:"space-between" // backgroundColor:"red" }} > <Text style={{ fontWeight:"bold", fontSize:normalize(18), textAlign:"center" }}>8739172134</Text> <View padding={10}/> <Text style={{ // fontWeight:"bold", fontSize:normalize(16), textAlign:"center" }}>Upload ARC Anda terlebih dahulu</Text> <View padding={10}/> <TouchableOpacity onPress={()=>{ navigation.navigate("Account"); }} style={{ backgroundColor:"#DE2727", width:w*0.7, height:h*0.05, alignItems:"center", justifyContent:"center", borderRadius:normalize(10), }} onPress={toggleModal}> <Text style={{ fontSize:normalize(16), color:"white" }}>Upload Sekarang!</Text> </TouchableOpacity> {/* <View padding={8}/> */} </View> { Platform.OS === 'ios' ? ( <View padding={40}/> ) : ( <View padding={0}/> )} <View style={{ width:w, height:"auto", backgroundColor:"green", alignItems:"center", }} > <View style={{ position:"absolute", top:normalize(2), }}> <Image source={require("../../../assets/segitiga.png")} style={{ width:44, height:40, }}/> </View> </View> </View> </View> </Modal> {Status == 0 ? ( <UIActivityIndicator color="red" /> ) : ( <ScrollView showsVerticalScrollIndicator={false} refreshControl={ <RefreshControl refreshing={refreshing} onRefresh={onRefresh} /> } > <View style={{ width: w, height:h*0.3, }}> <ImageBackground // source={require("../../../assets/images/sore.jpg")} source={{ // uri: `http://52.231.160.254:8081/assets/bg/pagi.png`, uri: `http://52.231.160.254:8081/assets/bg/${infoImage}`, }} style={{ flex: 1, resizeMode: "cover", }} > {/* <View style={{ flex: 1, backgroundColor:"rgba(0,0,0,0.2)", }}></View> */} <View style={{ // backgroundColor:"blue", flex:1, justifyContent:"center" }}> <View style={{ width: w, backgroundColor:"rgba(0,0,0,0.2)", height:h*0.26, }}> <View padding={10}/> <View style={{ width:w, height:"auto", paddingHorizontal:normalize(14), // backgroundColor:"red" }}> <View style={{ justifyContent:"space-between", flexDirection:"row" }}> <View> <Text style={{ fontSize:normalize(20), color:"white", fontFamily: Platform.OS === "android" ? "HelveticaNeueBd" : "HelveticaNeue-Medium", }}>{numberTelepon}</Text> <View padding={4}/> <Text style={{ fontSize:normalize(14), color:"white", fontFamily: Platform.OS === "android" ? "HelveticaNeueMed" : "HelveticaNeue-Medium", }}>Pelanggan Non Kartu as {satu}</Text> <View padding={4}/> <Text style={{ fontSize:normalize(20), color:"white", fontWeight:"bold", textAlign:"center" }}> {/* {balance==" - "?"":"US $"} */} {balance=="-"?"0":"0"} </Text> </View> <View style={{ alignItems:"flex-end" }}> {/* <Icon name="envelope" size={30} color="white" /> */} <TouchableOpacity onPress={() => { navigation.navigate("Message"); }} style={{ width: wp("10%"), height: hp("4%"), backgroundColor: "white", borderRadius: 10, }} > <Image source={require("../../../assets/icons/iconhome/PESAN.png")} style={{ width: wp("10%"), height: hp("4%"), backgroundColor: "white", borderRadius: 10, }} /> {DataBadgeCount==""?null:( <Badge badgeStyle={{ backgroundColor: "red",position:"absolute",top:normalize(-30),right:normalize(-2)}} containerStyle={{}} // onPress={() => { // alert("onPress"); // }} textProps={{}} textStyle={{ color: "#EFE",fontFamily: Platform.OS === "android" ? "HelveticaNeueMed" : "HelveticaNeue-Medium", textAlign: "center", // fontSize: normalize(20), }} value={DataBadgeCount} options={{}} /> )} </TouchableOpacity> <View padding={2}/> <Text style={{ fontSize:normalize(20), color:"white", fontWeight:"bold" }}>{info}</Text> <View padding={2}/> <View style={{ flexDirection:"row" }}> <Text style={{ fontSize:normalize(20), color:"white", fontWeight:"bold", fontFamily: Platform.OS === "android" ? "HelveticaNeueBd" : "HelveticaNeue-Medium", }}>STS</Text> <View padding={2}/> <View style={{ width:w*0.08, height:w*0.08, backgroundColor:"#C4C4C4", borderRadius:normalize(50) }}> </View> </View> </View> </View> </View> </View> </View> </ImageBackground> </View> {/* show package */} <View style={{ width:w, height:"auto", alignItems:"center", position:"relative", top:normalize(-50) }}> <View style={{ width:w*0.94, height:"auto", backgroundColor:"white", borderRadius:normalize(10), shadowColor: "#000", shadowOffset: { width: 0, height: 2, }, shadowOpacity: 0.25, shadowRadius: 3.84, elevation: 2, flexDirection:"row", flexWrap:"wrap", paddingTop:normalize(10), // paddingBottom:normalize(10) // marginBottom:normalize(10) }}> {DataPackageType.map((index,key)=>( <TouchableOpacity onPress={() => { index.pk == 1 ? Linking.openURL( `https://mgtt.com.tw/?system=arc&page=remit&ui=store&mmr=1&bno=${bno}&cno=${msisdnTw}&lang=IDN` ) : index.pk == 12 ? Linking.openURL( `https://mgtt.com.tw/?ui=store&line=1&lang=IDN` ) : index.pk == 4 ? navigation.navigate("PulsaTaiwan", { itemId: index.pk, name_id: index.name_id, name_en: index.name_en, }) : index.pk == 5 ? navigation.navigate("PaketDataInternet", { itemId: index.pk, name_id: index.name_id, name_en: index.name_en, }) : index.pk == 6 ? navigation.navigate("PulsaIndonesia", { itemId: index.pk, name_id: index.name_id, name_en: index.name_en, }) : index.pk == 7 ? navigation.navigate("VoucherGame", { itemId: index.pk, name_id: index.name_id, name_en: index.name_en, }) : index.pk == 8 ? navigation.navigate("Emoney", { itemId: index.pk, name_id: index.name_id, name_en: index.name_en, }) :index.pk == 9 ? navigation.navigate("SubTabTokenListrik", { itemId: index.pk, name_id: index.name_id, name_en: index.name_en, }) : index.pk == 10 ? navigation.navigate("Donasi", { itemId: index.pk, name_id: index.name_id, name_en: index.name_en, }) :index.pk == 3 ? navigation.navigate("InternetAs", { itemId: index.pk, name_id: index.name_id, name_en: index.name_en, }) :navigation.navigate("InternetAs", { itemId: index.pk, name_id: index.name_id, name_en: index.name_en, }); }} key={key} style={{ width: w*0.94/4, height:"auto", // backgroundColor:"grey", alignItems:"center", marginBottom:normalize(10) }}> <Image style={{ width:w*0.14, height:w*0.14, }} source={{uri:index.icon_class.replace("icon_blue","icon_nonka")}} /> <View padding={2}/> <Text style={{ fontSize:normalize(12), color:"black", fontWeight:"bold", textAlign:"center", paddingHorizontal:normalize(5) }}> {bahasatext == "id" ? index.name_id : index.name_en}</Text> <View padding={2}/> </TouchableOpacity> ))} </View> </View> {/* end package type */} {/* start show package data */} <View style={{ // flex: 2, width: wp("100%"), height: h * 0.38, // backgroundColor: "red", paddingHorizontal: 10, }} > <View> <Text allowFontScaling={false} style={{ fontSize: normalize(16), fontFamily: Platform.OS === "android" ? "HelveticaNeueMed" : "HelveticaNeue-Medium", paddingBottom: 10, }} > KHUSUS HANYA UNTUKMU </Text> </View> <View style={{ backgroundColor: "white", //white // width: "100%", // height: // Platform.OS === "ios" // ? height.height * 0.28 // : height.height * 0.29, height: "auto", borderRadius: 8, padding: 10, }} > <ScrollView horizontal={true} showsHorizontalScrollIndicator={false} contentContainerStyle={ { // paddingLeft: 10, // paddingRight: 10, // alignItems: 'center', } } // style={{alignSelf: 'center'}} > {data.map((index, key) => ( <View key={key} style={{ borderRadius: 5, backgroundColor: "white", //white width: w * 0.72, // height: // Platform.OS === "android" // ? height.height * 0.24 // : height_dua * 0.22, height: "auto", borderColor: "#ecedef", borderWidth: 1, margin: 6, // padding: 10, overflow: "hidden", shadowColor: "#000", shadowOffset: { width: 0, height: 2, }, shadowOpacity: 0.25, shadowRadius: 3.84, elevation: 2, }} > <ImageBackground source={require("../../../assets/icons/bg_package.png")} style={{ height: Platform.OS === "ios" ? 120 : 125, // height: height.height * 0.1, width: w * 0.72, // backgroundColor: "black", // opacity: 0.9, }} > <View style={{ // backgroundColor: "red", // flexDirection: "column", // alignContent: "space-between", backgroundColor: "#d2d2d2", flex: 1, opacity: 0.8, // padding: 4, }} > <View style={{ flex: 1, // backgroundColor: "orange" }} > <Text allowFontScaling={false} numberOfLines={1} style={{ fontSize: normalize(18), paddingHorizontal: 10, paddingVertical: 10, top: 26, fontFamily: Platform.OS === "android" ? "HelveticaNeueLt" : "HelveticaNeue-Light", }} > halo </Text> </View> <View // key={key} style={{ // flex: 1, flexDirection: "row", paddingHorizontal: 10, // backgroundColor: "orange", // height: "100%", // position: "absolute", // buttom: 35, // alignSelf: "flex-end", paddingBottom: 16, }} > <View style={{ backgroundColor: "#ecedef", // backgroundColor: "white", borderRadius: 8, flexDirection: "row", alignItems: "center", paddingVertical: 3, paddingHorizontal: 6, fontFamily: Platform.OS === "android" ? "HelveticaNeueMed" : "HelveticaNeue-Medium", }} > <Image source={require("../../../assets/icons/iconCardPackage/Jampasir.png")} style={{ width: 18, height: 24 }} /> <Text allowFontScaling={false} style={{ fontSize: normalize(14), fontFamily: Platform.OS === "android" ? "HelveticaNeueMed" : "HelveticaNeue-Medium", // paddingRight: 10, marginLeft: -2, }} > halo </Text> </View> {/* */} <View style={{ backgroundColor: "#ecedef", // backgroundColor: "white", borderRadius: 8, flexDirection: "row", alignItems: "center", paddingVertical: 3, paddingHorizontal: 6, marginLeft: 10, fontFamily: Platform.OS === "android" ? "HelveticaNeueMed" : "HelveticaNeue-Medium", }} > <Image source={require("../../../assets/icons/iconCardPackage/Internet.png")} style={{ width: 24, height: 24 }} /> <Text allowFontScaling={false} style={styles.TextDetail} > halo </Text> </View> {/* */} </View> </View> </ImageBackground> <View style={{ // flex: 1, // width: width.width * 0.7, // height: height.height * 0.1, flexDirection: "row", justifyContent: "center", alignItems: "center", // backgroundColor: "green", paddingTop: 10, paddingBottom: 10, }} > <Left> <View style={{ marginLeft: 15 }}> <Text allowFontScaling={false} style={{ fontSize: normalize(16), fontFamily: Platform.OS === "android" ? "HelveticaNeueMed" : "HelveticaNeue-Medium", }} > halo </Text> </View> </Left> <Right> <TouchableOpacity style={{ backgroundColor: "red", width: wp("20%"), height: Platform.OS === "ios" ? 35 : 35, marginRight: 15, borderRadius: 5, justifyContent: "center", }} // onPress={() => { // } > <Text allowFontScaling={false} style={{ color: "white", fontSize: normalize(16), textAlign: "center", fontFamily: Platform.OS === "android" ? "HelveticaNeueMed" : "HelveticaNeue-Medium", }} > Beli {/* {bahasatext == "id" ? "Beli" : "Purchase"} */} </Text> </TouchableOpacity> </Right> </View> </View> ))} </ScrollView> </View> </View> {/* end show data */} </ScrollView> )} </SafeAreaView>
Editor is loading...