first commit

This commit is contained in:
Philip Cheung 2024-02-28 13:51:18 +08:00
commit c0883177cf
129 changed files with 51324 additions and 0 deletions

6
.buckconfig Normal file
View File

@ -0,0 +1,6 @@
[android]
target = Google Inc.:Google APIs:23
[maven_repositories]
central = https://repo1.maven.org/maven2

2
.bundle/config Normal file
View File

@ -0,0 +1,2 @@
BUNDLE_PATH: "vendor/bundle"
BUNDLE_FORCE_RUBY_PLATFORM: 1

4
.eslintrc.js Normal file
View File

@ -0,0 +1,4 @@
module.exports = {
root: true,
extends: '@react-native-community',
};

67
.flowconfig Normal file
View File

@ -0,0 +1,67 @@
[ignore]
; We fork some components by platform
.*/*[.]android.js
; Ignore "BUCK" generated dirs
<PROJECT_ROOT>/\.buckd/
; Ignore polyfills
node_modules/react-native/Libraries/polyfills/.*
; Flow doesn't support platforms
.*/Libraries/Utilities/LoadingView.js
.*/node_modules/resolve/test/resolver/malformed_package_json/package\.json$
[untyped]
.*/node_modules/@react-native-community/cli/.*/.*
[include]
[libs]
node_modules/react-native/interface.js
node_modules/react-native/flow/
[options]
emoji=true
exact_by_default=true
format.bracket_spacing=false
module.file_ext=.js
module.file_ext=.json
module.file_ext=.ios.js
munge_underscores=true
module.name_mapper='^react-native/\(.*\)$' -> '<PROJECT_ROOT>/node_modules/react-native/\1'
module.name_mapper='^@?[./a-zA-Z0-9$_-]+\.\(bmp\|gif\|jpg\|jpeg\|png\|psd\|svg\|webp\|m4v\|mov\|mp4\|mpeg\|mpg\|webm\|aac\|aiff\|caf\|m4a\|mp3\|wav\|html\|pdf\)$' -> '<PROJECT_ROOT>/node_modules/react-native/Libraries/Image/RelativeImageStub'
suppress_type=$FlowIssue
suppress_type=$FlowFixMe
suppress_type=$FlowFixMeProps
suppress_type=$FlowFixMeState
[lints]
sketchy-null-number=warn
sketchy-null-mixed=warn
sketchy-number=warn
untyped-type-import=warn
nonstrict-import=warn
deprecated-type=warn
unsafe-getters-setters=warn
unnecessary-invariant=warn
signature-verification-failure=warn
[strict]
deprecated-type
nonstrict-import
sketchy-null
unclear-type
unsafe-getters-setters
untyped-import
untyped-type-import
[version]
^0.170.0

61
.gitignore vendored Normal file
View File

@ -0,0 +1,61 @@
# OSX
#
.DS_Store
# Xcode
#
build/
*.pbxuser
!default.pbxuser
*.mode1v3
!default.mode1v3
*.mode2v3
!default.mode2v3
*.perspectivev3
!default.perspectivev3
xcuserdata
*.xccheckout
*.moved-aside
DerivedData
*.hmap
*.ipa
*.xcuserstate
# Android/IntelliJ
#
build/
.idea
.gradle
local.properties
*.iml
*.hprof
# node.js
#
node_modules/
npm-debug.log
yarn-error.log
# BUCK
buck-out/
\.buckd/
*.keystore
!debug.keystore
# fastlane
#
# It is recommended to not store the screenshots in the git repo. Instead, use fastlane to re-generate the
# screenshots whenever they are needed.
# For more information about the recommended setup visit:
# https://docs.fastlane.tools/best-practices/source-control/
*/fastlane/report.xml
*/fastlane/Preview.html
*/fastlane/screenshots
# Bundle artifact
*.jsbundle
# Ruby / CocoaPods
/ios/Pods/
/vendor/bundle/

7
.prettierrc.js Normal file
View File

@ -0,0 +1,7 @@
module.exports = {
arrowParens: 'avoid',
bracketSameLine: true,
bracketSpacing: false,
singleQuote: true,
trailingComma: 'all',
};

1
.ruby-version Normal file
View File

@ -0,0 +1 @@
2.7.4

1
.watchmanconfig Normal file
View File

@ -0,0 +1 @@
{}

156
App.js Normal file
View File

@ -0,0 +1,156 @@
/**
* Sample React Native App
* https://github.com/facebook/react-native
*
* @format
* @flow strict-local
*/
import React from 'react';
import {StyleSheet, ScrollView, View, Text, StatusBar} from 'react-native';
import {SafeAreaProvider} from 'react-native-safe-area-context';
import {colors} from './src/assets/styles/colors-theme';
import Router from './router';
import {Provider} from 'mobx-react';
import Store from './src/stores/index';
import {NavigationContainer, useFocusEffect} from '@react-navigation/native';
import {createStackNavigator, HeaderBackButton} from '@react-navigation/stack';
import {createMaterialBottomTabNavigator} from '@react-navigation/material-bottom-tabs';
import {createBottomTabNavigator} from '@react-navigation/bottom-tabs';
import {
Header,
LearnMoreLinks,
Colors,
DebugInstructions,
ReloadInstructions,
} from 'react-native/Libraries/NewAppScreen';
import Icon from 'react-native-vector-icons/dist/MaterialCommunityIcons';
import SplashScreen from './src/pages/splash/splashScreen';
import Main from './src/pages/main/main';
import buyHistory from './src/pages/buyHistory/buyHistory';
import Favorite from './src/pages/favorite/favorite';
import Profile from './src/pages/profile/profile';
import BuyHistory from './src/pages/buyHistory/buyHistory';
Icon.loadFont();
console.disableYellowBox = true;
const Stack = createStackNavigator();
const BottomTab = createBottomTabNavigator();
const BottomTabScreen = () => (
<BottomTab.Navigator
screenOptions={({route}) => ({
tabBarIcon: ({focused, color, size}) => {
let iconName;
switch (route.name) {
case 'Main':
iconName = 'home-variant';
break;
case 'BuyHistory':
iconName = 'cart';
break;
case 'Favorite':
iconName = 'heart';
break;
case 'Profile':
iconName = 'account-circle';
break;
}
return (
<Icon
name={iconName}
size={size}
color={color}
style={{marginTop: 5}}
/>
);
},
})}
tabBarOptions={{
activeTintColor: 'tomato',
inactiveTintColor: 'gray',
}}>
<Stack.Screen
name="Main"
component={Main}
options={{tabBarLabel: '主頁'}}
/>
<Stack.Screen
name="Favorite"
component={Favorite}
options={{tabBarLabel: '我的清單'}}
/>
<Stack.Screen
name="BuyHistory"
component={BuyHistory}
options={{tabBarLabel: '購買記錄'}}
/>
<Stack.Screen
name="Profile"
component={Profile}
options={{tabBarLabel: '賬號/設定'}}
/>
</BottomTab.Navigator>
);
const App: () => React$Node = () => {
return (
<>
<Provider {...Store}>
<SafeAreaProvider>
<StatusBar
animated={true}
barStyle={'light-content'}
backgroundColor={colors.mainColor}
translucent={true}
/>
<NavigationContainer
onStateChange={state => Store.appStore.setRouterState(state)}
ref={navigatorRef => Store.appStore.setRouterRef(navigatorRef)}>
<Router />
</NavigationContainer>
</SafeAreaProvider>
</Provider>
</>
);
};
const styles = StyleSheet.create({
scrollView: {
backgroundColor: Colors.lighter,
},
engine: {
position: 'absolute',
right: 0,
},
body: {
backgroundColor: colors.bgc,
},
sectionContainer: {
marginTop: 32,
paddingHorizontal: 24,
},
sectionTitle: {
fontSize: 24,
fontWeight: '600',
color: Colors.black,
},
sectionDescription: {
marginTop: 8,
fontSize: 18,
fontWeight: '400',
color: Colors.dark,
},
highlight: {
fontWeight: '700',
},
footer: {
color: Colors.dark,
fontSize: 12,
fontWeight: '600',
padding: 4,
paddingRight: 12,
textAlign: 'right',
},
});
export default App;

6
Gemfile Normal file
View File

@ -0,0 +1,6 @@
source 'https://rubygems.org'
# You may use http://rbenv.org/ or https://rvm.io/ to install and use this version
ruby '2.7.4'
gem 'cocoapods', '~> 1.11', '>= 1.11.2'

100
Gemfile.lock Normal file
View File

