StoreAudit.js 4.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134
  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 { setNavigation, pushRouter } = useModel("routersModel", true);
  31. const { status, changeGuideStep } = useModel("userModel");
  32. const {
  33. storeAudio,
  34. storeAudioText1,
  35. storeAudioText2,
  36. storeAudioText3,
  37. storeAudioText4,
  38. complete,
  39. } = useModel("wordsModel");
  40. const [categoryList, changeCategoryList] = React.useState([]);
  41. const [merchantNatureList, changeMerchantNatureList] = React.useState([]);
  42. useFocusEffect(
  43. React.useCallback(() => {
  44. changeBackground(theme["color-primary-500"]);
  45. setNavigation(navigation);
  46. }, [])
  47. );
  48. const canNext = React.useMemo(() => {
  49. return true;
  50. }, [name]);
  51. return (
  52. <>
  53. <NavHeaderBar title={storeAudio} back={false} />
  54. <ScrollPage>
  55. <Layout style={styles.container}>
  56. {status == "PENDING" ? (
  57. <>
  58. <Image
  59. source={require("../assets/images/shenhe.png")}
  60. style={styles.icon}
  61. />
  62. <Text
  63. category='h6'
  64. status='info'
  65. style={styles.text}
  66. >
  67. {storeAudioText1}
  68. </Text>
  69. <Text
  70. category='h6'
  71. status='info'
  72. style={styles.text}
  73. >
  74. {storeAudioText2}
  75. </Text>
  76. </>
  77. ) : (
  78. <>
  79. <Image
  80. source={require("../assets/images/shehe1.png")}
  81. style={styles.icon}
  82. />
  83. <Text
  84. category='h6'
  85. status='primary'
  86. style={styles.text}
  87. >
  88. {storeAudioText3}
  89. </Text>
  90. <Text
  91. category='h6'
  92. status='primary'
  93. style={styles.text}
  94. >
  95. {storeAudioText4}
  96. </Text>
  97. <Button
  98. style={styles.button}
  99. onPress={() => changeGuideStep("finish")}
  100. >
  101. {complete}
  102. </Button>
  103. </>
  104. )}
  105. </Layout>
  106. </ScrollPage>
  107. </>
  108. );
  109. }
  110. const styles = StyleSheet.create({
  111. container: {
  112. flex: 1,
  113. paddingBottom: 33,
  114. paddingVertical: 40,
  115. alignItems: "center",
  116. },
  117. icon: {
  118. width: 90,
  119. height: 80,
  120. marginBottom: 26,
  121. },
  122. text: {
  123. fontWeight: "500",
  124. marginBottom: 7,
  125. },
  126. button: {
  127. marginTop: 19,
  128. },
  129. });