|
@@ -12,6 +12,9 @@ import {
|
|
|
import { getEntSearchPower } from '@/api/modules'
|
|
|
|
|
|
const {
|
|
|
+ goLogin,
|
|
|
+ isLogin,
|
|
|
+ isInApp,
|
|
|
filterState,
|
|
|
doQuery,
|
|
|
showFilter
|
|
@@ -31,13 +34,40 @@ const searchBidMoreVipSchema = ref([])
|
|
|
|
|
|
const conf = computed(() => {
|
|
|
return {
|
|
|
- vipUser: isVip.value,
|
|
|
- oldUser: isOld.value
|
|
|
+ vipUser: isVip.value && isInApp.value,
|
|
|
+ oldUser: isOld.value && isInApp.value,
|
|
|
+ showVip: isLogin.value && isInApp.value
|
|
|
}
|
|
|
})
|
|
|
|
|
|
+
|
|
|
+// 获取用户信息
|
|
|
+async function getUserPowerInfo () {
|
|
|
+ const { error_code: code, data } = await getEntSearchPower()
|
|
|
+ if (code === 0 && data) {
|
|
|
+ const { entniche, member, vip, isOld: old } = data
|
|
|
+ isVip.value = entniche || member || vip > 0
|
|
|
+ isOld.value = old
|
|
|
+ disposeSchema()
|
|
|
+ }
|
|
|
+}
|
|
|
+if(isLogin.value) {
|
|
|
+ getUserPowerInfo()
|
|
|
+} else {
|
|
|
+ disposeSchema()
|
|
|
+}
|
|
|
+
|
|
|
+function disposeSchema () {
|
|
|
+ SearchBidBaseSchema.value = createSearchBidBaseSchema(conf.value)
|
|
|
+ SearchBidMoreSchema.value = createSearchBidMoreSchema()
|
|
|
+
|
|
|
+ searchBidMoreFreeSchema.value = SearchBidMoreSchema.value?.filter((s) => !s.vipMark)
|
|
|
+ searchBidMoreVipSchema.value = SearchBidMoreSchema.value?.filter((s) => s.vipMark)
|
|
|
+}
|
|
|
+
|
|
|
const customMoreSchema = computed(() => {
|
|
|
return {
|
|
|
+ vipShow: true,
|
|
|
commonConf: {
|
|
|
showLabel: false,
|
|
|
styleType: 'row'
|
|
@@ -52,23 +82,6 @@ const customMoreSchema = computed(() => {
|
|
|
}
|
|
|
}
|
|
|
})
|
|
|
-// 获取用户信息
|
|
|
-async function getUserPowerInfo () {
|
|
|
- const { error_code: code, data } = await getEntSearchPower()
|
|
|
- if (code === 0 && data) {
|
|
|
- const { entniche, member, vip, isOld: old } = data
|
|
|
- isVip.value = entniche || member || vip > 0
|
|
|
- isOld.value = old
|
|
|
-
|
|
|
- SearchBidBaseSchema.value = createSearchBidBaseSchema(conf.value)
|
|
|
- SearchBidMoreSchema.value = createSearchBidMoreSchema()
|
|
|
-
|
|
|
- searchBidMoreFreeSchema.value = SearchBidMoreSchema.value?.filter((s) => !s.vipMark)
|
|
|
- searchBidMoreVipSchema.value = SearchBidMoreSchema.value?.filter((s) => s.vipMark)
|
|
|
- }
|
|
|
-}
|
|
|
-
|
|
|
-getUserPowerInfo()
|
|
|
|
|
|
function noPower() {
|
|
|
$bus.$emit('search:filter:no-power')
|
|
@@ -77,11 +90,19 @@ function noPower() {
|
|
|
function doChangeFilter() {
|
|
|
doQuery()
|
|
|
}
|
|
|
+
|
|
|
</script>
|
|
|
|
|
|
<template>
|
|
|
<el-collapse-transition >
|
|
|
<div class="search-bid-filter" v-show="showFilter">
|
|
|
+ <div class="guide-go-workspace">
|
|
|
+ 最近五年数据查询以及更多筛选条件请
|
|
|
+ <span class="highlight-text">"</span>
|
|
|
+ <span class="cursor-button highlight-text" @click="goLogin">{{ isLogin ? '' : '登录后' }}进入工作台</span>
|
|
|
+ <span class="highlight-text">"</span>
|
|
|
+ 检索
|
|
|
+ </div>
|
|
|
<!-- 标准筛选 -->
|
|
|
<search-schema-filter
|
|
|
v-model="filterState"
|
|
@@ -113,6 +134,7 @@ function doChangeFilter() {
|
|
|
:vipConf="customMoreSchema.vipConf"
|
|
|
v-model="filterState"
|
|
|
vipMask
|
|
|
+ :vipShow="isInApp && isLogin"
|
|
|
@clickMask="noPower"
|
|
|
@change="doChangeFilter"
|
|
|
></SelectorWithBasePower>
|
|
@@ -135,6 +157,7 @@ function doChangeFilter() {
|
|
|
}
|
|
|
}
|
|
|
.search-bid-filter {
|
|
|
+ position: relative;
|
|
|
padding: 16px 32px;
|
|
|
.wrap-line {
|
|
|
::v-deep {
|
|
@@ -143,5 +166,29 @@ function doChangeFilter() {
|
|
|
}
|
|
|
}
|
|
|
}
|
|
|
+ .guide-go-workspace{
|
|
|
+ left: 345px;
|
|
|
+ position: absolute;
|
|
|
+ border-radius: 4px;
|
|
|
+ background: linear-gradient(270deg, rgba(42, 190, 209, 0.24) 1.5%, rgba(42, 190, 209, 0.12) 97.45%);
|
|
|
+ padding: 2px 8px;
|
|
|
+ color: #1D1D1D;
|
|
|
+ font-size: 16px;
|
|
|
+ font-style: normal;
|
|
|
+ font-weight: 400;
|
|
|
+ line-height: 22px;
|
|
|
+
|
|
|
+ .highlight-text{
|
|
|
+ color: #2ABED1;
|
|
|
+ font-weight: 700;
|
|
|
+ font-family: -apple-system, system-ui, BlinkMacSystemFont, Helvetica Neue, PingFang SC, Hiragino Sans GB, Microsoft YaHei, Arial, sans-serif;
|
|
|
+ }
|
|
|
+ .cursor-button{
|
|
|
+ text-decoration-line: underline;
|
|
|
+ background: transparent;
|
|
|
+ padding: 0;
|
|
|
+ cursor: pointer;
|
|
|
+ }
|
|
|
+ }
|
|
|
}
|
|
|
</style>
|