index.js 1.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051
  1. "use strict";
  2. const common_vendor = require("../../../common/vendor.js");
  3. const api_system_agreement = require("../../../api/system/agreement.js");
  4. const ErpNavBar = () => "../../../components/erp-nav-bar.js";
  5. const _sfc_main = {
  6. components: { ErpNavBar },
  7. data() {
  8. return {
  9. statusBarHeight: 20,
  10. title: "",
  11. privacyNodes: ""
  12. };
  13. },
  14. computed: {
  15. scrollHeight() {
  16. return `calc(100vh - ${this.statusBarHeight + 44}px)`;
  17. }
  18. },
  19. async onLoad() {
  20. this.statusBarHeight = common_vendor.index.getSystemInfoSync().statusBarHeight || 20;
  21. try {
  22. const res = await api_system_agreement.getAgreement(2);
  23. this.title = res.data.title;
  24. this.privacyNodes = res.data.content;
  25. } catch (e) {
  26. common_vendor.index.__f__("error", "at pages/mine/privacy/index.vue:37", "[隐私政策] 加载失败", e);
  27. common_vendor.index.showToast({ title: e || "加载隐私政策失败", icon: "none" });
  28. }
  29. },
  30. methods: {
  31. goBack() {
  32. common_vendor.index.navigateBack();
  33. }
  34. }
  35. };
  36. if (!Array) {
  37. const _component_erp_nav_bar = common_vendor.resolveComponent("erp-nav-bar");
  38. _component_erp_nav_bar();
  39. }
  40. function _sfc_render(_ctx, _cache, $props, $setup, $data, $options) {
  41. return {
  42. a: common_vendor.p({
  43. title: $data.title
  44. }),
  45. b: $data.privacyNodes,
  46. c: $options.scrollHeight
  47. };
  48. }
  49. const MiniProgramPage = /* @__PURE__ */ common_vendor._export_sfc(_sfc_main, [["render", _sfc_render], ["__scopeId", "data-v-2b75265c"]]);
  50. wx.createPage(MiniProgramPage);
  51. //# sourceMappingURL=../../../../.sourcemap/mp-weixin/pages/mine/privacy/index.js.map