Commit c87b7a79 by felix

每日一更

parent 79910c51
...@@ -12,7 +12,7 @@ if ($user_id != 0) { ...@@ -12,7 +12,7 @@ if ($user_id != 0) {
$context['consultant'] = get_consultant_info($consultant_id); $context['consultant'] = get_consultant_info($consultant_id);
$context['consultant_mobile'] = $_GET['mobile']; $context['consultant_mobile'] = $_GET['mobile'];
$context['consultant_score_url'] = $const_score_page . '&consultant_id=' . $consultant_id; $context['consultant_score_url'] = $const_score_page . '&consultant_id=' . $consultant_id;
$context['default_head'] = get_avatar_url(1); $context['default_head'] = $context['theme'] . '/img/head.png';
Timber::render('consultant_info.html', $context); Timber::render('consultant_info.html', $context);
}else{ }else{
......
...@@ -7,7 +7,8 @@ $context['url'] = home_url(); ...@@ -7,7 +7,8 @@ $context['url'] = home_url();
$current_user = wp_get_current_user(); $current_user = wp_get_current_user();
$user_id = $current_user->ID; $user_id = $current_user->ID;
if ($user_id != 0) { if ($user_id != 0) {
$city_id = 2; $default_city_id = get_option('default_city_id');
$city_id = ($default_city_id) ? $default_city_id : 2;
if ($_GET['cityId']){ if ($_GET['cityId']){
$city_id = $_GET['cityId']; $city_id = $_GET['cityId'];
} }
...@@ -20,7 +21,7 @@ if ($user_id != 0) { ...@@ -20,7 +21,7 @@ if ($user_id != 0) {
$context['city_name'] = $value->value; $context['city_name'] = $value->value;
} }
} }
$context['default_head'] = get_avatar_url(1); $context['default_head'] = $context['theme'] . '/img/head.png';
Timber::render('consultant_list.html', $context); Timber::render('consultant_list.html', $context);
}else{ }else{
......
...@@ -4,7 +4,8 @@ $context = array(); ...@@ -4,7 +4,8 @@ $context = array();
$context['theme'] = get_template_directory_uri(); $context['theme'] = get_template_directory_uri();
require_once(WP_PLUGIN_DIR . "/tospur/Dao/SearchDao.php"); require_once(WP_PLUGIN_DIR . "/tospur/Dao/SearchDao.php");
$cityId = 2; $default_city_id = get_option('default_city_id');
$cityId = ($default_city_id) ? $default_city_id : 2;
if ($_GET['cityId']) if ($_GET['cityId'])
$cityId = $_GET['cityId']; $cityId = $_GET['cityId'];
$houseType = 0; $houseType = 0;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment