feat:登录的也是mock接口对接

This commit is contained in:
zoujing committed 2026-09-17 16:24:02 +08:00
1 parent d723eb1232
commit d759d48e79
37 files changed
+1791 -7498

No files matched your search

+9 -7
View File
@@ -3,19 +3,21 @@
* 协议页:?type=privacy | terms
* 合规必备页,「我的」与登录页均可直达。
*/
import { computed, ref } from "vue";
import { ref } from "vue";
import { onLoad, onShareAppMessage } from "@dcloudio/uni-app";
import userApi from "@/api/user";
import { AGREEMENT_DATE } from "@/constant";
import contentApi from "@/api/content";
const type = ref("privacy");
const blocks = ref([]);
const title = computed(() => userApi.getAgreementTitle(type.value));
const title = ref("");
const updatedAt = ref("");
onLoad(async (options) => {
type.value = options?.type === "terms" ? "terms" : "privacy";
blocks.value = (await userApi.getAgreementContent(type.value)) || [];
const res = await contentApi.getAgreement(type.value);
title.value = res.title;
blocks.value = res.blocks || [];
updatedAt.value = res.updatedAt;
});
onShareAppMessage(() => ({
@@ -36,7 +38,7 @@ onShareAppMessage(() => ({
<view class="h-[46px]" />
<view class="px-5 pt-[18px] pb-10">
<view class="text-[11.5px] text-ink3 mb-[18px]">更新日期:{{ AGREEMENT_DATE }}</view>
<view class="text-[11.5px] text-ink3 mb-[18px]">更新日期:{{ updatedAt }}</view>
<view class="text-[19px] font-semibold mb-[6px] text-ink">{{ title }}</view>
<template v-for="(block, i) in blocks" :key="i">