Commit 369c6be5 by lijiabin

feat: 优化部署测试

parent c0f86506
......@@ -352,11 +352,11 @@ async function writeIndexHtml(entries) {
function getAccountCode() {
const storedValue = window.localStorage.getItem(STORAGE_KEY)
return storedValue && storedValue.trim() ? storedValue.trim() : DEFAULT_ACCOUNT
return storedValue === null ? DEFAULT_ACCOUNT : storedValue.trim()
}
function setAccountCode(value) {
const finalValue = value && value.trim() ? value.trim() : DEFAULT_ACCOUNT
const finalValue = value.trim()
window.localStorage.setItem(STORAGE_KEY, finalValue)
if (accountInput && accountInput.value !== finalValue) {
accountInput.value = finalValue
......@@ -365,8 +365,8 @@ async function writeIndexHtml(entries) {
}
function goToBranch(slug) {
const code = encodeURIComponent(getAccountCode())
window.location.href = '/' + slug + '/?code=' + code + '@yswg.com.cn'
const code = getAccountCode()
window.location.href = '/' + slug + '/' + (code ? '?code=' + encodeURIComponent(code) + '@yswg.com.cn' : '')
}
if (accountInput) {
......
......@@ -26,7 +26,7 @@ export const resolveUploadBaseUrl = () => {
};
const OA_UPLOAD_COMMON_BASE_URL = 'http://47.112.96.71:8082'
const CHUNK_UPLOAD_THRESHOLD = 10 * 1024 * 1024
const CHUNK_UPLOAD_THRESHOLD = 1 * 1024 * 1024
const CHUNK_SIZE = 5 * 1024 * 1024
const MAX_CONCURRENT_UPLOADS = 3
const CHUNK_API_AUTH_SECRET = '4821-7395-1642-8053-2971-5604-9182-4307'
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment