Skip to content

Commit

Permalink
opt code
Browse files Browse the repository at this point in the history
  • Loading branch information
zmisgod committed Jul 28, 2024
1 parent 7690ab5 commit 2b1f2e4
Show file tree
Hide file tree
Showing 3 changed files with 1 addition and 10 deletions.
3 changes: 0 additions & 3 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -20,9 +20,6 @@ jobs:
- name: Install dependencies
uses: bahmutov/npm-install@v1

- name: alter assest config
run: echo '{"epark":{"fullUrl":"https://zhimin-dev.github.io/#/epark"}}' > src/assets/config.json

- name: Build project
run: npm run build

Expand Down
5 changes: 0 additions & 5 deletions src/assets/config.json

This file was deleted.

3 changes: 1 addition & 2 deletions src/component/epark/index.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,6 @@ import QRCode from 'qrcode'
import CryptoJS from 'crypto-js';
import Box from '@mui/material/Box';
import Snackbar from '@mui/material/Snackbar';
import configJson from './../../assets/config.json';

function eParkTag() {
const [carTag, setCarTag] = useState('')
Expand Down Expand Up @@ -70,7 +69,7 @@ function eParkTag() {
let enData = AES_ECB_ENCRYPT(userConnect, carTag)
let gemData = base64Encode(enData)
console.log(gemData)
let url = configJson.epark.fullUrl + "?&data=" + gemData
let url = window.location.href + "?&data=" + gemData
setResultLink(url)
let data = await QRCode.toDataURL(url)
setImageData(data)
Expand Down

0 comments on commit 2b1f2e4

Please sign in to comment.