闫增涛
2024-05-10 813e3b6030ecfc86e4e71db31173e5cb77ee8c40
packagePersonal/pages/aboutUs/index.js
@@ -7,13 +7,17 @@
   * 页面的初始数据
   */
  data: {
    loading: true,
    hidden: true,
    aboutText: null,
    swiperList: null,
    current: 1,//轮播图参数
    current: 1, //轮播图参数
    autoplay: true, //轮播图参数
    duration: '500',//轮播图参数
    interval: 5000,//轮播图参数
    navigation: { type: 'dots' },//轮播图参数
    duration: '500', //轮播图参数
    interval: 5000, //轮播图参数
    navigation: {
      type: 'dots'
    }, //轮播图参数
    bannerList: [], //轮播图列表
    navBarHeight: '',
    barHeight: '',
@@ -24,21 +28,14 @@
   * 生命周期函数--监听页面加载
   */
  onLoad(options) {
    const systInfo = wx.getSystemInfoSync();
    const menu = wx.getMenuButtonBoundingClientRect(); // 胶囊信息
    const navBarHeight = (menu.top - systInfo.statusBarHeight) * 2 + menu.height; // 导航栏高度
    this.setData({
      navBarHeight: navBarHeight,
      barHeight: systInfo.statusBarHeight,
      types: options.types
    })
    console.log(this.data.types);
    // this.getBanner()
    this.getAboutText()
  },
@@ -95,7 +92,10 @@
  getBanner() {
    app.MG.resource.getItem({
      path: 'jsek_banner\\jsek_aboutUsBanner',
      paging: { start: 0, size: 9 },
      paging: {
        start: 0,
        size: 9
      },
      fields: {
        jsek_link: []
      }
@@ -104,7 +104,6 @@
        bannerList: res.datas[0].icon,
        swiperList: res.datas[0].icon
      })
      console.log(this.data.bannerList, 789);
    })
  },
@@ -120,13 +119,15 @@
        width: 750
      },
    }).then(res => {
      console.log(res);
      // console.log(res.datas[0].content);
      // let modifiedContent = `<div class="richTextBox">${res.datas[0].content}</div>`;
      let modifiedContent = res.datas[0].content
      // modifiedContent = modifiedContent.replace(/\<table/gi, '<table class="aboutUs-rich-table"').replace(/\<td/gi, '<table class="aboutUs-rich-td"').replace(/\<tr/gi, '<tr class="aboutUs-rich-tr"').replace(/\<p/gi, '<p class="aboutUs-rich-p"')
      this.setData({
        aboutText: res.datas[0].content
        aboutText: modifiedContent,
        loading: false,
        hidden: false,
      })
    })
  },
  goBack() {