feat(checkin): 支持活动相关的URL参数传递
- 在 checkin/info 页面添加 activityId 和 discount_title 参数支持 - 在地图标记导航时传递 activityId 和 discount_title 参数 - 修复 discount_title 变量重复声明问题 - 确保 page_details 对象包含完整的 URL 参数 影响文件: - src/views/checkin/info.vue: 在 watch 和 onMounted 中添加参数 - src/views/checkin/map.vue: 在标记点击导航时传递参数 - src/views/checkin/CLAUDE.md: 更新上下文记忆 Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
Showing
3 changed files
with
31 additions
and
7 deletions
| ... | @@ -3,10 +3,13 @@ | ... | @@ -3,10 +3,13 @@ |
| 3 | 3 | ||
| 4 | <!-- This section is auto-generated by claude-mem. Edit content outside the tags. --> | 4 | <!-- This section is auto-generated by claude-mem. Edit content outside the tags. --> |
| 5 | 5 | ||
| 6 | -### Feb 9, 2026 | 6 | +### Feb 10, 2026 |
| 7 | 7 | ||
| 8 | | ID | Time | T | Title | Read | | 8 | | ID | Time | T | Title | Read | |
| 9 | |----|------|---|-------|------| | 9 | |----|------|---|-------|------| |
| 10 | -| #4119 | 2:13 PM | 🔵 | page_details data source identified in checkin info component | ~328 | | 10 | +| #5325 | 11:20 AM | 🔄 | Removed duplicate discountTitle variable declaration in onMounted hook | ~218 | |
| 11 | -| #3978 | 11:52 AM | 🔵 | Code duplication identified in src/views directory structure | ~320 | | 11 | +| #5324 | 11:19 AM | 🔴 | Map marker navigation parameter handling completed for activityId and discount_title | ~322 | |
| 12 | +| #5323 | " | 🔴 | Map marker navigation now properly passes activityId and discount_title parameters | ~305 | | ||
| 13 | +| #5319 | 11:17 AM | 🔴 | Map marker navigation updated with activityId and discount_title parameters | ~313 | | ||
| 14 | +| #5318 | " | 🔴 | Map marker popup navigation updated with new query parameters | ~255 | | ||
| 12 | </claude-mem-context> | 15 | </claude-mem-context> |
| ... | \ No newline at end of file | ... | \ No newline at end of file | ... | ... |
| ... | @@ -162,7 +162,16 @@ watch( | ... | @@ -162,7 +162,16 @@ watch( |
| 162 | async (newInfo) => { | 162 | async (newInfo) => { |
| 163 | if (newInfo && newInfo.details && newInfo.details.length) { | 163 | if (newInfo && newInfo.details && newInfo.details.length) { |
| 164 | // 更新page_details数据 | 164 | // 更新page_details数据 |
| 165 | - page_details.value = { ...newInfo.details[0], position: newInfo.position, path: newInfo.path, current_lng: newInfo.current_lng, current_lat: newInfo.current_lat, openid: newInfo.openid }; | 165 | + page_details.value = { |
| 166 | + ...newInfo.details[0], | ||
| 167 | + position: newInfo.position, | ||
| 168 | + path: newInfo.path, | ||
| 169 | + current_lng: newInfo.current_lng, | ||
| 170 | + current_lat: newInfo.current_lat, | ||
| 171 | + openid: newInfo.openid, | ||
| 172 | + activityId: $route.query.activityId, // 添加 activityId 参数 | ||
| 173 | + discount_title: $route.query.discount_title // 添加 discount_title 参数 | ||
| 174 | + }; | ||
| 166 | 175 | ||
| 167 | // 如果 URL 参数中有 discount_title,更新标签页默认标题 | 176 | // 如果 URL 参数中有 discount_title,更新标签页默认标题 |
| 168 | const discountTitle = $route.query.discount_title; | 177 | const discountTitle = $route.query.discount_title; |
| ... | @@ -256,15 +265,25 @@ onMounted(async () => { | ... | @@ -256,15 +265,25 @@ onMounted(async () => { |
| 256 | const current_lng = $route.query.current_lng; | 265 | const current_lng = $route.query.current_lng; |
| 257 | const current_lat = $route.query.current_lat; | 266 | const current_lat = $route.query.current_lat; |
| 258 | const openid = $route.query.openid; | 267 | const openid = $route.query.openid; |
| 268 | + const activityId = $route.query.activityId; // 获取 activityId 参数 | ||
| 269 | + const discountTitle = $route.query.discount_title; // 获取 discount_title 参数 | ||
| 259 | // | 270 | // |
| 260 | - page_details.value = { ...current_marker.details[0], position: current_marker.position, path: current_marker.path, current_lng: current_lng, current_lat: current_lat, openid: openid }; | 271 | + page_details.value = { |
| 272 | + ...current_marker.details[0], | ||
| 273 | + position: current_marker.position, | ||
| 274 | + path: current_marker.path, | ||
| 275 | + current_lng: current_lng, | ||
| 276 | + current_lat: current_lat, | ||
| 277 | + openid: openid, | ||
| 278 | + activityId: activityId, // 添加 activityId 参数 | ||
| 279 | + discount_title: discountTitle // 添加 discount_title 参数 | ||
| 280 | + }; | ||
| 261 | // 富文本转义, 分割线样式转换 | 281 | // 富文本转义, 分割线样式转换 |
| 262 | page_details.value.introduction = page_details.value.introduction?.replace(/\<hr\>/g, '<div class="van-hairline--bottom" style="margin: 1rem 0;"></div>') | 282 | page_details.value.introduction = page_details.value.introduction?.replace(/\<hr\>/g, '<div class="van-hairline--bottom" style="margin: 1rem 0;"></div>') |
| 263 | page_details.value.story = page_details.value.story?.replace(/\<hr\>/g, '<div class="van-hairline--bottom" style="margin: 1rem 0;"></div>') | 283 | page_details.value.story = page_details.value.story?.replace(/\<hr\>/g, '<div class="van-hairline--bottom" style="margin: 1rem 0;"></div>') |
| 264 | page_details.value.experience = page_details.value.experience?.replace(/\<hr\>/g, '<div class="van-hairline--bottom" style="margin: 1rem 0;"></div>') | 284 | page_details.value.experience = page_details.value.experience?.replace(/\<hr\>/g, '<div class="van-hairline--bottom" style="margin: 1rem 0;"></div>') |
| 265 | 285 | ||
| 266 | // 如果 URL 参数中有 discount_title,更新标签页默认标题 | 286 | // 如果 URL 参数中有 discount_title,更新标签页默认标题 |
| 267 | - const discountTitle = $route.query.discount_title; | ||
| 268 | if (discountTitle) { | 287 | if (discountTitle) { |
| 269 | tab_configs.value = updateDefaultTitleFromURL(discountTitle, tab_configs.value); | 288 | tab_configs.value = updateDefaultTitleFromURL(discountTitle, tab_configs.value); |
| 270 | } | 289 | } | ... | ... |
| 1 | <!-- | 1 | <!-- |
| 2 | * @Date: 2023-05-19 14:54:27 | 2 | * @Date: 2023-05-19 14:54:27 |
| 3 | * @LastEditors: hookehuyr hookehuyr@gmail.com | 3 | * @LastEditors: hookehuyr hookehuyr@gmail.com |
| 4 | - * @LastEditTime: 2025-10-11 10:14:44 | 4 | + * @LastEditTime: 2026-02-10 11:23:01 |
| 5 | * @FilePath: /map-demo/src/views/checkin/map.vue | 5 | * @FilePath: /map-demo/src/views/checkin/map.vue |
| 6 | * @Description: 公众地图主体页面 | 6 | * @Description: 公众地图主体页面 |
| 7 | --> | 7 | --> |
| ... | @@ -1432,6 +1432,8 @@ export default { | ... | @@ -1432,6 +1432,8 @@ export default { |
| 1432 | current_lng: this.itemInfo.current_lng, | 1432 | current_lng: this.itemInfo.current_lng, |
| 1433 | current_lat: this.itemInfo.current_lat, | 1433 | current_lat: this.itemInfo.current_lat, |
| 1434 | openid: this.itemInfo.openid, | 1434 | openid: this.itemInfo.openid, |
| 1435 | + activityId: this.$route.query.activityId, // 添加 activityId 参数 | ||
| 1436 | + discount_title: this.$route.query.discount_title // 添加 discount_title 参数 | ||
| 1435 | } | 1437 | } |
| 1436 | }) | 1438 | }) |
| 1437 | } else { | 1439 | } else { | ... | ... |
-
Please register or login to post a comment