detail.vue
4.59 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
<template>
<div>
<div class="box">
<el-button class="back-btn" @click="goback()">{{ languageLibrary[language].a }}</el-button>
<el-row class="detail-title">
<el-col :span="4">
<span v-if="projectMainInfo.enrollStatusStr == '未开始'" style="background: #3194FA;border-radius:6px 0 6px 0;padding: 0 4px">{{ languageLibrary[language].g }}</span>
<span v-else-if="projectMainInfo.enrollStatusStr == '进行中'" style="background: #21C9AB;border-radius:6px 0 6px 0;padding: 0 4px">{{ languageLibrary[language].h }}</span>
<span v-else style="background: #929AA0;border-radius:6px 0 6px 0;padding: 0 4px">{{ languageLibrary[language].i }}</span>
</el-col>
<el-col :span="6">
<span style="font-size: 20px;font-weight: bold;margin-bottom: 5px">{{projectMainInfo.name}}</span>
<!-- <div style="display: flex;flex-direction: column;">-->
<!-- <span style="font-size: 20px;font-weight: bold;margin-bottom: 5px">{{projectMainInfo.name}}</span>-->
<!-- <span>{{projectMainInfo.beginTime + '~' + projectMainInfo.endTime}}</span>-->
<!-- </div>-->
</el-col>
<el-col :span="14">
<span>比赛时间: {{projectMainInfo.beginTime + '~' + projectMainInfo.endTime}}</span>
</el-col>
<!-- <el-col style="border-left: 1px solid #929AA0;border-right: 1px solid #929AA0" :span="4">-->
<!-- <div style="display: flex;flex-direction: column;text-align: center">-->
<!-- <span style="font-size: 14px;color: #929AA0;margin-bottom: 5px">{{ languageLibrary[language].b }}</span>-->
<!-- <span style="color: #EEEEEE;font-size: 16px">${{projectMainInfo.serviceFee}}</span>-->
<!-- </div>-->
<!-- </el-col>-->
<!-- <el-col :span="4">-->
<!-- <div style="display: flex;flex-direction: column;text-align: center">-->
<!-- <span style="font-size: 14px;color: #929AA0;margin-bottom: 5px">{{ languageLibrary[language].c }}</span>-->
<!-- <span style="color: #EEEEEE;font-size: 16px">{{projectMainInfo.projectFormat}}</span>-->
<!-- </div>-->
<!-- </el-col>-->
</el-row>
<el-row>
<el-col class="photo-space" :lg="12" v-for="item in photoList">
<div class="photo-img-group">
<img class="photo-img" :src="fillImgUrl(item.path)">
</div>
</el-col>
</el-row>
</div>
</div>
</template>
<script setup>
import { onMounted, onUnmounted, ref, watch } from 'vue'
import { useRoute, useRouter } from 'vue-router'
import {useStorage} from "@vueuse/core";
import {getMain,getImgList} from '@/apiPc/webSite'
const router = useRouter()
const route = useRoute()
const activeName = ref("first")
const language = useStorage('language', 1)
const languageLibrary = ref([{
a:'返回',
b:'总买入费用',
c:'参赛席位',
g:'未开始',
h:'进行中',
i:'已结束',
},{
a:'Return',
b:'Total buy-in fee',
c:'Entry seats',
g:'Not started',
h:'In progress',
i:'Completed',
},{
a:'돌아가기',
b:'총 바이인 금액',
c:'엔트리 수',
g:'시작 전',
h:'진행 중',
i:'완료됨',
},{
a:'戻る',
b:'バイイン総額',
c:'エントリー数',
g:'未開始',
h:'進行中',
i:'完了',
},{
a:'Quay lại',
b:'Tổng phí Buy-in',
c:'Số ghế tham gia',
g:'Chưa bắt đầu',
h:'Đang diễn ra',
i:'Đã hoàn thành',
}])
const tId = ref()
const projectMainInfo = ref({})
const photoList = ref([])
onMounted(() => {
tId.value = route.params.id
getMainInfo()
getPhotoList()
})
const getMainInfo = () => {
getMain(tId.value).then(res => {
if (res.code === 200) {
projectMainInfo.value = res.data
}
})
}
const getPhotoList = () => {
getImgList({cptId:tId.value}).then(res => {
if (res.code === 200) {
photoList.value = res.rows
}
})
}
const goback = function () {
router.go(-1)
}
</script>
<style lang="scss" scoped>
.box {
padding: 0 10%;
}
.back-btn {
font-size: 16px;
color: #fff;
background: url("@/assets/v1/arrow_left.png") no-repeat left;
background-size: auto 35px;
padding-left: 35px;
box-shadow: none;
border: none;
}
.detail-title {
color: #fff;
background: #1F2644;
padding: 40px 30px;
border-radius: 15px;
display: flex;
align-items: center;
.not-start {
display: inline-block;
background: #3194FA;
border-radius:6px 0 6px 0;
padding: 0 4px
}
}
.photo-space {
padding: 10px;
}
.photo-img-group {
padding: 20px;
width: 100%;
position: relative;
}
.photo-img {
width: 100%;
aspect-ratio: 3/2;
cursor: pointer;
}
</style>