StoreAudit.js 4.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129
  1. import * as WebBrowser from "expo-web-browser";
  2. import * as React from "react";
  3. import {
  4. Image,
  5. Platform,
  6. StyleSheet,
  7. TouchableOpacity,
  8. View,
  9. ImageBackground,
  10. } from "react-native";
  11. import scrollPage from "../decorator/scrollPage";
  12. import { useModel } from "flooks";
  13. import {
  14. Layout,
  15. Tab,
  16. TabView,
  17. Text,
  18. useTheme,
  19. Button,
  20. Card,
  21. } from "@ui-kitten/components";
  22. import FormInput from "../components/FormInput";
  23. import { useFocusEffect } from "@react-navigation/native";
  24. import ScrollPage from "../components/ScrollPage";
  25. import NavHeaderBar from "../components/NavHeaderBar";
  26. import GoodsCard from "../components/GoodsCard";
  27. export default function StoreAudit({ navigation, route }) {
  28. const theme = useTheme();
  29. const { changeBackground } = useModel("barModel");
  30. const { status, changeGuideStep } = useModel("userModel");
  31. const {
  32. storeAudio,
  33. storeAudioText1,
  34. storeAudioText2,
  35. storeAudioText3,
  36. storeAudioText4,
  37. complete,
  38. } = useModel("wordsModel");
  39. const [categoryList, changeCategoryList] = React.useState([]);
  40. const [merchantNatureList, changeMerchantNatureList] = React.useState([]);
  41. useFocusEffect(
  42. React.useCallback(() => {
  43. changeBackground(theme["color-primary-500"]);
  44. }, [])
  45. );
  46. return (
  47. <>
  48. <NavHeaderBar title={storeAudio} back={false} />
  49. <ScrollPage>
  50. <Layout style={styles.container}>
  51. {status == "PENDING" ? (
  52. <>
  53. <Image
  54. source={require("../assets/images/shenhe.png")}
  55. style={styles.icon}
  56. />
  57. <Text
  58. category='h6'
  59. status='info'
  60. style={styles.text}
  61. >
  62. {storeAudioText1}
  63. </Text>
  64. <Text
  65. category='h6'
  66. status='info'
  67. style={styles.text}
  68. >
  69. {storeAudioText2}
  70. </Text>
  71. </>
  72. ) : (
  73. <>
  74. <Image
  75. source={require("../assets/images/shehe1.png")}
  76. style={styles.icon}
  77. />
  78. <Text
  79. category='h6'
  80. status='primary'
  81. style={styles.text}
  82. >
  83. {storeAudioText3}
  84. </Text>
  85. <Text
  86. category='h6'
  87. status='primary'
  88. style={styles.text}
  89. >
  90. {storeAudioText4}
  91. </Text>
  92. <Button
  93. style={styles.button}
  94. onPress={() => changeGuideStep("finish")}
  95. >
  96. {complete}
  97. </Button>
  98. </>
  99. )}
  100. </Layout>
  101. </ScrollPage>
  102. </>
  103. );
  104. }
  105. const styles = StyleSheet.create({
  106. container: {
  107. flex: 1,
  108. paddingBottom: 33,
  109. paddingVertical: 40,
  110. alignItems: "center",
  111. },
  112. icon: {
  113. width: 90,
  114. height: 80,
  115. marginBottom: 26,
  116. },
  117. text: {
  118. fontWeight: "500",
  119. marginBottom: 7,
  120. },
  121. button: {
  122. marginTop: 19,
  123. },
  124. });