2024改成2025
Showing
7 changed files
with
50 additions
and
42 deletions
| ... | @@ -2,7 +2,7 @@ | ... | @@ -2,7 +2,7 @@ |
| 2 | <div> | 2 | <div> |
| 3 | <!-- top --> | 3 | <!-- top --> |
| 4 | <div class="container top"> | 4 | <div class="container top"> |
| 5 | <img :src="fillImgUrl(matchForm.ticketImg)" class="cover_img"/> | 5 | <img :src="fillImgUrl(matchForm.ticketImg)" class="cover_img"> |
| 6 | <div class="info"> | 6 | <div class="info"> |
| 7 | <div class="title">{{ matchForm.name }}</div> | 7 | <div class="title">{{ matchForm.name }}</div> |
| 8 | <div class="time"> | 8 | <div class="time"> |
| ... | @@ -67,8 +67,10 @@ | ... | @@ -67,8 +67,10 @@ |
| 67 | {{ triggerLanguage(language, "票档", "Tickets") }} : | 67 | {{ triggerLanguage(language, "票档", "Tickets") }} : |
| 68 | </div> | 68 | </div> |
| 69 | <div v-if="matchForm.ticketLayout"> | 69 | <div v-if="matchForm.ticketLayout"> |
| 70 | <span style="color: #493ceb;cursor:pointer;font-weight:600;font-size: 14px" | 70 | <span |
| 71 | @click="show=true"> <span style="color: red;font-size: 18px">*</span> | 71 | style="color: #493ceb;cursor:pointer;font-weight:600;font-size: 14px" |
| 72 | @click="show=true" | ||
| 73 | > <span style="color: red;font-size: 18px">*</span> | ||
| 72 | {{ | 74 | {{ |
| 73 | language == 0 ? '点击查看场馆布局' : 'View Venue Layout' | 75 | language == 0 ? '点击查看场馆布局' : 'View Venue Layout' |
| 74 | }} | 76 | }} |
| ... | @@ -141,8 +143,10 @@ | ... | @@ -141,8 +143,10 @@ |
| 141 | </div> | 143 | </div> |
| 142 | </div> | 144 | </div> |
| 143 | 145 | ||
| 144 | <div v-if="endTime<=0" class="btn" style="margin-left: 40px;opacity: 0.5;cursor: not-allowed;margin-top: 10px" | 146 | <div |
| 145 | @click="toSelectClosed"> | 147 | v-if="endTime<=0" class="btn" style="margin-left: 40px;opacity: 0.5;cursor: not-allowed;margin-top: 10px" |
| 148 | @click="toSelectClosed" | ||
| 149 | > | ||
| 146 | {{ | 150 | {{ |
| 147 | triggerLanguage(language, "售票结束", "Sale closed") | 151 | triggerLanguage(language, "售票结束", "Sale closed") |
| 148 | }} | 152 | }} |
| ... | @@ -163,8 +167,8 @@ | ... | @@ -163,8 +167,8 @@ |
| 163 | <div :class="{'bg':active==1}" class="buBg" @click="active=1">购票说明</div> | 167 | <div :class="{'bg':active==1}" class="buBg" @click="active=1">购票说明</div> |
| 164 | <div :class="{'bg' :active==2}" class="buBg" @click="active=2">购票须知</div> | 168 | <div :class="{'bg' :active==2}" class="buBg" @click="active=2">购票须知</div> |
| 165 | </div> | 169 | </div> |
| 166 | <div v-show="active==1" class="rich_content" v-html="matchForm.ticketDes"/> | 170 | <div v-show="active==1" class="rich_content" v-html="matchForm.ticketDes" /> |
| 167 | <div v-show="active==2" class="rich_content" v-html="matchForm.ticketNotice"/> | 171 | <div v-show="active==2" class="rich_content" v-html="matchForm.ticketNotice" /> |
| 168 | 172 | ||
| 169 | <el-dialog v-model="show" title="" width="1000px"> | 173 | <el-dialog v-model="show" title="" width="1000px"> |
| 170 | <div> | 174 | <div> |
| ... | @@ -177,30 +181,30 @@ | ... | @@ -177,30 +181,30 @@ |
| 177 | 181 | ||
| 178 | 182 | ||
| 179 | <script setup> | 183 | <script setup> |
| 180 | import {ref, computed} from "vue"; | 184 | import { ref, computed } from 'vue' |
| 181 | import {listApi, getTicketInfoByActivityId, getTicketListApi, checkNonPayment} from '@/apiPc/booking' | 185 | import { listApi, getTicketInfoByActivityId, getTicketListApi, checkNonPayment } from '@/apiPc/booking' |
| 182 | 186 | ||
| 183 | import {dayjs} from "element-plus"; | 187 | import { dayjs } from 'element-plus' |
| 184 | import {ElMessageBox, ElMessage} from "element-plus"; | 188 | import { ElMessageBox, ElMessage } from 'element-plus' |
| 185 | import {languageFormat, getDayName} from "@/viewsPc/seat/utils/language"; | 189 | import { languageFormat, getDayName } from '@/viewsPc/seat/utils/language' |
| 186 | import {fillImgUrl} from "/@/utils/ruoyi"; | 190 | import { fillImgUrl } from '/@/utils/ruoyi' |
| 187 | import useUserStore from "/@/store/modules/user"; | 191 | import useUserStore from '/@/store/modules/user' |
| 188 | import {triggerLanguage} from '@/utils/ruoyi' | 192 | import { triggerLanguage } from '@/utils/ruoyi' |
| 189 | import {useStorage} from "@vueuse/core/index"; | 193 | import { useStorage } from '@vueuse/core/index' |
| 190 | 194 | ||
| 191 | const language = useStorage('language', 0) | 195 | const language = useStorage('language', 0) |
| 192 | const useStore = useUserStore() | 196 | const useStore = useUserStore() |
| 193 | const user = computed(() => useUserStore().user) | 197 | const user = computed(() => useUserStore().user) |
| 194 | const route = useRoute(); | 198 | const route = useRoute() |
| 195 | const router = useRouter(); | 199 | const router = useRouter() |
| 196 | const show = ref(false) | 200 | const show = ref(false) |
| 197 | const activeId = ref(route.params.activeId) | 201 | const activeId = ref(route.params.activeId) |
| 198 | const flag = ref(false) | 202 | const flag = ref(false) |
| 199 | const active = ref(1) | 203 | const active = ref(1) |
| 200 | const countDown = ref(false) | 204 | const countDown = ref(false) |
| 201 | const props = defineProps({ | 205 | const props = defineProps({ |
| 202 | activityId: [String, Number], | 206 | activityId: [String, Number] |
| 203 | }); | 207 | }) |
| 204 | const timeData = ref() | 208 | const timeData = ref() |
| 205 | const endTime = ref() | 209 | const endTime = ref() |
| 206 | const matchForm = ref({}) | 210 | const matchForm = ref({}) |
| ... | @@ -209,7 +213,7 @@ const selectForm = ref({ | ... | @@ -209,7 +213,7 @@ const selectForm = ref({ |
| 209 | latId: null, | 213 | latId: null, |
| 210 | id: null, | 214 | id: null, |
| 211 | price: '--', | 215 | price: '--', |
| 212 | priceEn: '--', | 216 | priceEn: '--' |
| 213 | }) | 217 | }) |
| 214 | const tickList = ref([]) | 218 | const tickList = ref([]) |
| 215 | 219 | ||
| ... | @@ -217,14 +221,14 @@ const tickList = ref([]) | ... | @@ -217,14 +221,14 @@ const tickList = ref([]) |
| 217 | getDetail() | 221 | getDetail() |
| 218 | 222 | ||
| 219 | async function getDetail() { | 223 | async function getDetail() { |
| 220 | const res = await getTicketInfoByActivityId({activityId: activeId.value}) | 224 | const res = await getTicketInfoByActivityId({ activityId: activeId.value }) |
| 221 | matchForm.value = res.data | 225 | matchForm.value = res.data |
| 222 | console.log(res) | 226 | console.log(res) |
| 223 | const today = dayjs().format('YYYY-MM-DD HH:mm:ss') | 227 | const today = dayjs().format('YYYY-MM-DD HH:mm:ss') |
| 224 | timeData.value = dayjs(res.data.ticketStart).diff(today, 'millisecond') | 228 | timeData.value = dayjs(res.data.ticketStart).diff(today, 'millisecond') |
| 225 | endTime.value = dayjs(res.data.ticketEnd).diff(today, 'millisecond') | 229 | endTime.value = dayjs(res.data.ticketEnd).diff(today, 'millisecond') |
| 226 | // if (timeData.value <= nowData.value) countDown.value = true | 230 | // if (timeData.value <= nowData.value) countDown.value = true |
| 227 | // timeData.value = dayjs('2024-08-10 00:00:00').diff(today, 'millisecond') | 231 | // timeData.value = dayjs('2025-08-10 00:00:00').diff(today, 'millisecond') |
| 228 | } | 232 | } |
| 229 | 233 | ||
| 230 | // 根据赛事ID获取票档 | 234 | // 根据赛事ID获取票档 |
| ... | @@ -243,8 +247,8 @@ async function getTicketList() { | ... | @@ -243,8 +247,8 @@ async function getTicketList() { |
| 243 | 247 | ||
| 244 | // 根据票档获取场次 | 248 | // 根据票档获取场次 |
| 245 | async function getTicketListType() { | 249 | async function getTicketListType() { |
| 246 | let arr = [] | 250 | const arr = [] |
| 247 | const res = await listApi({latId: selectForm.value.latId}) | 251 | const res = await listApi({ latId: selectForm.value.latId }) |
| 248 | tickList.value = res.rows | 252 | tickList.value = res.rows |
| 249 | for (const v of res.rows) { | 253 | for (const v of res.rows) { |
| 250 | if (v.isView == 0) arr.push(v) | 254 | if (v.isView == 0) arr.push(v) |
| ... | @@ -277,8 +281,8 @@ function selectTick(v) { | ... | @@ -277,8 +281,8 @@ function selectTick(v) { |
| 277 | } | 281 | } |
| 278 | 282 | ||
| 279 | function toSelectSeat() { | 283 | function toSelectSeat() { |
| 280 | if (!selectForm.value.latId) return ElMessage.error(language.value == 0 ? "请选择票档" : 'Please select a ticket file') | 284 | if (!selectForm.value.latId) return ElMessage.error(language.value == 0 ? '请选择票档' : 'Please select a ticket file') |
| 281 | if (!selectForm.value.id) return ElMessage.error(language.value == 0 ? "请选择时间" : 'Please select time') | 285 | if (!selectForm.value.id) return ElMessage.error(language.value == 0 ? '请选择时间' : 'Please select time') |
| 282 | if (!user.value) { | 286 | if (!user.value) { |
| 283 | useStore.setVisitor() | 287 | useStore.setVisitor() |
| 284 | return | 288 | return |
| ... | @@ -296,10 +300,7 @@ function toSelectSeat() { | ... | @@ -296,10 +300,7 @@ function toSelectSeat() { |
| 296 | } else { | 300 | } else { |
| 297 | router.push('/center/myReservation') | 301 | router.push('/center/myReservation') |
| 298 | } | 302 | } |
| 299 | |||
| 300 | }) | 303 | }) |
| 301 | |||
| 302 | |||
| 303 | } | 304 | } |
| 304 | 305 | ||
| 305 | function toSelectClosed() { | 306 | function toSelectClosed() { | ... | ... |
| ... | @@ -15,42 +15,48 @@ | ... | @@ -15,42 +15,48 @@ |
| 15 | <div class="esp mt5">{{ n.name }}</div> | 15 | <div class="esp mt5">{{ n.name }}</div> |
| 16 | </li> | 16 | </li> |
| 17 | </ul> | 17 | </ul> |
| 18 | <el-empty v-if="schList.length== 0" | 18 | <el-empty |
| 19 | style="--el-empty-padding:0;--el-empty-description-margin-top:0" | 19 | v-if="schList.length== 0" |
| 20 | :image="`/img/order_no.png`" :image-size="200"/> | 20 | :image="`/img/order_no.png`" |
| 21 | :image-size="200" style="--el-empty-padding:0;--el-empty-description-margin-top:0" | ||
| 22 | /> | ||
| 21 | </div> | 23 | </div> |
| 22 | </div> | 24 | </div> |
| 23 | </template> | 25 | </template> |
| 24 | 26 | ||
| 25 | <script setup> | 27 | <script setup> |
| 26 | import {ref} from "vue"; | 28 | import { ref } from 'vue' |
| 27 | import {dayjs} from "element-plus"; | 29 | import { dayjs } from 'element-plus' |
| 28 | import {getIndexScheduleList} from "@/apiPc/common"; | 30 | import { getIndexScheduleList } from '@/apiPc/common' |
| 29 | import {useRouter} from "vue-router"; | 31 | import { useRouter } from 'vue-router' |
| 32 | |||
| 30 | const router = useRouter() | 33 | const router = useRouter() |
| 31 | const currentDate = ref(new Date()) | 34 | const currentDate = ref(new Date()) |
| 32 | const calendarRange = ref([dayjs('2024-07-17').toDate(), dayjs('2024-07-17').toDate()]) | 35 | const calendarRange = ref([dayjs('2025-07-17').toDate(), dayjs('2025-07-17').toDate()]) |
| 33 | const schList = ref([]) | 36 | const schList = ref([]) |
| 34 | const loading = ref(false) | 37 | const loading = ref(false) |
| 35 | const query = ref({ | 38 | const query = ref({ |
| 36 | // currentDate:dayjs().format('YYYY-MM-DD') | 39 | // currentDate:dayjs().format('YYYY-MM-DD') |
| 37 | currentDate: '2024-07-17' | 40 | currentDate: '2025-07-17' |
| 38 | }) | 41 | }) |
| 39 | getScheduleList() | 42 | getScheduleList() |
| 43 | |||
| 40 | function getScheduleList() { | 44 | function getScheduleList() { |
| 41 | loading.value = true | 45 | loading.value = true |
| 42 | query.value.currentDate = dayjs(query.value.currentDate).format('YYYY-MM-DD') | 46 | query.value.currentDate = dayjs(query.value.currentDate).format('YYYY-MM-DD') |
| 43 | getIndexScheduleList(query.value).then(res=>{ | 47 | getIndexScheduleList(query.value).then(res => { |
| 44 | loading.value = false | 48 | loading.value = false |
| 45 | schList.value = res.data | 49 | schList.value = res.data |
| 46 | }) | 50 | }) |
| 47 | } | 51 | } |
| 52 | |||
| 48 | function selectDate(date) { | 53 | function selectDate(date) { |
| 49 | console.log(dayjs(date).toDate()) | 54 | console.log(dayjs(date).toDate()) |
| 50 | console.log(query.value.currentDate) | 55 | console.log(query.value.currentDate) |
| 51 | query.value.currentDate = dayjs(date).toDate() | 56 | query.value.currentDate = dayjs(date).toDate() |
| 52 | getScheduleList() | 57 | getScheduleList() |
| 53 | } | 58 | } |
| 59 | |||
| 54 | function goMatch(n) { | 60 | function goMatch(n) { |
| 55 | router.push({ | 61 | router.push({ |
| 56 | name: 'matchDetail', | 62 | name: 'matchDetail', |
| ... | @@ -64,7 +70,7 @@ function goMatch(n) { | ... | @@ -64,7 +70,7 @@ function goMatch(n) { |
| 64 | } | 70 | } |
| 65 | </script> | 71 | </script> |
| 66 | 72 | ||
| 67 | <style scoped lang="scss"> | 73 | <style lang="scss" scoped> |
| 68 | .el-calendar { | 74 | .el-calendar { |
| 69 | --el-calendar-border: none; | 75 | --el-calendar-border: none; |
| 70 | --el-calendar-cell-width: 40px; | 76 | --el-calendar-cell-width: 40px; |
| ... | @@ -119,7 +125,8 @@ function goMatch(n) { | ... | @@ -119,7 +125,8 @@ function goMatch(n) { |
| 119 | height: 225px; | 125 | height: 225px; |
| 120 | 126 | ||
| 121 | ul { | 127 | ul { |
| 122 | li {cursor: pointer; | 128 | li { |
| 129 | cursor: pointer; | ||
| 123 | background: #F6F9FE; | 130 | background: #F6F9FE; |
| 124 | margin: 7px 0 7px 20px; | 131 | margin: 7px 0 7px 20px; |
| 125 | position: relative; | 132 | position: relative; | ... | ... |
This diff is collapsed.
Click to expand it.
This diff is collapsed.
Click to expand it.
This diff is collapsed.
Click to expand it.
This diff is collapsed.
Click to expand it.
This diff is collapsed.
Click to expand it.
-
Please register or sign in to post a comment