Xiao_123 před 4 dny
rodič
revize
21066f71d1

+ 17 - 7
pagesA/resumeOnline/jobIntention.vue

@@ -3,7 +3,13 @@
   <view class="ss-m-x-30 ss-m-y-30">
     <uni-forms ref="form" :modelValue="formData" :rules="rules" validateTrigger="bind">
       <uni-forms-item label="期望岗位" name="positionId" required label-width="90px">
-				<uni-data-picker popup-title="请选择期望岗位" v-model="formData.positionId" :localdata="dictObj?.positionTreeData || []" :clear-icon="false" :map="{ text: 'nameCn', value: 'id'}"></uni-data-picker>
+				<uni-data-picker
+					popup-title="请选择期望岗位"
+					v-model="formData.positionId"
+					:localdata="dictObj?.positionTreeData || []"
+					:clear-icon="false"
+					:map="{ text: 'nameCn', value: 'id'}"
+				></uni-data-picker>
 			</uni-forms-item>
       <uni-forms-item label="期望行业" name="industryIdList" required label-width="90px">
 				<m-select
@@ -14,7 +20,6 @@
 					multiple
 					v-model="formData.industryIdList"
 				></m-select>
-				<!-- <uni-data-picker popup-title="请选择期望行业" v-model="formData.industryIdList" :localdata="dictObj?.industryTreeData || []" :clear-icon="false" :map="{ text: 'nameCn', value: 'id'}"></uni-data-picker> -->
 			</uni-forms-item>
       <uni-forms-item label="最低薪资" name="payFrom" required label-width="90px">
         <uni-number-box v-model="formData.payFrom" :min="1" :max="999999999" :step="1000" :width="150" @change="payChange"></uni-number-box>
@@ -29,7 +34,6 @@
 				<uni-data-picker popup-title="请选择工作城市" v-model="formData.workAreaId" :localdata="dictObj?.areaTreeData || []" :clear-icon="false" :map="{ text: 'name', value: 'id'}"></uni-data-picker>
 			</uni-forms-item>
       <uni-forms-item label="其它感兴趣的城市" name="interestedAreaIdList" label-width="90px">
-				<!-- <uni-data-picker popup-title="其它感兴趣的城市" v-model="formData.interestedAreaIdList" :localdata="dictObj?.areaTreeData || []" :clear-icon="false" :map="{ text: 'name', value: 'id'}"></uni-data-picker> -->
 				<m-select
 					label="请选择其它感兴趣的城市"
 					:items="dictObj?.areaTreeData || []"
@@ -42,7 +46,13 @@
 			</uni-forms-item>
     </uni-forms>
     <view class="f-horizon-center">
-      <button v-if="editId" size="default" class="delete-button commonBtnStyle MiSans-Medium" :disabled="deleteDisabled" @click="handleDelete">删 除</button>
+      <button 
+				v-if="editId"
+				size="default"
+				class="delete-button commonBtnStyle MiSans-Medium"
+				:disabled="deleteDisabled"
+				@click="handleDelete"
+			>删 除</button>
       <button
 				size="default"
 				class="MiSans-Medium"
@@ -74,7 +84,9 @@ async function getJobInterested (id) {
   }
   const obj = data.find(k => k.id === id)
 	formData.value = cloneDeep(obj)
-	formData.value.interestedAreaIdList = obj.interestedAreaIdList.map(e => +e)
+
+	const interest = obj.interestedAreaIdList
+	formData.value.interestedAreaIdList = interest && interest.length ? interest.map(e => +e) : []
 	if (dictObj && dictObj?.areaTreeData) {
 		const type = typeof dictObj.areaTreeData[0].id
 		formData.value.workAreaId = type === 'string' ? obj.workAreaId.toString() : Number(obj.workAreaId)
@@ -93,8 +105,6 @@ const disabled = ref(false)
 const submit = async () => {
   const valid = await unref(form).validate()
   if (!valid) return
-	// 后续做多选
-	// const query = {...formData.value, industryIdList: formData.value.industryIdList, interestedAreaIdList: formData.value.interestedAreaIdList}
 
 	disabled.value = true
 	try {

+ 13 - 7
pagesB/positionDetail/index.vue

@@ -567,7 +567,8 @@ const handleDelivery = async () => {
   if (!getAccessToken()) {
     uni.showToast({
       title:'请先登录',
-      icon: 'none'
+      icon: 'none',
+      duration: 2000
     })
     showAuthModal()
     return
@@ -575,7 +576,8 @@ const handleDelivery = async () => {
   if (showNecessaryInfoPopup()) {
 		uni.showToast({
 			title: '请先完善基本信息',
-			icon: 'none'
+			icon: 'none',
+      duration: 2000
 		})
 		showAuthModal('necessaryInfo')
 		return
@@ -658,7 +660,8 @@ async function handleSend () {
   if (showNecessaryInfoPopup()) {
 		uni.showToast({
 			title: '请先完善基本信息',
-			icon: 'none'
+			icon: 'none',
+      duration: 2000
 		})
 		showAuthModal('necessaryInfo')
 		return
@@ -716,9 +719,10 @@ const handleUpload = () => {
     type: 'file',
     success (res) {
       // 限制文件上传大小
-      const size = res.tempFiles[0].size
+      const size = res.tempFiles[0]?.size
+      if (!size) return uni.showToast({ icon: 'none', title: '文件选择失败,请稍后再试', duration: 2000 })
       if (size / (1024*1024) > 20) {
-        uni.showToast({ icon: 'none', title: '文件大小不能超过20M' })
+        uni.showToast({ icon: 'none', title: '文件大小不能超过20M', duration: 2000 })
         return
       }
 
@@ -730,14 +734,16 @@ const handleUpload = () => {
           if (!res.data) {
             uni.showToast({
               title: '上传失败',
-              icon: 'none'
+              icon: 'none',
+              duration: 2000
             })
             return
           }
           await saveResume({ title, url: res.data })
           uni.showToast({
             title: '上传成功',
-            icon: 'success'
+            icon: 'success',
+            duration: 2000
           })
           deliverySubmit({ title, url: res.data })
         })

+ 1 - 1
utils/position.js

@@ -124,7 +124,7 @@ const preferred = ref({})
 const getSystemWebContent = async () => {
   const { data } = await getWebContent()
   // 优选集团
-  preferred.value = data?.appPreferredGroup
+  preferred.value = data?.appPreferredGroup ?? {}
 }
 getSystemWebContent()