/**
 * 微信营销组件(领券中心)
 */
// @ts-nocheck
Component({
  data: {
    isReady: false,
    pluginAppId: '2021002191638959',
    // pluginPageUrl: '/wechat-marketing',
    pluginVersion: '*',
    activityId: ''
  },

  didMount() {
    this.setData({
      activityId: (this.props.componentData.componentExtInfo || {}).activityId
    });
    this.loadPlugin();
  },

  methods: {
    loadPlugin() {
      const {
        pluginAppId,
        pluginVersion
      } = this.data;
      const that = this;
      my.loadPlugin({
        plugin: `${pluginAppId}@${pluginVersion}`,
        success: () => {
          that.setData({
            isReady: true
          });
        }
      });
    }

  }
});