revert: 员工端附件上传回退为文件选择
撤销 7d1e482(改为拍照/相册选图),恢复 H5 chooseFile / 小程序 chooseMessageFile / App chooseImage 三段分支与「上传附件」文案。
This commit is contained in:
@@ -80,9 +80,9 @@
|
||||
<view v-if="attachments.length === 0" class="empty">暂无附件</view>
|
||||
|
||||
<button class="upload-button" :loading="uploading" @click="chooseAttachment">
|
||||
上传图片({{ attachments.length }}/9)
|
||||
上传附件({{ attachments.length }}/9)
|
||||
</button>
|
||||
<text class="hint">支持拍照或从相册选择图片(jpg/png),单张不超过20MB</text>
|
||||
<text class="hint">支持 jpg/jpeg/png/pdf/doc/docx/xls/xlsx,单张不超过20MB</text>
|
||||
</uni-card>
|
||||
|
||||
<view class="footer">
|
||||
@@ -267,8 +267,24 @@ function chooseAttachment() {
|
||||
return;
|
||||
}
|
||||
const remaining = 9 - attachments.value.length;
|
||||
// 统一改为拍照/相册选图:H5 文件选择与小程序会话选文件在手机上点击无响应
|
||||
uni.chooseImage({
|
||||
// #ifdef H5
|
||||
(uni as any).chooseFile({
|
||||
count: remaining,
|
||||
extension: ['.jpg', '.jpeg', '.png', '.pdf', '.doc', '.docx', '.xls', '.xlsx'],
|
||||
success: (result: any) => uploadFiles(result.tempFiles || []),
|
||||
fail: () => undefined
|
||||
});
|
||||
// #endif
|
||||
// #ifdef MP-WEIXIN
|
||||
(uni as any).chooseMessageFile({
|
||||
count: remaining,
|
||||
type: 'file',
|
||||
success: (result: any) => uploadFiles(result.tempFiles || []),
|
||||
fail: () => undefined
|
||||
});
|
||||
// #endif
|
||||
// #ifdef APP-PLUS
|
||||
(uni as any).chooseImage({
|
||||
count: remaining,
|
||||
sizeType: ['compressed'],
|
||||
sourceType: ['camera', 'album'],
|
||||
@@ -278,6 +294,7 @@ function chooseAttachment() {
|
||||
),
|
||||
fail: () => undefined
|
||||
});
|
||||
// #endif
|
||||
}
|
||||
|
||||
async function uploadFiles(files: Array<{ path: string; name?: string; size?: number }>) {
|
||||
|
||||
@@ -91,9 +91,9 @@
|
||||
<view v-if="attachments.length === 0" class="empty">暂无附件</view>
|
||||
|
||||
<button class="upload-button" :loading="uploading" @click="chooseAttachment">
|
||||
上传图片({{ attachments.length }}/9)
|
||||
上传附件({{ attachments.length }}/9)
|
||||
</button>
|
||||
<text class="hint">支持拍照或从相册选择图片(jpg/png),单张不超过20MB</text>
|
||||
<text class="hint">支持 jpg/jpeg/png/pdf/doc/docx/xls/xlsx,单张不超过20MB</text>
|
||||
</uni-card>
|
||||
|
||||
<view class="footer">
|
||||
@@ -339,8 +339,24 @@ function chooseAttachment() {
|
||||
return;
|
||||
}
|
||||
const remaining = 9 - attachments.value.length;
|
||||
// 统一改为拍照/相册选图:H5 文件选择与小程序会话选文件在手机上点击无响应
|
||||
uni.chooseImage({
|
||||
// #ifdef H5
|
||||
(uni as any).chooseFile({
|
||||
count: remaining,
|
||||
extension: ['.jpg', '.jpeg', '.png', '.pdf', '.doc', '.docx', '.xls', '.xlsx'],
|
||||
success: (result: any) => uploadFiles(result.tempFiles || []),
|
||||
fail: () => undefined
|
||||
});
|
||||
// #endif
|
||||
// #ifdef MP-WEIXIN
|
||||
(uni as any).chooseMessageFile({
|
||||
count: remaining,
|
||||
type: 'file',
|
||||
success: (result: any) => uploadFiles(result.tempFiles || []),
|
||||
fail: () => undefined
|
||||
});
|
||||
// #endif
|
||||
// #ifdef APP-PLUS
|
||||
(uni as any).chooseImage({
|
||||
count: remaining,
|
||||
sizeType: ['compressed'],
|
||||
sourceType: ['camera', 'album'],
|
||||
@@ -350,6 +366,7 @@ function chooseAttachment() {
|
||||
),
|
||||
fail: () => undefined
|
||||
});
|
||||
// #endif
|
||||
}
|
||||
|
||||
async function uploadFiles(files: Array<{ path: string; name?: string; size?: number }>) {
|
||||
|
||||
@@ -101,9 +101,9 @@
|
||||
<view v-if="attachments.length === 0" class="empty">暂无附件</view>
|
||||
|
||||
<button class="upload-button" :loading="uploading" @click="chooseAttachment">
|
||||
上传图片({{ attachments.length }}/9)
|
||||
上传附件({{ attachments.length }}/9)
|
||||
</button>
|
||||
<text class="hint">支持拍照或从相册选择图片(jpg/png),单张不超过20MB</text>
|
||||
<text class="hint">支持 jpg/jpeg/png/pdf/doc/docx/xls/xlsx,单张不超过20MB</text>
|
||||
</uni-card>
|
||||
|
||||
<view class="footer">
|
||||
@@ -351,8 +351,24 @@ function chooseAttachment() {
|
||||
return;
|
||||
}
|
||||
const remaining = 9 - attachments.value.length;
|
||||
// 统一改为拍照/相册选图:H5 文件选择与小程序会话选文件在手机上点击无响应
|
||||
uni.chooseImage({
|
||||
// #ifdef H5
|
||||
(uni as any).chooseFile({
|
||||
count: remaining,
|
||||
extension: ['.jpg', '.jpeg', '.png', '.pdf', '.doc', '.docx', '.xls', '.xlsx'],
|
||||
success: (result: any) => uploadFiles(result.tempFiles || []),
|
||||
fail: () => undefined
|
||||
});
|
||||
// #endif
|
||||
// #ifdef MP-WEIXIN
|
||||
(uni as any).chooseMessageFile({
|
||||
count: remaining,
|
||||
type: 'file',
|
||||
success: (result: any) => uploadFiles(result.tempFiles || []),
|
||||
fail: () => undefined
|
||||
});
|
||||
// #endif
|
||||
// #ifdef APP-PLUS
|
||||
(uni as any).chooseImage({
|
||||
count: remaining,
|
||||
sizeType: ['compressed'],
|
||||
sourceType: ['camera', 'album'],
|
||||
@@ -362,6 +378,7 @@ function chooseAttachment() {
|
||||
),
|
||||
fail: () => undefined
|
||||
});
|
||||
// #endif
|
||||
}
|
||||
|
||||
async function uploadFiles(files: Array<{ path: string; name?: string; size?: number }>) {
|
||||
|
||||
@@ -143,9 +143,9 @@
|
||||
<view v-if="attachments.length === 0" class="empty">暂无附件</view>
|
||||
|
||||
<button class="upload-button" :loading="uploading" @click="chooseAttachment">
|
||||
上传图片({{ attachments.length }}/9)
|
||||
上传附件({{ attachments.length }}/9)
|
||||
</button>
|
||||
<text class="hint">支持拍照或从相册选择图片(jpg/png),单张不超过20MB</text>
|
||||
<text class="hint">支持 jpg/jpeg/png/pdf/doc/docx/xls/xlsx,单张不超过20MB</text>
|
||||
</uni-card>
|
||||
|
||||
<view class="footer">
|
||||
@@ -426,8 +426,24 @@ function chooseAttachment() {
|
||||
return;
|
||||
}
|
||||
const remaining = 9 - attachments.value.length;
|
||||
// 统一改为拍照/相册选图:H5 文件选择与小程序会话选文件在手机上点击无响应
|
||||
uni.chooseImage({
|
||||
// #ifdef H5
|
||||
(uni as any).chooseFile({
|
||||
count: remaining,
|
||||
extension: ['.jpg', '.jpeg', '.png', '.pdf', '.doc', '.docx', '.xls', '.xlsx'],
|
||||
success: (result: any) => uploadFiles(result.tempFiles || []),
|
||||
fail: () => undefined
|
||||
});
|
||||
// #endif
|
||||
// #ifdef MP-WEIXIN
|
||||
(uni as any).chooseMessageFile({
|
||||
count: remaining,
|
||||
type: 'file',
|
||||
success: (result: any) => uploadFiles(result.tempFiles || []),
|
||||
fail: () => undefined
|
||||
});
|
||||
// #endif
|
||||
// #ifdef APP-PLUS
|
||||
(uni as any).chooseImage({
|
||||
count: remaining,
|
||||
sizeType: ['compressed'],
|
||||
sourceType: ['camera', 'album'],
|
||||
@@ -437,6 +453,7 @@ function chooseAttachment() {
|
||||
),
|
||||
fail: () => undefined
|
||||
});
|
||||
// #endif
|
||||
}
|
||||
|
||||
async function uploadFiles(files: Array<{ path: string; name?: string; size?: number }>) {
|
||||
|
||||
@@ -91,9 +91,9 @@
|
||||
<view v-if="attachments.length === 0" class="empty">暂无附件</view>
|
||||
|
||||
<button class="upload-button" :loading="uploading" @click="chooseAttachment">
|
||||
上传图片({{ attachments.length }}/9)
|
||||
上传附件({{ attachments.length }}/9)
|
||||
</button>
|
||||
<text class="hint">支持拍照或从相册选择图片(jpg/png),单张不超过20MB</text>
|
||||
<text class="hint">支持 jpg/jpeg/png/pdf/doc/docx/xls/xlsx,单张不超过20MB</text>
|
||||
</uni-card>
|
||||
|
||||
<view class="footer">
|
||||
@@ -277,8 +277,24 @@ function chooseAttachment() {
|
||||
return;
|
||||
}
|
||||
const remaining = 9 - attachments.value.length;
|
||||
// 统一改为拍照/相册选图:H5 文件选择与小程序会话选文件在手机上点击无响应
|
||||
uni.chooseImage({
|
||||
// #ifdef H5
|
||||
(uni as any).chooseFile({
|
||||
count: remaining,
|
||||
extension: ['.jpg', '.jpeg', '.png', '.pdf', '.doc', '.docx', '.xls', '.xlsx'],
|
||||
success: (result: any) => uploadFiles(result.tempFiles || []),
|
||||
fail: () => undefined
|
||||
});
|
||||
// #endif
|
||||
// #ifdef MP-WEIXIN
|
||||
(uni as any).chooseMessageFile({
|
||||
count: remaining,
|
||||
type: 'file',
|
||||
success: (result: any) => uploadFiles(result.tempFiles || []),
|
||||
fail: () => undefined
|
||||
});
|
||||
// #endif
|
||||
// #ifdef APP-PLUS
|
||||
(uni as any).chooseImage({
|
||||
count: remaining,
|
||||
sizeType: ['compressed'],
|
||||
sourceType: ['camera', 'album'],
|
||||
@@ -288,6 +304,7 @@ function chooseAttachment() {
|
||||
),
|
||||
fail: () => undefined
|
||||
});
|
||||
// #endif
|
||||
}
|
||||
|
||||
async function uploadFiles(files: Array<{ path: string; name?: string; size?: number }>) {
|
||||
|
||||
@@ -174,9 +174,9 @@
|
||||
<view v-if="attachments.length === 0" class="empty">暂无附件</view>
|
||||
|
||||
<button class="upload-button" :loading="uploading" @click="chooseAttachment">
|
||||
上传图片({{ attachments.length }}/9)
|
||||
上传附件({{ attachments.length }}/9)
|
||||
</button>
|
||||
<text class="hint">支持拍照或从相册选择图片(jpg/png),单张不超过20MB</text>
|
||||
<text class="hint">支持 jpg/jpeg/png/pdf/doc/docx/xls/xlsx,单张不超过20MB</text>
|
||||
</uni-card>
|
||||
|
||||
<view class="footer">
|
||||
@@ -472,8 +472,24 @@ function chooseAttachment() {
|
||||
return;
|
||||
}
|
||||
const remaining = 9 - attachments.value.length;
|
||||
// 统一改为拍照/相册选图:H5 文件选择与小程序会话选文件在手机上点击无响应
|
||||
uni.chooseImage({
|
||||
// #ifdef H5
|
||||
(uni as any).chooseFile({
|
||||
count: remaining,
|
||||
extension: ['.jpg', '.jpeg', '.png', '.pdf', '.doc', '.docx', '.xls', '.xlsx'],
|
||||
success: (result: any) => uploadFiles(result.tempFiles || []),
|
||||
fail: () => undefined
|
||||
});
|
||||
// #endif
|
||||
// #ifdef MP-WEIXIN
|
||||
(uni as any).chooseMessageFile({
|
||||
count: remaining,
|
||||
type: 'file',
|
||||
success: (result: any) => uploadFiles(result.tempFiles || []),
|
||||
fail: () => undefined
|
||||
});
|
||||
// #endif
|
||||
// #ifdef APP-PLUS
|
||||
(uni as any).chooseImage({
|
||||
count: remaining,
|
||||
sizeType: ['compressed'],
|
||||
sourceType: ['camera', 'album'],
|
||||
@@ -483,6 +499,7 @@ function chooseAttachment() {
|
||||
),
|
||||
fail: () => undefined
|
||||
});
|
||||
// #endif
|
||||
}
|
||||
|
||||
async function uploadFiles(files: Array<{ path: string; name?: string; size?: number }>) {
|
||||
|
||||
@@ -166,9 +166,9 @@
|
||||
<view v-if="attachments.length === 0" class="empty">暂无附件</view>
|
||||
|
||||
<button class="upload-button" :loading="uploading" @click="chooseAttachment">
|
||||
上传图片({{ attachments.length }}/9)
|
||||
上传附件({{ attachments.length }}/9)
|
||||
</button>
|
||||
<text class="hint">支持拍照或从相册选择图片(jpg/png),单张不超过20MB</text>
|
||||
<text class="hint">支持 jpg/jpeg/png/pdf/doc/docx/xls/xlsx,单张不超过20MB</text>
|
||||
</uni-card>
|
||||
|
||||
<view class="footer">
|
||||
@@ -454,8 +454,24 @@ function chooseAttachment() {
|
||||
return;
|
||||
}
|
||||
const remaining = 9 - attachments.value.length;
|
||||
// 统一改为拍照/相册选图:H5 文件选择与小程序会话选文件在手机上点击无响应
|
||||
uni.chooseImage({
|
||||
// #ifdef H5
|
||||
(uni as any).chooseFile({
|
||||
count: remaining,
|
||||
extension: ['.jpg', '.jpeg', '.png', '.pdf', '.doc', '.docx', '.xls', '.xlsx'],
|
||||
success: (result: any) => uploadFiles(result.tempFiles || []),
|
||||
fail: () => undefined
|
||||
});
|
||||
// #endif
|
||||
// #ifdef MP-WEIXIN
|
||||
(uni as any).chooseMessageFile({
|
||||
count: remaining,
|
||||
type: 'file',
|
||||
success: (result: any) => uploadFiles(result.tempFiles || []),
|
||||
fail: () => undefined
|
||||
});
|
||||
// #endif
|
||||
// #ifdef APP-PLUS
|
||||
(uni as any).chooseImage({
|
||||
count: remaining,
|
||||
sizeType: ['compressed'],
|
||||
sourceType: ['camera', 'album'],
|
||||
@@ -465,6 +481,7 @@ function chooseAttachment() {
|
||||
),
|
||||
fail: () => undefined
|
||||
});
|
||||
// #endif
|
||||
}
|
||||
|
||||
async function uploadFiles(files: Array<{ path: string; name?: string; size?: number }>) {
|
||||
|
||||
@@ -127,9 +127,9 @@
|
||||
<view v-if="attachments.length === 0" class="empty">暂无附件</view>
|
||||
|
||||
<button class="upload-button" :loading="uploading" @click="chooseAttachment">
|
||||
上传图片({{ attachments.length }}/9)
|
||||
上传附件({{ attachments.length }}/9)
|
||||
</button>
|
||||
<text class="hint">支持拍照或从相册选择图片(jpg/png),单张不超过20MB</text>
|
||||
<text class="hint">支持 jpg/jpeg/png/pdf/doc/docx/xls/xlsx,单张不超过20MB</text>
|
||||
</uni-card>
|
||||
|
||||
<view class="footer">
|
||||
@@ -421,8 +421,24 @@ function chooseAttachment() {
|
||||
return;
|
||||
}
|
||||
const remaining = 9 - attachments.value.length;
|
||||
// 统一改为拍照/相册选图:H5 文件选择与小程序会话选文件在手机上点击无响应
|
||||
uni.chooseImage({
|
||||
// #ifdef H5
|
||||
(uni as any).chooseFile({
|
||||
count: remaining,
|
||||
extension: ['.jpg', '.jpeg', '.png', '.pdf', '.doc', '.docx', '.xls', '.xlsx'],
|
||||
success: (result: any) => uploadFiles(result.tempFiles || []),
|
||||
fail: () => undefined
|
||||
});
|
||||
// #endif
|
||||
// #ifdef MP-WEIXIN
|
||||
(uni as any).chooseMessageFile({
|
||||
count: remaining,
|
||||
type: 'file',
|
||||
success: (result: any) => uploadFiles(result.tempFiles || []),
|
||||
fail: () => undefined
|
||||
});
|
||||
// #endif
|
||||
// #ifdef APP-PLUS
|
||||
(uni as any).chooseImage({
|
||||
count: remaining,
|
||||
sizeType: ['compressed'],
|
||||
sourceType: ['camera', 'album'],
|
||||
@@ -432,6 +448,7 @@ function chooseAttachment() {
|
||||
),
|
||||
fail: () => undefined
|
||||
});
|
||||
// #endif
|
||||
}
|
||||
|
||||
async function uploadFiles(files: Array<{ path: string; name?: string; size?: number }>) {
|
||||
|
||||
Reference in New Issue
Block a user