Browse Source

fix: 修改bug

yezhihao 3 months ago
parent
commit
298c9d779c

+ 4 - 0
App.vue

@@ -249,6 +249,10 @@ export default {
 							  uni.removeStorageSync("updated");
 							  plus.runtime.install(packgePath, {
 							    force: true,
+							  }, (res) => {
+								  console.log('安装成功', res)
+							  }, (err) => {
+								  console.log('安装失败', err)
 							  });
 							  uni.setStorage({
 							    key: "updated",

+ 12 - 4
components/resume/preview-resume.vue

@@ -23,7 +23,9 @@
 					<view class="tag" v-if="tag" :key="index">{{ tag }}</view>
 				</template>
 			</view>
-			<view class="advantages">{{ adv }}</view>
+			<view class="advantages">
+				<text>{{ adv }}</text>
+			</view>
 			<!-- <view class="resume-tag">
 				<image src="@/static/images/svg/file.svg" class="resume-icon"></image>
 				已上传附件简历
@@ -62,11 +64,15 @@
 						<view class="position-info">{{ item.position }} &nbsp; {{ item.startTime }}-{{ item.endTime }}</view>
 						<view class="content">
 							<view class="content-title">工作内容</view>
-							<view class="content-text">{{ item.workContent }}</view>
+							<view class="content-text">
+								<text>{{ item.workContent }}</text>
+							</view>
 						</view>
 						<view class="content">
 							<view class="content-title">工作业绩</view>
-							<view class="content-text">{{ item.workPerformance }}</view>
+							<view class="content-text">
+								<text>{{ item.workPerformance }}</text>
+							</view>
 						</view>
 						<view class="tags">
 							<view class="tag" v-for="(skill, i) in item.skills" :key="i">{{ skill }}</view>
@@ -84,7 +90,9 @@
 			<view class="edu-item" v-for="item in eduList" :key="item.eduId">
 				<view class="school-name">{{ item.school }}</view>
 				<view class="edu-base-info">{{ item.degree }} • {{ item.profession }} • {{ item.time }}</view>
-				<view class="desc">{{ item.detail }}</view>
+				<view class="desc">
+					<text>{{ item.detail }}</text>
+				</view>
 			</view>
 		</view>
 		

+ 2 - 2
manifest.json

@@ -2,8 +2,8 @@
     "name" : "亿职赞",
     "appid" : "__UNI__0B0096D",
     "description" : "",
-    "versionName" : "1.2.5",
-    "versionCode" : 125,
+    "versionName" : "1.2.7",
+    "versionCode" : 127,
     "transformPx" : false,
     "sassImplementationName" : "node-sass",
     /* 5+App特有相关 */

+ 12 - 1
package/jobIntention/jobSkills.vue

@@ -90,6 +90,7 @@
 				tagParam: '' ,// 新增:保存传入的tag参数
 				ruleClassifyId:'',
 				fromPage: '', // 判断从哪个页面进入 userInfo个人信息、onlineResume在线简历
+				disabledSubmit: false
 			}
 		},
 		computed: {
@@ -136,13 +137,20 @@
 			},
 			getData() {
 				let data = {
-					ruleClassifyId: this.jobId || this.ruleClassifyId
+					ruleClassifyId: this.jobId || this.ruleClassifyId || ''
 				}
 				var action = this.jobId == '' || this.jobId == 0 ? '/app/userFirst/selectSkill' :
 					'/app/userFirst/getPostSkill'
 				if(this.ruleClassifyId){
 					action = '/app/userFirst/getPostSkill'
 				}
+				// 如果ruleClassifyId等于null字符串,则置空
+				if (data.ruleClassifyId == 'null') {
+					this.disabledSubmit = true
+					data.ruleClassifyId = ''
+				} else {
+					this.disabledSubmit = false
+				}
 				this.$Request.getT(action, data).then(res => {
 					if (res.code == 0) {
 						this.operationOptions = res.data
@@ -251,6 +259,9 @@
 				this.customTags.splice(index, 1)
 			},
 			confirmSelection() {
+				if (this.disabledSubmit) {
+					return this.$queue.showToast('请重新选择亿职赞所匹配的岗位')
+				}
 				// 合并选择的标签和自定义标签并回传
 				const allSelectedTags = this.onlyShowCustomTag ? this.customTags : [...this.selectedOperation, ...this.customTags]
 				// 触发事件通知上一页面

+ 2 - 2
package/my/hiddenManagement/index.vue

@@ -25,10 +25,10 @@
 				<view class="company-item" v-for="item in hideCompanys" :key="item.companyId">
 					<siwper-delete @delete="handleDelete(item)">
 						<view class="company-content flex align-center">
-							<image :src="item.company.companyLogo ? item.company.companyLogo : '/static/images/logo.jpg'" class="company-icon"></image>
+							<image :src="item.company && item.company.companyLogo ? item.company.companyLogo : '/static/images/logo.jpg'" class="company-icon"></image>
 							<view class="company-info">
 								<view class="company-name">{{ item.companyName }}</view>
-								<view class="text">{{ item.company.companyPeople }} <template v-if="item.company.type == '0'">· 跨境电商</template></view>
+								<view class="text" v-if="item.company">{{ item.company.companyPeople }} <template v-if="item.company.type == '0'">· 跨境电商</template></view>
 							</view>
 						</view>
 					</siwper-delete>

+ 15 - 2
pages/index/game/order.vue

@@ -372,7 +372,8 @@
 					collectCount: 0,
 					viewCount: 0,
 				},
-				userType: null
+				userType: null,
+				updating: false
 			};
 		},
 		computed: {
@@ -578,9 +579,11 @@
 			},
 			//在线联系
 			bindphone(phone, index) {
+				if (this.updating) return
 				if(!this.info.user||!this.info.user.userId)
 					return this.$queue.showToast('岗位发布者已不知所踪,请联系管理员😂😂😂😂😂😂')
 				if (uni.getStorageSync('token')) {
+					this.updating = true
 					this.$Request.get('/app/resumes/selectResumesByUserId').then(res => {
 						if (res.code == 0) {
 							let obj = res.data
@@ -598,6 +601,7 @@
 										}
 									}
 								})
+								this.updating = false
 							} else {
 								console.log(this.info)
 								if(uni.getStorageSync('userId')==this.info.user.userId)
@@ -614,12 +618,21 @@
 											url: '/pages/msg/im?byUserId=' + this.info.user
 												.userId + '&chatConversationId=' + res.data
 												.chatConversationId + '&postPushId=' + res.data
-												.postPushId
+												.postPushId,
+											complete: () => {
+												this.updating = false
+											}
 										})
+									} else {
+										this.updating = false
 									}
