优化页面

This commit is contained in:
pengxiaolong
2025-05-30 22:04:45 +08:00
parent c747f9625c
commit 050ceedd59
66 changed files with 1215 additions and 190 deletions

View File

@@ -14,6 +14,5 @@ function generateRandomString(length = 6) {
const timestamp = Date.now(); // 当前时间戳(毫秒级)
return `${randomPart}${timestamp}.jpg`;
}
export default generateFileName;

View File

@@ -0,0 +1,18 @@
// 生成 6位随机字符包含大小写字母和数字
function generateRandomString(length = 6) {
const chars = 'abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789';
let result = '';
for (let i = 0; i < length; i++) {
result += chars[Math.floor(Math.random() * chars.length)];
}
return result;
}
//自定义消息id
function generateMsgId() {
const randomPart = generateRandomString();
const timestamp = Date.now(); // 当前时间戳(毫秒级)
return `${randomPart}${timestamp}`;
}
export default generateMsgId;

View File

@@ -1,8 +1,7 @@
export default function request(urldata) {
const { url, data, method, header, userInfo } = urldata;
const baseUrl =
"http://192.168.1.218:8086/"
+ url;
const baseUrl = "http://120.26.251.180:8086/"+ url;
// const baseUrl = "http://192.168.1.218:8086/"+ url;
if (userInfo) {
return new Promise((resolve, reject) => {
uni.getStorage({