@ -0,0 +1,100 @@
GEM
remote: https://rubygems.org/
specs:
CFPropertyList (3.0.5)
rexml
activesupport (6.1.5.1)
concurrent-ruby (~> 1.0, >= 1.0.2)
i18n (>= 1.6, < 2)
minitest (>= 5.1)
tzinfo (~> 2.0)
zeitwerk (~> 2.3)
addressable (2.8.0)
public_suffix (>= 2.0.2, < 5.0)
algoliasearch (1.27.5)
httpclient (~> 2.8, >= 2.8.3)
json (>= 1.5.1)
atomos (0.1.3)
claide (1.1.0)
cocoapods (1.11.3)
addressable (~> 2.8)
claide (>= 1.0.2, < 2.0)
cocoapods-core (= 1.11.3)
cocoapods-deintegrate (>= 1.0.3, < 2.0)
cocoapods-downloader (>= 1.4.0, < 2.0)
cocoapods-plugins (>= 1.0.0, < 2.0)
cocoapods-search (>= 1.0.0, < 2.0)
cocoapods-trunk (>= 1.4.0, < 2.0)
cocoapods-try (>= 1.1.0, < 2.0)
colored2 (~> 3.1)
escape (~> 0.0.4)
fourflusher (>= 2.3.0, < 3.0)
gh_inspector (~> 1.0)
molinillo (~> 0.8.0)
nap (~> 1.0)
ruby-macho (>= 1.0, < 3.0)
xcodeproj (>= 1.21.0, < 2.0)
cocoapods-core (1.11.3)
activesupport (>= 5.0, < 7)
addressable (~> 2.8)
algoliasearch (~> 1.0)
concurrent-ruby (~> 1.1)
fuzzy_match (~> 2.0.4)
nap (~> 1.0)
netrc (~> 0.11)
public_suffix (~> 4.0)
typhoeus (~> 1.0)
cocoapods-deintegrate (1.0.5)
cocoapods-downloader (1.6.3)
cocoapods-plugins (1.0.0)
nap
cocoapods-search (1.0.1)
cocoapods-trunk (1.6.0)
nap (>= 0.8, < 2.0)
netrc (~> 0.11)
cocoapods-try (1.2.0)
colored2 (3.1.2)
concurrent-ruby (1.1.10)
escape (0.0.4)
ethon (0.15.0)
ffi (>= 1.15.0)
ffi (1.15.5)
fourflusher (2.3.1)
fuzzy_match (2.0.4)
gh_inspector (1.1.3)
httpclient (2.8.3)
i18n (1.10.0)
concurrent-ruby (~> 1.0)
json (2.6.1)
minitest (5.15.0)
molinillo (0.8.0)
nanaimo (0.3.0)
nap (1.1.0)
netrc (0.11.0)
public_suffix (4.0.7)
rexml (3.2.5)
ruby-macho (2.5.1)
typhoeus (1.4.0)
ethon (>= 0.9.0)
tzinfo (2.0.4)
concurrent-ruby (~> 1.0)
xcodeproj (1.21.0)
CFPropertyList (>= 2.3.3, < 4.0)
atomos (~> 0.1.3)
claide (>= 1.0.2, < 2.0)
colored2 (~> 3.1)
nanaimo (~> 0.3.0)
rexml (~> 3.2.4)
zeitwerk (2.5.4)
PLATFORMS
ruby
DEPENDENCIES
cocoapods (~> 1.11, >= 1.11.2)
RUBY VERSION
ruby 2.7.4p191
BUNDLED WITH
2.2.27

156
MyTabBar.js Normal file
View File

@ -0,0 +1,156 @@
import React from 'react';
import {
SafeAreaView,
Text,
View,
TouchableOpacity,
Image,
TextInput,
Keyboard,
} from 'react-native';
import { inject, observer } from 'mobx-react';
import { KeyboardAwareScrollView } from 'react-native-keyboard-aware-scroll-view';
import Toast, { DURATION } from 'react-native-easy-toast';
import Icon from 'react-native-vector-icons/dist/MaterialCommunityIcons';
import { observable } from 'mobx';
import { colors } from './src/assets/styles/colors-theme';
Icon.loadFont();
const MyTabBar = inject("appStore")(observer(class MyTabBar extends React.Component {
constructor(props) {
super(props);
this.store = props.appStore;
}
langLabelReturn() {
switch (this.props.label) {
case 'home':
return this.store.text.home
break;
case 'info':
return this.store.text.rentTools
break;
case 'history':
return this.store.text.history
break;
case 'profile':
return this.store.text.profile
break;
}
}
langLabelReturn(label) {
switch (label) {
case 'main':
return this.store.text.main
break;
case 'myfavourite':
return this.store.text.myfavourite
break;
case 'shoppingHistory':
return this.store.text.shoppingHistory
break;
case 'acAndSetting':
return this.store.text.acAndSetting
break;
}
}
render() {
var { state, descriptors, navigation, logined } = this.props;
return (
<View style={{ flexDirection: 'row', backgroundColor: colors.mainColor }}>
{state.routes.map((route, index) => {
const { options } = descriptors[route.key];
const label =
options.tabBarLabel !== undefined
? options.tabBarLabel
: options.title !== undefined
? options.title
: route.name;
let iconName;
switch (route.name) {
case 'Main':
iconName = 'storefront';
break;
case 'BuyHistory':
iconName = 'cart';
break;
case 'Favorite':
iconName = 'heart';
break;
case 'Profile':
iconName = 'account-circle';
break;
}
const isFocused = state.index === index;
const onPress = () => {
const event = navigation.emit({
type: 'tabPress',
target: route.key,
});
if (!isFocused && !event.defaultPrevented) {
console.log(route.name);
if (route.name == 'Profile' && !this.store.logined) {
navigation.navigate('Signin');
} else if (route.name == 'Favorite' && !this.store.logined) {
navigation.navigate('Signin');
} else if (route.name == 'BuyHistory' && !this.store.logined) {
navigation.navigate('Signin');
} else {
navigation.navigate(route.name);
}
}
};
const onLongPress = () => {
navigation.emit({
type: 'tabLongPress',
target: route.key,
});
};
return (
<TouchableOpacity
accessibilityRole="button"
accessibilityStates={isFocused ? ['selected'] : []}
accessibilityLabel={options.tabBarAccessibilityLabel}
testID={options.tabBarTestID}
onPress={onPress}
onLongPress={onLongPress}
style={{
flex: 1,
alignItems: 'center',
justifyContent: 'center',
marginTop: 5,
marginBottom: 5,
}}>
<Icon
name={iconName}
size={28}
color={isFocused ? 'white' : '#98AD86'}
/>
<Text style={{ color: isFocused ? 'white' : '#98AD86', fontSize: 12 }}>
{this.langLabelReturn(label)}
</Text>
</TouchableOpacity>
);
})}
</View>
);
}
}))
export default MyTabBar

92
README.md Normal file
View File

