privacy_policy.js 1.3 KB

123456789101112131415161718192021222324252627282930313233
  1. "use strict";
  2. const common_vendor = require("../../common/vendor.js");
  3. const api_auth = require("../../api/auth.js");
  4. const _sfc_main = {
  5. __name: "privacy_policy",
  6. setup(__props) {
  7. const privacyContent = common_vendor.ref('<p style="text-align: center; padding: 20px;">内容加载中...</p>');
  8. common_vendor.onMounted(async () => {
  9. try {
  10. const res = await api_auth.getAgreement("privacy");
  11. if (res && res.data) {
  12. privacyContent.value = res.data.content || '<p style="text-align: center; padding: 20px;">暂无相关协议内容</p>';
  13. if (res.data.title) {
  14. common_vendor.index.setNavigationBarTitle({
  15. title: res.data.title
  16. });
  17. }
  18. }
  19. } catch (err) {
  20. common_vendor.index.__f__("error", "at pages/my/privacy_policy.vue:32", "获取隐私政策失败:", err);
  21. privacyContent.value = '<p style="text-align: center; padding: 20px; color: #999;">协议加载失败,请稍后重试</p>';
  22. }
  23. });
  24. return (_ctx, _cache) => {
  25. return {
  26. a: privacyContent.value
  27. };
  28. };
  29. }
  30. };
  31. const MiniProgramPage = /* @__PURE__ */ common_vendor._export_sfc(_sfc_main, [["__scopeId", "data-v-e5797e7d"]]);
  32. wx.createPage(MiniProgramPage);
  33. //# sourceMappingURL=../../../.sourcemap/mp-weixin/pages/my/privacy_policy.js.map