// component/picNav/picNav.js
const wx2my = require('../../wx2my');
const Behavior = require('../../Behavior');
var app = getApp();
const wxService = require('../../utils/wxService');
const utils = require('../../utils/util');
const utilLink = require('../../utils/currentLinkRouter')
const envInfo = require('../../config/index').envInfo;

Component({
  /**
   * 组件的属性列表
   */
  props: {
    picNav: []
  },
  didMount() {
    this.setData({
      picNav: this.props.picNav,
      baseImgUrl: app.globalData.imageUrl
    });
  },
  /**
   * 组件的初始数据
   */
  data: {
    imagewidth: 0,
    imageheight: 0,
    isAuthorization: false,
    isAuthorizationActiveText: '',
    isAuthorizationType: 2,
    baseImgUrl: ''
  },

  /**
   * 组件的方法列表
   */
  methods: {
    imageLoad(e) {
      let imageSize = utils.imageUtil(e);
      this.setData({
      },()=> {
        this.setData({
          imagewidth: imageSize.imageWidth,
          imageheight: imageSize.imageHeight
        })
      });
    },
    preview(event) {
      utilLink.currentLinkRouter(event, this)
    },

    activeTocard(e) {
      if (e.detail) {
        wxService.openCard();
      }
    }

  }
});