MemberArrivalnotice.php 2.9 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283
  1. <?php
  2. namespace app\home\controller;
  3. use think\facade\View;
  4. use think\facade\Lang;
  5. /**
  6. * ============================================================================
  7. * DSMall多用户商城
  8. * ============================================================================
  9. * 版权所有 2014-2028 长沙德尚网络科技有限公司,并保留所有权利。
  10. * 网站地址: http://www.csdeshang.com
  11. * ----------------------------------------------------------------------------
  12. * 这不是一个自由软件!您只能在不用于商业目的的前提下对程序代码进行修改和使用 .
  13. * 不允许对程序代码以任何形式任何目的的再发布。
  14. * ============================================================================
  15. * 控制器
  16. */
  17. class MemberArrivalnotice extends BaseMember
  18. {
  19. public function initialize()
  20. {
  21. parent::initialize(); // TODO: Change the autogenerated stub
  22. Lang::load(base_path() . 'home/lang/'.config('lang.default_lang').'/member_arrivalnotice.lang.php');
  23. }
  24. /**
  25. * 到货列表
  26. *
  27. * @param
  28. * @return
  29. */
  30. public function index()
  31. {
  32. $arrivalnotice_model = model('arrivalnotice');
  33. $arrivalnotice_list = $arrivalnotice_model->getArrivalNoticeList(array('member_id'=>$this->member_info['member_id']),'','','',20);
  34. View::assign('arrivalnotice_list', $arrivalnotice_list);
  35. View::assign('show_page', $arrivalnotice_model->page_info->render());
  36. $this->setMemberCurItem('index');
  37. $this->setMemberCurMenu('member_arrivalnotice');
  38. return View::fetch($this->template_dir.'index');
  39. }
  40. public function del(){
  41. $arrivalnotice_id = input('param.arrivalnotice_id');
  42. $arrivalnotice_id_array = ds_delete_param($arrivalnotice_id);
  43. if ($arrivalnotice_id_array == FALSE) {
  44. ds_json_encode('10001', lang('param_error'));
  45. }
  46. $condition=array();
  47. $condition[] = array('member_id','=',$this->member_info['member_id']);
  48. $condition[]=array('arrivalnotice_id','in', $arrivalnotice_id_array);
  49. $arrivalnotice_model = model('arrivalnotice');
  50. //批量删除
  51. $result = $arrivalnotice_model->delArrivalNotice($condition);
  52. if ($result){
  53. ds_json_encode(10000, lang('ds_common_del_succ'));
  54. }else{
  55. ds_json_encode(10001, lang('ds_common_del_fail'));
  56. }
  57. }
  58. /**
  59. * 用户中心右边,小导航
  60. *
  61. * @param string $menu_key 当前导航的menu_key
  62. * @return
  63. */
  64. protected function getMemberItemList()
  65. {
  66. $menu_array = array(
  67. 1 => array(
  68. 'name' => 'index', 'text' => lang('ds_arrivalnotice'),
  69. 'url' => (string)url('MemberArrivalnotice/index')
  70. )
  71. );
  72. return $menu_array;
  73. }
  74. }