Compare commits
2 Commits
master
...
locallized
| Author | SHA1 | Date | |
|---|---|---|---|
| f73baeb226 | |||
| 097d210f89 |
Generated
+712
-640
File diff suppressed because it is too large
Load Diff
+2
-2
@@ -7,7 +7,7 @@
|
||||
"serve": "vite preview"
|
||||
},
|
||||
"dependencies": {
|
||||
"axios": "1.8.2",
|
||||
"axios": "^1.16.1",
|
||||
"clipboard": "2.0.4",
|
||||
"element-plus": "^2.8.2",
|
||||
"fast-sha256": "^1.3.0",
|
||||
@@ -27,6 +27,6 @@
|
||||
"sass": "^1.43.4",
|
||||
"sass-loader": "^12.3.0",
|
||||
"ts-proto": "^1.141.1",
|
||||
"vite": "6.3.4"
|
||||
"vite": "^6.4.2"
|
||||
}
|
||||
}
|
||||
|
||||
@@ -25,7 +25,7 @@
|
||||
},
|
||||
label: {
|
||||
type: String,
|
||||
default: '省/市/区',
|
||||
default: 'Province / City / District',
|
||||
},
|
||||
province: {
|
||||
type: String,
|
||||
|
||||
@@ -25,7 +25,7 @@
|
||||
<el-icon class="default-icon">
|
||||
<plus/>
|
||||
</el-icon>
|
||||
<div class="drag-tips">点击上传<span v-if="drag">或直接拖入文件</span></div>
|
||||
<div class="drag-tips">Click to Upload<span v-if="drag">Or drag and drop files directly</span></div>
|
||||
</div>
|
||||
</slot>
|
||||
</div>
|
||||
|
||||
@@ -6,7 +6,7 @@ export function useOss (beforeUp, multiple) {
|
||||
let fileUploadData = reactive({
|
||||
policy: '',
|
||||
OSSAccessKeyId: '',
|
||||
success_action_status: '200', // 让服务端返回200,不然,默认会返回204
|
||||
success_action_status: '200', // Have the server return 200; otherwise, it will return 204 by default.
|
||||
callback: '',
|
||||
signature: '',
|
||||
'x:dir': '',
|
||||
@@ -32,7 +32,7 @@ export function useOss (beforeUp, multiple) {
|
||||
fileUploadData['x:dir'] = obj['dir']
|
||||
fileUploadHost.value = obj['host']
|
||||
}
|
||||
//多选文件时需要这个,不然每个文件上传的都是一样的data
|
||||
// This is required when selecting multiple files; otherwise, the same data will be uploaded for every single file.
|
||||
if (multiple) {
|
||||
await new Promise(resolve => {
|
||||
setTimeout(() => { resolve() }, 50)
|
||||
|
||||
+2
-2
@@ -21,7 +21,7 @@ router.beforeEach(async (to, from, next) => {
|
||||
|
||||
const token = getToken()
|
||||
if (!token) {
|
||||
//无token,跳转到登录
|
||||
// No token found; redirecting to login.
|
||||
if (whiteList.indexOf(to.path) !== -1) {
|
||||
next()
|
||||
} else {
|
||||
@@ -29,7 +29,7 @@ router.beforeEach(async (to, from, next) => {
|
||||
}
|
||||
|
||||
} else {
|
||||
//有token
|
||||
// With Token
|
||||
|
||||
const userStore = useUserStore(pinia)
|
||||
|
||||
|
||||
+2
-2
@@ -36,13 +36,13 @@ export const asyncRoutes = [
|
||||
// path: '/',
|
||||
// name: 'Index',
|
||||
// redirect: '/Home',
|
||||
// meta: { title: '首页', icon: 'house' },
|
||||
// meta: { title: 'front page', icon: 'house' },
|
||||
// component: () => import('@/layout/index.vue'),
|
||||
// children: [
|
||||
// {
|
||||
// path: '/Home',
|
||||
// name: 'Home',
|
||||
// meta: { title: '首页', icon: 'house' },
|
||||
// meta: { title: 'front page', icon: 'house' },
|
||||
// component: () => import('@/views/index/index.vue'),
|
||||
// },
|
||||
//
|
||||
|
||||
+11
-11
@@ -15,29 +15,29 @@ export function removeToken () {
|
||||
return localStorage.removeItem(TokenKey)
|
||||
}
|
||||
|
||||
// 设置 code,并存储当前时间戳(单位:毫秒)
|
||||
// Set the code and store the current timestamp (in milliseconds).
|
||||
export function setCode(code) {
|
||||
const now = Date.now(); // 当前时间戳(毫秒)
|
||||
const expiry = now + 60 * 1000; // 60 秒后过期
|
||||
const now = Date.now(); //Current Timestamp (Milliseconds)
|
||||
const expiry = now + 60 * 1000; // Expires in ... seconds 60
|
||||
|
||||
localStorage.setItem(OidcCode, code); // 存储 code
|
||||
localStorage.setItem(OidcCodeExpiry, expiry); // 存储过期时间戳
|
||||
localStorage.setItem(OidcCode, code); // Storage Code
|
||||
localStorage.setItem(OidcCodeExpiry, expiry); // Store Expiration Timestamp
|
||||
}
|
||||
|
||||
// 获取 code,如果已过期则删除并返回 null
|
||||
// Retrieve the code; if it has expired, delete it and return null.
|
||||
export function getCode() {
|
||||
const expiry = localStorage.getItem(OidcCodeExpiry); // 获取过期时间戳
|
||||
const now = Date.now(); // 当前时间戳
|
||||
const expiry = localStorage.getItem(OidcCodeExpiry); // Get Expiration Timestamp
|
||||
const now = Date.now(); // Current Timestamp
|
||||
|
||||
if (expiry && now > parseInt(expiry)) {
|
||||
// 如果已过期,删除 code 和过期时间
|
||||
// If expired, delete the code and the expiration time.
|
||||
removeCode();
|
||||
return null;
|
||||
}
|
||||
return localStorage.getItem(OidcCode); // 返回 code(如果未过期)
|
||||
return localStorage.getItem(OidcCode); // Return code (if not expired)
|
||||
}
|
||||
|
||||
// 删除 code 和过期时间
|
||||
// Delete the code and expiration time.
|
||||
export function removeCode() {
|
||||
localStorage.removeItem(OidcCode);
|
||||
localStorage.removeItem(OidcCodeExpiry);
|
||||
|
||||
@@ -19,7 +19,7 @@ export function handleClipboard (text, event) {
|
||||
|
||||
export function copyImage (targetNode) {
|
||||
if (window.getSelection) {
|
||||
// chrome等主流浏览器
|
||||
// Mainstream browsers such as Chrome
|
||||
var selection = window.getSelection()
|
||||
selection.removeAllRanges()
|
||||
var range = document.createRange()
|
||||
|
||||
@@ -34,7 +34,7 @@
|
||||
</el-form>
|
||||
</el-card>
|
||||
<el-card class="list-body" shadow="hover">
|
||||
<!-- <el-tag type="danger" style="margin-bottom: 10px">不建议在此操作地址簿,可能会造成数据不同步</el-tag>-->
|
||||
<!-- <el-tag type="danger" style="margin-bottom: 10px">It is not recommended to manage the address book here, as this may lead to data synchronization issues.</el-tag>-->
|
||||
<el-table :data="listRes.list" v-loading="listRes.loading" border>
|
||||
<el-table-column prop="id" label="ID" align="center" width="200">
|
||||
<template #default="{row}">
|
||||
|
||||
@@ -10,10 +10,10 @@
|
||||
name: 'Home',
|
||||
setup () {
|
||||
const todoList = ref([
|
||||
{title:'修复bug'},
|
||||
{title:'修复bug'},
|
||||
{title:'修复bug'},
|
||||
{title:'增加新功能'},
|
||||
{title:'repair bug'},
|
||||
{title:'repair bug'},
|
||||
{title:'repair bug'},
|
||||
{title:'Add New Features'},
|
||||
])
|
||||
return {
|
||||
todoList
|
||||
|
||||
Reference in New Issue
Block a user