|
|
@@ -17,9 +17,9 @@
|
|
|
<scroll-view scroll-with-animation scroll-y>
|
|
|
<!-- 我的公司 -->
|
|
|
<view class="usermain-item item-padding" v-for="item in content">
|
|
|
- <view class="usermain-item-title c-flex-center"><image src="../../static/images/pdf.svg" class="header-icon" /></view>
|
|
|
+ <view class="usermain-item-title c-flex-center"><image :src="item.fileType=='pdf'?'../../static/images/pdf.svg':'../../static/images/docx.svg'" class="header-icon" mode="aspectFill"/></view>
|
|
|
<view @click="seekDoc(item)" class="fileContent c-flex-center">
|
|
|
- <view class="fileName">{{item.attachmentName}}</view>
|
|
|
+ <view class="fileName m-ellipsis">{{item.attachmentName}}</view>
|
|
|
<view class="filedesc">{{item.attachmentSize}}kb 更新于{{item.createTime}}</view>
|
|
|
</view>
|
|
|
<view @click.stop="more(item.resumesAttachmentId)" class="c-flex-center">
|
|
|
@@ -223,6 +223,10 @@
|
|
|
getUserInfo() {
|
|
|
this.$Request.get("/app/resumes/getAttachment").then(res => {
|
|
|
if (res.code == 0) {
|
|
|
+ res.data.forEach(function(item){
|
|
|
+ const ext = item.attachmentName.split('.').pop().toLowerCase();
|
|
|
+ item.fileType=ext
|
|
|
+ })
|
|
|
this.content=res.data
|
|
|
}
|
|
|
uni.hideLoading();
|
|
|
@@ -234,9 +238,16 @@
|
|
|
uploadResumes(e) {
|
|
|
var that=this
|
|
|
console.log(e.path)
|
|
|
+ const validExtensions = ['pdf', 'doc', 'docx'];
|
|
|
+ const ext = e.name.split('.').pop().toLowerCase();
|
|
|
+ if (!validExtensions.includes(ext)) {
|
|
|
+ this.$queue.showToast('仅支持PDF/DOC/DOCX格式')
|
|
|
+ return;
|
|
|
+ }
|
|
|
uni.getFileInfo({
|
|
|
filePath: e.path,
|
|
|
success: (info) => {
|
|
|
+
|
|
|
console.log('文件大小:', info.size); // 单位:字节
|
|
|
let attachment_size=(info.size/1024).toFixed(1)
|
|
|
that.$queue.uploadFile(e.path,function(path){
|
|
|
@@ -432,9 +443,8 @@
|
|
|
padding: 30rpx 0;
|
|
|
// border-bottom: 1rpx solid rgba(229, 229, 229, 0.3);
|
|
|
background: #fff;
|
|
|
- gap: 16rpx;
|
|
|
.fileContent{
|
|
|
- width: 80%;
|
|
|
+ width: 85%;
|
|
|
margin:0 20rpx;
|
|
|
}
|
|
|
.fileName{
|
|
|
@@ -448,6 +458,7 @@
|
|
|
.c-flex-center{
|
|
|
align-self: center;
|
|
|
color: #aaa;
|
|
|
+ flex-shrink: 0;
|
|
|
}
|
|
|
|
|
|
}
|