优化工作单bug

Signed-off-by: java110 <928255095@qq.com>
This commit is contained in:
java110 2024-08-05 02:12:40 +00:00 committed by Gitee
parent a9ebfbbd87
commit 527f037b83
No known key found for this signature in database
GPG Key ID: 173E9B9CA92EEF8F
2 changed files with 15 additions and 11 deletions

View File

@ -36,7 +36,7 @@
queryStaffListInfo
} from '../../api/common/common.js';
import {
getCurrentCommunity
getCommunityId
} from '../../api/community/community.js'
export default {
@ -68,7 +68,7 @@
let _data = {
page: 1,
row: 50,
communityId: this.communityId,
communityId: getCommunityId(),
};
queryStaffListInfo(this, _data)
.then(function(res) {

View File

@ -11,7 +11,8 @@
</template>
<script>
import {getHeaders} from '../../lib/java110/api/SystemApi.js'
import {getHeaders} from '../../lib/java110/api/SystemApi.js';
import url from '@/constant/url.js'
export default {
name:"vcUploadFile",
@ -25,19 +26,21 @@
this.fileName = _fileName;
},
_doUploadFile: function() {
uni.chooseFile({
let _that = this;
uni.chooseMessageFile({
count: 1, //100
type:'all',
extension: ['.zip','.jpg','.png','.xlsx','.doc','docx','.xls'],
success: (res) => {
console.log(res);
if (res.tempFiles[0].size / 1024 / 1024 > 20) {
this.$refs.uToast.show({
_that.$refs.uToast.show({
title: '附件大小不能超过20M',
type: 'warning',
})
return;
}
this.resultPath(res.tempFilePaths[0], res.tempFiles[0].name);
_that.resultPath(res.tempFiles[0].path, res.tempFiles[0].name);
}
});
},
@ -47,7 +50,7 @@
title: '上传中...',
});
uni.uploadFile({
url: '/callComponent/upload/uploadVedio/upload',
url: url.uploadVideo,
filePath: path,
name: 'uploadFile',
header:getHeaders(),
@ -63,10 +66,11 @@
},
fail:(err) =>{
this.$refs.uToast.show({
title: '上传失败',
type: 'error',
});
console.log(err)
uni.showToast({
icon:'none',
title:'上传失败'
})
uni.hideLoading();
}
});