+								}).catch(() => {
+									this.updating = false
 								})
 							}
 						}
+					}).catch(() => {
+						this.updating = false
 					})
 				} else {
 					uni.showModal({

+ 9 - 8
pages/index/index.vue

@@ -492,6 +492,7 @@ import nomore from '../../components/nomore.vue'
 import permision from '@/js_sdk/wa-permission/permission.js'
 import companyListIndex from '@/components/companyListIndex/companyListIndex.vue'
 import { formatNumberToK } from '@/utils/util.js'
+import { debounce } from '@/utils/util'
 export default {
 	components: {
 		empty,
@@ -1879,7 +1880,7 @@ export default {
 				}
 			})
 		},
-		gotoInfo(postPushId) {
+		gotoInfo: debounce(function(postPushId) {
 			if (uni.getStorageSync('token')) {
 				// #ifdef MP-WEIXIN
 				if (uni.getStorageSync('sendMsg')) {
@@ -1910,9 +1911,9 @@ export default {
 				url: '/pages/index/game/order?postPushId=' + postPushId
 			})
 
-		},
+		}, 300),
 		//不需要登录跳转
-		goNavs(url) {
+		goNavs: debounce(function(url) {
 			// #ifdef MP-WEIXIN
 			if (uni.getStorageSync('sendMsg')) {
 				// console.log('授权+1')
@@ -1934,9 +1935,9 @@ export default {
 			uni.navigateTo({
 				url: url
 			})
-		},
+		}, 300),
 		//跳转
-		goNav(url, company = '') {
+		goNav: debounce(function(url, company = '') {
 			if (company == 'company') {
 				if (this.jobSxTypeList.length <= 0 || this.jobSxTypeList[this.currentJobSx].id == '') return this.$queue.showToast('请先点击右上角发布岗位');
 			}
@@ -1966,7 +1967,7 @@ export default {
 				this.noLogin()
 			}
 
-		},
+		}, 300),
 		//未登录
 		noLogin() {
 			uni.showModal({
@@ -2161,11 +2162,11 @@ export default {
 		},
 		
 		// 跳转公司页面
-		toCompanyPage(companyId) {
+		toCompanyPage: debounce(function(companyId) {
 			uni.navigateTo({
 				url: `/my/enterpriseInfo/enterpriseInfo?companyId=${companyId}`
 			})
-		}
+		}, 300),
 	}
 }
 </script>

+ 7 - 6
pages/msg/im.vue

@@ -898,6 +898,7 @@
 	import resumeCard from '@/components/resume/resume-card.vue'
 	import { logoutJP } from '@/utils/login.js';
 	import { onlineInterviewType } from "@/constants/common";
+	import { debounce } from '@/utils/util'
 	export default {
 		components: {
 			attachment,
@@ -1996,11 +1997,11 @@
 				this.wechatExchangeShow = false;
 				this.setChatSave(6);
 			},
-			goNav(url) {
+			goNav: debounce(function(url) {
 				uni.navigateTo({
 					url: url
 				})
-			},
+			}, 300),
 			//获取简历数据
 			getResumesInfo(id) {
 				var that=this
@@ -2033,11 +2034,11 @@
 				this.content= this.userType == 1 ? '抱歉,我对该岗位暂无兴趣' : '抱歉,您不符合我们的招聘条件';
 				this.setChatSave(1)
 			},
-			gotoInfo(id) {
+			gotoInfo: debounce(function(id) {
 				uni.navigateTo({
 					url: '/pages/index/game/order?postPushId=' + id
 				})
-			},
+			}, 300),
 			//获取岗位数据
 			getPostPushInfo(id) {
 				this.$Request.getT("/app/postPush/selectPostPushDetails", {
@@ -2188,7 +2189,7 @@
 					return data[key] !== undefined ? data[key] : match;
 				});
 			},
-			goGuanZhu() {
+			goGuanZhu: debounce(function() {
 				if(this.userType == 1){
 					this.gotoInfo(this.postPushInfo.postPushId)
 				}else{
@@ -2236,7 +2237,7 @@
 				// 		}
 				// 	}
 				// });
-			},
+			}, 300),
 			//添加常用语/自动回复
 			goAdd() {
 				this.showMore();

+ 8 - 7
pages/msg/index.vue

@@ -12,7 +12,7 @@
 				</view>
 				<view class="nav-right">
 					<!-- <u-icon name="bell" color="rgba(56, 58, 63, 1)" size="40" style="margin-right: 20rpx;"></u-icon> -->
-					<u-icon name="setting" color="rgba(56, 58, 63, 1)" size="40" v-if="isLogin" @click="showSettingsModal"></u-icon>
+					<!-- <u-icon name="setting" color="rgba(56, 58, 63, 1)" size="40" v-if="isLogin" @click="showSettingsModal"></u-icon> -->
 				</view>
 			</view>
 			
@@ -275,6 +275,7 @@
 <script>
 	import empty from '../../components/empty.vue'
 	import configData from '../../common/config.js'
+	import { debounce } from '../../utils/util'
 
 	// 求职端tabs
 	// 显示:全部(固定)、未读(固定)、新招呼、仅沟通、有交换、有面试
@@ -750,7 +751,7 @@
 					}
 				});
 			},
-			goIM(e) {
+			goIM: debounce(function(e) {
 				// #ifdef MP-WEIXIN
 				if (uni.getStorageSync('sendMsg')) {
 					// console.log('授权+1')
@@ -788,13 +789,13 @@
 					})
 				}
 
-			},
-			goMsg() {
+			}, 300),
+			goMsg: debounce(function() {
 				if (!this.isLogin) return
 				uni.navigateTo({
 					url: '/pages/msg/message'
 				})
-			},
+			}, 300),
 			
 			// 显示设置弹窗
 			showSettingsModal() {
@@ -821,11 +822,11 @@
 				})
 			},
 			// 搜索功能
-			goSearch() {
+			goSearch: debounce(function() {
 				uni.navigateTo({
 					url: '/pages/msg/search'
 				})
-			},
+			}, 300),
 			// 刷新
 			handleRefresh() {
 				if (!uni.getStorageSync('token')) {

+ 20 - 2
pages/my/attachment.vue

@@ -495,7 +495,6 @@ export default {
 				},
 				method: 'post',
 				data: {
-					workflowId: '7594327567932309547',
 					fileId,
 					resumesAttachmentId
 				},
@@ -505,11 +504,13 @@ export default {
 					
 					if (res.data?.code == 0) {
 						const data = res.data.data.data
+						// 识别前,先清空数据
+						this.clearResumeData()
 						this.setAiResumesAnalysis(data.output)
 					}
 				},
 				fail: (err) => {
-					this.$queue.showToast('解析失败,请稍后重试')
+					this.showModal('解析失败,请稍后重试')
 					this.stopLoadStatus()
 				}
 			})
@@ -572,12 +573,29 @@ export default {
 					if (res.code === 0) {
 						this.showResumesAnalysis = false
 						this.$queue.showToast('同步成功')
+					} else {
+						this.$queue.showToast('同步失败')
 					}
 				})
 				.finally(() => {
 					this.loading = false
 					uni.hideLoading()
 				})
