Skip to content

Commit

Permalink
commit
Browse files Browse the repository at this point in the history
  • Loading branch information
WalterBrightHub committed Apr 18, 2020
1 parent e9ff730 commit 3595b07
Show file tree
Hide file tree
Showing 25 changed files with 271 additions and 173 deletions.
69 changes: 2 additions & 67 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,68 +1,3 @@
This project was bootstrapped with [Create React App](https://github.com/facebook/create-react-app).
# 抽包模拟器

## Available Scripts

In the project directory, you can run:

### `yarn start`

Runs the app in the development mode.<br />
Open [http://localhost:3000](http://localhost:3000) to view it in the browser.

The page will reload if you make edits.<br />
You will also see any lint errors in the console.

### `yarn test`

Launches the test runner in the interactive watch mode.<br />
See the section about [running tests](https://facebook.github.io/create-react-app/docs/running-tests) for more information.

### `yarn build`

Builds the app for production to the `build` folder.<br />
It correctly bundles React in production mode and optimizes the build for the best performance.

The build is minified and the filenames include the hashes.<br />
Your app is ready to be deployed!

See the section about [deployment](https://facebook.github.io/create-react-app/docs/deployment) for more information.

### `yarn eject`

**Note: this is a one-way operation. Once you `eject`, you can’t go back!**

If you aren’t satisfied with the build tool and configuration choices, you can `eject` at any time. This command will remove the single build dependency from your project.

Instead, it will copy all the configuration files and the transitive dependencies (Webpack, Babel, ESLint, etc) right into your project so you have full control over them. All of the commands except `eject` will still work, but they will point to the copied scripts so you can tweak them. At this point you’re on your own.

You don’t have to ever use `eject`. The curated feature set is suitable for small and middle deployments, and you shouldn’t feel obligated to use this feature. However we understand that this tool wouldn’t be useful if you couldn’t customize it when you are ready for it.

## Learn More

You can learn more in the [Create React App documentation](https://facebook.github.io/create-react-app/docs/getting-started).

To learn React, check out the [React documentation](https://reactjs.org/).

### Code Splitting

This section has moved here: https://facebook.github.io/create-react-app/docs/code-splitting

### Analyzing the Bundle Size

This section has moved here: https://facebook.github.io/create-react-app/docs/analyzing-the-bundle-size

### Making a Progressive Web App

This section has moved here: https://facebook.github.io/create-react-app/docs/making-a-progressive-web-app

### Advanced Configuration

This section has moved here: https://facebook.github.io/create-react-app/docs/advanced-configuration

### Deployment

This section has moved here: https://facebook.github.io/create-react-app/docs/deployment

### `yarn build` fails to minify

This section has moved here: https://facebook.github.io/create-react-app/docs/troubleshooting#npm-run-build-fails-to-minify
https://walterbright.cc/a9pack/
20 changes: 10 additions & 10 deletions build/asset-manifest.json
Original file line number Diff line number Diff line change
@@ -1,20 +1,20 @@
{
"files": {
"main.css": "/a9pack/static/css/main.44903061.chunk.css",
"main.js": "/a9pack/static/js/main.08eb923e.chunk.js",
"main.css": "/a9pack/static/css/main.5895597c.chunk.css",
"main.js": "/a9pack/static/js/main.07c305b3.chunk.js",
"runtime-main.js": "/a9pack/static/js/runtime-main.07194dcc.js",
"static/css/2.a884fb5c.chunk.css": "/a9pack/static/css/2.a884fb5c.chunk.css",
"static/js/2.d43ef837.chunk.js": "/a9pack/static/js/2.d43ef837.chunk.js",
"static/css/2.67b2524d.chunk.css": "/a9pack/static/css/2.67b2524d.chunk.css",
"static/js/2.f167ab4b.chunk.js": "/a9pack/static/js/2.f167ab4b.chunk.js",
"index.html": "/a9pack/index.html",
"precache-manifest.21a245ba801d5be1877f3a7a5e8cee26.js": "/a9pack/precache-manifest.21a245ba801d5be1877f3a7a5e8cee26.js",
"precache-manifest.63c2a6661218f108760b8769c2eb2e2b.js": "/a9pack/precache-manifest.63c2a6661218f108760b8769c2eb2e2b.js",
"service-worker.js": "/a9pack/service-worker.js",
"static/js/2.d43ef837.chunk.js.LICENSE": "/a9pack/static/js/2.d43ef837.chunk.js.LICENSE"
"static/js/2.f167ab4b.chunk.js.LICENSE": "/a9pack/static/js/2.f167ab4b.chunk.js.LICENSE"
},
"entrypoints": [
"static/js/runtime-main.07194dcc.js",
"static/css/2.a884fb5c.chunk.css",
"static/js/2.d43ef837.chunk.js",
"static/css/main.44903061.chunk.css",
"static/js/main.08eb923e.chunk.js"
"static/css/2.67b2524d.chunk.css",
"static/js/2.f167ab4b.chunk.js",
"static/css/main.5895597c.chunk.css",
"static/js/main.07c305b3.chunk.js"
]
}
8 changes: 4 additions & 4 deletions build/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,8 @@
<link rel="apple-touch-icon" href="/a9pack/logo192.png"/>
<link rel="manifest" href="/a9pack/manifest.json"/>
<title>抽包模拟器</title>
<link href="/a9pack/static/css/2.a884fb5c.chunk.css" rel="stylesheet">
<link href="/a9pack/static/css/main.44903061.chunk.css" rel="stylesheet">
<link href="/a9pack/static/css/2.67b2524d.chunk.css" rel="stylesheet">
<link href="/a9pack/static/css/main.5895597c.chunk.css" rel="stylesheet">
</head>
<body>
<noscript>You need to enable JavaScript to run this app.</noscript>
Expand Down Expand Up @@ -73,7 +73,7 @@
var s = n;
c()
}([])</script>
<script src="/a9pack/static/js/2.d43ef837.chunk.js"></script>
<script src="/a9pack/static/js/main.08eb923e.chunk.js"></script>
<script src="/a9pack/static/js/2.f167ab4b.chunk.js"></script>
<script src="/a9pack/static/js/main.07c305b3.chunk.js"></script>
</body>
</html>
2 changes: 1 addition & 1 deletion build/service-worker.js
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
importScripts("https://storage.googleapis.com/workbox-cdn/releases/4.3.1/workbox-sw.js");

importScripts(
"/a9pack/precache-manifest.21a245ba801d5be1877f3a7a5e8cee26.js"
"/a9pack/precache-manifest.63c2a6661218f108760b8769c2eb2e2b.js"
);

self.addEventListener('message', (event) => {
Expand Down
Binary file added public/favicon/jesko.ico
Binary file not shown.
Binary file added public/images/car.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
2 changes: 1 addition & 1 deletion public/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
<html lang="zh">
<head>
<meta charset="utf-8"/>
<link rel="icon" href="%PUBLIC_URL%/favicon.ico"/>
<link rel="icon" href="%PUBLIC_URL%/favicon/jesko.ico"/>
<meta name="viewport" content="width=device-width, initial-scale=1"/>
<meta name="theme-color" content="#000000"/>
<meta
Expand Down
File renamed without changes.
File renamed without changes.
61 changes: 61 additions & 0 deletions src/components/RewordModal/components/RewordCard/index.css
Original file line number Diff line number Diff line change
@@ -0,0 +1,61 @@
.reword-block {
/*padding: 10px;*/
color: #303030;
/*display: inline-block;*/
border-radius: 5px;
font-weight: bold;
width: 80px;
height: 100px;
/*text-align: center;*/
margin: 10px;
display: flex;
flex-direction: column;
/*align-items: center;*/
}

.reword-name {
background-color: rgba(255, 255, 255, 0.6);
padding: 5px;
margin-top: auto;
font-size: 12px;

}


.reword-block + .reword-block {
/*margin-top: 0.5em;*/
}

.reword-num {
font-weight: bold;
color: white;
padding: 2px 6px;
font-size: 14px;

background-color: #f0ff4c;
color: black;
/*display: inline-block;*/
align-self: flex-end;
}

.reword-icon {
width: 36px;
height: 36px;
margin: auto auto;
}

.reword-credit {
background-color: #ffc600;
}

.reword-uncommon {
background-color: #01a5f3;
}

.reword-rare {
background-color: #c871ff;
}

.reword-epic {
background-color: #fdce33;
}
Original file line number Diff line number Diff line change
@@ -1,16 +1,18 @@
import React from "react";

import './index.css'
import carInfo from "../../model/carInfo";
import carInfo from "../../../../model/carInfo";

const RewordCard = ({info}) => {
const {type} = info
if (type === 'car_card') {
const {num, car_code} = info
return <div className='reword-block'>
<span className={`reword reword-${carInfo[car_code].quality}`}>{car_code} 图纸</span>
<span className='reword-num'>x {num}</span>
return <div className={`reword-block reword-${carInfo[car_code].quality}`}>
<div className='reword-num'>x {num}</div>
<img className='reword-icon' src='/images/car.png'/>
<div className='reword-name'>{car_code}</div>
</div>

} else if (type === 'credit') {
return <div className='reword-block'><span className='reword reword-credit'>金币</span>
<span className='reword-num'>x {info.num}</span>
Expand Down
20 changes: 20 additions & 0 deletions src/components/RewordModal/index.css
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
.reword-modal {
max-width: 768px;
margin: 0 auto;
}

.reword-modal-title {
color: #303030;
font-size: 24px;
margin: 10px 0 0 10px;
}


.reword-modal-next-button {
background-color: #30c21d;
color: #fff;
font-size: 18px;
padding: 10px 25px;
border-radius: 20px;
display: inline-block;
}
63 changes: 63 additions & 0 deletions src/components/RewordModal/index.jsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,63 @@
import React from "react";

import './index.css'
import RewordCard from "./components/RewordCard";

const RewordModal = ({onClose, rewords}) => {
return <div className='reword-modal'>
<div className='reword-modal-title'>恭喜!你获得了这些奖励!</div>
<div style={{marginTop: 20, display: 'flex', flexWrap: 'wrap', justifyContent: 'center'}}>
{rewords.map((info, index) => (
<RewordCard
style={{
// margin:'0 auto'
}}
key={index}
info={info}
/>
))}
</div>

{/*bottom placeholder*/}
<div style={{height: 80}}/>


<div style={{
display: 'flex',
justifyContent: 'center',
position: 'fixed',
width: '100%',
zIndex: '9999',
right: 0,
bottom: 0,
}}>
<div
style={{
maxWidth: 768,
width: '100%',
display: 'flex'
}}
>
<div
style={{
marginLeft: 'auto',
marginRight: 50,
marginBottom: 30,
padding: '10px 25px',
borderRadius: '20px',
fontSize: '18px',
fontWeight: 'bold',
letterSpacing: 6,
backgroundColor: '#30c12d',
color: '#fff',
}}
onClick={onClose}>继续
</div>
</div>


</div>
</div>
}

export default RewordModal
33 changes: 0 additions & 33 deletions src/conponents/RewordCard/index.css

This file was deleted.

44 changes: 44 additions & 0 deletions src/model/carInfo.js
Original file line number Diff line number Diff line change
Expand Up @@ -138,7 +138,51 @@ const carInfo = {
lastName: 'DS E-Tense',
quality: 'uncommon',
starArray: [0, 20, 18, 36]
},
'Jesko': {
firstName: 'Koenigsegg',
lastName: 'Jesko',
quality: 'epic',
starArray: [0, 0, 40, 45, 60, 85, 85]
},
'G60': {
firstName: 'Ginetta',
lastName: 'G60',
quality: 'uncommon',
starArray: [0, 30, 18, 24, 36]
},
'Artega': {
firstName: 'Artega',
lastName: 'Scalo Superelletra',
quality: 'rare',
starArray: [0, 40, 18, 24, 36]
},
'488 GTB': {
firstName: 'Ferrari',
lastName: '488 GTB',
quality: 'rare',
starArray: [0, 40, 18, 24, 36]
},
'H2': {
firstName: 'Pinnfarina',
lastName: 'H2 Speed',
quality: 'rare',
starArray: [0, 40, 18, 24, 36]
},
'Centenario': {
firstName: 'Lamborghini',
lastName: 'Centenario',
quality: 'rare',
starArray: [0, 35, 15, 21, 24, 36]
},

'50th': {
firstName: 'Chevrolet',
lastName: '50th Edition',
quality: 'uncommon',
starArray: [0, 18, 25, 36]
}

}


Expand Down
Loading

0 comments on commit 3595b07

Please sign in to comment.