index.js 1.5 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950
  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. agreementNodes: ""
  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(1);
  23. this.title = res.data.title;
  24. this.agreementNodes = res.data.content;
  25. } catch (e) {
  26. common_vendor.index.__f__("error", "at pages/mine/agreement/index.vue:37", "[用户协议] 加载失败", e);
  27. }
  28. },
  29. methods: {
  30. goBack() {
  31. common_vendor.index.navigateBack();
  32. }
  33. }
  34. };
  35. if (!Array) {
  36. const _component_erp_nav_bar = common_vendor.resolveComponent("erp-nav-bar");
  37. _component_erp_nav_bar();
  38. }
  39. function _sfc_render(_ctx, _cache, $props, $setup, $data, $options) {
  40. return {
  41. a: common_vendor.p({
  42. title: $data.title
  43. }),
  44. b: $data.agreementNodes,
  45. c: $options.scrollHeight
  46. };
  47. }
  48. const MiniProgramPage = /* @__PURE__ */ common_vendor._export_sfc(_sfc_main, [["render", _sfc_render], ["__scopeId", "data-v-0b7e99d3"]]);
  49. wx.createPage(MiniProgramPage);
  50. //# sourceMappingURL=../../../../.sourcemap/mp-weixin/pages/mine/agreement/index.js.map