|
|
@@ -21,18 +21,29 @@
|
|
|
<!-- 在职证明上传 -->
|
|
|
<view class="upload-img">
|
|
|
<view v-if="pdfFilePath" class="text-item">
|
|
|
- <u-icon name="file-text" color="#016bf6" size="40"></u-icon>
|
|
|
- <text style="margin-top: 8rpx;">已选择 PDF</text>
|
|
|
- <view class="delete-btn" @click="deletePDF">×</view>
|
|
|
+ <template v-if="isImageFile(pdfFilePath)">
|
|
|
+ <image
|
|
|
+ :src="pdfFilePath"
|
|
|
+ mode="aspectFill"
|
|
|
+ class="preview-img"
|
|
|
+ ></image>
|
|
|
+ <view class="delete-btn" @click="deletePDF">×</view>
|
|
|
+ </template>
|
|
|
+
|
|
|
+ <template v-else>
|
|
|
+ <u-icon name="file-text" color="#016bf6" size="40"></u-icon>
|
|
|
+ <text style="margin-top: 8rpx;">已选择 PDF</text>
|
|
|
+ <view class="delete-btn" @click="deletePDF">×</view>
|
|
|
+ </template>
|
|
|
</view>
|
|
|
- <fileSelector v-else :isShowStyle="false" title="上传在职证明" allowType=".pdf" @fileSelected="choosePDF" />
|
|
|
+ <fileSelector v-else :isShowStyle="false" title="上传在职证明" allowType=".pdf,image/*" @fileSelected="choosePDF" />
|
|
|
</view>
|
|
|
<!-- 模板下载部分 -->
|
|
|
<view class="warning-title" style="margin-top: 20rpx;">
|
|
|
<text style="color: #016bf6; margin-left: 8rpx;" @click="downloadTemplate">点击下载模板</text>
|
|
|
</view>
|
|
|
<view class="warning-title">注意事项</view>
|
|
|
- <view class="warning-desc">1.请上传加盖公章的在职证明(仅限 PDF 文件)</view>
|
|
|
+ <view class="warning-desc">1.请上传加盖公章的在职证明(仅限 PDF 文件 或者 图片)</view>
|
|
|
|
|
|
<!-- 公司证明上传 -->
|
|
|
<view class="upload-group">
|
|
|
@@ -83,6 +94,10 @@
|
|
|
if (options.companyId) this.companyId = options.companyId;
|
|
|
},
|
|
|
methods: {
|
|
|
+ // 判断是否为图片
|
|
|
+ isImageFile(path) {
|
|
|
+ return /\.(jpg|jpeg|png|gif|bmp|webp)$/i.test(path) || path.startsWith('data:image/')
|
|
|
+ },
|
|
|
// 下载模板
|
|
|
downloadTemplate() {
|
|
|
const url = 'https://h5.bosszan.com/员工在职证明-亿职赞模板.docx';
|
|
|
@@ -168,10 +183,10 @@
|
|
|
// ======= 在职证明上传 (PDF) =======
|
|
|
async choosePDF(e) {
|
|
|
var that = this
|
|
|
- const validExtensions = ['pdf', 'doc', 'docx'];
|
|
|
+ const validExtensions = ['pdf', 'jpg', 'jpeg', 'png', 'gif', 'bmp', 'webp'];
|
|
|
const ext = e.name.split('.').pop().toLowerCase();
|
|
|
if (!validExtensions.includes(ext)) {
|
|
|
- this.$queue.showToast('仅支持PDF/DOC/DOCX格式')
|
|
|
+ this.$queue.showToast('仅支持PDF或图片格式');
|
|
|
return;
|
|
|
}
|
|
|
uni.getFileInfo({
|
|
|
@@ -251,7 +266,7 @@
|
|
|
// ======= 提交 =======
|
|
|
async goUnderReview() {
|
|
|
if (!this.licenseUrl) return uni.showToast({ title: '请上传营业执照', icon: 'none' });
|
|
|
- if (!this.employmentVerification) return uni.showToast({ title: '请上传在职证明PDF', icon: 'none' });
|
|
|
+ if (!this.employmentVerification) return uni.showToast({ title: '请上传在职证明PDF或者图片', icon: 'none' });
|
|
|
if (this.companyProofUrls.length === 0) return uni.showToast({ title: '请上传公司证明图片', icon: 'none' });
|
|
|
|
|
|
const data = {
|