mirror of
https://gitee.com/java110/PropertyApp.git
synced 2026-02-23 21:36:39 +08:00
优化工作单bug
Signed-off-by: java110 <928255095@qq.com>
This commit is contained in:
parent
a9ebfbbd87
commit
527f037b83
@ -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) {
|
||||
|
||||
@ -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();
|
||||
}
|
||||
});
|
||||
|
||||
Loading…
Reference in New Issue
Block a user