Xiao_123 8 달 전
부모
커밋
e9e39933e1
5개의 변경된 파일88개의 추가작업 그리고 50개의 파일을 삭제
  1. 56 28
      components/FilterList/index.vue
  2. 7 7
      pages/index/position.vue
  3. 9 3
      pages/login/index.vue
  4. 4 3
      pagesA/resume/index.vue
  5. 12 9
      store/user.js

+ 56 - 28
components/FilterList/index.vue

@@ -1,18 +1,26 @@
 <template>
   <view class="labelColor itemBox">
-    <view class="item" v-for="item in filterList" :key="item[props.idValue]" @click="handleClick(item)">
-      <view class="">{{ item[labelValue] }}</view>
-       <view class="iconBox"><uni-icons type="icon-arrow-sortdown-smal" custom-prefix="iconfont" color="#999"/></view>
+    <view class="item" v-for="item in filterList" :key="item[props.idValue]">
+      <picker @change="e => handleClick(e, item)" :value="item.selected" :range="item.array">
+        <view>
+          {{ item[labelValue] }}
+          <uni-icons type="icon-arrow-sortdown-smal" custom-prefix="iconfont" color="#999"/>
+        </view>
+      </picker>
+      <!-- <uni-data-picker :localdata="item.array" :popup-title="'请选择' + item[labelValue]" :map="{ text: 'name', value: 'id' }">
+        <view>
+          {{ item[labelValue] }}
+          <uni-icons type="icon-arrow-sortdown-smal" custom-prefix="iconfont" color="#999"/>
+        </view>
+      </uni-data-picker> -->
     </view>
-    <uni-popup ref="popupRef" type="bottom" border-radius="10px 10px 0 0">
-      <view class="popup">
-        <view v-for="val in itemObj?.selectOptions" :key="val[props.selectIdValue]">{{ val[selectLabelValue] }}</view>
-      </view>
-    </uni-popup>
   </view>
 </template>
+
 <script setup>
 import { ref, watch } from 'vue'
