index.js 1.1 KB

1234567891011121314151617181920212223242526272829303132
  1. "use strict";
  2. const common_vendor = require("../../common/vendor.js");
  3. const _sfc_main = /* @__PURE__ */ common_vendor.defineComponent({
  4. __name: "index",
  5. setup(__props) {
  6. const config = common_vendor.ref({ logo: [], file: [] });
  7. common_vendor.onShow(async () => {
  8. await searchConfig();
  9. });
  10. const searchConfig = async () => {
  11. config.value = common_vendor.index.getStorageSync("config");
  12. };
  13. const formatRichText = (html) => {
  14. if (html) {
  15. return html && html.replace(/<img[^>]*>/gi, function(match, capture) {
  16. return match.replace(/style=".*"/gi, "").replace(
  17. /style='.*'/gi,
  18. ""
  19. );
  20. }).replace(/\<img/gi, '<img style="width:100%;"');
  21. }
  22. };
  23. return (_ctx, _cache) => {
  24. return {
  25. a: formatRichText(config.value.brief),
  26. b: common_vendor.t(config.value.phone || "暂无")
  27. };
  28. };
  29. }
  30. });
  31. const MiniProgramPage = /* @__PURE__ */ common_vendor._export_sfc(_sfc_main, [["__scopeId", "data-v-36ae6b6d"], ["__file", "D:/project/学吧/learn_applet/pagesMy/introduce/index.vue"]]);
  32. wx.createPage(MiniProgramPage);