hookehuyr

fix: 移除表单默认值和优化功能逻辑

- 移除IDQueryPage、CompleteInfoPage和PosterPage中的默认表单值
- 在PointsPage中添加localStorage缓存清理逻辑
- 优化pointsPage中的余额显示格式
- 调整ActivityHistoryPage中的路由参数和日期排序逻辑
......@@ -199,7 +199,7 @@ const onLoad = async () => {
if (res && res.data) {
if (res.data.balance !== undefined) {
balance.value = res.data.balance
balance.value = res.data.balance ? Number(res.data.balance).toLocaleString() : '0'
}
const newItems = res.data.point_list || []
......
......@@ -123,8 +123,7 @@ const missingInfo = ref('')
// 处理生成海报
const handleGeneratePoster = (item) => {
router.push({ path: '/recall/poster', query: { id: item.id, stu_uid: item.stu_uid, campaign_id: item.campaign_id } })
// showToast('生成海报: ' + item.title)
router.push({ path: '/recall/poster', query: { title: item.title, stu_uid: item.stu_uid, campaign_id: item.campaign_id } })
}
const handleCollectCoins = async () => {
......@@ -160,8 +159,6 @@ const handleSubmitMissing = () => {
return
}
// TODO: Submit to API
showToast({
message: '感谢您为我们找回偏轨的星球活动',
icon: 'success'
......@@ -224,7 +221,9 @@ onMounted(async () => {
count: item.stu_cnt || 0,
date: item.create_time?.substring(0, 10) || '',
total: item.fee_stu * item.stu_cnt || 0
}))
}));
const sortedDates = activities.value.map(item => item.date).sort((a, b) => new Date(a) - new Date(b))
recordDate.value = sortedDates[0]?.substring(0, 4) + '-' + sortedDates[sortedDates.length - 1]?.substring(0, 4) || ''
}
}
}
......
......@@ -88,9 +88,9 @@ useTitle(route.meta.title || '完善信息')
// Form Data
const form = reactive({
name: '张开心', // Mock initial data as per design
phone: '15658666022', // Mock initial data as per design
idCard: '44030619900101001X'
name: '',
phone: '',
idCard: ''
})
// Actions
......
......@@ -115,7 +115,7 @@ useTitle('身份证号查询')
const name = ref('')
const phone = ref('')
const idCard = ref('44030619900101001X')
const idCard = ref('')
// ID Card Validation
const validateIdCard = (id) => {
......
......@@ -143,6 +143,9 @@ const harvestMethods = [
const handleExplore = () => {
// 路由跳转逻辑
router.push('/')
// 收集成功后删除缓存
localStorage.removeItem('cached_user_info')
}
const totalPoints = ref(0);
......
......@@ -56,7 +56,7 @@ const qrCodeUrl = 'https://cdn.ipadbiz.cn/mlaj/recall/poster/%E4%BA%8C%E7%BB%B4%
// State
const posterBg = ref(defaultBg)
const title = ref('2017.7.6-7.11 【自然的恩典】“爱我中华”优秀传统文化夏令营-天津场开启~')
const title = ref('')
/**
* 获取文件哈希(与七牛云ETag一致)
......