// packageI/newMedia/components/shortcutMenu/shortcutMenu.js
Component({
  /**
   * 组件的属性列表
   */
  options: {
    addGlobalClass: true
  },
  properties: {
    path:{
      value:'',
      type:String
    },
    tabsIndex:{
      value:0,
      type:Number
    },
    ordinaryIndex:{
      value:0,
      type:Number
    },
    is_release:{
      value:false,
      type:Boolean
    }
  },

  /**
   * 组件的初始数据
   */
  data: {

  },

  /**
   * 组件的方法列表
   */
  methods: {
    gotoPublish(){
      let type="";
      if(this.data.tabsIndex==1){
        type="advideo";
      }else if(this.data.tabsIndex==0){
        let arr = ["news","video","audio","article"];
        type = arr[this.data.ordinaryIndex];
      }
      wx.navigateTo({
        url: '/packageI/newMedia/newMediaPublish/newMediaPublish?type='+type,
      });
    },
    gotoMy(){
      wx.navigateTo({
        url: '/packageI/newMedia/newMediaMy/newMediaMy',
      });
    },
    gotoGuide(){
      wx.navigateTo({
        url: '/packageI/newMedia/newMediaGuide/newMediaGuide',
      });
    }
  }
});
