<?php

namespace app\home\controller;
use think\facade\View;
use think\facade\Lang;

/**
 * ============================================================================
 * 
 * ============================================================================
 * 版权所有 2014-2028 浙江惠利玛产业互联网有限公司，并保留所有权利。
 * 网站地址: https://www.valimart.net/
 * ----------------------------------------------------------------------------
 * 
 * ============================================================================
 * 控制器
 */
class FLeaalbum extends BaseFleaMember {

    /**
     * 	验证是否开启闲置功能
     */
    public function initialize() {
        parent::initialize(); // TODO: Change the autogenerated stub
        Lang::load(base_path() . 'home/lang/'.config('lang.default_lang').'/memberstorealbum.lang.php');
    }

    /**
     * 闲置图片列表，发布闲置调用
     */
    public function pic_list() {
        /**
         * 实例化相册类
         */
        $flea_model = model('flea');
        /**
         * 图片列表
         */
        $param = array();
        $param['store_id'] = session('member_id');
        $param['item_id'] = input('goods_id');
        $pic_list = $flea_model->getFleauploadList($param, 12);
        View::assign('pic_list', $pic_list);
        View::assign('show_page', $flea_model->page_info->render());
        if (input('item') == 'goods') {
            return View::fetch($this->template_dir . 'store_flea_sample');
        } elseif (input('item') == 'des') {
            return View::fetch($this->template_dir . 'store_flea_sample_des');
        }
    }

}
