public function __autoload() { parent::__autoload(); $banner = getBanner('home'); $advert = getBanner('advert'); $news = get_recommend_articles('news', 9); $notice = get_recommend_articles('notice', 9); /*个人译者店铺*/ $shop_personal = get_recommend_shop(1); /*公司店铺*/ $shop_company = get_recommend_shop(); $shop_new = get_new_shop(); $written_shop = $this->recommend_shop(36); $interpreter_shop = $this->recommend_shop(37); /*获取网站指数*/ $site_index = get_site_index(); $data['site_index'] = $site_index; $data['home_banner'] = $banner; $data['advert'] = $advert; $data['news'] = $news; $data['notice'] = $notice; $data['shop_personal'] = $shop_personal; $data['shop_company'] = $shop_company; $data['shop_new'] = $shop_new; $data['written_shop'] = $written_shop; $data['interpreter_shop'] = $interpreter_shop; $this->info = $data; $this->assign($data); }
public function __autoload() { parent::__autoload(); $this->product_type = list_to_tree(get_ability_cache()); /* 获取缓存的分类属性转换为树状 */ $this->first_step_view = array('36' => 'step_1_written', '37' => 'step_1_interpret', '56' => 'step_1_audio'); }
public function __autoload() { parent::__autoload(); $this->seller_type = array('1' => '个人', '2' => '公司'); $this->search = array('language_id' => '', 'to_language_id' => '', 'ability_id' => '', 'industry_id' => '', 'type' => '', 'city' => ''); $this->product_type = list_to_tree(get_ability_cache()); /*获取缓存的分类属性转换为树状*/ $this->shop_id = I('shop_id'); if (session('home_member_id')) { $info_k = get_info('member', array('id' => session('home_member_id'))); $this->member_info = $info_k; } $shop_info = $this->get_shop_description(); //店铺信息 // dump($shop_info);die; $shop_id = I('shop_id'); if ($shop_id) { /*查询店铺信息*/ $shop_info = get_info(D($this->member_model), array('id' => $shop_id)); if (empty($shop_info)) { $this->error('店铺信息不存在'); } else { if (empty($shop_info['seller_id'])) { $this->error('店铺信息不存在'); } else { if ($shop_info and $shop_info["shop_status"] != 1) { if ($shop_info["shop_status"] == 2) { $this->error("该店铺已被禁用"); } else { $this->error("该店铺暂未开通"); } } } } // dump($shop_info); //查询地理信息 $area_data = get_area_cache(); $area_list = list_to_tree($area_data); //查询店铺的地理信息 $shop_area_id = $shop_info['area_id']; foreach ($area_list as $val) { foreach ($val['_child'] as $v) { foreach ($v['_child'] as $vv) { if ($vv['id'] == $shop_area_id) { $shop_info['city'] = $v['title']; $shop_info['province'] = $val['title']; $shop_info['area'] = $vv["title"]; $city_data = $val['_child']; $area_k = $v['_child']; } } } } /*获取过往经历*/ $result1 = get_experience($shop_id, 1); if ($result1['status'] == 1) { $shop_info_old = $result1['shop_info']; } /*获取成功分享*/ $result2 = get_experience($shop_id, 2); if ($result2['status'] == 1) { $shop_info_new = $result2['shop_info']; } /*获取语言信息*/ $language = get_language_cache(); /*获取技能信息*/ $ability = list_to_tree(get_ability_cache()); /*获取行业信息*/ $industry = get_industry_cache(); /*获取数组键值为语言ID的新数组*/ foreach ($language as $val) { $language_id_key[$val['id']] = $val; } /*处理擅长语言*/ $good_at = json_decode($shop_info['good_at'], true); foreach ($good_at as $k => $v) { $good_at_new[$k]['id'] = $v; $good_at_new[$k]['title'] = $language_id_key[$v]['title']; } $shop_info['good_at_arr'] = $good_at_new; /*处理店铺logo*/ if (is_file($shop_info['logo'])) { $shop_info['logo'] = __ROOT__ . '/' . $shop_info['logo']; } else { $shop_info['logo'] = __ROOT__ . '/Public/Home/img/company_img.jpg'; } /*处理数字值,将数字转化为文字*/ $temp[0] = $shop_info; $temp = int_to_string($temp, array('type' => $this->seller_type)); $shop_info = $temp[0]; //print_r($product_result); $data['shop_info_1'] = $shop_info; // dump($shop_info);die; //获取店铺收藏信息 $show_result = get_info('collect', array('collect_id' => $this->shop_id)); // dump($show_result);die; $hot_product = get_hot_product($shop_id); //@赵群@查询地理信息 $map2['member.id'] = array('gt', 0); $result = $this->page(D($this->member_model), $map2, $order, '', $this->limit); $area = get_area_cache(); $area_id_key = array_id_key($area); $address_data = array(); foreach ($result as $key => $value) { $address_data[] = get_info('address', array('member_id' => $value['member_id']), $field = array('member_id', 'area_path')); } foreach ($address_data as $key => $value) { $address_arr = $value['area_path']; $path = explode('-', $address_arr); $new_address = $area_id_key[$path['2']]['title'] . $area_id_key[$path['3']]['title'] . $area_id_key[$path['4']]['title']; $address_data[$key]['path'] = $new_address; } // dump($address_data);die; $data['result'] = $result; $data['hot_product'] = $hot_product; $data['shop_info_old'] = $shop_info_old; $data['shop_info_new'] = $shop_info_new; $data['show_result'] = $show_result; $this->assign($data)->assign('address_data', $address_data); } }
public function __autoload() { parent::__autoload(); $this->product_type = list_to_tree(get_ability_cache()); /*获取缓存的分类属性转换为树状*/ }
public function __autoload() { parent::__autoload(); $this->seller_type = array('1' => '个人', '2' => '公司'); }