+		},
+		
+		// 清空数据
+		clearResumeData() {
+			this.analysisList.forEach(item => {
+				item.value = ''
+			})
+		},
+		
+		showModal(content) {
+			uni.showModal({
+				title: '提示',
+				content,
+				showCancel: false
+			})
 		}
 	},
 	// userphone(){

+ 10 - 5
pages/my/index.vue

@@ -104,18 +104,21 @@
 								<view class="jobServer-box-btn flex justify-between" style="padding: 0 30px;">
 									<view class="jobServer-box-btn-item flex justify-center flex-wrap"
 										@click="goNav('/pages/my/onlineResume')">
-										<image src="../../static/images/index/qwzn.svg" mode=""></image>
+										<!-- <image src="../../static/images/index/qwzn.svg" mode=""></image> -->
+										<image src="@/static/images/my/icons/home.png"></image>
 										<view class=""> 在线简历 </view>
 										<view class="info-tip" v-if="score < 60">待完善</view>
 									</view>
 									<view class="jobServer-box-btn-item flex justify-center flex-wrap"
 										@click="goNav('/pages/my/attachment')">
-										<image src="../../static/images/index/cpbk.svg" mode=""></image>
+										<!-- <image src="../../static/images/index/cpbk.svg" mode=""></image> -->
+										<image src="@/static/images/my/icons/file.png" mode=""></image>
 										<view class=""> 附件简历 </view>
 									</view>
 									<view class="jobServer-box-btn-item flex justify-center flex-wrap"
 										@click="goNav('/package/jobIntention/tagManage')">
