This commit is contained in:
oneao committed 2026-03-19 17:28:47 +08:00
1 parent 6c20d0c80d
commit 4aaa93df7d
66 files changed
+4375 -1311

No files matched your search

@@ -1,6 +1,5 @@
import { toast } from 'sard-uniapp'
import { getaliyunkeyApi, loaddataAttachApi } from '@/request/api'
import { useUserStore } from '@/store'
import { getaliyunkeyApi } from '@/request/api'
import { isApp, isH5, isMpWeixin } from './platform'
const aliyunBucket = import.meta.env.VITE_ALIYUN_BUCKET
@@ -132,11 +131,8 @@ export async function uploadFileToAliyun(
fileName: string,
fileType: any,
): Promise<AliyunUploadResult> {
const userStore = useUserStore()
// 获取 OSS 临时上传凭证
const keyRes = await getaliyunkeyApi({
orgid: userStore.userInfo.orgid,
bucket: aliyunBucket,
})
const { accessid, callback, dir, host, policy, signature } = keyRes.data
@@ -421,24 +417,3 @@ function downloadAppMedia(fileUrl: string, type: 'image' | 'video') {
}
})
}
export function checkUploadFile(fatherId, modUid, cateId = '') {
let searchcondition = `father = '${fatherId}' and mx_moduleid = '${modUid}'`
if (cateId !== '') {
searchcondition += ` and mx_cate_id = '${cateId}'`
}
return loaddataAttachApi({
viewname: 'bf_files',
searchcondition,
orderfield: 'mx_xh',
soption: '',
}).then((res) => {
console.log(res)
console.log(res.data.length)
return res.data.length > 0
}).catch(() => {
return false
})
}