panhui hace 5 años
padre
commit
a4736c00f5

+ 2 - 2
App.js

@@ -21,7 +21,7 @@ import {
 } from "@react-navigation/stack";
 } from "@react-navigation/stack";
 import { useModel } from "flooks";
 import { useModel } from "flooks";
 import { useUpdateEffect, useMount } from "@umijs/hooks";
 import { useUpdateEffect, useMount } from "@umijs/hooks";
-import { enableScreens } from "react-native-screens";
+// import { enableScreens } from "react-native-screens";
 // eslint-disable-next-line no-unused-vars
 // eslint-disable-next-line no-unused-vars
 import * as model from "./models";
 import * as model from "./models";
 import { default as theme } from "./theme.json"; // <-- Import app theme
 import { default as theme } from "./theme.json"; // <-- Import app theme
@@ -35,7 +35,7 @@ import GuideScreens from "./navigation/GuideStackNavigator";
 import BasicScreens from "./navigation/BasicNavigator";
 import BasicScreens from "./navigation/BasicNavigator";
 import { navigationRef } from "./navigation/RootNavigation";
 import { navigationRef } from "./navigation/RootNavigation";
 
 
-enableScreens();
+// enableScreens();
 
 
 const Stack = createStackNavigator();
 const Stack = createStackNavigator();
 
 

+ 13 - 12
Utils/MapUtils.ts → Utils/MapUtils.js

