??? ??? ? ?? ??? ?? Vue? ???? ??
??:
???? ????? ??? ??? ?? ? ?? ??? ?? ????. ? ?????? ???? ??? ??? ? ?? ??? ??? ????? ??? ??? ???? ??? ?????. ?? ???? JavaScript ?????? Vue? ??? ??? ? ?? ??? ???? ? ??? ?? ??? ??? ????? ?????. ? ????? ??? ??? ? ?? ??? ?? Vue? ???? ??? ???? ??? ?? ??? ?????.
1. ??? ???
??? ???? ???? ???? ??? ??? ?? ?? ???? ???? ???? ???? ?? ????. Vue??? ?? ??? ????? ???? ???? ???? ? ????.
- ??? ???? ?? Crypto-js ????? ??
Crypto-js? AES, DES, SHA, HMAC ?? ?? ??? ??? ????? ???? ????? ???? JavaScript ??? ????????. npm? ?? Crypto-js? ???? Vue ?????? ??? ????? ??? ? ????.
?? npm? ???? Crypto-js? ?????.
npm install crypto-js
?? ?? Vue ?? ??? Crypto-js? AES ????? ?????.
import AES from 'crypto-js/aes' import enc from 'crypto-js/enc-utf8'
???? AES ????? ???? ???? ???? ? ????.
let text = 'Hello World' let key = 'secret-key' let encryptedText = AES.encrypt(text, key).toString()
? ????? AES ????? ???? ?? ??? ??? "Hello World"? ????? "secret-key" ?? ???? ??????. ????? toString() ???? ???? ???? ??? ???? ?????.
- RSA ??? ??? ???? ??
RSA? ??? ? ???? ?? ?? ?? ??? ? ?? ?? ???? ????? ???? ??? ??? ???????. jsencrypt ?????? Vue?? RSA ???? ???? ? ??? ? ????.
?? npm? ???? jsencrypt ?????? ?????:
npm install jsencrypt
?? ?? Vue ?? ??? jsencrypt? ?????:
import JSEncrypt from 'jsencrypt'
???? RSA ????? ???? ???? ???? ? ????.
let text = 'Hello World' let publicKey = 'public-key' let encrypt = new JSEncrypt() encrypt.setPublicKey(publicKey) let encryptedText = encrypt.encrypt(text)
? ???? ??? ?? ??? ?? ??? ??? "Hello World"? RSA ????? ???? ????? ?? ? "public-key"? ???? ??????. ????? ???? ?? cryptoText? ????.
2. ??? ??
??? ???? ??? ?? ???? ???? ????? ????? ??? ?? ? ??? ???? ?? ????. Vue??? HTTPS ????? ?? ??? ???? ??? ??? ??? ? ????.
- HTTPS ???? ??
HTTPS? SSL/TLS ????? ???? ???? ????? ???? ?? HTTP ???????. Vue??? ??? ???? SSL ???? ???? HTTPS? ???? ? ????.
?? ?? ??? SSL ???? ???? ???. ?? SSL ???? ????? ?? ? ????. ?? ?? SSL ???? ????? ??? ?????.
Vue ?????? HTTP ??? HTTPS ???? ?????.
axios.defaults.baseURL = 'https://api.example.com'
- ?? ?? ??
?? ??? ? ??? ??? ???? ??? ??? ???? ????? ???? ?? ?? ?????. vue-router ? axios? ???? Vue?? ?? ??? ??? ? ????.
?? ???? ??? ? ??? ??? ?????? ?????. ?? ?? ?????? ??? ?? ???? ?????.
Vue ??????? axios ????? ?? ??? ??? ? ????.
axios.interceptors.request.use(function (config) { const token = localStorage.getItem('token') if (token) { config.headers.Authorization = 'Bearer ' + token } return config }, function (error) { return Promise.reject(error) })
? ????? ?? ?? ?? ??? ???? ?? ??? Authorization ??? ???? ?? ??? ?? ??? ?????. ?????.
??:
? ???? ??? ??? ? ?? ??? ?? Vue? ???? ??? ??????. ??? ??? ? ???? ?? Crypto-js ?????, RSA ??? ??? ????, HTTPS ???? ? ?? ??? ???? ??? ?? ?? ? ??? ??? ???? ??? ??? ???? ? ????. ? ??? ??? ??? ? ?? ??? ?? Vue? ??? ???? ? ??? ??? ????.
?? ??:
import AES from 'crypto-js/aes' import enc from 'crypto-js/enc-utf8' let text = 'Hello World' let key = 'secret-key' let encryptedText = AES.encrypt(text, key).toString() import JSEncrypt from 'jsencrypt' let text = 'Hello World' let publicKey = 'public-key' let encrypt = new JSEncrypt() encrypt.setPublicKey(publicKey) let encryptedText = encrypt.encrypt(text) axios.defaults.baseURL = 'https://api.example.com' axios.interceptors.request.use(function (config) { const token = localStorage.getItem('token') if (token) { config.headers.Authorization = 'Bearer ' + token } return config }, function (error) { return Promise.reject(error) })
? ??? ??? ??? ? ?? ??? ?? Vue? ???? ??? ?? ?????. ??? ??? PHP ??? ????? ?? ?? ??? ?????!

