소스 검색

上传在职证明优化

wkw 6 달 전
부모
커밋
ed4871e50e

+ 2 - 2
manifest.json

@@ -2,8 +2,8 @@
     "name" : "亿职赞",
     "appid" : "__UNI__0B0096D",
     "description" : "",
-    "versionName" : "1.0.9",
-    "versionCode" : 109,
+    "versionName" : "1.1.6",
+    "versionCode" : 116,
     "transformPx" : false,
     "sassImplementationName" : "node-sass",
     /* 5+App特有相关 */

+ 25 - 26
package/jobIntention/companyImg.vue

@@ -25,10 +25,7 @@
 					<text style="margin-top: 8rpx;">已选择 PDF</text>
 					<view class="delete-btn" @click="deletePDF">×</view>
 				</view>
-				<view v-else class="text-item" @click="choosePDF">
-					<u-icon name="plus" color="#999" size="40" style="margin-bottom: 8rpx;"></u-icon>
-					上传在职证明
-				</view>
+				<fileSelector v-else :isShowStyle="false" title="上传在职证明" allowType=".pdf" @fileSelected="choosePDF" />
 			</view>
 			<view class="warning-title">注意事项</view>
 			<view class="warning-desc">1.请上传加盖公章的在职证明(仅限 PDF 文件)</view>
@@ -56,6 +53,8 @@
 <script>
 	import navBar from "@/components/nav-bar/index.vue";
 	import configdata from '../../common/config.js';
+	// 引入组件
+	import fileSelector from '@/uni_modules/zhouquan-fileSelector/components/zhouquan-fileSelector/file-selector.vue';
 
 	export default {
 		data() {
@@ -74,7 +73,7 @@
 				action: configdata.APIHOST1 + '/alioss/upload'
 			};
 		},
-		components: { navBar },
+		components: { navBar,fileSelector},
 		onLoad(options) {
 			if (options.companyName) this.companyName = decodeURIComponent(options.companyName);
 			if (options.companyId) this.companyId = options.companyId;
@@ -133,27 +132,28 @@
 			},
 
 			// ======= 在职证明上传 (PDF) =======
-			async choosePDF() {
-				uni.chooseFile({
-					count: 1,
-					type: 'file',
-					extension: ['pdf'],
-					success: async (res) => {
-						const path = res.tempFiles[0].path;
-						this.pdfFilePath = path;
-
-						uni.showLoading({ title: '上传PDF中...' });
-						try {
-							this.employmentVerification = await this.uploadSingleFile(path);
-							uni.showToast({ title: 'PDF上传成功', icon: 'success' });
-						} catch (e) {
-							uni.showToast({ title: '上传失败', icon: 'none' });
-						} finally {
-							uni.hideLoading();
-						}
+			async choosePDF(e) {
+				var that = this
+				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) => {
+						let attachment_size = (info.size / 1024).toFixed(1)
+						that.$queue.uploadFile(e.path, function (path) {
+							if (path){
+								that.pdfFilePath = path;
+								that.employmentVerification = path;
+							}else
+								that.$queue.showToast('文件上传失败')
+						})
 					},
-					fail: () => {
-						uni.showToast({ title: '请选择PDF文件', icon: 'none' });
+					fail: (err) => {
+						console.error('获取失败', err);
 					}
 				});
 			},
@@ -226,7 +226,6 @@
 					employmentVerification: this.employmentVerification,
 					companyVerification: this.companyProofUrls.join(',')
 				};
-
 				uni.showLoading({ title: '提交中...' });
 				try {
 					const res = await this.$Request.postJson("/app/company/updateCompany", data);

+ 0 - 1
pages/msg/im.vue

@@ -2791,7 +2791,6 @@
 								name: 'file',
 								success: (uploadFileRes) => {
 									let content = JSON.parse(uploadFileRes.data).data;
-									// this.setChatSave(2);
 									uni.hideLoading();
 									let data = {
 										userId: that.byUserId,

+ 21 - 6
pages/my/VIP/benefits.vue

@@ -60,7 +60,7 @@
 			  <!-- 在线普通职位 -->
 			  <view class="table-row">
 			    <view class="row-cell benefit-type">在线普通职位</view>
-			    <view class="row-cell basic">1个</view>
+			    <view class="row-cell basic">{{nonVipInfo.postTimes}}个</view>
 			    <view v-for="(vip, index) in viplist" :key="vip.id"
 			          :class="['row-cell', index === 0 ? 'regular' : index === 1 ? 'vip' : 'flagship']">
 			      {{ vip.vipPostTimes }}个
@@ -70,7 +70,7 @@
 			  <!-- 在线急聘职位 -->
 			  <view class="table-row">
 			    <view class="row-cell benefit-type">在线急聘职位</view>
-			    <view class="row-cell basic">0个</view>
+			    <view class="row-cell basic">{{nonVipInfo.dueTimes}}个</view>
 			    <view v-for="(vip, index) in viplist" :key="vip.id"
 			          :class="['row-cell', index === 0 ? 'regular' : index === 1 ? 'vip' : 'flagship']">
 			      {{ vip.vipDueTimes }}个
@@ -80,7 +80,7 @@
 			  <!-- 每日查看总数 -->
 			  <view class="table-row">
 			    <view class="row-cell benefit-type">每日查看总数</view>
-			    <view class="row-cell basic">5个</view>
+			    <view class="row-cell basic">{{nonVipInfo.viewTimes}}个</view>
 			    <view v-for="(vip, index) in viplist" :key="vip.id"
 			          :class="['row-cell', index === 0 ? 'regular' : index === 1 ? 'vip' : 'flagship']">
 			      {{ vip.vipViewTimes }}个
@@ -90,7 +90,7 @@
 			  <!-- 每日沟通总数 -->
 			  <view class="table-row">
 			    <view class="row-cell benefit-type">每日沟通总数</view>
-			    <view class="row-cell basic">5个</view>
+			    <view class="row-cell basic">{{nonVipInfo.conTimes}}个</view>
 			    <view v-for="(vip, index) in viplist" :key="vip.id"
 			          :class="['row-cell', index === 0 ? 'regular' : index === 1 ? 'vip' : 'flagship']">
 			      {{ vip.vipConTimes }}个
@@ -266,7 +266,8 @@
 					regular: 599,
 					vip: 1599,
 					flagship: 2599
-				}
+				},
+				nonVipInfo:{}
 			}
 		},
 		onLoad() {
@@ -336,6 +337,7 @@
 		onShow() {
 			this.getUserInfoVipList();
 			this.selectVipDetails();
+			this.getNonVipDetails();
 			this.getVipdetile();
 		},
 		methods: {
@@ -689,7 +691,20 @@
 					}
 				});
 			},