-										<image src="../../static/images/index/fwzx.svg" mode=""></image>
+										<!-- <image src="../../static/images/index/fwzx.svg" mode=""></image> -->
+										<image src="@/static/images/my/icons/tag.png" mode=""></image>
 										<view class=""> 求职意向 </view>
 									</view>
 									<!-- <view class="jobServer-box-btn-item flex justify-center flex-wrap"
@@ -252,12 +255,14 @@
 									</view>
 									<view class="jobServer-box-btn-item flex justify-center flex-wrap"
 										@click="goNavStatus('/pages/my/jobPosting')">
-										<image src="../../static/images/index/qwzn.svg" mode=""></image>
+										<!-- <image src="../../static/images/index/qwzn.svg" mode=""></image> -->
+										<image src="@/static/images/my/icons/home.png" mode=""></image>
 										<view class=""> 发布招聘 </view>
 									</view>
 									<view class="jobServer-box-btn-item flex justify-center flex-wrap"
 										@click="handleToCompanyIndex">
-										<image src="../../static/images/index/fwzx.svg" mode=""></image>
+										<!-- <image src="../../static/images/index/fwzx.svg" mode=""></image> -->
+										<image src="@/static/images/my/icons/tag.png" mode=""></image>
 										<view class=""> 公司主页 </view>
 										<view class="info-tip" v-if="showCompanyInfoTip">待完善</view>
 									</view>

+ 11 - 1
pages/my/onlineResume.vue

@@ -52,7 +52,9 @@
 						</view>
 						<view class="content">
 							<view class="title">我的优势</view>
-							<view class="content-text">{{ detail.resumeList && detail.resumeList.adv }}</view>
+							<view class="content-text">
+								<text>{{ detail.resumeList && detail.resumeList.adv }}</text>
+							</view>
 						</view>
 						<view class="content">
 							<view class="title">我的技能</view>
@@ -422,6 +424,7 @@ export default {
 		}
 		// 判断是否有fileId,如果有则是从上传简历文件页面跳转
 		if (options.fileId) {
+			this.clearResumeData()
 			this.getAiResumesAnalysis(options.fileId)
 		}
 		this.getData()