? AI ??

Undress AI Tool
??? ???? ??

Undresser.AI Undress
???? ?? ??? ??? ?? AI ?? ?

AI Clothes Remover
???? ?? ???? ??? AI ?????.

Clothoff.io
AI ? ???

Video Face Swap
??? ??? AI ?? ?? ??? ???? ?? ???? ??? ?? ????!

?? ??

??? ??

???++7.3.1
???? ?? ?? ?? ???

SublimeText3 ??? ??
??? ??, ???? ?? ????.

???? 13.0.1 ???
??? PHP ?? ?? ??

???? CS6
??? ? ?? ??

SublimeText3 Mac ??
? ??? ?? ?? ?????(SublimeText3)

Vue3+TS+Vite ?? ?: ???? ????? ???? ?? ??? ??? ??? ???? ?? ??? ?? ? ?? ?? ??? ?? ? ????? ????. Vue3+TS+Vite ?? ???? ???? ????? ???? ??? ?? ???? ???? ?? ?????. ? ????? ???? ?????? ?? ? ??? ??? ???? ? ??? ?? ? ?? ???? ??? ??? ? ?? ??? ?????. 1. ??? ??? ????? ??? ??? ????? ???? ??? ??? ???? ??? ?????. ????? ????

PHP ? SQLite: ???? ???? ????? ?? ?? ? ???????? ??? ??? ?? ?? ??? ?? ??? ?? ?????. PHP? SQLite? ?? ?? ???? ? ?? ????, ? ????? ??? ?? ? ???? ?? ???? ??? ?????. SQLite? ??? ?? ????? ??? ??????? ?? ?? ???? ?? ???? ?????? ?????. PHP? ?? ??? ?? ???? ?? ???? ?? ? ???? ?????.

??? ??? ? ?? ??? ?? Vue? ???? ?? ??: ???? ????? ??? ??? ?? ? ?? ??? ?? ????. ? ?????? ???? ??? ??? ? ?? ??? ??? ????? ??? ??? ???? ??? ?????. ?? ???? JavaScript ?????? Vue? ??? ??? ? ?? ??? ???? ? ??? ?? ??? ??? ????? ?????. ? ????? ??? ??? ? ?? ??? ?? Vue? ???? ??? ???? ??? ?? ??? ?????. 1. ??? ??? ? ??? ???

MySQL?? ???? ????? ???? ??? ?????? ??: ??? ??? ?????? ??? ??? ?????. ? ????? ??? ????? ???? MySQL?? ???? ????? ???? ??? ??? ????? ??? ?????. 1. ?? ?? ?????? ??? ?? ??? ?? ? ????? ????. ??????? ??? ????? ??? ????, ?? ?? ?? ?? ?? ??? ??? ??? ? ????. ??? ?? ? ?? ??? ???? ?? ??? ??? ??? ????? ???? ???. MySQL

MySQL ? PowerShell? ???? ??: ??? ??? ? ?? ?? ??? ???? ?? ??: ?? ??? ????????? ??? ???? ??? ???? ?? ?????. ??? ???? ??? ??? ???? ???? ?? ???? ??? ??? ??? ???? ??? ????. ? ????? MySQL ??????? PowerShell ????? ???? ??? ??? ? ?? ?? ??? ???? ??? ?????. 1. MySQL ??????? ??? ??? MySQL? ??????? ??? ???? ???? ?? ??? ??? ??? ????? ?????.

??|??? Xingxuan|51CTO ?? ??(WeChat ID: blog51cto) ?? 2? ?? ?? ?? ?????? ??? ?? ??(LLM)? ???? ?? AI ????? ? ?? ??? ????. ???? ???? ???? ????? ??????. ??? ??????? ??? AI ???? ??? ??? ?? ??? ?? ??? ?? ? ?? ??? ??? ????? ?????. ??? ???? ????? ?? ?? ???? ???? ??? ??? ??? ?? ?? ???? ??? ?? ??? ??? ??? ???? ???? ?????. ??? ????? ????. ????? ???, ???, ?? ??? ??(?? ? GPU ?? ??)? ?? ?? ??? ?????. ??? ???? ???? LLM? ???? ?????? ? ???? ?? ? ?? ??? ????.

? ???? 401 Unauthorized ??? ?????? ?? ???? ???? ??? ??? ?????. PHP? ??? ?? ??? ?????. 1. 401 HTTP ?? ??? ?????. 2. JSON ??? ?????. 3. ??? ???? ???????. ??? ????? ?? ??? ?? ? ????. 1. HTTPS? ?????. 2. CSRF ??? ??????. 3. ?? ??? ??? ?????.

??? Java ?? ??: ??? ??? ? ??? ?? ?? ?? ??? ??? ??? ??? ?? ??? ??? ?????. ??? ???? ??? ???? ?? ?? ????????? ??? ????? ???? ???? ??????. ?? ?? ???? ????? ??? Java? ??? ??? ?? ? ?? ?????? ?????. ? ????? ???? ??? ??? ?? ????? ??? ? ??? Java ???? ??? ??? ? ?? ?? ??? ???? ? ?? ??? ?????. 1. ??? ??? ???? ?? Java? ??? ??
