diff --git a/Learun.Framework.Ultimate V7/LearunApp-2.2.0/common/customform.js b/Learun.Framework.Ultimate V7/LearunApp-2.2.0/common/customform.js index 3c1394e52..bde9e0c04 100644 --- a/Learun.Framework.Ultimate V7/LearunApp-2.2.0/common/customform.js +++ b/Learun.Framework.Ultimate V7/LearunApp-2.2.0/common/customform.js @@ -274,13 +274,15 @@ export default { case 'upload': const uploadUid = [] - for (const { path, uid } of val) { - if (uid) { - uploadUid.push(uid) + console.log(val,'val上传前') + + for (const item of val) { + if (item.uid) { + uploadUid.push(item.uid) continue } - - const fileId = await this.HTTP_UPLOAD(path) + + const fileId = await this.HTTP_UPLOAD(item.path||item) if (fileId) { uploadUid.push(fileId) } diff --git a/Learun.Framework.Ultimate V7/LearunApp-2.2.0/common/mixins.js b/Learun.Framework.Ultimate V7/LearunApp-2.2.0/common/mixins.js index 8fe797283..1efbf2cfe 100644 --- a/Learun.Framework.Ultimate V7/LearunApp-2.2.0/common/mixins.js +++ b/Learun.Framework.Ultimate V7/LearunApp-2.2.0/common/mixins.js @@ -259,7 +259,8 @@ export default { // filePath 为临时文件的路径 // formData 为请求附带的提交数据 async HTTP_UPLOAD(filePath, formData) { - const [err, res] = await this.UPLOAD('/annexes/wxupload', filePath, formData) + + const [err, res] = await this.UPLOAD('/learun/adms/annexes/wxupload', filePath, formData) return this.handleResult(err, res) }, @@ -341,7 +342,7 @@ export default { // }) // }) // #endif - + console.log(filePath,'filePath上传内') // #ifndef MP-DINGTALK return uni.uploadFile({ url: uploadUrl, @@ -351,9 +352,11 @@ export default { formData: query }).then(([err, result]) => { if (!err) { + result.data = JSON.parse(result.data) return [null, result] } else { + return [err, null] } diff --git a/Learun.Framework.Ultimate V7/LearunApp-2.2.0/components/learun-app/customform.vue b/Learun.Framework.Ultimate V7/LearunApp-2.2.0/components/learun-app/customform.vue index 9ff9a6f73..3dafa1ce7 100644 --- a/Learun.Framework.Ultimate V7/LearunApp-2.2.0/components/learun-app/customform.vue +++ b/Learun.Framework.Ultimate V7/LearunApp-2.2.0/components/learun-app/customform.vue @@ -194,12 +194,14 @@ export default { // 依次验证表单项,返回一个所有错误提示的数组,如果为空数组则表示无错误 verifyValue() { const errorList = [] - + console.log(this.scheme) this.scheme .filter(t => t.verify) .forEach(schemeItem => { if (schemeItem.table && schemeItem.field) { + console.log(schemeItem.verify,'hemeItem.verify') const verifyFunc = this.verify[schemeItem.verify] + console.log(schemeItem.verify) const verifyResult = verifyFunc(this.getValue(schemeItem.__valuePath__)) if (verifyResult !== true) { errorList.push(`[${schemeItem.title}]: ${verifyResult}`) @@ -304,7 +306,8 @@ export default { MobileOrPhoneOrNull: t => t.length <= 0 || /^1[0-9]{10}$/.test(t) || /^[+0-9- ]*$/.test(t) || '须留空或符合手机/电话号码格式', Uri: t => /^[a-zA-z]+:\/\/[^\s]*$/.test(t) || '须符合网址Url格式', - UriOrNull: t => t.length <= 0 || /^[a-zA-z]+:\/\/[^\s]*$/.test(t) || '须留空或符合网址Url格式' + UriOrNull: t => t.length <= 0 || /^[a-zA-z]+:\/\/[^\s]*$/.test(t) || '须留空或符合网址Url格式', + PositiveFloatint:t=> /^([1-9]\d*|(0|[1-9]\d*)\.\d*[1-9])$/.test(t) || '请输入正确的整数或小数(不能为零和负数)' } } } diff --git a/Learun.Framework.Ultimate V7/LearunApp-2.2.0/components/upload-file.vue b/Learun.Framework.Ultimate V7/LearunApp-2.2.0/components/upload-file.vue index 6927690a6..f3947f199 100644 --- a/Learun.Framework.Ultimate V7/LearunApp-2.2.0/components/upload-file.vue +++ b/Learun.Framework.Ultimate V7/LearunApp-2.2.0/components/upload-file.vue @@ -1,296 +1,293 @@