فهرست منبع

Merge branch 'master' of https://git.citupro.com/zhengnaiwen_citu/menduner-uniapp

zhengnaiwen_citu 5 ماه پیش
والد
کامیت
8dbf02c3a7
4فایلهای تغییر یافته به همراه28 افزوده شده و 16 حذف شده
  1. 16 4
      pages/index/position.vue
  2. 2 1
      pagesA/chart/index.vue
  3. 1 1
      pagesA/resume/index.vue
  4. 9 10
      pagesB/headhunting/pages/contact.vue

+ 16 - 4
pages/index/position.vue

@@ -175,8 +175,9 @@ const checkValue = (obj) => {
   })
 }
 
+const type = ref('recommend')
 const positionListData = ref([])
-const query = reactive({ 
+const query = reactive({
   pageSize: 20, 
   pageNo: 1,
   hire: false,
@@ -192,10 +193,19 @@ const getData = async () => {
   const { content, areaIds, industryIds, jobType, payScope, positionId } = query
   const hasValue = checkValue({ content, areaIds, industryIds, jobType, payScope, positionId })
 
-  // 带查询条件时返回到顶部
-  if (hasValue) {
+  // 当前接口为推荐列表时,带查询条件需返回到列表顶部
+  if (hasValue && type.value === 'recommend') {
     scrollTop.value = old.value.scrollTop
     nextTick(() => {
+      type.value = 'position'
+      scrollTop.value = 0
+    })
+  }
+  // 当前接口为只为列表时,清除查询条件需返回到列表顶部
+  if (!hasValue && type.value === 'position') {
+    scrollTop.value = old.value.scrollTop
+    nextTick(() => {
+      type.value = 'recommend'
       scrollTop.value = 0
     })
   }
@@ -203,6 +213,7 @@ const getData = async () => {
   // 带搜索条件(除分页外)用职位搜索接口,无条件则用推荐接口
   const api = hasValue ? getJobAdvertisedSearch : getPromotedPosition
   const params = hasValue ? query : { pageSize: query.pageSize, pageNo: query.pageNo, hire: 0 }
+  type.value = hasValue ? 'position' : 'recommend'
   try {
     const res = await api(params)
     const arr = res?.data?.list || []
@@ -253,7 +264,8 @@ const onSearch = () => {
   getData()
 }
 
-const loadingMore = () => { // 加载更多
+// 加载更多
+const loadingMore = () => {
   more.value = 'loading'
   query.pageNo++
   getData()

+ 2 - 1
pagesA/chart/index.vue

@@ -184,7 +184,7 @@
         <view class="popup-upload-box">
           <uni-icons type="plusempty" size="50" color="#f1f1f1"></uni-icons>
         </view>
-        <text>您还未上传过简历,点击选取微信聊天文件投递</text>
+        <text>温馨提示:您还未上传过简历,点击选取微信聊天文件投递。请在手机上打开此小程序进行文件上传,暂不支持在桌面版小程序中上传文件。</text>
       </view>
       <view v-if="resumeList.length" class="popup-actions">
         <button class="default" type="default" @click="handleSendResume">发送简历</button>
@@ -850,6 +850,7 @@ onLoad(async (options) => {
     // justify-content: center;
     // flex-direction: column;
     // width: 70%;
+    width: 80vw;
     font-size: .75em;
     color: #999;
     padding: 40rpx;

+ 1 - 1
pagesA/resume/index.vue

@@ -1,6 +1,6 @@
 <template>
   <view class="ss-p-b-100" style="height: 100vh; background-color: #f2f4f7;">
-    <uni-notice-bar show-close single text="最多可以上传5份附件简历" />
+    <uni-notice-bar text="温馨提示:最多可以上传5份附件简历。请在手机上打开此小程序进行文件上传,暂不支持在桌面版小程序中上传文件。" />
     <view v-if="bioList.length > 0">
 			<uni-card v-for="(item, index) in bioList" :key="index" :is-shadow="true" :border='false' shadow="0px 0px 3px 1px rgba(0,0,0,0.1)">
 				<view class="d-flex align-center">

+ 9 - 10
pagesB/headhunting/pages/contact.vue

@@ -1,13 +1,13 @@
 <template>
   <view class="pa-3">
-    <uni-forms ref="baseForm" v-model="baseFormData" validateTrigger="bind" :rules="rules" label-width="100px" label-align="right">
-      <uni-forms-item label="姓名" required  >
+    <uni-forms ref="baseFormRef" v-model="baseFormData" validateTrigger="bind" :rules="rules" label-width="100px" label-align="right">
+      <uni-forms-item label="姓名" required  name="name">
         <uni-easyinput v-model="baseFormData.name" placeholder="请输入姓名" />
       </uni-forms-item>
-      <uni-forms-item label="联系手机号" required >
+      <uni-forms-item label="联系手机号" required name="phone">
         <uni-easyinput v-model="baseFormData.phone" placeholder="请输入联系手机号" />
       </uni-forms-item>
-      <uni-forms-item label="企业名称" required>
+      <uni-forms-item label="企业名称" required name="enterpriseName">
         <uni-easyinput v-model="baseFormData.enterpriseName" placeholder="请输入企业名称" />
       </uni-forms-item>
       <button type="primary" @click="submit" :disabled="loading">提交</button>
@@ -18,7 +18,8 @@
 <script setup>
 import { ref, unref } from 'vue'
 import { huntSubmit } from '@/api/common'
-const baseForm = ref()
+
+const baseFormRef = ref()
 const baseFormData = ref({
   name: null,
   phone: null,
@@ -40,12 +41,10 @@ const rules = {
 }
 const loading = ref(false)
 const submit = async () => {
+  const valid = await unref(baseFormRef).validate()
+  if (!valid) return
+  loading.value = true
   try {
-    const valid = await unref(baseForm).validate()
-    if (!valid) return
-
-    loading.value = true
-
     const { code, msg } = await huntSubmit(baseFormData.value)
     if (code !== 0) {
       loading.value = false