@@ -13,12 +13,13 @@ async function getLocation() {
       if (res.status === "granted") {
       if (res.status === "granted") {
         return Location.getCurrentPositionAsync({
         return Location.getCurrentPositionAsync({
           enableHighAccuracy: true,
           enableHighAccuracy: true,
+          timeout: 5000,
         });
         });
-      } 
-        return Promise.reject();
-      
+      }
+      return Promise.reject();
     })
     })
     .then(({ coords }) => {
     .then(({ coords }) => {
+      console.log(coords);
       lat = coords.latitude;
       lat = coords.latitude;
       lng = coords.longitude;
       lng = coords.longitude;
 
 
@@ -31,9 +32,9 @@ async function getLocation() {
       );
       );
     })
     })
     .then(res => {
     .then(res => {
-      if (res.status === 0) {
-        lat = res.locations[0].lat;
-        lng = res.locations[0].lng;
+      if (res.data.status === 0) {
+        lat = res.data.locations[0].lat;
+        lng = res.data.locations[0].lng;
       }
       }
       return axios.get(
       return axios.get(
         `https://apis.map.qq.com/ws/geocoder/v1/?location=${lat},${lng}&key=${tengxunKey}&get_poi=1`,
         `https://apis.map.qq.com/ws/geocoder/v1/?location=${lat},${lng}&key=${tengxunKey}&get_poi=1`,
@@ -44,16 +45,16 @@ async function getLocation() {
       );
       );
     })
     })
     .then(res => {
     .then(res => {
-      if (res.status === 0) {
+      if (res.data.status === 0) {
         return Promise.resolve({
         return Promise.resolve({
-          addressName: res.result.address,
-          location: res.result.location,
+          addressName: res.data.result.address,
+          location: res.data.result.location,
         });
         });
-      } 
-        return Promise.reject();
-      
+      }
+      return Promise.reject();
     })
     })
     .catch(e => {
     .catch(e => {
+      console.log(e);
       return Promise.resolve({
       return Promise.resolve({
         addressName: "定位失败",
         addressName: "定位失败",
         location: {
         location: {

+ 6 - 2
app.json

@@ -2,7 +2,9 @@
   "expo": {
   "expo": {
     "name": "叮咚外卖商家端",
     "name": "叮咚外卖商家端",
     "slug": "Dingdong",
     "slug": "Dingdong",
-    "platforms": ["android"],
+    "platforms": [
+      "android"
+    ],
     "version": "1.0.0",
     "version": "1.0.0",
     "orientation": "portrait",
     "orientation": "portrait",
     "icon": "./assets/images/icon.png",
     "icon": "./assets/images/icon.png",
@@ -17,7 +19,9 @@
     "updates": {
     "updates": {
       "fallbackToCacheTimeout": 0
       "fallbackToCacheTimeout": 0
     },
     },
-    "assetBundlePatterns": ["**/*"],
+    "assetBundlePatterns": [
+      "**/*"
+    ],
     "ios": {
     "ios": {
       "supportsTablet": true
       "supportsTablet": true
     },
     },

+ 62 - 70
components/Actionsheet.js

@@ -1,78 +1,70 @@
 import React from "react";
 import React from "react";
-import { StyleSheet, View, Text  } from "react-native";
-import {
-    SelectItem,
-    Icon,
-} from "@ui-kitten/components";
+import { StyleSheet, View, Text } from "react-native";
+import { SelectItem, Icon } from "@ui-kitten/components";
 import { Actionsheet } from "beeshell";
 import { Actionsheet } from "beeshell";
 
 
 const styles = StyleSheet.create({
 const styles = StyleSheet.create({
-    backdrop: {
-        backgroundColor: "rgba(0, 0, 0, 0.5)",
-    },
-    menu: {
-        bottom: 0,
-    },
-    modal: {},
-    layout: {
-        position: "absolute",
-        top: 0,
-        left: 0,
-        bottom: 0,
-        right: 0,
-    },
-    text: {
-        fontSize: 12,
-    },
-    item: {
-        flexDirection: "row",
-        paddingVertical: 10,
-        alignItems: "center",
-        justifyContent: "center",
-        backgroundColor: "#fff",
-        borderBottomWidth: 1,
-        borderColor: "rgb(228, 233, 242)",
-    },
+  backdrop: {
+    backgroundColor: "rgba(0, 0, 0, 0.5)",
+  },
+  menu: {
+    bottom: 0,
+  },
+  modal: {},
+  layout: {
+    position: "absolute",
+    top: 0,
+    left: 0,
+    bottom: 0,
+    right: 0,
+  },
+  text: {
+    fontSize: 12,
+  },
+  item: {
+    flexDirection: "row",
+    paddingVertical: 10,
+    alignItems: "center",
+    justifyContent: "center",
+    backgroundColor: "#fff",
+    borderBottomWidth: 1,
+    borderColor: "rgb(228, 233, 242)",
+  },
 });
 });
 
 
-
-const ForwardIcon = (props) => <Icon {...props} name='arrow-ios-forward' />;
+const ForwardIcon = props => <Icon {...props} name="arrow-ios-forward" />;
 export default function myActionsheet({ list, onChange, value }) {
 export default function myActionsheet({ list, onChange, value }) {
-    const [bottomModalX, changeBottomModalx] = React.useState("");
-    return (
-      <>
-        <SelectItem
-          appearance='form'
-          style={{ flex: 1 }}
-          accessoryRight={ForwardIcon}
-          title={value || " "}
-          onPress={() => {
-                    bottomModalX.open();
-                }}
-        />
-        <Actionsheet
-          ref={(c) => {
-                    changeBottomModalx(c);
-                }}
-          header={<View />}
-          data={list}
-          cancelable
-          maxShowNum={4}
-          useSafeAreaView
-          onPressConfirm={(item) => {
-                    onChange(item);
-                }}
-          onPressCancel={() => {
-                }}
-          renderItem={(item) => {
-                    return (
-                      <View style={styles.item}>
-                        <Text style={styles.text}>{item}</Text>
-                      </View>
-                    );
-                }}
-        />
-      </>
-    );
+  const bottomRef = React.useRef();
+  return (
+    <>
+      <SelectItem
+        appearance="form"
+        style={{ flex: 1 }}
+        accessoryRight={ForwardIcon}
+        title={value || " "}
+        onPress={() => {
+          bottomRef.current.open();
+        }}
+      />
+      <Actionsheet
+        ref={bottomRef}
+        header={<View />}
+        data={list}
+        cancelable
+        maxShowNum={4}
+        useSafeAreaView
+        onPressConfirm={item => {
+          onChange(item);
+        }}
+        onPressCancel={() => {}}
+        renderItem={item => {
+          return (
+            <View style={styles.item}>
+              <Text style={styles.text}>{item}</Text>
+            </View>
+          );
+        }}
+      />
+    </>
+  );
 }
 }
-

+ 5 - 7
components/ClassificationSelect.js

@@ -1,5 +1,5 @@
 import * as React from "react";
 import * as React from "react";
-import {  StyleSheet } from "react-native";
+import { StyleSheet } from "react-native";
 import { Cascader, BottomModal } from "beeshell";
 import { Cascader, BottomModal } from "beeshell";
 import { useModel } from "flooks";
 import { useModel } from "flooks";
 
 
@@ -56,22 +56,20 @@ const styles = StyleSheet.create({
 
 
 export default function OpenTimeCom(props) {
 export default function OpenTimeCom(props) {
   const { selectTitle, list, node$, defaultValue, submit } = props;
   const { selectTitle, list, node$, defaultValue, submit } = props;
-  const [Node, setNode] = React.useState();
   const { cancel, confirm } = useModel("wordsModel");
   const { cancel, confirm } = useModel("wordsModel");
   const [selectVal, setSelectVal] = React.useState("");
   const [selectVal, setSelectVal] = React.useState("");
   const [selectInfo, setSelectInfo] = React.useState({});
   const [selectInfo, setSelectInfo] = React.useState({});
+  const bottomRef = React.useRef();
 
 
   if (node$) {
   if (node$) {
     node$.useSubscription(() => {
     node$.useSubscription(() => {
       setSelectVal(defaultValue);
       setSelectVal(defaultValue);
-      Node.open();
+      bottomRef.current.open();
     });
     });
   }
   }
   return (
   return (
     <BottomModal
     <BottomModal
-      ref={c => {
-        setNode(c);
-      }}
+      ref={bottomRef}
       title={selectTitle}
       title={selectTitle}
       titleStyle={styles.titleStyle}
       titleStyle={styles.titleStyle}
       cancelable
       cancelable
@@ -80,7 +78,7 @@ export default function OpenTimeCom(props) {
       rightLabelText={confirm}
       rightLabelText={confirm}
       rightLabelTextStyle={styles.rightLabelTextStyle}
       rightLabelTextStyle={styles.rightLabelTextStyle}
       rightCallback={() => {
       rightCallback={() => {
-        Node.close();
+        bottomRef.current.close();
         submit(selectInfo);
         submit(selectInfo);
       }}
       }}
     >
     >

+ 3 - 3
components/Datepicker.js

@@ -11,7 +11,7 @@ export default function MyDatepicker(props) {
 
 
   const [dateValue, chooseValue] = React.useState();
   const [dateValue, chooseValue] = React.useState();
 
 
-  const [bottomModal, setBottomModal] = React.useState();
+  const bottomRef = React.useRef();
 
 
   return (
   return (
     <>
     <>
@@ -22,13 +22,13 @@ export default function MyDatepicker(props) {
         title={value || " "}
         title={value || " "}
         onPress={() => {
         onPress={() => {
           chooseValue(value);
           chooseValue(value);
-          bottomModal.open();
+          bottomRef.current.open();
         }}
         }}
       />
       />
       <BottomModal
       <BottomModal
         title=""
         title=""
         cancelable
         cancelable
-        ref={c => setBottomModal(c)}
+        ref={bottomRef}
         rightCallback={() => {
         rightCallback={() => {
           chooseDate(dateValue);
           chooseDate(dateValue);
         }}
         }}

+ 4 - 7
components/FormInput.js

@@ -199,7 +199,8 @@ const FormInput = React.memo(props => {
     );
     );
   }, [type, value, placeholder, onChange, secureTextEntry, renderIcon]);
   }, [type, value, placeholder, onChange, secureTextEntry, renderIcon]);
 
 
-  const [bottomModalX, changeBottomModalx] = React.useState("");
+  // const [bottomModalX, changeBottomModalx] = React.useState("");
+  const bottomRef = React.useRef();
   const [selectVal, setSelectVal] = React.useState("");
   const [selectVal, setSelectVal] = React.useState("");
 
 
   const selectInfo = useCreation(() => {
   const selectInfo = useCreation(() => {
@@ -214,8 +215,6 @@ const FormInput = React.memo(props => {
     return { name: " " };
     return { name: " " };
   }, [value, type, selectList]);
   }, [value, type, selectList]);
 
 
-  const [open, ChangeOpen] = React.useState(false);
-
   function getMain(type, props, inputProps) {
   function getMain(type, props, inputProps) {
     if (type === "select") {
     if (type === "select") {
       return (
       return (
@@ -226,13 +225,11 @@ const FormInput = React.memo(props => {
             accessoryRight={ForwardIcon}
             accessoryRight={ForwardIcon}
             title={selectInfo.name}
             title={selectInfo.name}
             onPress={() => {
             onPress={() => {
-              bottomModalX.open();
+              bottomRef.current.open();
             }}
             }}
           />
           />
           <BottomModal
           <BottomModal
-            ref={c => {
-              changeBottomModalx(c);
-            }}
+            ref={bottomRef}
             title={props.selectTitle}
             title={props.selectTitle}
             titleStyle={styles.titleStyle}
             titleStyle={styles.titleStyle}
             cancelable
             cancelable

+ 63 - 66
components/ScrollPage.js

@@ -1,5 +1,6 @@
 import React from "react";
 import React from "react";
-import { ScrollView, RefreshControl } from "react-native";
+import { RefreshControl } from "react-native";
+import { ScrollView } from "react-native-gesture-handler";
 import { useFocusEffect } from "@react-navigation/native";
 import { useFocusEffect } from "@react-navigation/native";
 import { useTheme } from "@ui-kitten/components";
 import { useTheme } from "@ui-kitten/components";
 import { useModel } from "flooks";
 import { useModel } from "flooks";
@@ -7,74 +8,70 @@ import NavHeaderBar from "./NavHeaderBar";
 import { initState, refreashReducer } from "../Redux/RefreashRedux";
 import { initState, refreashReducer } from "../Redux/RefreashRedux";
 
 
 export default function scrollPage(props) {
 export default function scrollPage(props) {
-    const {
-        style,
-        enabledFresh,
-        refreshEvent,
-        statusType,
-		navHeaderBarTitle,
-		children,
-    } = props;
-    const [state, dispatch] = React.useReducer(refreashReducer, initState);
-    const { refreshing } = state;
-    const theme = useTheme();
-    const { changeBackground } = useModel("barModel");
-    function onRefresh() {
+  const {
+    style,
+    enabledFresh,
+    refreshEvent,
+    statusType,
+    navHeaderBarTitle,
+    children,
+  } = props;
+  const [state, dispatch] = React.useReducer(refreashReducer, initState);
+  const { refreshing } = state;
+  const theme = useTheme();
+  const { changeBackground } = useModel("barModel");
+  function onRefresh() {
+    dispatch({
+      type: "startRefresh",
+    });
+    if (refreshEvent) {
+      refreshEvent()
+        .then(() => {
+          dispatch({
+            type: "refreshFinish",
+          });
+        })
+        .catch(() => {
+          dispatch({
+            type: "refreshError",
+          });
+        });
+    } else {
+      setTimeout(() => {
         dispatch({
         dispatch({
-            type: "startRefresh",
+          type: "refreshFinish",
         });
         });
-        if (refreshEvent) {
-            refreshEvent()
-                .then(() => {
-                    dispatch({
-                        type: "refreshFinish",
-                    });
-                })
-                .catch(() => {
-                    dispatch({
-                        type: "refreshError",
-                    });
-                });
-        } else {
-            setTimeout(() => {
-                dispatch({
-                    type: "refreshFinish",
-                });
-            }, 1000);
-        }
+      }, 1000);
     }
     }
-    useFocusEffect(
-        React.useCallback(() => {
-            if (enabledFresh && refreshEvent) {
-                onRefresh();
-            }
-
-            if (statusType === "primary") {
-                changeBackground(theme["color-primary-500"]);
-            }
-        }, [])
-    );
+  }
+  useFocusEffect(
+    React.useCallback(() => {
+      if (enabledFresh && refreshEvent) {
+        onRefresh();
+      }
 
 
+      if (statusType === "primary") {
+        changeBackground(theme["color-primary-500"]);
+      }
+    }, [])
+  );
 
 
-
-    return (
-      <>
-        {navHeaderBarTitle != null && (
-        <NavHeaderBar title={navHeaderBarTitle} />
-            )}
-        <ScrollView
-          refreshControl={(
-            <RefreshControl
-              refreshing={refreshing}
-              onRefresh={onRefresh}
-              enabled={enabledFresh || false}
-            />
-                  )}
-          style={style}
-          contentContainerStyle={{ flexGrow: 1 }}
-        >
-          {children}
-        </ScrollView>
-      </>
-    );
+  return (
+    <>
+      {navHeaderBarTitle != null && <NavHeaderBar title={navHeaderBarTitle} />}
+      <ScrollView
+        refreshControl={
+          <RefreshControl
+            refreshing={refreshing}
+            onRefresh={onRefresh}
+            enabled={enabledFresh || false}
+          />
+        }
+        style={style}
+        contentContainerStyle={{ flexGrow: 1 }}
+      >
+        {children}
+      </ScrollView>
+    </>
+  );
 }
 }

+ 64 - 0
map/SearchMapScreen.js

@@ -0,0 +1,64 @@
+/* eslint-disable react/style-prop-object */
+import * as WebBrowser from "expo-web-browser";
+import * as React from "react";
+import { WebView } from "react-native-webview";
+import { useMount } from "ahooks";
+import { useModel } from "flooks";
+import { getLocation } from "../Utils/MapUtils";
+
+export default function SearchMapScreen({ navigation }) {
+  const { saveLocation } = useModel("userModel");
+  const webRef = React.useRef();
+  const { showDialog } = useModel("dialogModel", true);
+  useMount(() => {
+    getLocation().then(res => {
+      let location = "";
+      // saveLocation(
+      //   "江苏省南京市建邺区白龙江东街9号新城科技园科技创新综合体",
+      //   31.981402,
+      //   118.737781
+      // ).then(() => {
+      //   navigation.goBack();
+      // });
+      if (res.addressName !== "定位失败") {
+        location = `${res.location.lat},${res.location.lng}`;
+      }
+      webRef.current.injectJavaScript(`window.setLocation('${location}')`);
+      Portal.remove(key);
+    });
+  });
+
+  const [chooseLocal, setchooseLocal] = React.useState({});
+
+  function showChange(val, title, max, type) {
+    showDialog({
+      pla: "",
+      maxLength: max || 50,
+      defaultValue: val,
+      InputType: type,
+      isEdit: true,
+      title,
+      cancelable: true,
+      confirmCallback: info => {
+        saveLocation(info, chooseLocal.lat, chooseLocal.lng).then(() => {
+          navigation.goBack();
+        });
+      },
+    });
+  }
+  return (
+    <WebView
+      ref={webRef}
+      source={{
+        uri: "http://dingdong.izouma.com/map/chooseLocation",
+      }}
+      // style={{ flexGrow: 1, width: "100%" }}
+      onMessage={({ nativeEvent }) => {
+        const info = JSON.parse(nativeEvent.data);
+        setchooseLocal({ lat: info.latlng.lat, lng: info.latlng.lng });
+
+        showChange(info.poiaddress + info.poiname, "请录入详细地址", 100);
+      }}
+    />
+  );
+}

+ 0 - 44
map/SearchMapScreen.tsx

@@ -1,44 +0,0 @@
-/* eslint-disable react/style-prop-object */
-import * as WebBrowser from "expo-web-browser";
-import * as React from "react";
-import { WebView } from "react-native-webview";
-
-import { useMount } from "ahooks";
-import { useModel } from "flooks";
-import { getLocation } from "../Utils/MapUtils.ts";
-
-export default function SearchMapScreen({ navigation }) {
-  const [location, setLocation] = React.useState<any>();
-  const { saveLocation } = useModel("userModel");
-  const [show, setshow] = React.useState<boolean>(false);
-  useMount(() => {
-    getLocation().then(res => {
-      setLocation(res.location);
-      setTimeout(() => {
-        setshow(true);
-      }, 500);
-    });
-  });
-  return (
-    <>
-      {show && (
-        <WebView
-          source={{
-            uri: `http://dingdong.izouma.com/map/chooseLocation?location=${location.lat},${location.lng}`,
-          }}
-          style={{ flexGrow: 1, width: "100%" }}
-          onMessage={({ nativeEvent }) => {
-            const info = JSON.parse(nativeEvent.data);
-            console.log(info);
-            saveLocation(
-              info.poiaddress + info.poiname,
-              info.latlng.lat,
-              info.latlng.lng
-            );
-            navigation.goBack();
-          }}
-        />
-      )}
-    </>
-  );
-}

+ 1 - 0
models/loadingModel.js

@@ -10,6 +10,7 @@ export default {
   },
   },
   actions: ({ model, setState }) => ({
   actions: ({ model, setState }) => ({
     loading() {
     loading() {
+      console.log("aaaaa");
       const { tKey } = model();
       const { tKey } = model();
       if (!tKey) {
       if (!tKey) {
         const newKey = Toast.loading("Loading...", 0);
         const newKey = Toast.loading("Loading...", 0);

+ 18 - 8
models/userModel.js

@@ -99,7 +99,7 @@ export default {
       const { success, warnning } = model("loadingModel");
       const { success, warnning } = model("loadingModel");
       const { getUserInfo } = model();
       const { getUserInfo } = model();
       httpPost("/auth/phoneLogin", {
       httpPost("/auth/phoneLogin", {
-        phone,
+        phone: `+86${phone}`,
         code,
         code,
         identity: "MERCHANT",
         identity: "MERCHANT",
       })
       })
@@ -117,16 +117,20 @@ export default {
     saveLocation(address, latitude, longitude) {
     saveLocation(address, latitude, longitude) {
       const { mid, registerInfo, updateMerchant } = model();
       const { mid, registerInfo, updateMerchant } = model();
       if (mid) {
       if (mid) {
-        updateMerchant({
+        const { loading, success } = model("loadingModel");
+        loading();
+        return updateMerchant({
           address,
           address,
           latitude,
           latitude,
           longitude,
           longitude,
-        });
-      } else {
-        setState({
-          registerInfo: { ...registerInfo, address, latitude, longitude },
+        }).then(() => {
+          success("设置成功");
         });
         });
       }
       }
+      setState({
+        registerInfo: { ...registerInfo, address, latitude, longitude },
+      });
+      return Promise.resolve();
     },
     },
     registerFirst({ ...data }) {
     registerFirst({ ...data }) {
       setState({ registerInfo: data });
       setState({ registerInfo: data });
@@ -196,7 +200,7 @@ export default {
       aliNameEvent(aliName);
       aliNameEvent(aliName);
     },
     },
     updateMerchant({ ...data }) {
     updateMerchant({ ...data }) {
-      const { mid, getUserInfo } = model();
+      const { mid, userInfo } = model();
       const { httpPost } = model("httpModel");
       const { httpPost } = model("httpModel");
       return httpPost(
       return httpPost(
         "/merchant/saveDTO",
         "/merchant/saveDTO",
@@ -209,7 +213,13 @@ export default {
       ).then(res => {
       ).then(res => {
         // success("修改成功");
         // success("修改成功");
         if (res) {
         if (res) {
-          getUserInfo();
+          // setState({
+          //   userInfo: {
+          //     ...userInfo,
+          //     ...data,
+          //   },
+          //   ...data,
+          // });
         }
         }
       });
       });
     },
     },

+ 1 - 1
navigation/BasicNavigator.js

@@ -13,7 +13,7 @@ import Coupon from "../screens/Coupon";
 import Appraisal from "../screens/Appraisal";
 import Appraisal from "../screens/Appraisal";
 import Goods from "../screens/Goods";
 import Goods from "../screens/Goods";
 import Attestation from "../screens/Attestation";
 import Attestation from "../screens/Attestation";
-import SearchMapScreen from "../map/SearchMapScreen.tsx";
+import SearchMapScreen from "../map/SearchMapScreen";
 
 
 export default function BasicScreens(Screen) {
 export default function BasicScreens(Screen) {
   return (
   return (

+ 12 - 20
package-lock.json

@@ -6041,8 +6041,7 @@
     "boolbase": {
     "boolbase": {
       "version": "1.0.0",
       "version": "1.0.0",
       "resolved": "https://registry.npmjs.org/boolbase/-/boolbase-1.0.0.tgz",
       "resolved": "https://registry.npmjs.org/boolbase/-/boolbase-1.0.0.tgz",
-      "integrity": "sha1-aN/1++YMUes3cl6p4+0xDcwed24=",
-      "dev": true
+      "integrity": "sha1-aN/1++YMUes3cl6p4+0xDcwed24="
     },
     },
     "bplist-creator": {
     "bplist-creator": {
       "version": "0.0.8",
       "version": "0.0.8",
@@ -7712,7 +7711,6 @@
       "version": "0.2.2",
       "version": "0.2.2",
       "resolved": "https://registry.npmjs.org/dom-serializer/-/dom-serializer-0.2.2.tgz",
       "resolved": "https://registry.npmjs.org/dom-serializer/-/dom-serializer-0.2.2.tgz",
       "integrity": "sha512-2/xPb3ORsQ42nHYiSunXkDjPLBaEj/xTwUO4B7XCZQTRk7EBtTOPaygh10YAAh2OI1Qrp6NWfpAhzswj0ydt9g==",
       "integrity": "sha512-2/xPb3ORsQ42nHYiSunXkDjPLBaEj/xTwUO4B7XCZQTRk7EBtTOPaygh10YAAh2OI1Qrp6NWfpAhzswj0ydt9g==",
-      "dev": true,
       "requires": {
       "requires": {
         "domelementtype": "^2.0.1",
         "domelementtype": "^2.0.1",
         "entities": "^2.0.0"
         "entities": "^2.0.0"
@@ -7733,8 +7731,7 @@
     "domelementtype": {
     "domelementtype": {
       "version": "2.0.1",
       "version": "2.0.1",
       "resolved": "https://registry.npmjs.org/domelementtype/-/domelementtype-2.0.1.tgz",
       "resolved": "https://registry.npmjs.org/domelementtype/-/domelementtype-2.0.1.tgz",
-      "integrity": "sha512-5HOHUDsYZWV8FGWN0Njbr/Rn7f/eWSQi1v7+HsUVwXgn8nWWlL64zKDkS0n8ZmQ3mlWOMuXOnR+7Nx/5tMO5AQ==",
-      "dev": true
+      "integrity": "sha512-5HOHUDsYZWV8FGWN0Njbr/Rn7f/eWSQi1v7+HsUVwXgn8nWWlL64zKDkS0n8ZmQ3mlWOMuXOnR+7Nx/5tMO5AQ=="
     },
     },
     "domexception": {
     "domexception": {
       "version": "1.0.1",
       "version": "1.0.1",
@@ -7911,8 +7908,7 @@
     "entities": {
     "entities": {
       "version": "2.0.3",
       "version": "2.0.3",
       "resolved": "https://registry.npmjs.org/entities/-/entities-2.0.3.tgz",
       "resolved": "https://registry.npmjs.org/entities/-/entities-2.0.3.tgz",
-      "integrity": "sha512-MyoZ0jgnLvB2X3Lg5HqpFmn1kybDiIfEQmKzTb5apr51Rb+T3KdmMiqa70T+bhGnyv7bQ6WMj2QMHpGMmlrUYQ==",
-      "dev": true
+      "integrity": "sha512-MyoZ0jgnLvB2X3Lg5HqpFmn1kybDiIfEQmKzTb5apr51Rb+T3KdmMiqa70T+bhGnyv7bQ6WMj2QMHpGMmlrUYQ=="
     },
     },
     "envinfo": {
     "envinfo": {
       "version": "7.7.2",
       "version": "7.7.2",
@@ -9115,6 +9111,11 @@
         "invariant": "^2.2.4"
         "invariant": "^2.2.4"
       }
       }
     },
     },
+    "expo-network": {
+      "version": "2.2.1",
+      "resolved": "https://registry.npmjs.org/expo-network/-/expo-network-2.2.1.tgz",
+      "integrity": "sha512-O76Vh3t/ZC1ZMR0/JNOvaFmiDckP3nbGWSy5fcULf9Qgi9qYqksf7PssDAlo9cGKMD4g/dUTkrQn9QIzdxZCjQ=="
+    },
     "expo-permissions": {
     "expo-permissions": {
       "version": "9.0.1",
       "version": "9.0.1",
       "resolved": "https://registry.npmjs.org/expo-permissions/-/expo-permissions-9.0.1.tgz",
       "resolved": "https://registry.npmjs.org/expo-permissions/-/expo-permissions-9.0.1.tgz",
@@ -15822,7 +15823,6 @@
       "version": "1.0.2",
       "version": "1.0.2",
       "resolved": "https://registry.npmjs.org/nth-check/-/nth-check-1.0.2.tgz",
       "resolved": "https://registry.npmjs.org/nth-check/-/nth-check-1.0.2.tgz",
       "integrity": "sha512-WeBOdju8SnzPN5vTUJYxYUxLeXpCaVP5i5e0LF8fg7WORF2Wd7wFX/pk0tYZk7s8T+J7VLy0Da6J1+wCT0AtHg==",
       "integrity": "sha512-WeBOdju8SnzPN5vTUJYxYUxLeXpCaVP5i5e0LF8fg7WORF2Wd7wFX/pk0tYZk7s8T+J7VLy0Da6J1+wCT0AtHg==",
-      "dev": true,
       "requires": {
       "requires": {
         "boolbase": "~1.0.0"
         "boolbase": "~1.0.0"
       }
       }
@@ -18366,7 +18366,6 @@
       "version": "12.1.0",
       "version": "12.1.0",
       "resolved": "https://registry.npmjs.org/react-native-svg/-/react-native-svg-12.1.0.tgz",
       "resolved": "https://registry.npmjs.org/react-native-svg/-/react-native-svg-12.1.0.tgz",
       "integrity": "sha512-1g9qBRci7man8QsHoXn6tP3DhCDiypGgc6+AOWq+Sy+PmP6yiyf8VmvKuoqrPam/tf5x+ZaBT2KI0gl7bptZ7w==",
       "integrity": "sha512-1g9qBRci7man8QsHoXn6tP3DhCDiypGgc6+AOWq+Sy+PmP6yiyf8VmvKuoqrPam/tf5x+ZaBT2KI0gl7bptZ7w==",
-      "dev": true,
       "requires": {
       "requires": {
         "css-select": "^2.1.0",
         "css-select": "^2.1.0",
         "css-tree": "^1.0.0-alpha.39"
         "css-tree": "^1.0.0-alpha.39"
@@ -18376,7 +18375,6 @@
           "version": "2.1.0",
           "version": "2.1.0",
           "resolved": "https://registry.npmjs.org/css-select/-/css-select-2.1.0.tgz",
           "resolved": "https://registry.npmjs.org/css-select/-/css-select-2.1.0.tgz",
           "integrity": "sha512-Dqk7LQKpwLoH3VovzZnkzegqNSuAziQyNZUcrdDM401iY+R5NkGBXGmtO05/yaXQziALuPogeG0b7UAgjnTJTQ==",
           "integrity": "sha512-Dqk7LQKpwLoH3VovzZnkzegqNSuAziQyNZUcrdDM401iY+R5NkGBXGmtO05/yaXQziALuPogeG0b7UAgjnTJTQ==",
-          "dev": true,
           "requires": {
           "requires": {
             "boolbase": "^1.0.0",
             "boolbase": "^1.0.0",
             "css-what": "^3.2.1",
             "css-what": "^3.2.1",
@@ -18388,7 +18386,6 @@
           "version": "1.0.0-alpha.39",
           "version": "1.0.0-alpha.39",
           "resolved": "https://registry.npmjs.org/css-tree/-/css-tree-1.0.0-alpha.39.tgz",
           "resolved": "https://registry.npmjs.org/css-tree/-/css-tree-1.0.0-alpha.39.tgz",
           "integrity": "sha512-7UvkEYgBAHRG9Nt980lYxjsTrCyHFN53ky3wVsDkiMdVqylqRt+Zc+jm5qw7/qyOvN2dHSYtX0e4MbCCExSvnA==",
           "integrity": "sha512-7UvkEYgBAHRG9Nt980lYxjsTrCyHFN53ky3wVsDkiMdVqylqRt+Zc+jm5qw7/qyOvN2dHSYtX0e4MbCCExSvnA==",
-          "dev": true,
           "requires": {
           "requires": {
             "mdn-data": "2.0.6",
             "mdn-data": "2.0.6",
             "source-map": "^0.6.1"
             "source-map": "^0.6.1"
@@ -18397,20 +18394,17 @@
         "css-what": {
         "css-what": {
           "version": "3.3.0",
           "version": "3.3.0",
           "resolved": "https://registry.npmjs.org/css-what/-/css-what-3.3.0.tgz",
           "resolved": "https://registry.npmjs.org/css-what/-/css-what-3.3.0.tgz",
-          "integrity": "sha512-pv9JPyatiPaQ6pf4OvD/dbfm0o5LviWmwxNWzblYf/1u9QZd0ihV+PMwy5jdQWQ3349kZmKEx9WXuSka2dM4cg==",
-          "dev": true
+          "integrity": "sha512-pv9JPyatiPaQ6pf4OvD/dbfm0o5LviWmwxNWzblYf/1u9QZd0ihV+PMwy5jdQWQ3349kZmKEx9WXuSka2dM4cg=="
         },
         },
         "domelementtype": {
         "domelementtype": {
           "version": "1.3.1",
           "version": "1.3.1",
           "resolved": "https://registry.npmjs.org/domelementtype/-/domelementtype-1.3.1.tgz",
           "resolved": "https://registry.npmjs.org/domelementtype/-/domelementtype-1.3.1.tgz",
-          "integrity": "sha512-BSKB+TSpMpFI/HOxCNr1O8aMOTZ8hT3pM3GQ0w/mWRmkhEDSFJkkyzz4XQsBV44BChwGkrDfMyjVD0eA2aFV3w==",
-          "dev": true
+          "integrity": "sha512-BSKB+TSpMpFI/HOxCNr1O8aMOTZ8hT3pM3GQ0w/mWRmkhEDSFJkkyzz4XQsBV44BChwGkrDfMyjVD0eA2aFV3w=="
         },
         },
         "domutils": {
         "domutils": {
           "version": "1.7.0",
           "version": "1.7.0",
           "resolved": "https://registry.npmjs.org/domutils/-/domutils-1.7.0.tgz",
           "resolved": "https://registry.npmjs.org/domutils/-/domutils-1.7.0.tgz",
           "integrity": "sha512-Lgd2XcJ/NjEw+7tFvfKxOzCYKZsdct5lczQ2ZaQY8Djz7pfAD3Gbp8ySJWtreII/vDlMVmxwa6pHmdxIYgttDg==",
           "integrity": "sha512-Lgd2XcJ/NjEw+7tFvfKxOzCYKZsdct5lczQ2ZaQY8Djz7pfAD3Gbp8ySJWtreII/vDlMVmxwa6pHmdxIYgttDg==",
-          "dev": true,
           "requires": {
           "requires": {
             "dom-serializer": "0",
             "dom-serializer": "0",
             "domelementtype": "1"
             "domelementtype": "1"
@@ -18419,14 +18413,12 @@
         "mdn-data": {
         "mdn-data": {
           "version": "2.0.6",
           "version": "2.0.6",
           "resolved": "https://registry.npmjs.org/mdn-data/-/mdn-data-2.0.6.tgz",
           "resolved": "https://registry.npmjs.org/mdn-data/-/mdn-data-2.0.6.tgz",
-          "integrity": "sha512-rQvjv71olwNHgiTbfPZFkJtjNMciWgswYeciZhtvWLO8bmX3TnhyA62I6sTWOyZssWHJJjY6/KiWwqQsWWsqOA==",
-          "dev": true
+          "integrity": "sha512-rQvjv71olwNHgiTbfPZFkJtjNMciWgswYeciZhtvWLO8bmX3TnhyA62I6sTWOyZssWHJJjY6/KiWwqQsWWsqOA=="
         },
         },
         "source-map": {
         "source-map": {
           "version": "0.6.1",
           "version": "0.6.1",
           "resolved": "https://registry.npmjs.org/source-map/-/source-map-0.6.1.tgz",
           "resolved": "https://registry.npmjs.org/source-map/-/source-map-0.6.1.tgz",
-          "integrity": "sha512-UjgapumWlbMhkBgzT7Ykc5YXUT46F0iKu8SGXq0bcwP5dz/h0Plj6enJqjz1Zbq2l5WaqYnrVbwWOWMyF3F47g==",
-          "dev": true
+          "integrity": "sha512-UjgapumWlbMhkBgzT7Ykc5YXUT46F0iKu8SGXq0bcwP5dz/h0Plj6enJqjz1Zbq2l5WaqYnrVbwWOWMyF3F47g=="
         }
         }
       }
       }
     },
     },

+ 4 - 2
package.json

@@ -40,6 +40,8 @@
     "expo-image-picker": "~8.3.0",
     "expo-image-picker": "~8.3.0",
     "expo-linking": "~1.0.1",
     "expo-linking": "~1.0.1",
     "expo-localization": "~8.2.1",
     "expo-localization": "~8.2.1",
+    "expo-location": "~8.2.1",
+    "expo-network": "~2.2.1",
     "expo-splash-screen": "^0.3.1",
     "expo-splash-screen": "^0.3.1",
     "expo-web-browser": "~8.3.1",
     "expo-web-browser": "~8.3.1",
     "flooks": "^1.2.0",
     "flooks": "^1.2.0",
@@ -65,7 +67,7 @@
     "react-native-vector-icons": "^7.0.0",
     "react-native-vector-icons": "^7.0.0",
     "react-native-web": "~0.11.7",
     "react-native-web": "~0.11.7",
     "react-native-webview": "9.4.0",
     "react-native-webview": "9.4.0",
-    "expo-location": "~8.2.1"
+    "react-native-svg": "12.1.0"
   },
   },
   "devDependencies": {
   "devDependencies": {
     "@babel/cli": "^7.10.0",
     "@babel/cli": "^7.10.0",
@@ -91,7 +93,7 @@
     "jest-expo": "^38.0.0",
     "jest-expo": "^38.0.0",
     "metro-react-native-babel-preset": "^0.59.0",
     "metro-react-native-babel-preset": "^0.59.0",
     "prettier": "^2.0.5",
     "prettier": "^2.0.5",
-    "react-native-svg": "12.1.0"
+    "react-native-svg": "^12.1.0"
   },
   },
   "private": true
   "private": true
 }
 }

+ 2 - 2
screens/HomeScreen.js

@@ -5,9 +5,9 @@ import {
   StyleSheet,
   StyleSheet,
   TouchableOpacity,
   TouchableOpacity,
   ImageBackground,
   ImageBackground,
-  ScrollView,
   View,
   View,
 } from "react-native";
 } from "react-native";
+import { ScrollView } from "react-native-gesture-handler";
 import { useModel } from "flooks";
 import { useModel } from "flooks";
 import {
 import {
   Layout,
   Layout,
@@ -265,7 +265,7 @@ export default function HomeScreen({ navigation, route }) {
             userLogout();
             userLogout();
           }}
           }}
         />
         />
-        <MenuItem title="06.16.1版本" />
+        <MenuItem title="0811版本(更新短信登录,选择地址,保存商品)" />
         <MenuItem title={`切换语言(${local})`} onPress={changeLocal} />
         <MenuItem title={`切换语言(${local})`} onPress={changeLocal} />
       </OverflowMenu>
       </OverflowMenu>
     </>
     </>

+ 1 - 3
screens/HomeScreenPage3.js

@@ -271,9 +271,7 @@ export default function HomePage3() {
           }
           }
           accessoryRight={ForwardIcon}
           accessoryRight={ForwardIcon}
           style={styles.menuItem}
           style={styles.menuItem}
-          onPress={() =>
-            showChange("address", address, getWordsStr("guideHome_form_2"))
-          }
+          onPress={() => RootNavigation.navigate("SearchMap")}
         />
         />
         <MenuItem
         <MenuItem
           title={props => Label(props, getWordsStr("guideHome_form_3"), phone)}
           title={props => Label(props, getWordsStr("guideHome_form_3"), phone)}

+ 1 - 1
screens/LoginScreen.js

@@ -129,7 +129,7 @@ export default function LoginScreen() {
     },
     },
   ];
   ];
 
 
-  const [selectedIndex, setSelectedIndex] = React.useState(1);
+  const [selectedIndex, setSelectedIndex] = React.useState(0);
 
 
   const [phone, changePhone] = React.useState("");
   const [phone, changePhone] = React.useState("");
   const [password, changePassword] = React.useState("");
   const [password, changePassword] = React.useState("");