12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091 |
- <?php
- namespace app\home\controller;
- use think\facade\View;
- use think\facade\Lang;
- class Memberconsult extends BaseMember
- {
- public function initialize()
- {
- parent::initialize();
- Lang::load(base_path() . 'home/lang/'.config('lang.default_lang').'/sellerconsult.lang.php');
- }
-
- public function index()
- {
- $this->my_consult();
- }
-
- public function my_consult()
- {
-
- $consult_model = model('consult');
- $search_array = array();
- if (input('param.type') != '') {
- if (input('param.type') == 'to_reply') {
- $search_array[]=array('consult_reply','=','');
- }
- if (input('param.type') == 'replied') {
- $search_array[] = array('consult_reply','<>',''
- );
- }
- }
- $search_array[]=array('member_id','=',session('member_id'));
- $list_consult = $consult_model->getConsultList($search_array);
- View::assign('show_page', $consult_model->page_info->render());
- View::assign('list_consult', $list_consult);
- $type_v=input('param.type');
- $type = empty($type_v) ? 'consult_list' : $type_v;
-
- $this->setMemberCurMenu('member_consult');
-
- $this->setMemberCurItem($type);
- echo View::fetch($this->template_dir.'index');exit;
- }
-
- public function getMemberItemList()
- {
- $menu_array = array(
- array(
- 'name' => 'consult_list',
- 'text' => lang('ds_member_path_all_consult'),
- 'url' => (string)url('Memberconsult/index')
- ),
- array(
- 'name' => 'to_reply',
- 'text' => lang('ds_member_path_unreplied_consult'),
- 'url' => (string)url('Memberconsult/index',['type'=>'to_reply'])
- ),
- array(
- 'name' => 'replied',
- 'text' => lang('ds_member_path_replied_consult'),
- 'url' => (string)url('Memberconsult/index',['type'=>'replied'])
- )
- );
- return $menu_array;
- }
- }
|