Bläddra i källkod

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

lifanagju_citu 4 månader sedan
förälder
incheckning
d02f8d4634

+ 11 - 26
pages/index/position.vue

@@ -93,15 +93,16 @@ const getSystemWebContent = async () => {
   swiperAdList.value = data?.appHomeCarousel || []
   // 是否展示弹窗广告
   showAdvertisePop.value = data && data.appAdvertisement && data.appAdvertisement.length ? true : false
+
+  // 优选集团 
+  preferredGroup.value = data?.appPreferredGroup || {}
 }
 
 const filterList = ref([
   { label: '城市', multiple: true, dictType: 'areaTreeData', key: 'areaIds', map: { text: 'name', value: 'id' } },
-  // { label: '行业', dictType: 'industryTreeData',key: 'industryIds', map: { text: 'nameCn', value: 'id' } },
   { label: '职位', dictType: 'positionTreeData',key: 'positionId', map: { text: 'nameCn', value: 'id' } },
   { label: '求职类型', dictType: 'menduner_job_type', key: 'jobType' },
   { label: '薪资待遇', dictType: 'menduner_pay_scope', key: 'payScope' },
-  // { label: '工作经验', dictType: 'menduner_exp_type', key: 'expType' },
 ])
 
 const gridList = [
@@ -115,18 +116,15 @@ const gridList = [
 // 轮播图链接跳转
 const handleToDetails = ({ link, title }) => {
   if (!link) return
-  // 企业详情
-  if (link.includes('/pagesB/companyDetail/index')) {
-    uni.navigateTo({ url: link })
-  }
-  // 优选集团
-  else if (link.includes('/pagesB/preferredGroup/index')) {
-    console.log(link, 'link')
-    const id = link.split('?id=')[1]
-    if (preferredGroup.value && Object.keys(preferredGroup.value).length > 0 && preferredGroup.value[id]) uni.navigateTo({ url: link })
+
+  // 公众号链接跳转
+  if (link.includes('http')) uni.navigateTo({ url: `/pages/addWebView/index?url=${link}&title=${title || '门墩儿 专注顶尖招聘'}` })
+  else {
+	  // 优选集团
+	  if (preferredGroup.value && Object.keys(preferredGroup.value).length > 0 && preferredGroup.value[link]) uni.navigateTo({ url: `/pagesB/preferredGroup/index?id=${link}` })
+	  // 企业详情
+	  else uni.navigateTo({ url: `/pagesB/companyDetail/index?id=${link}` })
   }
-  // 公众号链接
-  else uni.navigateTo({ url: `/pages/addWebView/index?url=${link}&title=${title || '风尚榜奖投票'}` })
 }
 
 const handleGrid = async (e) => {
@@ -242,19 +240,6 @@ onShow(() => {
   currentTabBar?.setData({ selected: 0 });
   getSystemWebContent()
   getData()
-
-  // 优选集团数据
-  uni.request({
-    url: 'https://minio.menduner.com/dev/8f6f14c642e55254c28098bdbe22c42de33d4673dffd28069c03bf090cf479b9.json',
-    method: 'GET',
-    success: (res) => {
-      // console.log(res.data, 'success-优选集团')
-      preferredGroup.value = res.data
-    },
-    fail: res => {
-      log(res, 'fail')
-    }
-  })
 })
 
 const scrollTop = ref(0)

+ 7 - 22
pagesB/positionDetail/index.vue

@@ -94,9 +94,9 @@
           <uni-icons type="redo-filled" size="24" color="#00897B"/>
           <span style="color:#00897B;font-weight:bold;">分享</span>
         </view>
-        <button class="btnStyle bgButtons" @tap="handleSend">立即沟通</button>
+        <button class="btnStyle bgButtons" type="primary" plain="true" @tap="handleSend">立即沟通</button>
         <button v-if="delivery" :disabled="true" class="buttons btnStyle disable">我已投递</button>
-        <button v-else class="buttons btnStyle" @click="handleDelivery">我要投递</button>
+        <button v-else class="buttons btnStyle" type="primary" @click="handleDelivery">我要投递</button>
       </view>
     </view>
     <uni-popup
@@ -463,8 +463,6 @@ const resumeList = ref([])
 const selectIndex = ref(null)
 
 const handleOpen = async () => {
-  const { data } = await getPersonResumeCv()
-  resumeList.value = data
   // 未上传简历
   if (!resumeList.value?.length) {
     return uploadPopup.value.open()
@@ -495,6 +493,10 @@ const handleDelivery = async () => {
     return
   }
 
+  // 获取附件简历
+  const { data } = await getPersonResumeCv()
+  resumeList.value = data
+
   // 消息订阅
   const { data: templateList } = await getSubscribeTemplateList()
   const tmplIds = templateList.map(e => e.id)
@@ -653,23 +655,6 @@ const handleUpload = () => {
 // 分享
 const loginPopup = ref()
 const handleClickShare = () => {
-  // if (!getAccessToken()) {
-  //   uni.showToast({
-  //     title:'请先登录',
-  //     icon: 'none'
-  //   })
-  //   showAuthModal()
-  //   return
-  // }
-  // if (showNecessaryInfoPopup()) {
-	// 	uni.showToast({
-	// 		title: '请先完善基本信息',
-	// 		icon: 'none'
-	// 	})
-	// 	showAuthModal('necessaryInfo')
-	// 	return
-	// }
-
   // 如果当前职位是赏金职位且没有登录的状态,则弹窗询问是否需要登录;普通职位登录与不登录都可直接分享
   if (!getAccessToken() && info.value.hire) return loginPopup.value.open()
   sharePopup.value.open()
@@ -711,7 +696,7 @@ const handleLoginConfirm = () => {
   .bgButtons {
     border: 2rpx solid #00897b;
     color: #00897b;
-    background: #FFF;
+    // background: #FFF;
     border-radius: 50rpx;
   }
   .shareButtonCss {

+ 14 - 17
pagesB/preferredGroup/index.vue

@@ -1,5 +1,5 @@
 <template>
-	<view class="ss-p-x-20">
+	<view v-if="Object.keys(preferred).length > 0" class="ss-p-x-20">
 		<!-- 轮播图 -->
 		<swiper
       circular
@@ -19,7 +19,7 @@
 			<!-- 标题 -->
 			<uni-title class="ss-m-b-30" type="h1" :title="preferred?.introduce?.title" align="center"></uni-title>
 			<!-- 简介 -->
-			<rich-text v-for="(desc, index) in preferred.introduce.describe" :key="index" class="ss-m-b-30 color-666" :nodes="desc" style="display: block;"></rich-text>
+			<rich-text class="ss-m-b-30 color-666" :nodes="preferred?.introduce?.describe"></rich-text>
 			<!-- 小图 -->
 			<swiper
 				v-if="preferred?.introduce?.thumbnail?.length"
@@ -78,6 +78,7 @@ import { ref } from 'vue'
 import { onLoad, onShareAppMessage } from '@dcloudio/uni-app'
 import { getJobAdvertisedSearch } from '@/api/position'
 import { dealDictObjData } from '@/utils/position'
+import { getWebContent } from '@/api/common'
 import PositionList from '@/components/PositionList'
 
 const title = ref('')
@@ -85,23 +86,19 @@ const enterpriseId = ref(null)
 const preferred = ref({}) // 当前企业信息
 const preferredGroup = ref({}) // 优选集团信息
 
+const getSystemWebContent = async () => {
+  const { data } = await getWebContent()
+  preferredGroup.value = data?.appPreferredGroup || {}
+  if (!enterpriseId.value || !preferredGroup.value[enterpriseId.value]) return uni.navigateBack({ delta: 1 })
+  preferred.value = preferredGroup.value[enterpriseId.value]
+  title.value = preferred.value.title
+  uni.hideLoading()
+}
+
 onLoad(async (options) => {
+	uni.showLoading({ title: '加载中...', mask:true })
 	enterpriseId.value = options.id
-	uni.request({
-	  url: 'https://minio.menduner.com/dev/8f6f14c642e55254c28098bdbe22c42de33d4673dffd28069c03bf090cf479b9.json',
-	  method: 'GET',
-	  success: (res) => {
-			preferredGroup.value = res.data
-			if (!enterpriseId.value || !preferredGroup.value[enterpriseId.value]) return uni.navigateBack({ delta: 1 })
-			preferred.value = preferredGroup.value[enterpriseId.value]
-			title.value = preferred.value.title
-
-			console.log(preferred.value, 'preferred.value')
-	  },
-	  fail: res => {
-	    log(res, 'fail')
-	  }
-	})
+	await getSystemWebContent()
 	await getPositionList()
 })
 

+ 1 - 1
static/style/position/index.scss

@@ -85,7 +85,7 @@
   height: 44px;
   border-radius: 25px;
   margin: 0;
-  color: #fff !important;
+  // color: #fff !important;
   background-color: #00897b !important;
 }
 .disable { background-color: #41a79d !important; color: #ffffec !important;}