@ -0,0 +1,92 @@
## Cali Healthy Life
## Description
The mobile application is a shopping platform that includes features such as online payment, SMS verification, notifications, coupons, and membership points.
### Screenshot
<img src="./src/assets/screenshot/1.png" width="40%" height="40%">
<img src="./src/assets/screenshot/2.png" width="40%" height="40%">
<img src="./src/assets/screenshot/3.png" width="40%" height="40%">
<img src="./src/assets/screenshot/4.png" width="40%" height="40%">
<img src="./src/assets/screenshot/5.png" width="40%" height="40%">
<img src="./src/assets/screenshot/banner.png" >
This is a new [**React Native**](https://reactnative.dev) project, bootstrapped using [`@react-native-community/cli`](https://github.com/react-native-community/cli).
# Getting Started
>**Note**: Make sure you have completed the [React Native - Environment Setup](https://reactnative.dev/docs/environment-setup) instructions till "Creating a new application" step, before proceeding.
## Step 1: Start the Metro Server
First, you will need to start **Metro**, the JavaScript _bundler_ that ships _with_ React Native.
To start Metro, run the following command from the _root_ of your React Native project:
```bash
# using npm
npm start
# OR using Yarn
yarn start
```
## Step 2: Start your Application
Let Metro Bundler run in its _own_ terminal. Open a _new_ terminal from the _root_ of your React Native project. Run the following command to start your _Android_ or _iOS_ app:
### For Android
```bash
# using npm
npm run android
# OR using Yarn
yarn android
```
### For iOS
```bash
# using npm
npm run ios
# OR using Yarn
yarn ios
```
If everything is set up _correctly_, you should see your new app running in your _Android Emulator_ or _iOS Simulator_ shortly provided you have set up your emulator/simulator correctly.
This is one way to run your app — you can also run it directly from within Android Studio and Xcode respectively.
## Step 3: Modifying your App
Now that you have successfully run the app, let's modify it.
1. Open `App.tsx` in your text editor of choice and edit some lines.
2. For **Android**: Press the <kbd>R</kbd> key twice or select **"Reload"** from the **Developer Menu** (<kbd>Ctrl</kbd> + <kbd>M</kbd> (on Window and Linux) or <kbd>Cmd ⌘</kbd> + <kbd>M</kbd> (on macOS)) to see your changes!
For **iOS**: Hit <kbd>Cmd ⌘</kbd> + <kbd>R</kbd> in your iOS Simulator to reload the app and see your changes!
## Congratulations! :tada:
You've successfully run and modified your React Native App. :partying_face:
### Now what?
- If you want to add this new React Native code to an existing application, check out the [Integration guide](https://reactnative.dev/docs/integration-with-existing-apps).
- If you're curious to learn more about React Native, check out the [Introduction to React Native](https://reactnative.dev/docs/getting-started).
# Troubleshooting
If you can't get this to work, see the [Troubleshooting](https://reactnative.dev/docs/troubleshooting) page.
# Learn More
To learn more about React Native, take a look at the following resources:
- [React Native Website](https://reactnative.dev) - learn more about React Native.
- [Getting Started](https://reactnative.dev/docs/environment-setup) - an **overview** of React Native and how setup your environment.
- [Learn the Basics](https://reactnative.dev/docs/getting-started) - a **guided tour** of the React Native **basics**.
- [Blog](https://reactnative.dev/blog) - read the latest official React Native **Blog** posts.
- [`@facebook/react-native`](https://github.com/facebook/react-native) - the Open Source; GitHub **repository** for React Native.

14
__tests__/App-test.js Normal file
View File

@ -0,0 +1,14 @@
/**
* @format
*/
import 'react-native';
import React from 'react';
import App from '../App';
// Note: test renderer must be required after react-native.
import renderer from 'react-test-renderer';
it('renders correctly', () => {
renderer.create(<App />);
});

4
app.json Normal file
View File

@ -0,0 +1,4 @@
{
"name": "caliHealthyLife",
"displayName": "caliHealthyLife"
}

3
babel.config.js Normal file
View File

@ -0,0 +1,3 @@
module.exports = {
presets: ['module:metro-react-native-babel-preset'],
};

11
index.js Normal file
View File

@ -0,0 +1,11 @@
/**
* @format
*/
import {AppRegistry, Platform} from 'react-native';
import App from './App';
import {name as appName} from './app.json';
import codePush from 'react-native-code-push';
//AppRegistry.registerComponent(appName, () => App);
AppRegistry.registerComponent(appName, () => codePush(App));

17
metro.config.js Normal file
View File

@ -0,0 +1,17 @@
/**
* Metro configuration for React Native
* https://github.com/facebook/react-native
*
* @format
*/
module.exports = {
transformer: {
getTransformOptions: async () => ({
transform: {
experimentalImportSupport: false,
inlineRequires: true,
},
}),
},
};

26366
package-lock.json generated Normal file

File diff suppressed because it is too large Load Diff

78
package.json Normal file
View File

@ -0,0 +1,78 @@
{
"name": "caliHealthyLife",
"version": "0.0.1",
"private": true,
"scripts": {
"android": "react-native run-android",
"ios": "react-native run-ios",
"start": "react-native start",
"test": "jest",
"lint": "eslint ."
},
"dependencies": {
"@invertase/react-native-apple-authentication": "^2.2.2",
"@react-native-community/async-storage": "^1.12.1",
"@react-native-community/google-signin": "^5.0.0",
"@react-native-community/masked-view": "^0.1.11",
"@react-native-firebase/app": "^16.4.6",
"@react-native-firebase/messaging": "^16.4.6",
"@react-navigation/bottom-tabs": "^6.4.1",
"@react-navigation/material-bottom-tabs": "^6.2.5",
"@react-navigation/native": "^6.0.14",
"@react-navigation/stack": "^6.3.5",
"axios": "^1.2.0",
"buffer": "^6.0.3",
"date-time-format-timezone": "^1.0.22",
"lodash": "^4.17.21",
"lottie-react-native": "^5.1.4",
"mobx": "^6.7.0",
"mobx-react": "^7.6.0",
"moment": "^2.29.4",
"qs": "^6.11.0",
"query-string": "^7.1.1",
"react": "17.0.2",
"react-native": "0.68.2",
"react-native-base64": "^0.2.1",
"react-native-code-push": "^7.0.5",
"react-native-countdown-component": "^2.7.1",
"react-native-credit-card-input": "^0.4.1",
"react-native-easy-toast": "^2.3.0",
"react-native-fast-image": "^8.6.3",
"react-native-fbsdk": "^3.0.0",
"react-native-gallery-swiper": "^1.26.4",
"react-native-gesture-handler": "^2.8.0",
"react-native-image-picker": "^4.10.1",
"react-native-image-viewing": "^0.2.2",
"react-native-keyboard-aware-scroll-view": "^0.9.5",
"react-native-loading-spinner-overlay": "^3.0.1",
"react-native-modals": "^0.22.3",
"react-native-paper": "^4.12.5",
"react-native-popup-menu": "^0.16.1",
"react-native-reanimated": "^2.13.0",
"react-native-safe-area-context": "^4.4.1",
"react-native-safe-area-view": "^1.1.1",
"react-native-screens": "^3.18.2",
"react-native-size-matters": "^0.4.0",
"react-native-snap-carousel": "^3.9.1",
"react-native-status-bar-height": "^2.6.0",
"react-native-swiper": "^1.6.0",
"react-native-switch-pro": "^1.0.5",
"react-native-tab-view": "^3.3.0",
"react-native-uuid": "^2.0.1",
"react-native-vector-icons": "^9.2.0",
"underscore": "^1.13.6"
},
"devDependencies": {
"@babel/core": "^7.20.2",
"@babel/runtime": "^7.20.1",
"@react-native-community/eslint-config": "^3.2.0",
"babel-jest": "^29.3.1",
"eslint": "^8.28.0",
"jest": "^29.3.1",
"metro-react-native-babel-preset": "^0.73.3",
"react-test-renderer": "17.0.2"
},
"jest": {
"preset": "react-native"
}
}

224
router.js Normal file
View File

@ -0,0 +1,224 @@
/**
* Sample React Native App
* https://github.com/facebook/react-native
*
* @format
* @flow strict-local
*/
import React from 'react';
import {colors} from './src/assets/styles/colors-theme';
import {
StyleSheet,
ScrollView,
View,
Text,
StatusBar,
TouchableOpacity,
} from 'react-native';
import SafeAreaView from 'react-native-safe-area-view';
import {Provider} from 'mobx-react';
import Store from './src/stores/index';
import {NavigationContainer, useFocusEffect} from '@react-navigation/native';
import {createStackNavigator, HeaderBackButton} from '@react-navigation/stack';
import {createMaterialBottomTabNavigator} from '@react-navigation/material-bottom-tabs';
import {createBottomTabNavigator} from '@react-navigation/bottom-tabs';
import {
Header,
LearnMoreLinks,
Colors,
DebugInstructions,
ReloadInstructions,
} from 'react-native/Libraries/NewAppScreen';
import Icon from 'react-native-vector-icons/dist/MaterialCommunityIcons';
import SplashScreen from './src/pages/splash/splashScreen';
import Main from './src/pages/main/main';
import Search from './src/pages/search/search';
import Favorite from './src/pages/favorite/favorite';
import MyTabBar from './MyTabBar';
import Order from './src/pages/order/order';
import Profile from './src/pages/profile/profile';
import AddName from './src/pages/profile/addName';
import CreditCard from './src/pages/profile/creditCard';
import AddressSetting from './src/pages/profile/addressSetting';
import BuyHistory from './src/pages/buyHistory/buyHistory';
import HistoryDetails from './src/pages/buyHistory/historyDetails';
import ProductsDetails from './src/pages/productsDetails/productsDetails';
import ShoppingCart from './src/pages/shoppingCart/shoppingCart';
import Signin from './src/pages/signin/signin';
import Signup from './src/pages/signup/signup';
import SignUpVerify from './src/pages/signup/signUpVerify';
import ForgotPassword from './src/pages/signup/forgotPassword';
Icon.loadFont();
const Stack = createStackNavigator();
const BottomTab = createBottomTabNavigator();
import { Provider, inject, observer } from 'mobx-react';
const Router = inject("appStore")(observer(class Router extends React.Component {
constructor(props) {
super(props);
this.store = props.appStore;
}
BottomTabScreen = () => {
return (
<BottomTab.Navigator
tabBar={props => <MyTabBar {...props} logined={this.store.logined} />}>
<Stack.Screen
name="Main"
component={Main}
options={{tabBarLabel: 'main'}}
/>
<Stack.Screen
name="Favorite"
component={Favorite}
options={{tabBarLabel: 'myfavourite'}}
/>
<Stack.Screen
name="BuyHistory"
component={BuyHistory}
options={{tabBarLabel: 'shoppingHistory'}}
/>
<Stack.Screen
name="Profile"
component={Profile}
options={{tabBarLabel: 'acAndSetting'}}
/>
</BottomTab.Navigator>
);
};
render() {
return (
<SafeAreaView style={{flex: 1, backgroundColor: colors.mainColor}}>
<Stack.Navigator initialRouteName="SplashScreen">
{!this.store.splash ? (
<>
<Stack.Screen
name="SplashScreen"
component={SplashScreen}
options={{headerShown: false}}
/>
</>
) : (
<>
<Stack.Screen
name="BottomTabScreen"
component={this.BottomTabScreen}
options={{headerShown: false}}
/>
<Stack.Screen
name="ProductsDetails"
component={ProductsDetails}
options={{headerShown: false}}
/>
<Stack.Screen
name="Signin"
component={Signin}
options={{headerShown: false}}
/>
<Stack.Screen
name="Signup"
component={Signup}
options={{headerShown: false}}
/>
<Stack.Screen
name="SignUpVerify"
component={SignUpVerify}
options={{headerShown: false}}
/>
<Stack.Screen
name="AddName"
component={AddName}
options={{headerShown: false}}
/>
<Stack.Screen
name="ForgotPassword"
component={ForgotPassword}
options={{headerShown: false}}
/>
<Stack.Screen
name="ShoppingCart"
component={ShoppingCart}
options={{headerShown: false}}
/>
<Stack.Screen
name="Order"
component={Order}
options={{headerShown: false}}
/>
<Stack.Screen
name="HistoryDetails"
component={HistoryDetails}
options={{headerShown: false}}
/>
<Stack.Screen
name="CreditCard"
component={CreditCard}
options={{headerShown: false}}
/>
<Stack.Screen
name="AddressSetting"
component={AddressSetting}
options={{headerShown: false}}
/>
<Stack.Screen
name="Search"
component={Search}
options={{
headerShown: false,
// animationEnabled: false,
}}
/>
</>
)}
</Stack.Navigator>
</SafeAreaView>
);
}
}))
const styles = StyleSheet.create({
scrollView: {
backgroundColor: Colors.lighter,
},
engine: {
position: 'absolute',
right: 0,
},
body: {
backgroundColor: Colors.white,
},
sectionContainer: {
marginTop: 32,
paddingHorizontal: 24,
},
sectionTitle: {
fontSize: 24,
fontWeight: '600',
color: Colors.black,
},
sectionDescription: {
marginTop: 8,
fontSize: 18,
fontWeight: '400',
color: Colors.dark,
},
highlight: {
fontWeight: '700',
},
footer: {
color: Colors.dark,
fontSize: 12,
fontWeight: '600',
padding: 4,
paddingRight: 12,
textAlign: 'right',
},
});
export default Router;

Binary file not shown.

After

Width:  |  Height:  |  Size: 8.1 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 14 KiB

View File

@ -0,0 +1 @@
F81D0BFFE116347EE09EF84A5EF84824DB8EE17AD9FF86FB240BFDFEA61EF0FD comodoca.com 5fd97c3b2d29c

Binary file not shown.

After

Width:  |  Height:  |  Size: 6.6 MiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 9.4 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 15 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.7 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.2 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.5 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.9 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.8 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.9 KiB

BIN
src/assets/images/craft@2x.png Executable file

Binary file not shown.

After

Width:  |  Height:  |  Size: 601 B

BIN
src/assets/images/craft@3x.png Executable file

Binary file not shown.

After

Width:  |  Height:  |  Size: 783 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.4 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.9 KiB

BIN
src/assets/images/drink@2x.png Executable file

Binary file not shown.

After

Width:  |  Height:  |  Size: 9.6 KiB

BIN
src/assets/images/drink@3x.png Executable file

Binary file not shown.

After

Width:  |  Height:  |  Size: 16 KiB

BIN
src/assets/images/facebook@2x.png Executable file

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.9 KiB

BIN
src/assets/images/facebook@3x.png Executable file

Binary file not shown.

After

Width:  |  Height:  |  Size: 6.9 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.8 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 5.1 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 8.1 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 13 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 5.3 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 7.7 KiB

BIN
src/assets/images/fruit@2x.png Executable file

Binary file not shown.

After

Width:  |  Height:  |  Size: 5.1 KiB

BIN
src/assets/images/fruit@3x.png Executable file

Binary file not shown.

After

Width:  |  Height:  |  Size: 9.1 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.2 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.8 KiB

BIN
src/assets/images/google@2x.png Executable file

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.2 KiB

BIN
src/assets/images/google@3x.png Executable file

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.2 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 58 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 137 KiB

View File

@ -0,0 +1,42 @@
export const images = {
productCatalogue: {
alcoholic: require('./Alcoholic.png'),
frozenmeat: require('./Frozenmeat.png'),
drink: require('./drink.png'),
frozenfood: require('./frozenfood.png'),
fruit: require('./fruit.png'),
pasta: require('./pasta.png'),
seafood: require('./seafood.png'),
sneck: require('./sneck.png'),
vegetables: require('./vegetables.png'),
},
main: {
mostcheapstar: require('./mostcheapstar.png'),
ranking: require('./ranking.png'),
whiteStar: require('./whitestar.png'),
yellowStar: require('./yellowstar.png'),
goldenApple: require('./goldenApple.png'),
youmaylike: require('./youmaylike.png'),
template: require('./template.png'),
foodcat: require('./foodcat.png'),
},
details: {
share: require('./share.png'),
favourite: require('./favourite.png'),
comment: require('./comment.png'),
},
signIn: {
illustration: require('./illustration.png'),
facebook: require('./facebook.png'),
google: require('./google.png'),
bitMap: require('./Bitmap.png'),
},
profile: {
creditCardIcon: require('./creditcardicon.png'),
profileShare: require('./profileshare.png'),
},
search: {
greenMagnifier: require('./Icon_Magnifier.png'),
smallGreenMagnifier: require('./Icon_Magnifier_Small.png'),
},
};

Binary file not shown.

After

Width:  |  Height:  |  Size: 8.7 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 19 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.6 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.9 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.8 KiB

BIN
src/assets/images/pasta@2x.png Executable file

Binary file not shown.

After

Width:  |  Height:  |  Size: 10 KiB

BIN
src/assets/images/pasta@3x.png Executable file

Binary file not shown.

After

Width:  |  Height:  |  Size: 18 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 4.5 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 6.7 KiB

BIN
src/assets/images/ranking@2x.png Executable file

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.4 KiB

BIN
src/assets/images/ranking@3x.png Executable file

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.0 KiB

BIN
src/assets/images/seafood@2x.png Executable file

Binary file not shown.

After

Width:  |  Height:  |  Size: 10 KiB

BIN
src/assets/images/seafood@3x.png Executable file

Binary file not shown.

After

Width:  |  Height:  |  Size: 17 KiB

BIN
src/assets/images/search@2x.png Executable file

Binary file not shown.

After

Width:  |  Height:  |  Size: 742 B

BIN
src/assets/images/search@3x.png Executable file

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.0 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.8 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 5.7 KiB

BIN
src/assets/images/sneck@2x.png Executable file

Binary file not shown.

After

Width:  |  Height:  |  Size: 8.9 KiB

BIN
src/assets/images/sneck@3x.png Executable file

Binary file not shown.

After

Width:  |  Height:  |  Size: 14 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.5 MiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 5.5 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 9.6 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.6 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.5 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.9 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.5 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 9.7 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 16 KiB

View File

@ -0,0 +1,981 @@
{
"v": "4.10.1",
"fr": 30,
"ip": 0,
"op": 40,
"w": 80,
"h": 80,
"nm": "Success Checkmark",
"ddd": 0,
"assets": [],
"layers": [
{
"ddd": 0,
"ind": 1,
"ty": 4,
"nm": "Check Mark",
"sr": 1,
"ks": {
"o": {
"a": 0,
"k": 100,
"ix": 11
},
"r": {
"a": 0,
"k": 0,
"ix": 10
},
"p": {
"a": 0,
"k": [
40,
40,
0
],
"ix": 2
},
"a": {
"a": 0,
"k": [
-1.312,
6,
0
],
"ix": 1
},
"s": {
"a": 0,
"k": [
100,
100,
100
],
"ix": 6
}
},
"ao": 0,
"shapes": [
{
"ty": "gr",
"it": [
{
"ind": 0,
"ty": "sh",
"ix": 1,
"ks": {
"a": 0,
"k": {
"i": [
[
0,
0
],
[
0,
0
],
[
0,
0
]
],
"o": [
[
0,
0
],
[
0,
0
],
[
0,
0
]
],
"v": [
[
-15.75,
8
],
[
-8,
16
],
[
13.125,
-4
]
],
"c": false
},
"ix": 2
},
"nm": "Path 1",
"mn": "ADBE Vector Shape - Group",
"hd": false
},
{
"ty": "tm",
"s": {
"a": 1,
"k": [
{
"i": {
"x": [
0.667
],
"y": [
1
]
},
"o": {
"x": [
0.333
],
"y": [
0
]
},
"n": [
"0p667_1_0p333_0"
],
"t": 25,
"s": [
0
],
"e": [
100
]
},
{
"t": 33
}
],
"ix": 1
},
"e": {
"a": 0,
"k": 0,
"ix": 2
},
"o": {
"a": 0,
"k": 0,
"ix": 3
},
"m": 1,
"ix": 2,
"nm": "Trim Paths 1",
"mn": "ADBE Vector Filter - Trim",
"hd": false
},
{
"ty": "st",
"c": {
"a": 0,
"k": [
1,
1,
1,
1
],
"ix": 3
},
"o": {
"a": 0,
"k": 100,
"ix": 4
},
"w": {
"a": 0,
"k": 3,
"ix": 5
},
"lc": 2,
"lj": 2,
"nm": "Stroke 1",
"mn": "ADBE Vector Graphic - Stroke",
"hd": false
},
{
"ty": "tr",
"p": {
"a": 0,
"k": [
0,
0
],
"ix": 2
},
"a": {
"a": 0,
"k": [
0,
0
],
"ix": 1
},
"s": {
"a": 0,
"k": [
100,
100
],
"ix": 3
},
"r": {
"a": 0,
"k": 0,
"ix": 6
},
"o": {
"a": 0,
"k": 100,
"ix": 7
},
"sk": {
"a": 0,
"k": 0,
"ix": 4
},
"sa": {
"a": 0,
"k": 0,
"ix": 5
},
"nm": "Transform"
}
],
"nm": "Shape 1",
"np": 3,
"cix": 2,
"ix": 1,
"mn": "ADBE Vector Group",
"hd": false
}
],
"ip": 0,
"op": 40,
"st": 0,
"bm": 0
},
{
"ddd": 0,
"ind": 2,
"ty": 4,
"nm": "Circle Flash",
"sr": 1,
"ks": {
"o": {
"a": 1,
"k": [
{
"i": {
"x": [
0.833
],
"y": [
0.833
]
},
"o": {
"x": [
0.167
],
"y": [
0.167
]
},
"n": [
"0p833_0p833_0p167_0p167"
],
"t": 25,
"s": [
0
],
"e": [
98
]
},
{
"i": {
"x": [
0.833
],
"y": [
0.833
]
},
"o": {
"x": [
0.167
],
"y": [
0.167
]
},
"n": [
"0p833_0p833_0p167_0p167"
],
"t": 30,
"s": [
98
],
"e": [
0
]
},
{
"t": 38
}
],
"ix": 11
},
"r": {
"a": 0,
"k": 0,
"ix": 10
},
"p": {
"a": 0,
"k": [
40,
40,
0
],
"ix": 2
},
"a": {
"a": 0,
"k": [
0,
0,
0
],
"ix": 1
},
"s": {
"a": 1,
"k": [
{
"i": {
"x": [
0.667,
0.667,
0.667
],
"y": [
1,
1,
1
]
},
"o": {
"x": [
0.333,
0.333,
0.333
],
"y": [
0,
0,
0
]
},
"n": [
"0p667_1_0p333_0",
"0p667_1_0p333_0",
"0p667_1_0p333_0"
],
"t": 25,
"s": [
0,
0,
100
],
"e": [
100,
100,
100
]
},
{
"t": 30
}
],
"ix": 6
}
},
"ao": 0,
"shapes": [
{
"d": 1,
"ty": "el",
"s": {
"a": 0,
"k": [
64,
64
],
"ix": 2
},
"p": {
"a": 0,
"k": [
0,
0
],
"ix": 3
},
"nm": "Ellipse Path 1",
"mn": "ADBE Vector Shape - Ellipse",
"hd": false
},
{
"ty": "fl",
"c": {
"a": 0,
"k": [
0.529866635799,
0.961458325386,
0.448091417551,
1
],
"ix": 4
},
"o": {
"a": 0,
"k": 100,
"ix": 5
},
"r": 1,
"nm": "Fill 1",
"mn": "ADBE Vector Graphic - Fill",
"hd": false
}
],
"ip": 0,
"op": 40,
"st": 0,
"bm": 0
},
{
"ddd": 0,
"ind": 3,
"ty": 4,
"nm": "Circle Stroke",
"sr": 1,
"ks": {
"o": {
"a": 0,
"k": 100,
"ix": 11
},
"r": {
"a": 0,
"k": 0,
"ix": 10
},
"p": {
"a": 0,
"k": [
39.022,
39.022,
0
],
"ix": 2
},
"a": {
"a": 0,
"k": [
0,
0,
0
],
"ix": 1
},
"s": {
"a": 1,
"k": [
{
"i": {
"x": [
0.667,
0.667,
0.667
],
"y": [
1,
1,
1
]
},
"o": {
"x": [
0.333,
0.333,
0.333
],
"y": [
0,
0,
0
]
},
"n": [
"0p667_1_0p333_0",
"0p667_1_0p333_0",
"0p667_1_0p333_0"
],
"t": 16,
"s": [
100,
100,
100
],
"e": [
80,
80,
100
]
},
{
"i": {
"x": [
0.667,
0.667,
0.667
],
"y": [
1,
1,
1
]
},
"o": {
"x": [
0.333,
0.333,
0.333
],
"y": [
0,
0,
0
]
},
"n": [
"0p667_1_0p333_0",
"0p667_1_0p333_0",
"0p667_1_0p333_0"
],
"t": 22,
"s": [
80,
80,
100
],
"e": [
120,
120,
100
]
},
{
"i": {
"x": [
0.667,
0.667,
0.667
],
"y": [
1,
1,
1
]
},
"o": {
"x": [
0.333,
0.333,
0.333
],
"y": [
0,
0,
0
]
},
"n": [
"0p667_1_0p333_0",
"0p667_1_0p333_0",
"0p667_1_0p333_0"
],
"t": 25,
"s": [
120,
120,
100
],
"e": [
100,
100,
100
]
},
{
"t": 29
}
],
"ix": 6
}
},
"ao": 0,
"shapes": [
{
"ty": "gr",
"it": [
{
"d": 1,
"ty": "el",
"s": {
"a": 0,
"k": [
60,
60
],
"ix": 2
},
"p": {
"a": 0,
"k": [
0,
0
],
"ix": 3
},
"nm": "Ellipse Path 1",
"mn": "ADBE Vector Shape - Ellipse",
"hd": false
},
{
"ty": "tm",
"s": {
"a": 1,
"k": [
{
"i": {
"x": [
0.667
],
"y": [
1
]
},
"o": {
"x": [
0.333
],
"y": [
0
]
},
"n": [
"0p667_1_0p333_0"
],
"t": 0,
"s": [
0
],
"e": [
100
]
},
{
"t": 16
}
],
"ix": 1
},
"e": {
"a": 0,
"k": 0,
"ix": 2
},
"o": {
"a": 0,
"k": 0,
"ix": 3
},
"m": 1,
"ix": 2,
"nm": "Trim Paths 1",
"mn": "ADBE Vector Filter - Trim",
"hd": false
},
{
"ty": "st",
"c": {
"a": 0,
"k": [
0.427450984716,
0.800000011921,
0.35686275363,
1
],
"ix": 3
},
"o": {
"a": 0,
"k": 100,
"ix": 4
},
"w": {
"a": 0,
"k": 3,
"ix": 5
},
"lc": 2,
"lj": 2,
"nm": "Stroke 1",
"mn": "ADBE Vector Graphic - Stroke",
"hd": false
},
{
"ty": "tr",
"p": {
"a": 0,
"k": [
0.978,
0.978
],
"ix": 2
},
"a": {
"a": 0,
"k": [
0,
0
],
"ix": 1
},
"s": {
"a": 0,
"k": [
100,
100
],
"ix": 3
},
"r": {
"a": 0,
"k": 0,
"ix": 6
},
"o": {
"a": 0,
"k": 100,
"ix": 7
},
"sk": {
"a": 0,
"k": 0,
"ix": 4
},
"sa": {
"a": 0,
"k": 0,
"ix": 5
},
"nm": "Transform"
}
],
"nm": "Ellipse 1",
"np": 3,
"cix": 2,
"ix": 1,
"mn": "ADBE Vector Group",
"hd": false
}
],
"ip": 0,
"op": 40,
"st": 0,
"bm": 0
},
{
"ddd": 0,
"ind": 4,
"ty": 4,
"nm": "Circle Green Fill",
"sr": 1,
"ks": {
"o": {
"a": 1,
"k": [
{
"i": {
"x": [
0.833
],
"y": [
0.833
]
},
"o": {
"x": [
0.167
],
"y": [
0.167
]
},
"n": [
"0p833_0p833_0p167_0p167"
],
"t": 21,
"s": [
0
],
"e": [
98
]
},
{
"t": 28
}
],
"ix": 11
},
"r": {
"a": 0,
"k": 0,
"ix": 10
},
"p": {
"a": 0,
"k": [
40,
40,
0
],
"ix": 2
},
"a": {
"a": 0,
"k": [
0,
0,
0
],
"ix": 1
},
"s": {
"a": 1,
"k": [
{
"i": {
"x": [
0.667,
0.667,
0.667
],
"y": [
1,
1,
1
]
},
"o": {
"x": [
0.333,
0.333,
0.333
],
"y": [
0,
0,
0
]
},
"n": [
"0p667_1_0p333_0",
"0p667_1_0p333_0",
"0p667_1_0p333_0"
],
"t": 21,
"s": [
0,
0,
100
],
"e": [
100,
100,
100
]
},
{
"t": 28
}
],
"ix": 6
}
},
"ao": 0,
"shapes": [
{
"d": 1,
"ty": "el",
"s": {
"a": 0,
"k": [
64,
64
],
"ix": 2
},
"p": {
"a": 0,
"k": [
0,
0
],
"ix": 3
},
"nm": "Ellipse Path 1",
"mn": "ADBE Vector Shape - Ellipse",
"hd": false
},
{
"ty": "fl",
"c": {
"a": 0,
"k": [
0.427450984716,
0.800000011921,
0.35686275363,
1
],
"ix": 4
},
"o": {
"a": 0,
"k": 100,
"ix": 5
},
"r": 1,
"nm": "Fill 1",
"mn": "ADBE Vector Graphic - Fill",
"hd": false
}
],
"ip": 0,
"op": 40,
"st": 0,
"bm": 0
}
]
}

View File

@ -0,0 +1,708 @@
{
"v": "5.6.10",
"fr": 120,
"ip": 0,
"op": 160,
"w": 1000,
"h": 1000,
"nm": "Composição 1",
"ddd": 0,
"assets": [],
"layers": [
{
"ddd": 0,
"ind": 1,
"ty": 4,
"nm": "Left",
"sr": 1,
"ks": {
"o": {
"a": 0,
"k": 100,
"ix": 11
},
"r": {
"a": 0,
"k": 0,
"ix": 10
},
"p": {
"a": 1,
"k": [
{
"i": {
"x": 0.833,
"y": 0.833
},
"o": {
"x": 0.333,
"y": 0.333
},
"t": 0,
"s": [
650,
500,
0
],
"e": [
650,
500,
0
],
"to": [
0,
0,
0
],
"ti": [
0,
0,
0
]
},
{
"i": {
"x": 0.667,
"y": 1
},
"o": {
"x": 0.333,
"y": 0
},
"t": 20,
"s": [
650,
500,
0
],
"e": [
650,
300,
0
],
"to": [
0,
-33.333,
0
],
"ti": [
-3.333,
0,
0
]
},
{
"i": {
"x": 0.209,
"y": 1
},
"o": {
"x": 0.333,
"y": 0
},
"t": 70,
"s": [
650,
300,
0
],
"e": [
650,
500,
0
],
"to": [
3.329,
0,
0
],
"ti": [
-0.005,
-0.047,
0
]
},
{
"t": 120
}
],
"ix": 2
},
"a": {
"a": 0,
"k": [
-233,
-9,
0
],
"ix": 1
},
"s": {
"a": 0,
"k": [
100,
100,
100
],
"ix": 6
}
},
"ao": 0,
"shapes": [
{
"ty": "gr",
"it": [
{
"d": 1,
"ty": "el",
"s": {
"a": 0,
"k": [
90,
90
],
"ix": 2
},
"p": {
"a": 0,
"k": [
0,
0
],
"ix": 3
},
"nm": "Caminho da elipse 1",
"mn": "ADBE Vector Shape - Ellipse",
"hd": false
},
{
"ty": "fl",
"c": {
"a": 0,
"k": [
0,
0,
0,
1
],
"ix": 4
},
"o": {
"a": 0,
"k": 100,
"ix": 5
},
"r": 1,
"bm": 0,
"nm": "Preenchimento 1",
"mn": "ADBE Vector Graphic - Fill",
"hd": false
},
{
"ty": "tr",
"p": {
"a": 0,
"k": [
-233,
-9
],
"ix": 2
},
"a": {
"a": 0,
"k": [
0,
0
],
"ix": 1
},
"s": {
"a": 0,
"k": [
100,
100
],
"ix": 3
},
"r": {
"a": 0,
"k": 0,
"ix": 6
},
"o": {
"a": 0,
"k": 100,
"ix": 7
},
"sk": {
"a": 0,
"k": 0,
"ix": 4
},
"sa": {
"a": 0,
"k": 0,
"ix": 5
},
"nm": "Transformar"
}
],
"nm": "Elipse 1",
"np": 3,
"cix": 2,
"bm": 0,
"ix": 1,
"mn": "ADBE Vector Group",
"hd": false
}
],
"ip": 0,
"op": 160,
"st": 0,
"bm": 0
},
{
"ddd": 0,
"ind": 2,
"ty": 4,
"nm": "Center",
"sr": 1,
"ks": {
"o": {
"a": 0,
"k": 100,
"ix": 11
},
"r": {
"a": 0,
"k": 0,
"ix": 10
},
"p": {
"a": 1,
"k": [
{
"i": {
"x": 0.607,
"y": 1
},
"o": {
"x": 0.333,
"y": 0
},
"t": 10,
"s": [
500,
500,
0
],
"e": [
500,
300,
0
],
"to": [
0,
-33.333,
0
],
"ti": [
0,
0,
0
]
},
{
"i": {
"x": 0.121,
"y": 1
},
"o": {
"x": 0.333,
"y": 0
},
"t": 55,
"s": [
500,
300,
0
],
"e": [
500,
500,
0
],
"to": [
0,
0,
0
],
"ti": [
0,
-33.333,
0
]
},
{
"t": 115
}
],
"ix": 2
},
"a": {
"a": 0,
"k": [
-233,
-9,
0
],
"ix": 1
},
"s": {
"a": 0,
"k": [
100,
100,
100
],
"ix": 6
}
},
"ao": 0,
"shapes": [
{
"ty": "gr",
"it": [
{
"d": 1,
"ty": "el",
"s": {
"a": 0,
"k": [
90,
90
],
"ix": 2
},
"p": {
"a": 0,
"k": [
0,
0
],
"ix": 3
},
"nm": "Caminho da elipse 1",
"mn": "ADBE Vector Shape - Ellipse",
"hd": false
},
{
"ty": "fl",
"c": {
"a": 0,
"k": [
0,
0,
0,
1
],
"ix": 4
},
"o": {
"a": 0,
"k": 100,
"ix": 5
},
"r": 1,
"bm": 0,
"nm": "Preenchimento 1",
"mn": "ADBE Vector Graphic - Fill",
"hd": false
},
{
"ty": "tr",
"p": {
"a": 0,
"k": [
-233,
-9
],
"ix": 2
},
"a": {
"a": 0,
"k": [
0,
0
],
"ix": 1
},
"s": {
"a": 0,
"k": [
100,
100
],
"ix": 3
},
"r": {
"a": 0,
"k": 0,
"ix": 6
},
"o": {
"a": 0,
"k": 100,
"ix": 7
},
"sk": {
"a": 0,
"k": 0,
"ix": 4
},
"sa": {
"a": 0,
"k": 0,
"ix": 5
},
"nm": "Transformar"
}
],
"nm": "Elipse 1",
"np": 3,
"cix": 2,
"bm": 0,
"ix": 1,
"mn": "ADBE Vector Group",
"hd": false
}
],
"ip": 0,
"op": 160,
"st": 0,
"bm": 0
},
{
"ddd": 0,
"ind": 3,
"ty": 4,
"nm": "Rigth",
"sr": 1,
"ks": {
"o": {
"a": 0,
"k": 100,
"ix": 11
},
"r": {
"a": 0,
"k": 0,
"ix": 10
},
"p": {
"a": 1,
"k": [
{
"i": {
"x": 0.667,
"y": 1
},
"o": {
"x": 0.333,
"y": 0
},
"t": 0,
"s": [
360,
500,
0
],
"e": [
360,
300,
0
],
"to": [
0,
-13.366,
0
],
"ti": [
0,
36.899,
0
]
},
{
"i": {
"x": 0.163,
"y": 1
},
"o": {
"x": 0.333,
"y": 0
},
"t": 35,
"s": [
360,
300,
0
],
"e": [
360,
500,
0
],
"to": [
0,
-55.126,
0
],
"ti": [
0,
-33.333,
0
]
},
{
"t": 95
}
],
"ix": 2
},
"a": {
"a": 0,
"k": [
-233,
-9,
0
],
"ix": 1
},
"s": {
"a": 0,
"k": [
100,
100,
100
],
"ix": 6
}
},
"ao": 0,
"shapes": [
{
"ty": "gr",
"it": [
{
"d": 1,
"ty": "el",
"s": {
"a": 0,
"k": [
90,
90
],
"ix": 2
},
"p": {
"a": 0,
"k": [
0,
0
],
"ix": 3
},
"nm": "Caminho da elipse 1",
"mn": "ADBE Vector Shape - Ellipse",
"hd": false
},
{
"ty": "fl",
"c": {
"a": 0,
"k": [
0,
0,
0,
1
],
"ix": 4
},
"o": {
"a": 0,
"k": 100,
"ix": 5
},
"r": 1,
"bm": 0,
"nm": "Preenchimento 1",
"mn": "ADBE Vector Graphic - Fill",
"hd": false
},
{
"ty": "tr",
"p": {
"a": 0,
"k": [
-233,
-9
],
"ix": 2
},
"a": {
"a": 0,
"k": [
0,
0
],
"ix": 1
},
"s": {
"a": 0,
"k": [
100,
100
],
"ix": 3
},
"r": {
"a": 0,
"k": 0,
"ix": 6
},
"o": {
"a": 0,
"k": 100,
"ix": 7
},
"sk": {
"a": 0,
"k": 0,
"ix": 4
},
"sa": {
"a": 0,
"k": 0,
"ix": 5
},
"nm": "Transformar"
}
],
"nm": "Elipse 1",
"np": 3,
"cix": 2,
"bm": 0,
"ix": 1,
"mn": "ADBE Vector Group",
"hd": false
}
],
"ip": 0,
"op": 160,
"st": 0,
"bm": 0
}
],
"markers": []
}

BIN
src/assets/screenshot/1.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.9 MiB

BIN
src/assets/screenshot/2.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 247 KiB

BIN
src/assets/screenshot/3.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 445 KiB

BIN
src/assets/screenshot/4.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 202 KiB

BIN
src/assets/screenshot/5.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 266 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 166 KiB

View File

@ -0,0 +1,27 @@
/**
* 控制全app的颜色
* @type {{statusBarColor: string}}
*/
export const colors = {
bgc: '#FFFBF4',
catColor: '#D0B895',
historyListColor: '#F6EFE0',
statusBarColor: '#23A2FF',
inputBgc: '#E6E7E8',
signupInputBgc: '#F0E1C9',
shoppingcartColor: '#F0DEC1',
inputText: '#4D4D4D',
profileBg: '#D29686',
mainColor: '#275A39',
otherGreen: '#6EB7A0',
maingray: '#95a5a6',
lineColor: '#E5E5E5',
textColor: '#603913',
subTextColor: '#98AD86',
baseColor: '#1BBC9B',
line2Color: '#9EA3A6',
borderLineColor: '#E6E6E6',
loginButtonColor: '#3E9B42',
titleColor: '#57A75A',
grayTextColor: '#797979',
};

91
src/components/Loading.js Normal file
View File

@ -0,0 +1,91 @@
import React, {Component} from 'react';
import {
Platform,
StyleSheet,
Text,
View,
Modal,
ActivityIndicator,
} from 'react-native';
import Spinner from 'react-native-loading-spinner-overlay';
import {colors} from '../assets/styles/colors-theme';
import LottieView from 'lottie-react-native';
import {width, height} from '../services/screen';
export default class Loading extends Component {
state = {
spinner: false,
};
render() {
return (
<Modal
transparent={true}
animationType={'none'}
visible={this.props.loading}
onRequestClose={() => {
console.log('c lose modal');
}}>
<View style={styles.modalBackground}>
<View style={styles.activityIndicatorWrapper}>
{/* <ActivityIndicator animating={this.props.loading} /> */}
<LottieView
ref={animation => {
this.animation = animation;
}}
colorFilters={[
{
keypath: 'Left',
color: colors.mainColor,
},
{
keypath: 'Center',
color: colors.mainColor,
},
{
keypath: 'Rigth',
color: colors.mainColor,
},
]}
style={{height: 150, width: 150}}
source={require('../assets/lottie/loading')}
autoPlay
loop
/>
</View>
</View>
</Modal>
);
}
}
const styles = StyleSheet.flatten({
wrapper: {
position: 'absolute',
top: 0,
left: 0,
width: width,
height: height,
},
loading: {
position: 'absolute',
top: height / 2 - 100,
left: width / 2 - 70,
width: 140,
height: 140,
},
modalBackground: {
flex: 1,
alignItems: 'center',
flexDirection: 'column',
justifyContent: 'center',
},
activityIndicatorWrapper: {
height: 200,
width: 200,
borderRadius: 10,
display: 'flex',
alignItems: 'center',
justifyContent: 'space-around',
},
});

View File

@ -0,0 +1,299 @@
import React, { Component } from 'react';
import {
View,
Text,
TextInput,
TouchableOpacity,
Platform,
Image,
} from 'react-native';
import { colors } from '../assets/styles/colors-theme';
import CountDown from 'react-native-countdown-component';
import { width, height } from '../services/screen';
import { inject, observer } from "mobx-react"
import { observable, makeObservable } from 'mobx'
import { images } from '../assets/images/imageIndex';
import Rank from './rank';
import Icon from 'react-native-vector-icons/dist/Feather';
import MaterialCommunityIcons from 'react-native-vector-icons/dist/MaterialCommunityIcons';
Icon.loadFont();
MaterialCommunityIcons.loadFont();
const CategoriesItems = inject("appStore")(observer(class CategoriesItems extends React.Component {
constructor(props) {
super(props);
this.store = props.appStore;
}
priceHandler(price) {
var priceInt = parseFloat(price).toFixed(2);
return '$' + priceInt.toString();
}
navigationAction() {
this.props.navigation.navigate('ProductsDetails', { data: this.props.data });
}
renderTimer() {
if (this.props.sale) {
return (
<CountDown
until={this.props.data.unix}
size={15}
digitStyle={{ backgroundColor: '#FFF' }}
digitTxtStyle={{ color: colors.mainColor }}
timeToShow={['D', 'H', 'M', 'S']}
timeLabels={{ d: 'Days', h: 'Hrs', m: 'Mins', s: 'Sec' }}
timeLabelStyle={{ color: colors.mainColor }}
/>
);
}
}
renderGroupBuy() {
if (this.props.groupBuy) {
var index = this.props.data.attributes.findIndex(
element => element.name == 'groupbuy',
);
return (
<Text style={{ color: colors.mainColor }}>
{this.store.text.alreadyHave +
this.props.data.attributes[index].options[0] +
this.store.text.joinedGroupBuying}
</Text>
);
}
}
render() {
return (
// <TouchableOpacity
// style={{marginTop: 10}}
// onPress={() => {
// this.navigationAction();
// }}>
// <View
// style={{
// flex: 0.65,
// borderTopLeftRadius: 10,
// borderTopRightRadius: 10,
// }}>
// {this.props.data.hasOwnProperty('images') ? (
// <Image
// style={{
// flex: 1,
// borderTopLeftRadius: 10,
// borderTopRightRadius: 10,
// backgroundColor: '#F0E1C9',
// }}
// source={{
// uri: this.props.data.images[0].src,
// }}
// />
// ) : (
// <View style={{height: 140, width: 140}} />
// )}
// </View>
// <Text numberOfLines={1} style={{fontSize: 12, width: 140}}>
// {this.props.data.name}
// </Text>
// <Rank ranking={parseFloat(this.props.data.average_rating)} />
// <Text
// numberOfLines={1}
// style={{
// fontSize: 10,
// marginTop: 10,
// textDecorationLine: 'line-through',
// }}>
// {this.props.data.on_sale
// ? this.store.text.originalPrice +
// this.priceHandler(this.props.data.regular_price)
// : ''}
// </Text>
// <Text
// numberOfLines={1}
// style={{
// fontSize: 12,
// color: this.props.data.on_sale ? 'red' : 'black',
// fontWeight: 'bold',
// }}>
// {this.priceHandler(this.props.data.price)}
// </Text>
// <View>{this.renderTimer()}</View>
// {this.renderGroupBuy()}
// <TouchableOpacity
// style={{
// flexDirection: 'row',
// backgroundColor: colors.mainColor,
// height: 17,
// width: 75,
// alignItems: 'center',
// justifyContent: 'center',
// borderRadius: 5,
// marginTop: 5,
// }}
// onPress={() => this.props.onPress && this.props.onPress()}>
// <Icon
// name={'shopping-cart'}
// style={{marginRight: 2}}
// size={12}
// color={'white'}
// />
// <Text style={{fontSize: 10, color: 'white'}}>
// {this.store.text.addToShoppingCart}
// </Text>
// </TouchableOpacity>
// </TouchableOpacity>
<TouchableOpacity
style={{
borderColor: colors.mainColor,
marginTop: 15,
}}
onPress={() => {
this.navigationAction();
}}>
<View
style={{
height: 300,
width: 150,
}}>
<View
style={{
flex: 0.65,
borderTopLeftRadius: 10,
borderTopRightRadius: 10,
}}>
{this.props.data.hasOwnProperty('images') ? (
<Image
resizeMode="cover"
style={{
flex: 1,
borderTopLeftRadius: 10,
borderTopRightRadius: 10,
backgroundColor: '#F0E1C9',
}}
source={{
uri: this.props.data.images[0].src,
}}
/>
) : (
// <Image
// resizeMode='contain'
// style={{
// flex: 1,
// borderTopLeftRadius: 10,
// borderTopRightRadius: 10,
// backgroundColor:'red'
// }}
// source={require('../assets/images/noimage.png')}
// />
<View
style={{
flex: 1,
borderTopLeftRadius: 10,
borderTopRightRadius: 10,
backgroundColor: colors.borderLineColor,
justifyContent: 'center',
alignItems: 'center',
}}>
<MaterialCommunityIcons
name="image-remove"
size={50}
color={colors.mainColor}
/>
<Text style={{ color: colors.mainColor }}>No Image Yet</Text>
</View>
)}
</View>
<View
style={{
flex: 0.35,
backgroundColor: '#F0E1C9',
borderBottomLeftRadius: 10,
borderBottomRightRadius: 10,
}}>
<Text
numberOfLines={2}
style={{
fontSize: 12,
width: 90,
marginTop: 5,
marginLeft: 5,
marginRight: 5,
color: colors.mainColor,
fontWeight: '800',
}}>
{this.props.data.name}
</Text>
<View style={{ flex: 0.5 }}>
<View style={{ marginLeft: 5 }}>
{this.props.data.rating == null ? (
<Rank ranking={parseFloat(3)} />
) : (
<Rank ranking={parseFloat(this.props.data.rating)} />
)}
</View>
{this.props.data.ori_price != null ? (<Text
numberOfLines={1}
style={{
fontSize: 10,
color: colors.textColor,
fontWeight: 'bold',
marginLeft: 5,
textDecorationLine:'line-through'
}}>
{this.priceHandler(this.props.data.ori_price)}
</Text>) : (<View />)}
<Text
numberOfLines={1}
style={{
fontSize: 14,
color: this.props.data.ori_price != null? 'red': colors.textColor,
fontWeight: 'bold',
marginLeft: 5,
}}>
{this.priceHandler(this.props.data.price)}
</Text>
</View>
<View style={{ flex: 0.5, justifyContent: 'flex-end' }}>
<TouchableOpacity
style={{
flexDirection: 'row',
backgroundColor: colors.catColor,
height: 17,
width: 75,
alignItems: 'center',
justifyContent: 'center',
borderRadius: 5,
marginBottom: 5,
marginLeft: 5,
}}
onPress={() => this.props.onPress && this.props.onPress()}>
<Icon
name={'shopping-cart'}
style={{ marginRight: 2 }}
size={12}
color={colors.mainColor}
/>
<Text style={{ fontSize: 10, color: colors.mainColor }}>
{this.store.text.addToShoppingCart}
</Text>
</TouchableOpacity>
</View>
{this.props.data.stock_quantity <= 0 ? (<View style={{ width: 50, height: 20, backgroundColor: 'white', position: 'absolute', top: 5, right: 5, borderRadius: 4, justifyContent: 'center', alignItems: 'center' }}>
<Text style={{ fontSize: 10, color: 'red', fontWeight: '800' }}>
{this.store.text.outOfStock}
</Text>
</View>) : (<View />)}
</View>
</View>
</TouchableOpacity>
);
}
}))
export default CategoriesItems;

View File

@ -0,0 +1,64 @@
import React, { Component } from 'react'
import {View, Dimensions, StyleSheet,ActivityIndicator,Modal,TouchableOpacity} from 'react-native';
import {colors} from '../assets/styles/colors-theme';
import LottieView from 'lottie-react-native';
import { inject, observer } from "mobx-react"
import { observable, makeObservable } from 'mobx'
const { width, height } = Dimensions.get('window')
const CheckAnimate = inject("appStore")(observer(class CheckAnimate extends React.Component {
constructor(props) {
super(props);
this.store = props.appStore;
}
render(){
return (
<Modal
transparent={true}
animationType={'none'}
visible={this.props.visible}
onRequestClose={() => {console.log('c lose modal')}}>
<View style={styles.modalBackground}>
<LottieView style = {{height:100,width:100}} source={require('../assets/lottie/782-check-mark-success')} progress={this.props.progress} />
</View>
</Modal>
)
}
}))
const styles = StyleSheet.flatten({
wrapper: {
position: 'absolute',
top: 0,
left: 0,
width: width,
height: height,
backgroundColor: 'rgba(0, 0, 0, 0.2)'
},
loading:{
position: 'absolute',
top: height / 2 - 100,
left: width / 2 - 70,
width: 140,
height: 140
},
modalBackground: {
flex: 1,
alignItems: 'center',
flexDirection: 'column',
justifyContent: 'center',
//backgroundColor: '#00000040'
},
activityIndicatorWrapper: {
backgroundColor: '#FFFFFF',
height: 100,
width: 100,
borderRadius: 10,
display: 'flex',
alignItems: 'center',
justifyContent: 'space-around'
}
});
export default CheckAnimate

View File

@ -0,0 +1,49 @@
import React from 'react';
import {TextInput, View} from 'react-native';
import {colors} from '../assets/styles/colors-theme';
import {width, height} from '../services/screen';
const CommonTextInput = props => {
return (
<View
style={{
borderBottomColor: colors.textColor,
borderBottomWidth: 1,
marginLeft: 30,
marginRight: 30,
marginTop: 20,
height: 40,
borderRadius: 5,
}}>
<TextInput
style={{
// backgroundColor:theme.inputBgc,
color: colors.textColor,
height: 35,
marginBottom: 30,
paddingBottom: 0,
fontSize: 13,
paddingRight: 20,
paddingLeft: 20,
}}
key={props.key}
value={props.value}
underlineColorAndroid="rgba(0,0,0,0)"
onChangeText={props.onChangeText}
placeholder={props.placeholder}
placeholderStyle={{fontWeight: 'bold'}}
placeholderTextColor={colors.textColor}
secureTextEntry={props.secureTextEntry}
blurOnSubmit={false}
{...props}
ref={input => props.inputRef && props.inputRef(input)}
returnKeyType={props.returnKeyType}
onSubmitEditing={props.onSubmitEditing && props.onSubmitEditing}
onFocus={props.onFocus}
/>
</View>
);
};
export default CommonTextInput;

View File

@ -0,0 +1,33 @@
import React, {Component} from 'react';
import {View, Text, TextInput, TouchableOpacity, Platform} from 'react-native';
import {colors} from '../assets/styles/colors-theme';
import {width, height} from '../services/screen';
class CustomLoginButton extends Component {
render() {
return (
<TouchableOpacity
onPress={() => this.props.onPress && this.props.onPress()}
style={{
backgroundColor:
this.props.color != null ? this.props.color : colors.mainColor,
height: 50,
borderRadius: 30,
width: width - 100,
justifyContent: 'center',
alignItems: 'center',
marginTop: 10,
}}>
<Text
style={{
color:
this.props.textColor != null ? this.props.textColor : 'white',
fontSize: 20,
}}>
{this.props.title}
</Text>
</TouchableOpacity>
);
}
}
export default CustomLoginButton;

View File

@ -0,0 +1,46 @@
import React, {Component} from 'react';
import {View, Text, TextInput, TouchableOpacity, Platform} from 'react-native';
import {colors} from '../assets/styles/colors-theme';
import {width, height} from '../services/screen';
class CustomSignupInput extends Component {
render() {
return (
<View
style={{
backgroundColor: colors.signupInputBgc,
height: 50,
borderRadius: 30,
width: width - 100,
justifyContent: 'center',
marginTop: 20,
}}>
<TextInput
underlineColorAndroid="rgba(0,0,0,0)"
keyboardType={this.props.keyboardType}
onChangeText={this.props.onChangeText}
secureTextEntry={this.props.secureTextEntry}
placeholderStyle={{fontWeight: 'bold'}}
placeholderTextColor={colors.inputText}
ref={input => this.props.inputRef && this.props.inputRef(input)}
returnKeyType={this.props.returnKeyType}
onSubmitEditing={
this.props.onSubmitEditing && this.props.onSubmitEditing
}
onFocus={this.props.onFocus}
placeholder={this.props.title}
value={this.props.content}
style={{
color: colors.inputText,
fontSize: 14,
marginBottom: Platform.OS === 'ios' ? 3 : 0,
paddingVertical: 0,
marginLeft: 15,
}}
/>
</View>
);
}
}
export default CustomSignupInput;

View File

@ -0,0 +1,49 @@
import React, {Component} from 'react';
import {View, Text, TextInput, TouchableOpacity, Platform} from 'react-native';
import {colors} from '../assets/styles/colors-theme';
import {width, height} from '../services/screen';
class CustomTextInput extends Component {
render() {
return (
<View
style={{
backgroundColor: 'white',
height: 50,
borderRadius: 15,
width: width - 100,
justifyContent: 'center',
marginTop: 20,
borderWidth: 1,
borderColor: colors.line2Color,
}}>
<TextInput
underlineColorAndroid="rgba(0,0,0,0)"
keyboardType={this.props.keyboardType}
onChangeText={this.props.onChangeText}
secureTextEntry={this.props.secureTextEntry}
placeholderStyle={{fontWeight: 'bold'}}
// placeholderTextColor={colors.titleColor}
ref={input => this.props.inputRef && this.props.inputRef(input)}
returnKeyType={this.props.returnKeyType}
onSubmitEditing={
this.props.onSubmitEditing && this.props.onSubmitEditing
}
onFocus={this.props.onFocus}
placeholder={this.props.title}
placeholderTextColor={colors.grayTextColor}
value={this.props.content}
style={{
color: colors.inputText,
fontSize: 14,
marginBottom: Platform.OS === 'ios' ? 3 : 0,
paddingVertical: 0,
marginLeft: 15,
}}
/>
</View>
);
}
}
export default CustomTextInput;

Some files were not shown because too many files have changed in this diff Show More