提交 bdf12d9c authored 作者: 王鹏飞's avatar 王鹏飞

chore: update

上级 9b9c9974
......@@ -7,7 +7,7 @@
"build": "npm run typecheck && vite build --mode prod && npm run deploy",
"build:test": "npm run typecheck && vite build --mode test",
"build:pre": "npm run typecheck && vite build --mode pre",
"preview": "vite preview --port 5050",
"preview": "vite preview --port 4173",
"typecheck": "vue-tsc --noEmit",
"lint": "eslint . --ext .vue,.js,.jsx,.cjs,.mjs,.ts,.tsx,.cts,.mts --fix --ignore-path .gitignore",
"deploy": "node ./deploy.js"
......
......@@ -12,9 +12,15 @@ const props = withDefaults(defineProps<Props>(), {
backgroundColor: 'transparent'
})
const emit = defineEmits(['back'])
const router = useRouter()
function handleBack() {
try {
router.back()
} catch (e) {
router.replace('/')
}
emit('back')
}
const containerPaddingValue = computed(() => {
return props.backgroundColor === 'transparent' ? '0' : '.24rem'
......
......@@ -4,6 +4,8 @@ import { useUserStore } from '@/stores/user'
import type { ExamType } from '../types'
import { Toast } from 'vant'
const router = useRouter()
const userStore = useUserStore()
interface Props {
......@@ -20,6 +22,7 @@ function onSubmit() {
if (res.code === 0) {
emit('update')
emit('update:show', false)
router.push(`/exam/${props.data.exam_id}`)
} else {
Toast.fail(res.message)
}
......
......@@ -18,7 +18,7 @@ const tabActive = $ref<number>(2)
const dataset = reactive<Info>({ address: '', can_choose: true, id_number: '', list: [] })
// 日期转换
function formatDate(startTime: string, endTime: string) {
return dayjs(startTime).format('YYYY年MM月DD日 hh:mm') + '-' + dayjs(endTime).format('hh:mm')
return dayjs(startTime).format('YYYY年MM月DD日 HH:mm') + '-' + dayjs(endTime).format('HH:mm')
}
// 获取列表
const fetchList = () => {
......
......@@ -18,7 +18,7 @@ const props = defineProps<{ id: string }>()
const dataset = reactive<Info>({ address: '', can_choose: true, id_number: '', list: [] })
// 日期转换
function formatDate(time: string) {
return dayjs(time).format('YYYY年MM月DD日 hh:mm:ss')
return dayjs(time).format('YYYY年MM月DD日 HH:mm:ss')
}
// 获取列表
const fetchList = () => {
......
......@@ -19,8 +19,9 @@ onMounted(() => {
const menus = computed<
Array<{
name: string
path: string
path?: string
icon: string
href?: string
}>
>(() => {
return [
......@@ -34,6 +35,11 @@ const menus = computed<
name: '我的团队',
icon: 'https://webapp-pub.ezijing.com/project/prp-h5/my_menu_2.png'
},
{
href: 'https://account-show.ezijing.com/h5/payment',
name: '我的发票',
icon: 'https://webapp-pub.ezijing.com/project/prp-h5/my_menu_7.png'
},
{
path: '/qa',
name: '知识输出者',
......@@ -96,7 +102,11 @@ function onUploadSuccess(url: string) {
<nav class="menus">
<ul>
<li v-for="(item, index) in menus" :key="index">
<router-link :to="item.path">
<a :href="item.href" target="_blank" v-if="item.href">
<img :src="item.icon" />
<p>{{ item.name }}</p>
</a>
<router-link :to="item.path" v-if="item.path">
<img :src="item.icon" />
<p>{{ item.name }}</p>
</router-link>
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论