6692d073 by zhangmeng

2024改成2025

1 parent b1908dcf
......@@ -2,7 +2,7 @@
<div>
<!-- top -->
<div class="container top">
<img :src="fillImgUrl(matchForm.ticketImg)" class="cover_img"/>
<img :src="fillImgUrl(matchForm.ticketImg)" class="cover_img">
<div class="info">
<div class="title">{{ matchForm.name }}</div>
<div class="time">
......@@ -67,8 +67,10 @@
{{ triggerLanguage(language, "票档", "Tickets") }} :
</div>
<div v-if="matchForm.ticketLayout">
<span style="color: #493ceb;cursor:pointer;font-weight:600;font-size: 14px"
@click="show=true"> <span style="color: red;font-size: 18px">*</span>
<span
style="color: #493ceb;cursor:pointer;font-weight:600;font-size: 14px"
@click="show=true"
> <span style="color: red;font-size: 18px">*</span>
{{
language == 0 ? '点击查看场馆布局' : 'View Venue Layout'
}}
......@@ -141,8 +143,10 @@
</div>
</div>
<div v-if="endTime<=0" class="btn" style="margin-left: 40px;opacity: 0.5;cursor: not-allowed;margin-top: 10px"
@click="toSelectClosed">
<div
v-if="endTime<=0" class="btn" style="margin-left: 40px;opacity: 0.5;cursor: not-allowed;margin-top: 10px"
@click="toSelectClosed"
>
{{
triggerLanguage(language, "售票结束", "Sale closed")
}}
......@@ -163,8 +167,8 @@
<div :class="{'bg':active==1}" class="buBg" @click="active=1">购票说明</div>
<div :class="{'bg' :active==2}" class="buBg" @click="active=2">购票须知</div>
</div>
<div v-show="active==1" class="rich_content" v-html="matchForm.ticketDes"/>
<div v-show="active==2" class="rich_content" v-html="matchForm.ticketNotice"/>
<div v-show="active==1" class="rich_content" v-html="matchForm.ticketDes" />
<div v-show="active==2" class="rich_content" v-html="matchForm.ticketNotice" />
<el-dialog v-model="show" title="" width="1000px">
<div>
......@@ -177,30 +181,30 @@
<script setup>
import {ref, computed} from "vue";
import {listApi, getTicketInfoByActivityId, getTicketListApi, checkNonPayment} from '@/apiPc/booking'
import { ref, computed } from 'vue'
import { listApi, getTicketInfoByActivityId, getTicketListApi, checkNonPayment } from '@/apiPc/booking'
import {dayjs} from "element-plus";
import {ElMessageBox, ElMessage} from "element-plus";
import {languageFormat, getDayName} from "@/viewsPc/seat/utils/language";
import {fillImgUrl} from "/@/utils/ruoyi";
import useUserStore from "/@/store/modules/user";
import {triggerLanguage} from '@/utils/ruoyi'
import {useStorage} from "@vueuse/core/index";
import { dayjs } from 'element-plus'
import { ElMessageBox, ElMessage } from 'element-plus'
import { languageFormat, getDayName } from '@/viewsPc/seat/utils/language'
import { fillImgUrl } from '/@/utils/ruoyi'
import useUserStore from '/@/store/modules/user'
import { triggerLanguage } from '@/utils/ruoyi'
import { useStorage } from '@vueuse/core/index'
const language = useStorage('language', 0)
const useStore = useUserStore()
const user = computed(() => useUserStore().user)
const route = useRoute();
const router = useRouter();
const route = useRoute()
const router = useRouter()
const show = ref(false)
const activeId = ref(route.params.activeId)
const flag = ref(false)
const active = ref(1)
const countDown = ref(false)
const props = defineProps({
activityId: [String, Number],
});
activityId: [String, Number]
})
const timeData = ref()
const endTime = ref()
const matchForm = ref({})
......@@ -209,7 +213,7 @@ const selectForm = ref({
latId: null,
id: null,
price: '--',
priceEn: '--',
priceEn: '--'
})
const tickList = ref([])
......@@ -217,14 +221,14 @@ const tickList = ref([])
getDetail()
async function getDetail() {
const res = await getTicketInfoByActivityId({activityId: activeId.value})
const res = await getTicketInfoByActivityId({ activityId: activeId.value })
matchForm.value = res.data
console.log(res)
const today = dayjs().format('YYYY-MM-DD HH:mm:ss')
timeData.value = dayjs(res.data.ticketStart).diff(today, 'millisecond')
endTime.value = dayjs(res.data.ticketEnd).diff(today, 'millisecond')
// if (timeData.value <= nowData.value) countDown.value = true
// timeData.value = dayjs('2024-08-10 00:00:00').diff(today, 'millisecond')
// timeData.value = dayjs('2025-08-10 00:00:00').diff(today, 'millisecond')
}
// 根据赛事ID获取票档
......@@ -243,8 +247,8 @@ async function getTicketList() {
// 根据票档获取场次
async function getTicketListType() {
let arr = []
const res = await listApi({latId: selectForm.value.latId})
const arr = []
const res = await listApi({ latId: selectForm.value.latId })
tickList.value = res.rows
for (const v of res.rows) {
if (v.isView == 0) arr.push(v)
......@@ -277,8 +281,8 @@ function selectTick(v) {
}
function toSelectSeat() {
if (!selectForm.value.latId) return ElMessage.error(language.value == 0 ? "请选择票档" : 'Please select a ticket file')
if (!selectForm.value.id) return ElMessage.error(language.value == 0 ? "请选择时间" : 'Please select time')
if (!selectForm.value.latId) return ElMessage.error(language.value == 0 ? '请选择票档' : 'Please select a ticket file')
if (!selectForm.value.id) return ElMessage.error(language.value == 0 ? '请选择时间' : 'Please select time')
if (!user.value) {
useStore.setVisitor()
return
......@@ -296,10 +300,7 @@ function toSelectSeat() {
} else {
router.push('/center/myReservation')
}
})
}
function toSelectClosed() {
......
......@@ -15,42 +15,48 @@
<div class="esp mt5">{{ n.name }}</div>
</li>
</ul>
<el-empty v-if="schList.length== 0"
style="--el-empty-padding:0;--el-empty-description-margin-top:0"
:image="`/img/order_no.png`" :image-size="200"/>
<el-empty
v-if="schList.length== 0"
:image="`/img/order_no.png`"
:image-size="200" style="--el-empty-padding:0;--el-empty-description-margin-top:0"
/>
</div>
</div>
</template>
<script setup>
import {ref} from "vue";
import {dayjs} from "element-plus";
import {getIndexScheduleList} from "@/apiPc/common";
import {useRouter} from "vue-router";
import { ref } from 'vue'
import { dayjs } from 'element-plus'
import { getIndexScheduleList } from '@/apiPc/common'
import { useRouter } from 'vue-router'
const router = useRouter()
const currentDate = ref(new Date())
const calendarRange = ref([dayjs('2024-07-17').toDate(), dayjs('2024-07-17').toDate()])
const calendarRange = ref([dayjs('2025-07-17').toDate(), dayjs('2025-07-17').toDate()])
const schList = ref([])
const loading = ref(false)
const query = ref({
// currentDate:dayjs().format('YYYY-MM-DD')
currentDate: '2024-07-17'
currentDate: '2025-07-17'
})
getScheduleList()
function getScheduleList() {
loading.value = true
query.value.currentDate = dayjs(query.value.currentDate).format('YYYY-MM-DD')
getIndexScheduleList(query.value).then(res=>{
getIndexScheduleList(query.value).then(res => {
loading.value = false
schList.value = res.data
})
}
function selectDate(date) {
console.log(dayjs(date).toDate())
console.log(query.value.currentDate)
query.value.currentDate = dayjs(date).toDate()
getScheduleList()
}
function goMatch(n) {
router.push({
name: 'matchDetail',
......@@ -64,7 +70,7 @@ function goMatch(n) {
}
</script>
<style scoped lang="scss">
<style lang="scss" scoped>
.el-calendar {
--el-calendar-border: none;
--el-calendar-cell-width: 40px;
......@@ -119,7 +125,8 @@ function goMatch(n) {
height: 225px;
ul {
li {cursor: pointer;
li {
cursor: pointer;
background: #F6F9FE;
margin: 7px 0 7px 20px;
position: relative;
......
Styling with Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!