소스 검색

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

lifanagju_citu 8 달 전
부모
커밋
8a38d0409f
9개의 변경된 파일182개의 추가작업 그리고 22개의 파일을 삭제
  1. 1 1
      pages.json
  2. 15 6
      pages/index/my.vue
  3. 1 2
      pages/index/position.vue
  4. 42 1
      pagesA/collect/position.vue
  5. 49 8
      pagesA/seenMe/index.vue
  6. 43 2
      static/style/index.css
  7. 0 0
      static/style/index.min.css
  8. 30 1
      static/style/index.scss
  9. 1 1
      utils/request.js

+ 1 - 1
pages.json

@@ -39,7 +39,7 @@
 				{
 				{
 					"path": "resume/index",
 					"path": "resume/index",
 					"style": {
 					"style": {
-						"navigationBarTitleText": "我的简历"
+						"navigationBarTitleText": "附件简历"
 					}
 					}
 				},
 				},
 				{
 				{

+ 15 - 6
pages/index/my.vue

@@ -43,6 +43,7 @@
 import { ref, computed } from 'vue'
 import { ref, computed } from 'vue'
 import { userStore } from '@/store/user'
 import { userStore } from '@/store/user'
 import { getUserAvatar } from '@/utils/avatar'
 import { getUserAvatar } from '@/utils/avatar'
+import { getAccessToken } from '@/utils/request'
 
 
 const useUserStore = userStore()
 const useUserStore = userStore()
 const userInfo = computed(() => useUserStore.userInfo)
 const userInfo = computed(() => useUserStore.userInfo)
@@ -53,18 +54,26 @@ const itemList = [
 ]
 ]
 
 
 const list = [
 const list = [
-	{	title:'我的简历',	path:'/pagesA/resume/index'	},					
+	{	title:'附件简历',	path:'/pagesA/resume/index'	},					
 	{ title:'职位收藏', path:'/pagesA/collect/position' },
 	{ title:'职位收藏', path:'/pagesA/collect/position' },
 	{ title:'切换为招聘者', rightTex: '我要招人' }
 	{ title:'切换为招聘者', rightTex: '我要招人' }
 ]
 ]
 
 
 // 列表跳转
 // 列表跳转
 const handleToLink = (item) => {
 const handleToLink = (item) => {
-  if (item.path) {
-    uni.navigateTo({
-      url: item.path
-    })
-  }
+	if (!item.path) return
+  if (!getAccessToken()) {
+		uni.showToast({
+			title: '请先登录'
+		})
+		uni.navigateTo({
+			url: '/pages/login/index'
+		})
+		return
+	}
+	uni.navigateTo({
+		url: item.path
+	})
 }
 }
 
 
 // 登录
 // 登录

+ 1 - 2
pages/index/position.vue

@@ -43,7 +43,7 @@ const filterList = ref([
 // 
 // 
 const positionListData = ref([])
 const positionListData = ref([])
 const noMore = ref(false)
 const noMore = ref(false)
-const query = reactive({ pageSize: 8, pageNo: 1 })
+const query = reactive({ pageSize: 10, pageNo: 1 })
 //
 //
 const getData = async () => {
 const getData = async () => {
   query.content = searchContent
   query.content = searchContent
@@ -51,7 +51,6 @@ const getData = async () => {
   const list = res?.data?.list || []
   const list = res?.data?.list || []
   if (list?.length) {
   if (list?.length) {
     list.forEach(e => {
     list.forEach(e => {
-      e.active = false
       e.job = { ...e.job, ...dealDictObjData({}, e.job) }
       e.job = { ...e.job, ...dealDictObjData({}, e.job) }
       e.enterprise = { ...e.enterprise, ...dealDictObjData({}, e.enterprise)}
       e.enterprise = { ...e.enterprise, ...dealDictObjData({}, e.enterprise)}
     })
     })

+ 42 - 1
pagesA/collect/position.vue

@@ -1,8 +1,49 @@
 <template>
 <template>
-  <div>position</div>
+  <view class="defaultBgc">
+    <scroll-view class="scrollBox" scroll-y="true" @scrolltolower="loadingMore">
+      <view v-if="items.length">
+        <PositionList class="pb-10" :list="items" :noMore="false"></PositionList>
+        <uni-load-more :status="status" />
+      </view>
+      <view v-else class="nodata-img-parent">
+        <image src="https://minio.citupro.com/dev/static/nodata.png" mode="widthFix" style="width: 100vw;height: 100vh;"></image>
+      </view>
+    </scroll-view>
+  </view>
 </template>
 </template>
 
 
 <script setup>
 <script setup>
+import { ref } from 'vue'
+import { getJobFavoriteList } from '@/api/user'
+import { dealDictObjData } from '@/utils/position'
+import PositionList from '@/components/PositionList'
+
+const status = ref('more')
+const queryParams = ref({
+  pageSize: 10,
+  pageNo: 1
+})
+const items = ref([])
+
+const getList = async () => {
+  const { data } = await getJobFavoriteList(queryParams.value)
+  const list = data?.list || []
+  if (list?.length) {
+    list.forEach(e => {
+      e.job = { ...e.job, ...dealDictObjData({}, e.job) }
+      e.enterprise = { ...e.enterprise, ...dealDictObjData({}, e.enterprise)}
+    })
+    items.value = items.value.concat(list)
+  }
+  status.value = list?.length < queryParams.value.pageSize ? 'noMore' : 'more'
+}
+getList()
+
+const loadingMore = () => {
+  status.value = 'loading'
+  queryParams.value.pageNo++
+  getList()
+}
 </script>
 </script>
 
 
 <style scoped lang="scss">
 <style scoped lang="scss">

+ 49 - 8
pagesA/seenMe/index.vue

@@ -1,12 +1,45 @@
 <template>
 <template>
-  <div>看过我</div>
+  <scroll-view class="scrollBox" scroll-y="true" @scrolltolower="loadingMore">
+    <view v-if="list.length > 0">
+			<uni-card v-for="(item,index) in list" :key="index" :is-shadow="true" :border='false' shadow="0px 0px 3px 1px rgba(0,0,0,0.1)" >
+        <view class="f-horizon">
+          <image class="avatar" :src="item.enterprise.logoUrl || 'https://minio.citupro.com/dev/menduner/company-avatar.png'"></image>
+          <view class="f-straight" style="width:60vw;">
+            <view class="title-des">{{ item.enterprise.name }}</view>
+            <view class="s-word">
+              <span class="dis">
+                <view class="show-more" :style="{'width': item.enterprise.industryName == '' ? '15vw' : '30vw'}">
+                  {{ item.enterprise.industryName ? item.enterprise.industryName : '行业未知' }}
+                </view>
+                <span class="divider ss-m-10"> | </span>
+                <span>{{ item.enterprise.scaleName || '规模未知' }}</span>
+              </span>
+            </view>
+          </view>
+        </view>
+        <view style="border-bottom: 1px dashed #ccc;"></view>
+        <view class="ss-m-t-20 d-flex align-center justify-end">
+          <image class="r-avatar" :src="getUserAvatar(item.contact.avatar, item.contact.sex)"></image>
+          <text class="ss-m-l-20">
+            {{ item.contact.name }} | {{ item.post.nameCn }}
+          </text>
+        </view>
+      </uni-card>
+      <uni-load-more :status="status" />
+		</view>
+		<view v-else class="nodata-img-parent">
+			<image src="https://minio.citupro.com/dev/static/nodata.png" mode="widthFix" style="width: 100vw;height: 100vh;"></image>
+		</view>
+  </scroll-view>
 </template>
 </template>
 
 
 <script setup>
 <script setup>
 import { ref } from 'vue'
 import { ref } from 'vue'
 import { getInterestedMePage } from '@/api/user'
 import { getInterestedMePage } from '@/api/user'
 import { dealDictObjData } from '@/utils/position'
 import { dealDictObjData } from '@/utils/position'
+import { getUserAvatar } from '@/utils/avatar'
 
 
+const status = ref('more')
 const queryParams = ref({
 const queryParams = ref({
   pageNo: 1,
   pageNo: 1,
   pageSize: 10
   pageSize: 10
@@ -15,16 +48,24 @@ const queryParams = ref({
 const list = ref([])
 const list = ref([])
 const getList = async () => {
 const getList = async () => {
   const res = await getInterestedMePage(queryParams.value)
   const res = await getInterestedMePage(queryParams.value)
-  const { data } = res
-  if (!data.list.length) return
-  list.value = data.list.map(e => {
-    e.enterprise = dealDictObjData({}, e.enterprise)
-    e.active = false
-    return e
-  })
+  const arr = res?.data?.list || []
+  if (arr?.length) {
+    arr.forEach(e => {
+      e.enterprise = dealDictObjData({}, e.enterprise)
+    })
+    list.value = list.value.concat(arr)
+  }
+  status.value = arr?.length < queryParams.value.pageSize ? 'noMore' : 'more'
 }
 }
 
 
 getList()
 getList()
+
+// 加载跟多
+const loadingMore = () => { 
+  status.value = 'loading'
+  queryParams.value.pageNo++
+  getList()
+}
 </script>
 </script>
 
 
 <style scoped lang="scss">
 <style scoped lang="scss">

+ 43 - 2
static/style/index.css

@@ -174,7 +174,6 @@
   justify-content: space-between;
   justify-content: space-between;
   align-items: center;
   align-items: center;
   flex-direction: row;
   flex-direction: row;
-  margin: 15rpx;
 }
 }
 
 
 .f-horizon-center {
 .f-horizon-center {
@@ -197,7 +196,7 @@
 }
 }
 
 
 .list-shape {
 .list-shape {
-  padding: 10px 30rpx;
+  padding: 10px 30rpx 10px;
   margin-top: 10px;
   margin-top: 10px;
   background-color: #fff;
   background-color: #fff;
 }
 }
@@ -206,10 +205,22 @@
   margin: 10rpx 10rpx 10rpx 0;
   margin: 10rpx 10rpx 10rpx 0;
 }
 }
 
 
+.tag-gap1 {
+  margin: 10rpx;
+}
+
 .viewider {
 .viewider {
   margin: 0 10rpx;
   margin: 0 10rpx;
 }
 }
 
 
+.mt {
+  margin-top: 10rpx;
+}
+
+.mb {
+  margin-bottom: 10rpx;
+}
+
 .ml {
 .ml {
   margin-left: 20rpx;
   margin-left: 20rpx;
 }
 }
@@ -9105,3 +9116,33 @@
   color: #b3aeae;
   color: #b3aeae;
   font-size: 28rpx;
   font-size: 28rpx;
 }
 }
+
+.r-avatar {
+  width: 40px;
+  height: 40px;
+  border-radius: 50%;
+}
+
+.avatar {
+  width: 80px;
+  height: 80px;
+  border-radius: 50%;
+  margin: auto;
+}
+
+.r-avatar-small {
+  width: 25px;
+  height: 25px;
+  border-radius: 50%;
+  margin: 20rpx;
+}
+
+.title-des {
+  color: #3f424f;
+  font-size: 19px;
+  margin: 10px 0;
+}
+
+.scrollBox {
+  height: 100%;
+}

파일 크기가 너무 크기때문에 변경 상태를 표시하지 않습니다.
+ 0 - 0
static/style/index.min.css


+ 30 - 1
static/style/index.scss

@@ -77,7 +77,7 @@
 	justify-content: space-between;
 	justify-content: space-between;
 	align-items: center;
 	align-items: center;
 	flex-direction: row;
 	flex-direction: row;
-	margin:15rpx;
+	// margin:15rpx;
 }
 }
 // 水平居中
 // 水平居中
 .f-horizon-center{
 .f-horizon-center{
@@ -430,4 +430,33 @@
   background-color: #fff !important;
   background-color: #fff !important;
   color: #b3aeae;
   color: #b3aeae;
   font-size: 28rpx;
   font-size: 28rpx;
+}
+
+// 头像
+.r-avatar {
+	width: 40px;
+	height: 40px;
+	border-radius: 50%;
+	// margin: 25rpx;
+}
+.avatar{
+	width: 80px;
+	height: 80px;
+	border-radius: 50%;
+	margin: auto;
+}
+.r-avatar-small {
+	width: 25px;
+	height: 25px;
+	border-radius: 50%;
+	margin: 20rpx;
+}
+
+.title-des {
+  color: #3f424f;
+  font-size: 19px;
+  margin: 10px 0;
+}
+.scrollBox{
+  height: 100%;
 }
 }

+ 1 - 1
utils/request.js

@@ -296,7 +296,7 @@ const handleAuthorized = () => {
 }
 }
 
 
 /** 获得访问令牌 */
 /** 获得访问令牌 */
-const getAccessToken = () => {
+export const getAccessToken = () => {
   return uni.getStorageSync('token');
   return uni.getStorageSync('token');
 }
 }
 
 

이 변경점에서 너무 많은 파일들이 변경되어 몇몇 파일들은 표시되지 않았습니다.