@@ -806,6 +809,13 @@ export default {
 					this.loading = false
 					uni.hideLoading()
 				})
+		},
+		
+		// 清空数据
+		clearResumeData() {
+			this.analysisList.forEach(item => {
+				item.value = ''
+			})
 		}
 	},
 	watch: {

+ 10 - 13
pages/public/improvePrompt.vue

@@ -145,26 +145,15 @@
 			},
 			// 获取简历解析数据
 			getAiResumesAnalysis(fileId, resumesAttachmentId) {
-				// if (this.timer) {
-				// 	clearInterval(this.timer)
-				// 	this.progress = 0
-				// }
-				
 				this.showLoadCard = true
-				// this.timer = setInterval(() => {
-				// 	if (this.progress < 99) {
-				// 		this.progress++
-				// 	}
-				// }, 900)
 				uni.request({
-					url: config.APIHOST + '/app/resumes/aiResumesAnalysis',
+					url: this.$Request.config('APIHOST') + '/app/resumes/aiResumesAnalysis',
 					header: {
 						'content-type': 'application/x-www-form-urlencoded', // 模拟 form-data
 						token: uni.getStorageSync('token'),
 					},
 					method: 'post',
 					data: {
-						workflowId: '7594327567932309547',
 						fileId,
 						resumesAttachmentId
 					},
@@ -182,7 +171,7 @@
 						}
 					},
 					fail: (err) => {
-						this.$queue.showToast('解析失败,请稍后重试')
+						this.showModal('解析失败,请稍后重试')
 						this.stopLoadStatus()
 					}
 				})
@@ -192,6 +181,14 @@
 				this.showLoadCard = false
 				// this.progress = 0
 				// clearInterval(this.timer)
+			},
+			
+			showModal(content) {
+				uni.showModal({
+					title: '提示',
+					content,
+					showCancel: false
+				})
 			}
 		}
 	}

+ 5 - 4
pages/talentSearch/resumeDetail.vue

@@ -33,6 +33,7 @@
 
 <script>
 import previewResume from '@/components/resume/preview-resume.vue';
+import { debounce } from '@/utils/util'
 	
 export default {
 	components: {
@@ -99,7 +100,7 @@ export default {
 		/**
 		 * 收藏简历
 		 */
-		setCollection() {
+		setCollection: debounce(function() {
 			this.$Request.postT("/app/myCollection/saveCollection", {
 				resumesId: this.resumesId,
 				type: 2
@@ -111,11 +112,11 @@ export default {
 					this.getDetail()
 				}
 			})
-		},
+		}, 300),
 		goBack() {
 			uni.navigateBack();
 		},
-		contactCandidate() {
+		contactCandidate: debounce(function() {
 			//去联系
 			this.getDetail()
 			this.$Request.postJson('/app/chat/insertChatConversation', {
@@ -135,7 +136,7 @@ export default {
 				}
 			})
 
-		},
+		}, 300),
 		getDetail() {
 			uni.showLoading({
 				title: '加载中'

BIN
static/images/my/icons/file.png


BIN
static/images/my/icons/home.png


BIN
static/images/my/icons/tag.png


+ 34 - 1
utils/util.js

@@ -150,4 +150,37 @@ export const exportResumePdf = (resumesId) => {
 			loading = false
 		}
 	})
-}
+}
+
+/**
+ * 防抖:连续触发,只在最后一次操作后 wait 毫秒执行一次
+ * @param {Function} fn
+ * @param {number} [wait=300]
+ * @returns {Function} 每次 debounce(fn) 都会得到独立计时器,互不干扰
+ */
+export function debounce(fn, wait = 300) {
+	let timer = null
+	return function debounced(...args) {
+		const ctx = this
+		clearTimeout(timer)
+		timer = setTimeout(() => {
+			timer = null
+			fn.apply(ctx, args)
+		}, wait)
+	}
+}
+
+/**
+ * 节流:wait 毫秒内最多执行一次(适合按钮点击、跳转防连点)
+ * @param {Function} fn
+ * @param {number} [wait=500]
+ */
+export function throttle(fn, wait = 500) {
+	let last = 0
+	return function throttled(...args) {
+		const now = Date.now()
+		if (now - last < wait) return
+		last = now
+		fn.apply(this, args)
+	}
+}