yiming
2024-03-13 f9d4b09377c5471e1202be2fef2c89de27b6654d
pages/aboutUs/index.js
@@ -15,6 +15,9 @@
    interval: 5000,//轮播图参数
    navigation: { type: 'dots' },//轮播图参数
    bannerList: [], //轮播图列表
    navBarHeight: '',
    barHeight: '',
    types: '',
  },
  /**
@@ -22,36 +25,22 @@
   */
  onLoad(options) {
    this.getBanner()
    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()
    // drawQrcode({
    //   width: 200, // 必须,二维码宽度,与canvas的width保持一致
    //   height: 200, // 必须,二维码高度,与canvas的height保持一致
    //   canvasId: 'myQrcode',
    //   background: '#ffffff', //   非必须,二维码背景颜色,默认值白色
    //   foreground: '#000', // 非必须,二维码前景色,默认值黑色    '#000000'
    //   // ctx: wx.createCanvasContext('myQrcode'), // 非必须,绘图上下文,可通过 wx.createCanvasContext('canvasId') 获取,v1.0.0+版本支持
    //   text: '13216549865',  // 必须,二维码内容
    //   // v1.0.0+版本支持在二维码上绘制图片
    //   image: {
    //     // imageResource: '../../images/icon.png', // 指定二维码小图标
    //     dx: 70,
    //     dy: 70,
    //     dWidth: 60,
    //     dHeight: 60
    //   }
    // })
  },
  /**
@@ -102,17 +91,15 @@
  onShareAppMessage() {
  },
  //轮播图
  getBanner() {
    app.MG.resource.getItem({
      path: 'jsek_banner\\jsek_aboutUsBanner',
      paging: { start: 0, size: 9 },
      fields: {
        jsek_link: []
      }
    }).then(res => {
      this.setData({
        bannerList: res.datas[0].icon,
        swiperList: res.datas[0].icon
@@ -120,9 +107,12 @@
      console.log(this.data.bannerList, 789);
    })
  },
  //文字  jsek_aboutUs 关于我们
  //jsek_contactUs  联系我们
  getAboutText() {
    app.MG.resource.getItem({
      path: 'jsek_aboutUs',
      path: this.data.types,
      fields: {
        content: []
      },
@@ -138,5 +128,8 @@
    })
  },
  goBack() {
    wx.navigateBack()
  }
})