|
@@ -8,7 +8,17 @@
|
|
<el-icon color="#0085f5"><Location /></el-icon>
|
|
<el-icon color="#0085f5"><Location /></el-icon>
|
|
<span>{{ getArea(info.area) }}</span>
|
|
<span>{{ getArea(info.area) }}</span>
|
|
</div>
|
|
</div>
|
|
- <div class="name">{{ info.name || '暂无' }}</div>
|
|
|
|
|
|
+ <div class="info_title">
|
|
|
|
+ <div class="name">{{ info.name || '暂无' }}</div>
|
|
|
|
+ <div class="collect iscollect" @click="toCollect" v-if="info.is_collection">
|
|
|
|
+ <el-icon :size="24" color="#1073ff"><StarFilled /></el-icon>
|
|
|
|
+ <span>已收藏</span>
|
|
|
|
+ </div>
|
|
|
|
+ <div class="collect" v-else @click="toCollect">
|
|
|
|
+ <el-icon :size="24"><Star /></el-icon>
|
|
|
|
+ <span>收藏</span>
|
|
|
|
+ </div>
|
|
|
|
+ </div>
|
|
<div class="other">
|
|
<div class="other">
|
|
<span class="other_1">{{ getDict(info.urgent, 'urgent') || '暂无' }}</span>
|
|
<span class="other_1">{{ getDict(info.urgent, 'urgent') || '暂无' }}</span>
|
|
<div class="other_2">
|
|
<div class="other_2">
|
|
@@ -76,6 +86,9 @@ import { DictDataStore } from '@/store/api/system/dictData'
|
|
import { DemandStore } from '@/store/api/platform/demand'
|
|
import { DemandStore } from '@/store/api/platform/demand'
|
|
const store = DemandStore()
|
|
const store = DemandStore()
|
|
const dictDataStore = DictDataStore()
|
|
const dictDataStore = DictDataStore()
|
|
|
|
+import { UserStore } from '@/store/user'
|
|
|
|
+const userStore = UserStore()
|
|
|
|
+const user = computed(() => userStore.user)
|
|
const $checkRes = inject('$checkRes')
|
|
const $checkRes = inject('$checkRes')
|
|
// 加载中
|
|
// 加载中
|
|
const loading = ref(false)
|
|
const loading = ref(false)
|
|
@@ -171,6 +184,11 @@ const toView = (item) => {
|
|
location.reload()
|
|
location.reload()
|
|
})
|
|
})
|
|
}
|
|
}
|
|
|
|
+const toCollect = async () => {
|
|
|
|
+ if (user.value.id) {
|
|
|
|
+ info.value.is_collection = !info.value.is_collection
|
|
|
|
+ } else ElMessage({ message: '未登录!', type: 'error' })
|
|
|
|
+}
|
|
</script>
|
|
</script>
|
|
<style scoped lang="scss">
|
|
<style scoped lang="scss">
|
|
.main {
|
|
.main {
|
|
@@ -183,7 +201,7 @@ const toView = (item) => {
|
|
}
|
|
}
|
|
.info_2 {
|
|
.info_2 {
|
|
position: relative;
|
|
position: relative;
|
|
- padding: 0 20px 0 50px;
|
|
|
|
|
|
+ padding: 0 40px;
|
|
background-color: #fff;
|
|
background-color: #fff;
|
|
box-shadow: 0 0 13px 0 rgba(5, 88, 219, 0.18);
|
|
box-shadow: 0 0 13px 0 rgba(5, 88, 219, 0.18);
|
|
.area {
|
|
.area {
|
|
@@ -191,18 +209,39 @@ const toView = (item) => {
|
|
align-items: center;
|
|
align-items: center;
|
|
justify-content: flex-end;
|
|
justify-content: flex-end;
|
|
padding-top: 15px;
|
|
padding-top: 15px;
|
|
- margin-right: 20px;
|
|
|
|
font-size: $global-font-size-16;
|
|
font-size: $global-font-size-16;
|
|
span {
|
|
span {
|
|
margin: 0 0 0 5px;
|
|
margin: 0 0 0 5px;
|
|
}
|
|
}
|
|
}
|
|
}
|
|
- .name {
|
|
|
|
- margin-top: 15px;
|
|
|
|
- font-size: $global-font-size-24;
|
|
|
|
- line-height: 36px;
|
|
|
|
- color: #2b2b2b;
|
|
|
|
|
|
+ .info_title {
|
|
|
|
+ display: flex;
|
|
|
|
+ justify-content: space-between;
|
|
|
|
+ align-items: center;
|
|
|
|
+ .name {
|
|
|
|
+ margin-top: 15px;
|
|
|
|
+ font-size: $global-font-size-24;
|
|
|
|
+ width: 90%;
|
|
|
|
+ line-height: 36px;
|
|
|
|
+ color: #2b2b2b;
|
|
|
|
+ }
|
|
|
|
+ .collect {
|
|
|
|
+ display: flex;
|
|
|
|
+ align-items: center;
|
|
|
|
+ justify-content: flex-end;
|
|
|
|
+ width: 50%;
|
|
|
|
+ font-size: $global-font-size-20;
|
|
|
|
+ color: #929292;
|
|
|
|
+ cursor: default;
|
|
|
|
+ span {
|
|
|
|
+ margin: 0 0 0 5px;
|
|
|
|
+ }
|
|
|
|
+ }
|
|
|
|
+ .iscollect {
|
|
|
|
+ color: #1073ff;
|
|
|
|
+ }
|
|
}
|
|
}
|
|
|
|
+
|
|
.other {
|
|
.other {
|
|
margin-top: 25px;
|
|
margin-top: 25px;
|
|
.other_1 {
|
|
.other_1 {
|
|
@@ -264,7 +303,7 @@ const toView = (item) => {
|
|
}
|
|
}
|
|
.info_3 {
|
|
.info_3 {
|
|
margin-top: 20px;
|
|
margin-top: 20px;
|
|
- padding: 50px;
|
|
|
|
|
|
+ padding: 40px;
|
|
background-color: #fff;
|
|
background-color: #fff;
|
|
border: solid 1px #dedede;
|
|
border: solid 1px #dedede;
|
|
font-size: $global-font-size-16;
|
|
font-size: $global-font-size-16;
|