<?php

/* ========================================================================
 * $Id: helps.php 1281 2020-07-07 04:07:49Z onez $
 * 
 * Email: www@onez.cn
 * QQ: 6200103
 * HomePage: http://www.onez.cn
 * ========================================================================
 * Copyright 2016-2017 佳蓝科技.
 * 
 * ======================================================================== */

!defined('IN_ONEZ') && exit('Access Denied');
# helps
#请求数据
if($MODE=='$post'){
  $action=onez()->gp('action');
  if($action=='data'){
    $action=onez()->gp('ac');


    if($action=='del'){
      $id=(int)onez()->gp('id');
    }
    $data=array();
    $data['title']='帮助中心';
    $datatable=$this->load('datatable');
    $datatable->set('colFunc',function(&$rs){
      $rs['items']=$items;
      $rs['title']=$rs['name'];
      $rs['summary']=$rs['summary'];
      $rs['content']=$rs['content'];
    });
    $datatable->set('del','1');
    $datatable->set('fields','id,title,value,summary,content');

    $datatable->output($data,array(
      'table'=>'helps',

      'where'=>"1 order by id desc",
      'pagesize'=>999,
    ));
    $A['pagedata']=$data;
  }
  return;
}
?>
<template v-if="$pagedata && pagedata.title">
<onez-m-page :data="$pagedata">
<van-collapse v-model="activeNames" accordion>
  <van-collapse-item :title="(index+1)+'、'+item.title" :label="item.summary" :value="item.value" :name="index" v-for="(item,index) in pagedata.record">
    <div class="content" v-html="item.content"></div>
  </van-collapse-item>
</van-collapse>
<van-empty v-if="pagedata.total==0" image="error" description="暂无帮助信息" />
</onez-m-page>
</template>