111
This commit is contained in:
@@ -100,7 +100,7 @@
|
|||||||
></map>
|
></map>
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
<view class="content-card" v-if="!userInfo.isCompanyUser">
|
<view class="content-card" v-if="currentUserType !== 0">
|
||||||
<view class="card-title">
|
<view class="card-title">
|
||||||
<text class="title">竞争力分析</text>
|
<text class="title">竞争力分析</text>
|
||||||
</view>
|
</view>
|
||||||
@@ -193,6 +193,12 @@ import RadarMap from './component/radarMap.vue';
|
|||||||
import { storeToRefs } from 'pinia';
|
import { storeToRefs } from 'pinia';
|
||||||
import useUserStore from '@/stores/useUserStore';
|
import useUserStore from '@/stores/useUserStore';
|
||||||
const { userInfo } = storeToRefs(useUserStore());
|
const { userInfo } = storeToRefs(useUserStore());
|
||||||
|
// 与首页一致的用户类型获取:优先store,兜底缓存
|
||||||
|
const currentUserType = computed(() => {
|
||||||
|
const storeIsCompanyUser = userInfo.value?.isCompanyUser;
|
||||||
|
const cachedIsCompanyUser = (uni.getStorageSync('userInfo') || {}).isCompanyUser;
|
||||||
|
return Number(storeIsCompanyUser !== undefined ? storeIsCompanyUser : cachedIsCompanyUser);
|
||||||
|
});
|
||||||
const { $api, navTo, getLenPx, parseQueryParams, navBack, isEmptyObject } = inject('globalFunction');
|
const { $api, navTo, getLenPx, parseQueryParams, navBack, isEmptyObject } = inject('globalFunction');
|
||||||
import config from '@/config.js';
|
import config from '@/config.js';
|
||||||
const matchingDegree = ref(['一般', '良好', '优秀', '极好']);
|
const matchingDegree = ref(['一般', '良好', '优秀', '极好']);
|
||||||
@@ -265,11 +271,11 @@ function seeExplain() {
|
|||||||
function getDetail(jobId) {
|
function getDetail(jobId) {
|
||||||
return new Promise((reslove, reject) => {
|
return new Promise((reslove, reject) => {
|
||||||
$api.createRequest(`/app/job/${jobId}`).then((resData) => {
|
$api.createRequest(`/app/job/${jobId}`).then((resData) => {
|
||||||
const { latitude, longitude, companyName, companyId, isCompanyUser } = resData.data;
|
const { latitude, longitude, companyName, companyId } = resData.data;
|
||||||
jobInfo.value = resData.data;
|
jobInfo.value = resData.data;
|
||||||
reslove(resData.data);
|
reslove(resData.data);
|
||||||
getCompanyIsAJobs(companyId);
|
getCompanyIsAJobs(companyId);
|
||||||
if (isCompanyUser) {
|
if (currentUserType.value !== 0) {
|
||||||
getCompetivetuveness(jobId);
|
getCompetivetuveness(jobId);
|
||||||
}
|
}
|
||||||
// getCompetivetuveness(jobId);
|
// getCompetivetuveness(jobId);
|
||||||
|
|||||||
Reference in New Issue
Block a user