|
@@ -17,6 +17,9 @@
|
|
|
const $checkRes = inject('$checkRes')
|
|
|
import { cloneDeep, get } from 'lodash-es'
|
|
|
const route = useRoute()
|
|
|
+import { UserStore } from '@/store/user'
|
|
|
+const userStore = UserStore()
|
|
|
+const user = computed(() => userStore.user)
|
|
|
// 接口
|
|
|
import { AchievementStore } from '@/store/api/platform/achievement'
|
|
|
import { DemandStore } from '@/store/api/platform/demand'
|
|
@@ -57,7 +60,6 @@ onMounted(async () => {
|
|
|
await searchField()
|
|
|
loading.value = false
|
|
|
})
|
|
|
-
|
|
|
const searchField = async () => {
|
|
|
routeType.value = route.query.type
|
|
|
if (routeType.value == 'achievement') {
|
|
@@ -94,9 +96,8 @@ const searchField = async () => {
|
|
|
const search = async (query = { skip: 0, limit }) => {
|
|
|
const info = {
|
|
|
skip: query.skip,
|
|
|
- limit: query.limit,
|
|
|
- is_use: '0',
|
|
|
- status: '1'
|
|
|
+ limit: query.limit
|
|
|
+ // user: user.value._id
|
|
|
}
|
|
|
let res
|
|
|
if (routeType.value == 'achievement') res = await achieveStore.query(info)
|
|
@@ -139,10 +140,12 @@ const getDict = (data, model) => {
|
|
|
// 地区显示
|
|
|
const getArea = (data) => {
|
|
|
if (data) return data.join(',')
|
|
|
+ else return '暂无'
|
|
|
}
|
|
|
// 时间
|
|
|
const getTime = (data) => {
|
|
|
if (data) return `${data[0]} - ${data[1]}`
|
|
|
+ else return '暂无'
|
|
|
}
|
|
|
const toCommon = (data) => {
|
|
|
type.value = data
|
|
@@ -168,6 +171,7 @@ watch(
|
|
|
route,
|
|
|
(newVal) => {
|
|
|
if (newVal) {
|
|
|
+ list.value = []
|
|
|
searchField()
|
|
|
}
|
|
|
},
|
|
@@ -196,7 +200,7 @@ provide('changePage', changePage)
|
|
|
<style scoped lang="scss">
|
|
|
.main {
|
|
|
background-color: #f1f2f5;
|
|
|
- padding: 20px;
|
|
|
+ padding: 10px;
|
|
|
min-height: 77vh;
|
|
|
}
|
|
|
</style>
|