优化工作单bug

This commit is contained in:
wuxw 2024-08-05 10:13:57 +08:00
parent 0871dece84
commit 117d3b76f6
3 changed files with 16 additions and 12 deletions

View File

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

View File

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

View File

@ -17,7 +17,7 @@ let baseUrl = '/';
// 腾讯地图Key, h5使用 // 腾讯地图Key, h5使用
let QQMapKey = ''; let QQMapKey = '';
let commonBaseUrl= 'http://localhost:3000/'; let commonBaseUrl= 'http://demo.homecommunity.cn/';
// #ifndef H5 // #ifndef H5
//服务器域名 小程序 或者 app 时 后端地址 //服务器域名 小程序 或者 app 时 后端地址