qweqw
This commit is contained in:
parent
8603acf35e
commit
a3a5cdda93
@ -1,7 +1,7 @@
|
|||||||
# 变量必须以 VITE_ 为前缀才能暴露给外部读取
|
# 变量必须以 VITE_ 为前缀才能暴露给外部读取
|
||||||
NODE_ENV = 'production'
|
NODE_ENV = 'production'
|
||||||
VITE_APP_BASE_API = 'https://tools.1024tool.vip/'
|
VITE_APP_BASE_API = 'https://ddbs.1024tool.vip/'
|
||||||
VITE_SERVE = "https://tools.1024tool.vip/"
|
VITE_SERVE = "https://ddbs.1024tool.vip/"
|
||||||
|
|
||||||
VITE_OSS_ACCESS_KEY_ID = "LTAI5tCpvXC17uuPwWvb5oRo"
|
VITE_OSS_ACCESS_KEY_ID = "LTAI5tCpvXC17uuPwWvb5oRo"
|
||||||
VITE_OSS_ACCESS_KEY_SECRET = "44EqDghVI0UVF0rVaea7gwOsPkXZ1z"
|
VITE_OSS_ACCESS_KEY_SECRET = "44EqDghVI0UVF0rVaea7gwOsPkXZ1z"
|
||||||
@ -1,5 +1,7 @@
|
|||||||
NODE_ENV = 'development'
|
NODE_ENV = 'development'
|
||||||
|
|
||||||
VITE_APP_BASE_API = 'http://129.204.101.51:9999/'
|
VITE_APP_BASE_API = 'https://ddbs.1024tool.vip/'
|
||||||
VITE_SERVE = "http://129.204.101.51:9999/"
|
VITE_SERVE = "https://ddbs.1024tool.vip/"
|
||||||
|
|
||||||
|
VITE_OSS_ACCESS_KEY_ID = "LTAI5tCpvXC17uuPwWvb5oRo"
|
||||||
|
VITE_OSS_ACCESS_KEY_SECRET = "44EqDghVI0UVF0rVaea7gwOsPkXZ1z"
|
||||||
@ -39,6 +39,7 @@
|
|||||||
"@iconify-json/ep": "^1.1.11",
|
"@iconify-json/ep": "^1.1.11",
|
||||||
"@typescript-eslint/eslint-plugin": "^6.2.0",
|
"@typescript-eslint/eslint-plugin": "^6.2.0",
|
||||||
"@typescript-eslint/parser": "^6.2.0",
|
"@typescript-eslint/parser": "^6.2.0",
|
||||||
|
"@vitejs/plugin-basic-ssl": "^2.0.0",
|
||||||
"@vitejs/plugin-vue": "^4.2.3",
|
"@vitejs/plugin-vue": "^4.2.3",
|
||||||
"eslint": "^8.45.0",
|
"eslint": "^8.45.0",
|
||||||
"eslint-plugin-import": "^2.27.5",
|
"eslint-plugin-import": "^2.27.5",
|
||||||
|
|||||||
@ -141,11 +141,13 @@ editorConfig.MENU_CONF['uploadImage'] = {
|
|||||||
const code = await getCode()
|
const code = await getCode()
|
||||||
const client = new OSS({
|
const client = new OSS({
|
||||||
region: "oss-cn-beijing",
|
region: "oss-cn-beijing",
|
||||||
authorizationV4: true,
|
// authorizationV4: true,
|
||||||
accessKeyId: import.meta.env.VITE_OSS_ACCESS_KEY_ID,
|
accessKeyId: import.meta.env.VITE_OSS_ACCESS_KEY_ID,
|
||||||
accessKeySecret: import.meta.env.VITE_OSS_ACCESS_KEY_SECRET,
|
accessKeySecret: import.meta.env.VITE_OSS_ACCESS_KEY_SECRET,
|
||||||
stsToken: code.token,
|
stsToken: JSON.parse(code.token).security_token,
|
||||||
bucket: "image-fudan",
|
bucket: "image-fudan",
|
||||||
|
secure: true,
|
||||||
|
// endpoint: 'https'
|
||||||
});
|
});
|
||||||
|
|
||||||
// Generate unique filename with original extension
|
// Generate unique filename with original extension
|
||||||
@ -153,8 +155,8 @@ editorConfig.MENU_CONF['uploadImage'] = {
|
|||||||
const fileName = `${Date.now()}-${Math.random().toString(36).substring(2)}.${fileExt}`
|
const fileName = `${Date.now()}-${Math.random().toString(36).substring(2)}.${fileExt}`
|
||||||
|
|
||||||
const options = {
|
const options = {
|
||||||
meta: { temp: "demo" },
|
// meta: { temp: "demo" },
|
||||||
mime: file.type,
|
// mime: file.type,
|
||||||
headers: { "Content-Type": file.type },
|
headers: { "Content-Type": file.type },
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|||||||
@ -13,6 +13,7 @@ import IconsResolver from 'unplugin-icons/resolver'
|
|||||||
import { createSvgIconsPlugin } from 'vite-plugin-svg-icons'
|
import { createSvgIconsPlugin } from 'vite-plugin-svg-icons'
|
||||||
|
|
||||||
import { viteMockServe } from 'vite-plugin-mock'
|
import { viteMockServe } from 'vite-plugin-mock'
|
||||||
|
import pluginBasicSsl from '@vitejs/plugin-basic-ssl'
|
||||||
// 引入 fs 模块
|
// 引入 fs 模块
|
||||||
// import fs from 'fs'
|
// import fs from 'fs'
|
||||||
// const fs = require('fs');
|
// const fs = require('fs');
|
||||||
@ -23,7 +24,7 @@ export default defineConfig(({ command, mode }) => {
|
|||||||
return {
|
return {
|
||||||
plugins: [
|
plugins: [
|
||||||
vue(),
|
vue(),
|
||||||
|
pluginBasicSsl(),
|
||||||
AutoImport({
|
AutoImport({
|
||||||
resolvers: [
|
resolvers: [
|
||||||
ElementPlusResolver(),
|
ElementPlusResolver(),
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user