<?php

/* ========================================================================
 * $Id: plugins.php 1483 2020-05-21 00:17:11Z onez $
 * 
 * Email: www@onez.cn
 * QQ: 6200103
 * HomePage: http://www.onez.cn
 * ========================================================================
 * Copyright 2016-2017 佳蓝科技.
 * 
 * ======================================================================== */

!defined('IN_ONEZ') && exit('Access Denied');
# edit
#请求数据
if($MODE=='$post'){
  $id=onez()->gp('id');
  $action=onez()->gp('action');
  if($action=='data'){
    $key=onez()->gp('key');
    unset($_POST['action']);
    $_POST['_siteid']=(int)$G['site']['id'];
    $_POST['method']='design';
    $r=$G['this']->onezapi('view',array('key'=>'/page/plugins','post'=>$_POST));
    if($r['isRead']){
      $onezInfoFile=ONEZ_CACHE_PATH.'/plugins/'.$G['this']->token.'/infos/users/'.$G['userid'].'.php';
      @unlink($onezInfoFile);
    }
    if(onez()->gp('ac')){
      return $r;
    }
    $A['html']=$r;
  }
  return;
}
$this->add(array(
  'type'=>'breadcrumb',
  'name'=>'面包屑导航',
  'data'=>'html',
));
?>
<section :class="html.classname">
  <div class="nav-tabs-custom" v-if="html.categorys">
    <ul class="nav nav-tabs ui-sortable-handle">
      <li @click="onTab(index)" :class="tabIndex==index?'active':''" v-for="(item,index) in html.categorys">
        <a href="javascript:;" v-html="item.name"></a>
      </li>
    </ul>
    <div class="tab-content">
      <div class="tab-pane" :class="tabIndex==index?'active':''" v-for="(item,index) in html.categorys">
        <template v-if="item.type=='record'">
          <component v-for="item2 in item.record" :is="item2.type||'onez-html'" :data="item2"></component>
        </template>
        <component v-else :is="item.type||'onez-html'" :data="item"></component>
      </div>
    </div>
  </div>
</section>
