修改登录页兼容平板

This commit is contained in:
zm2000 2026-05-23 16:56:56 +08:00
parent bbad73400b
commit 3a6bb410c5
2 changed files with 20 additions and 3 deletions

9
.hbuilderx/launch.json Normal file
View File

@ -0,0 +1,9 @@
{
"version" : "1.0",
"configurations" : [
{
"playground" : "standard",
"type" : "uni-app:app-android"
}
]
}

View File

@ -41,12 +41,20 @@ function getAuthHeader(): Record<string, string> {
}
function buildRequestUrl(method: string): string {
const params = new URLSearchParams({
const params = {
method,
v: '1.0',
timestamp: String(Date.now()),
})
return `${API_URL}?${params.toString()}`
}
const queryList: string[] = []
for (const key in params) {
if (Object.prototype.hasOwnProperty.call(params, key)) {
const value = params[key as keyof typeof params]
queryList.push(`${encodeURIComponent(key)}=${encodeURIComponent(value)}`)
}
}
const query = queryList.join('&')
return `${API_URL}?${query}`
}
/**