hookehuyr

feat(ScanCheckinDetail): 添加分享页权限校验并重构页面初始化逻辑

提取页面初始化逻辑为独立的 initPage 函数
修复多处代码末尾缺少逗号的格式问题
在页面加载钩子中接入分享页权限校验逻辑
...@@ -55,7 +55,7 @@ import { reactive, computed } from 'vue' ...@@ -55,7 +55,7 @@ import { reactive, computed } from 'vue'
55 import Taro, { useLoad } from '@tarojs/taro' 55 import Taro, { useLoad } from '@tarojs/taro'
56 import './index.less' 56 import './index.less'
57 import RichTextRenderer from '@/components/RichTextRenderer.vue' 57 import RichTextRenderer from '@/components/RichTextRenderer.vue'
58 -import { getCurrentPageFullPath } from '@/utils/authRedirect' 58 +import { getCurrentPageFullPath, handleSharePageAuth } from '@/utils/authRedirect'
59 import { getMyFamiliesAPI } from '@/api/family' 59 import { getMyFamiliesAPI } from '@/api/family'
60 import { getScanStageDetailAPI, submitScanCheckinAPI } from '@/api/map_activity' 60 import { getScanStageDetailAPI, submitScanCheckinAPI } from '@/api/map_activity'
61 import { getUserProfileAPI } from '@/api/user' 61 import { getUserProfileAPI } from '@/api/user'
...@@ -411,7 +411,7 @@ const applyStageDetail = stageDetail => { ...@@ -411,7 +411,7 @@ const applyStageDetail = stageDetail => {
411 }) 411 })
412 } 412 }
413 413
414 -useLoad(options => { 414 +const initPage = options => {
415 const sceneParams = parseScanCheckinSceneParams(options.scene || '') 415 const sceneParams = parseScanCheckinSceneParams(options.scene || '')
416 416
417 detail.activityId = sceneParams.activityId || options.activityId || options.activity_id || '' 417 detail.activityId = sceneParams.activityId || options.activityId || options.activity_id || ''
...@@ -425,6 +425,12 @@ useLoad(options => { ...@@ -425,6 +425,12 @@ useLoad(options => {
425 detail.id = detailId 425 detail.id = detailId
426 426
427 loadStageDetail() 427 loadStageDetail()
428 +}
429 +
430 +useLoad(options => {
431 + handleSharePageAuth(options, () => {
432 + initPage(options)
433 + })
428 }) 434 })
429 435
430 const loadStageDetail = async () => { 436 const loadStageDetail = async () => {
......