+import { getDict } from '@/utils/useDictionaries'
+
 const props = defineProps({
   list: { type: Array, default: () => [] },
   idValue: { type: String, default: 'id' },
@@ -23,28 +31,52 @@ const props = defineProps({
   lazy: { type: Boolean, default: false },
 })
 
-const popupRef = ref()
-let itemObj = {}
-const handleClick = (item) => {
-  itemObj = item
-  popupRef.value.open('bottom')
+const handleClick = (e, item) => {
+  item.selected = e.detail.value
 }
 
-const selectData = {
-  行业: [{ label: '行业' }],
-  城市: [{ label: '城市' }],
-  工作性质: [{ label: '工作性质' }],
-  月薪范围: [{ label: '月薪范围' }],
-  工作经验: [{ label: '工作经验' }],
-}
+// const selectData = {
+//   城市: [{ label: '城市' }],
+//   行业: [{ label: '行业' }],
+//   求职类型: [{ label: '求职类型' }],
+//   薪资待遇: [{ label: '薪资待遇' }],
+//   工作经验: [{ label: '工作经验' }],
+// }
 
+// 获取字典数据
 const getData = (e) => {
-  // api
-  e.selectOptions = selectData[e[props.idValue]] || []
+  getDict(e.dictType).then(({ data }) => {
+    e.source = data.data
+    e.array = data.data.map(e => e.label)
+  })
+  // e.array = [
+  //   {
+  //     id: '110101',
+  //     name: '北京',
+  //     children: [
+  //       { id: '110101', name: '东城区' },
+  //       { id: '110102', name: '西城区' },
+  //       { id: '110105', name: '朝阳区' },
+  //       { id: '110106', name: '丰台区' },
+  //       { id: '110107', name: '石景山区' }
+  //     ]
+  //   },
+  //   {
+  //     id: '120000',
+  //     name: '天津',
+  //     children: [
+  //       { id: '120101', name: '和平区' },
+  //       { id: '120102', name: '河东区' },
+  //       { id: '120103', name: '河西区' },
+  //       { id: '120104', name: '南开区' },
+  //     ]
+  //   }
+  // ]
 }
 
 const setItemSelectData = () => {
   filterList.value.forEach(e => {
+    e.selected = 0
     getData(e)
   })
 }
@@ -55,8 +87,7 @@ watch(() => props.list,
     filterList.value = newVal ? [...newVal] : []
     if (filterList.value.length && !props.lazy) setItemSelectData()
   },
-  { immediate: true },
-  // { deep: true }
+  { immediate: true }
 )
 
 </script>
@@ -72,10 +103,7 @@ watch(() => props.list,
     display: flex;
     align-items: center;
     font-size: 14px;
-    margin: 5px 0;
-    .iconBox {
-      margin: 2px 13px 0 4px;
-    }
+    margin: 0 5px;
   }
 }
 .popup {

+ 7 - 7
pages/index/position.vue

@@ -13,7 +13,7 @@
       </view>
       <view class="white-bgc px-10 pb-10 mb-10">
         <SwiperAd :list="swiperAdList"></SwiperAd>
-        <!-- <FilterList :list="filterList" idValue="label"></FilterList> -->
+        <FilterList :list="filterList" idValue="label" class="ss-m-t-30"></FilterList>
       </view>
       <PositionList class="pb-10" :list="positionListData" :noMore="noMore"></PositionList>
     </scroll-view>
@@ -23,7 +23,7 @@
 <script setup>
 import SwiperAd from '@/components/SwiperAd'
 // import SearchBar from '@/components/SearchBar'
-// import FilterList from '@/components/FilterList'
+import FilterList from '@/components/FilterList'
 import PositionList from '@/components/PositionList'
 import { swiperAdListTest, positionList } from '@/utils/testData'
 import { dealDictObjData } from '@/utils/position'
@@ -34,11 +34,11 @@ import { onPullDownRefresh } from '@dcloudio/uni-app';
 
 const swiperAdList = ref(swiperAdListTest)
 const filterList = ref([
-  { label: '行业' },
-  { label: '城市' },
-  { label: '工作性质' },
-  { label: '月薪范围' },
-  { label: '工作经验' },
+  // { label: '城市', dictType: 'areaTreeData', mode: 'multiSelector' },
+  // { label: '行业', dictType: 'industryTreeData', mode: 'multiSelector' },
+  { label: '求职类型', dictType: 'menduner_job_type' },
+  { label: '薪资待遇', dictType: 'menduner_pay_scope' },
+  { label: '工作经验', dictType: 'menduner_exp_type' },
 ])
 
 // 

+ 9 - 3
pages/login/index.vue

@@ -1,6 +1,6 @@
 <template>
   <view class="ss-p-30 head-box">
-    <view>欢迎来到门墩儿招聘</view>
+    <view class="head-title">欢迎来到门墩儿招聘</view>
     <uni-segmented-control class="ss-m-t-60" :current="current" :values="items" style-type="text" active-color="#00897B" @clickItem="onClickItem" />
     <view class="head-subtitle ss-m-t-10">未注册的手机号,验证后自动注册账号</view>
 
@@ -118,12 +118,18 @@ const handleLogin = async () => {
 .login-code {
   width: 73px;
   min-width: 73px;
-  color: var(--v-primary-base);
+  color: #00897B;
   text-align: center; 
   font-size: 12px; 
   cursor: pointer;
-  border: 1px dashed var(--v-primary-base);
+  border: 1px dashed #00897B;
   border-radius: 26px;
   padding: 0;
 }
+.head-title {
+  font-size: 40rpx;
+  text-align: center;
+  color: #00897B;
+  margin-bottom: 100rpx;
+}
 </style>

+ 4 - 3
pagesA/resume/index.vue

@@ -1,10 +1,11 @@
 <template>
-  <view class="ss-p-b-100">
-    <view v-if="bioList.length > 0">
+  <view class="ss-p-b-100" style="height: 100vh; background-color: #f2f4f7;">
+    <uni-notice-bar show-close single text="最多可以上传5份附件简历" />
+    <view v-if="bioList.length > 0" class="ss-p-t-6">
 			<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">
           <view @click="preview(item.url)"  style="flex: 1;">
-            <view style="font-weight: bold;">{{ item.title }}</view>
+            <view class="font-size-14" style="font-weight: bold;">{{ item.title }}</view>
 				    <view>上传时间:{{ timesTampChange(item.createTime, 'Y-M-D') }}</view>
           </view>
           <view class="ss-m-l-30" style="width: 60rpx;">

+ 12 - 9
store/user.js

@@ -51,15 +51,18 @@ export const userStore = defineStore({
       this.getInfo()
 
       // 登录成功后的跳转地址
-      if (tabUrl.includes(route)) {
-        uni.switchTab({
-          url: '/' + route
-        })
-      } else {
-        uni.navigateTo({
-          url: '/' + route
-        })
-      }
+      // if (tabUrl.includes(route)) {
+      //   uni.switchTab({
+      //     url: '/' + route
+      //   })
+      // } else {
+      //   uni.navigateTo({
+      //     url: '/' + route
+      //   })
+      // }
+      uni.switchTab({
+        url: '/pages/index/position'
+      })
     },
     // 获取用户信息
     async getInfo() {