-
+			// 基础套餐
+			getNonVipDetails(){
+				this.$Request.get("/app/VipDetails/getNonVipDetails").then((res) => {
+					console.log(res)
+					if (res.code == 0) {
+						this.nonVipInfo = res.data;
+					} else {
+						uni.showToast({
+							title: '暂无基础套餐',
+							icon: 'none'
+						})
+					}
+				});
+			},
 			//获取个人信息
 			getUserInfo() {
 				this.$Request.get("/app/user/selectUserById").then((res) => {

+ 21 - 4
uni_modules/zhouquan-fileSelector/components/zhouquan-fileSelector/file-selector.vue

@@ -1,8 +1,9 @@
 <template>
-    <view class="main">
+    <view :class="isShowStyle?'main':'text-item'" @click="fileRender.createFileInputDom">
         <!-- 上传区域 -->
-        <view class="upload-area" @click="fileRender.createFileInputDom">
-            <text class="upload-text">{{title}}</text>
+		<u-icon v-if="!isShowStyle" name="plus" color="#999" size="40" style="margin-bottom: 8rpx;"></u-icon>
+        <view :class="isShowStyle?'upload-area':''">
+            <text :class="isShowStyle?'upload-text':''">{{title}}</text>
         </view>
         
         <!-- 文件列表 -->
@@ -14,7 +15,7 @@
                 <view class="file-info">
                     <text class="file-name">{{file.name}}</text>
                 </view>
-                <view class="delete-btn" @click="removeFile(index)">
+                <view class="delete-btn" @click.stop="removeFile(index)">
                     <text class="delete-icon">×</text>
                 </view>
             </view>
@@ -33,6 +34,10 @@ export default {
 		allowType:{
 			type: String,
 			default: '*'
+		},
+		isShowStyle:{
+			type:Boolean ,
+			default: true
 		}
     },
     data() {
@@ -177,6 +182,18 @@ export default {
 </script>
 
 <style>
+.text-item {
+	width: 142rpx;
+	height: 142rpx;
+	color: #666;
+	font-size: 16rpx;
+	display: flex;
+	justify-content: center;
+	align-items: center;
+	flex-direction: column;
+	background: #eee;
+	border-radius: 12rpx;
+}
 /* 基础样式 */
 .main {
     padding: 20rpx;