liujie
2026-09-11 4f6f15b818704079ff2e4e4719b798f48d68a335
mingdaojingjiang_uniapp/mingdaojingjiang_uniapp/pages/agreement-detail/index.vue
@@ -23,9 +23,6 @@
import AppNav from '@/components/app-nav/app-nav.vue'
import htmlParser from '@/common/html-parser.js'
import { getMiniAgreementDetail } from '@/services/agreement'
import { isLoggedIn, useLoginGuard } from '@/utils/auth-guard'
useLoginGuard('/pages/agreement-detail/index')
const contentMap = {
  user: {
@@ -77,6 +74,11 @@
  VISITOR_PRIVACY_PERMISSION: 'privacy',
  EXPLANATION_SERVICE_NOTICE: 'guide'
}
const typeCodeMap = {
  user: 'VISITOR_USER_AGREEMENT',
  privacy: 'VISITOR_PRIVACY_PERMISSION',
  guide: 'EXPLANATION_SERVICE_NOTICE'
}
onLoad((options = {}) => {
  if (options.code) {
@@ -85,11 +87,12 @@
  }
  if (options.type && contentMap[options.type]) {
    currentType.value = options.type
    agreementCode.value = typeCodeMap[options.type] || agreementCode.value
  }
})
onShow(() => {
  if (isLoggedIn()) loadAgreement()
  loadAgreement()
})
const agreement = computed(() => remoteAgreement.value || contentMap[currentType.value] || contentMap.user)