richtext.js 3.2 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091
  1. "use strict";
  2. const common_vendor = require("../../common/vendor.js");
  3. const sheep_api_promotion_article = require("../../sheep/api/promotion/article.js");
  4. require("../../sheep/request/index.js");
  5. require("../../sheep/config/index.js");
  6. require("../../sheep/store/index.js");
  7. require("../../sheep/store/app.js");
  8. require("../../sheep/api/promotion/diy.js");
  9. require("../../sheep/platform/index.js");
  10. require("../../sheep/platform/provider/wechat/index.js");
  11. require("../../sheep/platform/provider/wechat/miniProgram.js");
  12. require("../../sheep/api/member/auth.js");
  13. require("../../sheep/api/member/social.js");
  14. require("../../sheep/api/member/user.js");
  15. require("../../sheep/platform/provider/apple/index.js");
  16. require("../../sheep/platform/share.js");
  17. require("../../sheep/router/index.js");
  18. require("../../sheep/hooks/useModal.js");
  19. require("../../sheep/helper/index.js");
  20. require("../../sheep/helper/test.js");
  21. require("../../sheep/helper/digit.js");
  22. require("../../sheep/helper/throttle.js");
  23. require("../../sheep/url/index.js");
  24. require("../../sheep/platform/pay.js");
  25. require("../../sheep/index.js");
  26. require("../../sheep/config/zIndex.js");
  27. require("../../sheep/api/pay/order.js");
  28. require("../../sheep/store/user.js");
  29. require("../../sheep/store/cart.js");
  30. require("../../sheep/api/trade/cart.js");
  31. require("../../sheep/api/pay/wallet.js");
  32. require("../../sheep/api/trade/order.js");
  33. require("../../sheep/api/promotion/coupon.js");
  34. require("../../sheep/store/sys.js");
  35. require("../../sheep/store/modal.js");
  36. if (!Array) {
  37. const _easycom_mp_html2 = common_vendor.resolveComponent("mp-html");
  38. const _easycom_s_layout2 = common_vendor.resolveComponent("s-layout");
  39. (_easycom_mp_html2 + _easycom_s_layout2)();
  40. }
  41. const _easycom_mp_html = () => "../../uni_modules/mp-html/components/mp-html/mp-html.js";
  42. const _easycom_s_layout = () => "../../sheep/components/s-layout/s-layout.js";
  43. if (!Math) {
  44. (_easycom_mp_html + _easycom_s_layout)();
  45. }
  46. const _sfc_main = {
  47. __name: "richtext",
  48. setup(__props) {
  49. const state = common_vendor.reactive({
  50. title: "",
  51. content: ""
  52. });
  53. async function getRichTextContent(id, title) {
  54. const { code, data } = await sheep_api_promotion_article.ArticleApi.getArticle(id, title);
  55. if (code !== 0) {
  56. return;
  57. }
  58. state.content = data.content;
  59. if (state.title !== data.title) {
  60. state.title = data.title;
  61. common_vendor.index.setNavigationBarTitle({
  62. title: state.title
  63. });
  64. }
  65. }
  66. common_vendor.onLoad((options) => {
  67. if (options.title) {
  68. state.title = options.title;
  69. common_vendor.index.setNavigationBarTitle({
  70. title: state.title
  71. });
  72. }
  73. getRichTextContent(options.id, options.title);
  74. });
  75. return (_ctx, _cache) => {
  76. return {
  77. a: common_vendor.p({
  78. content: state.content
  79. }),
  80. b: common_vendor.p({
  81. title: state.title,
  82. bgStyle: {
  83. color: "#FFF"
  84. }
  85. })
  86. };
  87. };
  88. }
  89. };
  90. const MiniProgramPage = /* @__PURE__ */ common_vendor._export_sfc(_sfc_main, [["__scopeId", "data-v-bc551482"], ["__file", "/Users/RuHu.Xu/Desktop/mall-newfeifan-zx-app/pages/public/richtext.vue"]]);
  91. wx.createPage(MiniProgramPage);