index-C_9nX2uk.js 4.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101
  1. import { defineComponent, ref, reactive, resolveComponent, resolveDirective, mergeProps, useSSRContext } from "vue";
  2. import { useStore } from "vuex";
  3. import { _ as _sfc_main$1 } from "./banner-Bjm1R_JU.js";
  4. import { ssrRenderAttrs, ssrRenderComponent, ssrRenderList, ssrRenderStyle, ssrRenderAttr, ssrInterpolate, ssrGetDirectiveProps } from "vue/server-renderer";
  5. import { _ as _export_sfc } from "../entry-server.js";
  6. import "vue-router";
  7. import "element-plus";
  8. import "axios";
  9. import "vue3-lazy";
  10. const _sfc_main = defineComponent({
  11. setup() {
  12. const store = useStore();
  13. const requestParams = ref({});
  14. let paramsData = reactive({});
  15. let oldCategoryId = ref();
  16. function facilityClick(item) {
  17. if (item.id != oldCategoryId.value) {
  18. requestParams.value = item;
  19. paramsData = {
  20. params: {
  21. categoryid: item.id,
  22. pageNum: 1,
  23. pageSize: 10,
  24. order: "sortindex"
  25. },
  26. index: store.state.currentPagePath,
  27. sub: store.state.sub
  28. };
  29. oldCategoryId.value = item.id;
  30. store.dispatch("getPageData", paramsData).then(() => {
  31. store.commit("setColumnTypes", store.state.pageContent);
  32. });
  33. }
  34. }
  35. return { store, facilityClick };
  36. },
  37. components: {
  38. banner: _sfc_main$1
  39. },
  40. asyncData({ store, route }) {
  41. let params = reactive(route.value);
  42. return store.dispatch("getMenuList").then(() => {
  43. const data = store.state.menuList;
  44. let paramsData = reactive({});
  45. for (let i = 0; i < data.length; i++) {
  46. if (!data[i].sname && params.path == data[i].path) {
  47. paramsData = {
  48. params: {
  49. categoryid: data[i].id,
  50. pageNum: 1,
  51. pageSize: 100,
  52. order: "sortindex"
  53. },
  54. index: params.path,
  55. sub: i
  56. };
  57. return store.dispatch("getPageData", paramsData).then(() => {
  58. store.commit("setColumnTypes", store.state.pageContent);
  59. });
  60. }
  61. }
  62. });
  63. }
  64. });
  65. function _sfc_ssrRender(_ctx, _push, _parent, _attrs, $props, $setup, $data, $options) {
  66. const _component_banner = resolveComponent("banner");
  67. const _directive_lazy = resolveDirective("lazy");
  68. _push(`<div${ssrRenderAttrs(mergeProps({ class: "pageContain" }, _attrs))}><div class="common-bradcrumb-section">`);
  69. _push(ssrRenderComponent(_component_banner, null, null, _parent));
  70. _push(`</div><!--[-->`);
  71. ssrRenderList(_ctx.store.state.columnTypes, (arr, index2) => {
  72. _push(`<section class="about-introduce-section course-section pt-40 pb-60 about-sec" style="${ssrRenderStyle({ background: index2 % 2 == 1 ? "#F4F8FD" : "#fff" })}"><div${ssrRenderAttr("id", arr.id)} class="pointOffset">0</div><div class="container"><div class="row"><div class="col-md-2 col-sm-12 text-center">`);
  73. if (index2 == 0) {
  74. _push(`<ul class="aboutTyes"><!--[-->`);
  75. ssrRenderList(_ctx.store.state.columnTypes, (item, i) => {
  76. _push(`<li><a${ssrRenderAttr("href", `#${item.id}`)}>${ssrInterpolate(item.title)}</a></li>`);
  77. });
  78. _push(`<!--]--></ul>`);
  79. } else {
  80. _push(`<!---->`);
  81. }
  82. _push(`</div><div class="col-md-10 col-sm-12"><div class="section-title text-center both-border pb-20"><span class="title-tag">${ssrInterpolate(arr.title)}</span></div>`);
  83. if (arr.image) {
  84. _push(`<div class="row aboutOnlyText text-left" style="${ssrRenderStyle([{ padding: index2 % 2 == 1 ? "40px 25px" : " 40px 25px" }, { "background-color": "#ffff", "box-shadow": "0px 10px 20px 10px rgb(179 202 216 / 20%)" }])}"><div class="col-md-7 pr-40 aboutImg"><img${ssrRenderAttrs(mergeProps({ alt: "" }, ssrGetDirectiveProps(_ctx, _directive_lazy, arr.image)))}></div><div class="col-md-5">${arr.content}</div></div>`);
  85. } else {
  86. _push(`<div class="aboutOnlyText row text-left" style="${ssrRenderStyle([{ padding: index2 % 2 == 1 ? "40px" : "0 " }, { "background-color": "#ffff" }])}"><div class="about-text-image">${arr.content}</div></div>`);
  87. }
  88. _push(`</div></div></div></section>`);
  89. });
  90. _push(`<!--]--></div>`);
  91. }
  92. const _sfc_setup = _sfc_main.setup;
  93. _sfc_main.setup = (props, ctx) => {
  94. const ssrContext = useSSRContext();
  95. (ssrContext.modules || (ssrContext.modules = /* @__PURE__ */ new Set())).add("src/views/about/index.vue");
  96. return _sfc_setup ? _sfc_setup(props, ctx) : void 0;
  97. };
  98. const index = /* @__PURE__ */ _export_sfc(_sfc_main, [["ssrRender", _sfc_ssrRender]]);
  99. export {
  100. index as default
  101. };