Просмотр исходного кода

Merge branch 'master' of http://gogs.efunbox.cn/Rorschach/efunbox-mobile-8

zhangmengjie 5 лет назад
Родитель
Сommit
bd3e83ff92
3 измененных файлов с 213 добавлено и 223 удалено
  1. 121 122
      android/app/src/main/assets/index.android.bundle
  2. 15 34
      package-lock.json
  3. 77 67
      pages/Splash.js

Разница между файлами не показана из-за своего большого размера
+ 121 - 122
android/app/src/main/assets/index.android.bundle


+ 15 - 34
package-lock.json

@@ -2845,8 +2845,7 @@
         },
         "ansi-regex": {
           "version": "2.1.1",
-          "bundled": true,
-          "optional": true
+          "bundled": true
         },
         "aproba": {
           "version": "1.2.0",
@@ -2864,13 +2863,11 @@
         },
         "balanced-match": {
           "version": "1.0.0",
-          "bundled": true,
-          "optional": true
+          "bundled": true
         },
         "brace-expansion": {
           "version": "1.1.11",
           "bundled": true,
-          "optional": true,
           "requires": {
             "balanced-match": "^1.0.0",
             "concat-map": "0.0.1"
@@ -2883,18 +2880,15 @@
         },
         "code-point-at": {
           "version": "1.1.0",
-          "bundled": true,
-          "optional": true
+          "bundled": true
         },
         "concat-map": {
           "version": "0.0.1",
-          "bundled": true,
-          "optional": true
+          "bundled": true
         },
         "console-control-strings": {
           "version": "1.1.0",
-          "bundled": true,
-          "optional": true
+          "bundled": true
         },
         "core-util-is": {
           "version": "1.0.2",
@@ -2997,8 +2991,7 @@
         },
         "inherits": {
           "version": "2.0.3",
-          "bundled": true,
-          "optional": true
+          "bundled": true
         },
         "ini": {
           "version": "1.3.5",
@@ -3008,7 +3001,6 @@
         "is-fullwidth-code-point": {
           "version": "1.0.0",
           "bundled": true,
-          "optional": true,
           "requires": {
             "number-is-nan": "^1.0.0"
           }
@@ -3021,20 +3013,17 @@
         "minimatch": {
           "version": "3.0.4",
           "bundled": true,
-          "optional": true,
           "requires": {
             "brace-expansion": "^1.1.7"
           }
         },
         "minimist": {
           "version": "0.0.8",
-          "bundled": true,
-          "optional": true
+          "bundled": true
         },
         "minipass": {
           "version": "2.3.5",
           "bundled": true,
-          "optional": true,
           "requires": {
             "safe-buffer": "^5.1.2",
             "yallist": "^3.0.0"
@@ -3051,7 +3040,6 @@
         "mkdirp": {
           "version": "0.5.1",
           "bundled": true,
-          "optional": true,
           "requires": {
             "minimist": "0.0.8"
           }
@@ -3124,8 +3112,7 @@
         },
         "number-is-nan": {
           "version": "1.0.1",
-          "bundled": true,
-          "optional": true
+          "bundled": true
         },
         "object-assign": {
           "version": "4.1.1",
@@ -3135,7 +3122,6 @@
         "once": {
           "version": "1.4.0",
           "bundled": true,
-          "optional": true,
           "requires": {
             "wrappy": "1"
           }
@@ -3211,8 +3197,7 @@
         },
         "safe-buffer": {
           "version": "5.1.2",
-          "bundled": true,
-          "optional": true
+          "bundled": true
         },
         "safer-buffer": {
           "version": "2.1.2",
@@ -3242,7 +3227,6 @@
         "string-width": {
           "version": "1.0.2",
           "bundled": true,
-          "optional": true,
           "requires": {
             "code-point-at": "^1.0.0",
             "is-fullwidth-code-point": "^1.0.0",
@@ -3260,7 +3244,6 @@
         "strip-ansi": {
           "version": "3.0.1",
           "bundled": true,
-          "optional": true,
           "requires": {
             "ansi-regex": "^2.0.0"
           }
@@ -3299,13 +3282,11 @@
         },
         "wrappy": {
           "version": "1.0.2",
-          "bundled": true,
-          "optional": true
+          "bundled": true
         },
         "yallist": {
           "version": "3.0.3",
-          "bundled": true,
-          "optional": true
+          "bundled": true
         }
       }
     },
@@ -6300,7 +6281,7 @@
     },
     "opencollective": {
       "version": "1.0.3",
-      "resolved": "https://registry.npm.taobao.org/opencollective/download/opencollective-1.0.3.tgz?cache=0&other_urls=https%3A%2F%2Fregistry.npm.taobao.org%2Fopencollective%2Fdownload%2Fopencollective-1.0.3.tgz",
+      "resolved": "https://registry.npm.taobao.org/opencollective/download/opencollective-1.0.3.tgz",
       "integrity": "sha1-ruY3K8KBRFg2kMPKja7PwSDdDvE=",
       "requires": {
         "babel-polyfill": "6.23.0",
@@ -6318,12 +6299,12 @@
         },
         "ansi-styles": {
           "version": "2.2.1",
-          "resolved": "https://registry.npm.taobao.org/ansi-styles/download/ansi-styles-2.2.1.tgz",
+          "resolved": "https://registry.npm.taobao.org/ansi-styles/download/ansi-styles-2.2.1.tgz?cache=0&other_urls=https%3A%2F%2Fregistry.npm.taobao.org%2Fansi-styles%2Fdownload%2Fansi-styles-2.2.1.tgz",
           "integrity": "sha1-tDLdM1i2NM914eRmQ2gkBTPB3b4="
         },
         "chalk": {
           "version": "1.1.3",
-          "resolved": "https://registry.npm.taobao.org/chalk/download/chalk-1.1.3.tgz",
+          "resolved": "https://registry.npm.taobao.org/chalk/download/chalk-1.1.3.tgz?cache=0&other_urls=https%3A%2F%2Fregistry.npm.taobao.org%2Fchalk%2Fdownload%2Fchalk-1.1.3.tgz",
           "integrity": "sha1-qBFcVeSnAv5NFQq9OHKCKn4J/Jg=",
           "requires": {
             "ansi-styles": "^2.2.1",
@@ -6335,7 +6316,7 @@
         },
         "inquirer": {
           "version": "3.0.6",
-          "resolved": "https://registry.npm.taobao.org/inquirer/download/inquirer-3.0.6.tgz",
+          "resolved": "https://registry.npm.taobao.org/inquirer/download/inquirer-3.0.6.tgz?cache=0&other_urls=https%3A%2F%2Fregistry.npm.taobao.org%2Finquirer%2Fdownload%2Finquirer-3.0.6.tgz",
           "integrity": "sha1-4EqqnQW3o8ubD0B9BDdfBEcZA0c=",
           "requires": {
             "ansi-escapes": "^1.1.0",

+ 77 - 67
pages/Splash.js

@@ -1,74 +1,84 @@
-import React, { PureComponent } from 'react';
-import { StyleSheet, Text, View, Image, TouchableOpacity, StatusBar, ToastAndroid, TextInput } from 'react-native';
-import BasePage from './BasePage';
-import SplashScreen from 'react-native-splash-screen';
-import commonutil from './utils/commonutil';
+import React, { PureComponent } from "react";
+import {
+  StyleSheet,
+  Text,
+  View,
+  Image,
+  TouchableOpacity,
+  StatusBar,
+  ToastAndroid,
+  TextInput
+} from "react-native";
+import BasePage from "./BasePage";
+import SplashScreen from "react-native-splash-screen";
+import commonutil from "./utils/commonutil";
 export default class Splash extends BasePage {
-	state = {
-		exist: false,
-		MainPageParams: ''
-	};
-	render() {
-		return (
-			<View style={{ flex: 1 }}>
-				<StatusBar backgroundColor={'transparent'} translucent={true} />
-				<View style={{ flex: 1 }} />
-				<View style={{ flex: 5 }}>
-					<Text style={{ fontSize: 30 }}>模拟活动广告。。。。</Text>
-				</View>
-			</View>
-		);
-	}
+  state = {
+    exist: false,
+    MainPageParams: ""
+  };
+  render() {
+    return (
+      <View style={{ flex: 1 }}>
+        <StatusBar backgroundColor={"transparent"} translucent={true} />
+        <View style={{ flex: 1 }} />
+        <View style={{ flex: 5 }}>
+          <Text style={{ fontSize: 30 }}>模拟活动广告。。。。</Text>
+        </View>
+      </View>
+    );
+  }
 
-	componentWillMount() {
-		// global.storage.remove({ key: 'userInfo' });
-		this.getUserInfo();
-	}
+  componentWillMount() {
+    // global.storage.remove({ key: 'userInfo' });
+    this.getUserInfo();
+  }
 
-	componentDidMount() {}
+  componentDidMount() {}
 
-	async getUserInfo() {
-		//判断是否有用户
-		await global.storage
-			.load({
-				key: 'userInfo'
-			})
-			.then((result) => {
-				SplashScreen.hide();
-				var usermap = commonutil.jsonToMap(result);
-				this.setState({
-					exist: true,
-					MainPageParams: usermap.get('ageGroup')
-				});
-				this.Advertisement();
-			})
-			.catch((err) => {
-				console.log(err.message);
-				switch (err.name) {
-					case 'NotFoundError':
-						// TODO;
-						// alert('NotFoundError');
-						this.setState({
-							exist: false
+  async getUserInfo() {
+    //判断是否有用户
+    await global.storage
+      .load({
+        key: "userInfo"
+      })
+      .then(result => {
+     
+        var usermap = commonutil.jsonToMap(result);
+        this.setState({
+          exist: true,
+          MainPageParams: usermap.get("ageGroup")
+        });
+      })
+      .catch(err => {
+        console.log(err.message);
+        switch (err.name) {
+          case "NotFoundError":
+            // TODO;
+            // alert('NotFoundError');
+            this.setState({
+              exist: false
 						});
-						break;
-					case 'ExpiredError':
-						// TODO
-						// alert('ExpiredError');
-						break;
-				}
-			});
-	}
+						SplashScreen.hide();
+            this.Advertisement();
+            break;
+          case "ExpiredError":
+            // TODO
+            // alert('ExpiredError');
+            break;
+        }
+      });
+  }
 
-	//获取用户之后的操作,或者是别的操作。
-	Advertisement() {
-		//假装3秒广告
-		setTimeout(() => {
-			if (this.state.exist) {
-				this.clearPageToNext('MainPage');
-			} else {
-				this.clearPageToNext('Login');
-			}
-		}, 3000);
-	}
+  //获取用户之后的操作,或者是别的操作。
+  Advertisement() {
+    //假装3秒广告
+    setTimeout(() => {
+      if (this.state.exist) {
+        this.clearPageToNext("MainPage");
+      } else {
+        this.clearPageToNext("Login");
+      }
+    }, 3000);
+  }
 }