Commit d2bed045 authored by agping's avatar agping

修改 默认城市

parent cfe7bd08
...@@ -13,6 +13,7 @@ define(['doT', 'text!temp/house_template_tpl.html', 'css!style/home.css', 'ckfin ...@@ -13,6 +13,7 @@ define(['doT', 'text!temp/house_template_tpl.html', 'css!style/home.css', 'ckfin
}; };
}; };
var user_info_obj = JSON.parse(decodeURIComponent(localStorage.getItem('pcUserInfo'))); //读取缓存 var user_info_obj = JSON.parse(decodeURIComponent(localStorage.getItem('pcUserInfo'))); //读取缓存
console.log(user_info_obj);
business = { business = {
pageNo: 1, pageNo: 1,
/*第几页*/ /*第几页*/
...@@ -101,6 +102,10 @@ define(['doT', 'text!temp/house_template_tpl.html', 'css!style/home.css', 'ckfin ...@@ -101,6 +102,10 @@ define(['doT', 'text!temp/house_template_tpl.html', 'css!style/home.css', 'ckfin
str += '<option value="' + item.city + '">' + item.city + '</option>'; str += '<option value="' + item.city + '">' + item.city + '</option>';
}); });
$(".shop_city_choose_site_list").append(str); $(".shop_city_choose_site_list").append(str);
}else{
var _city = user_info_obj.city;
var _str = '<option value="' + _city + '">' + _city+ '</option>';
$(".shop_city_choose_site_list").append(_str);
} }
} }
}); });
......
...@@ -138,6 +138,11 @@ define(['doT', 'text!temp/user_template_tpl.html', 'css!style/home.css', 'ckfind ...@@ -138,6 +138,11 @@ define(['doT', 'text!temp/user_template_tpl.html', 'css!style/home.css', 'ckfind
str += '<option value="' + item.id + '">' + item.city + '</option>'; str += '<option value="' + item.id + '">' + item.city + '</option>';
}); });
$(".user_city_choose_site_list").append(str); $(".user_city_choose_site_list").append(str);
}else{
var _city = user_info_obj.city;
var _siteID = user_info_obj.site_id;
var _str = '<option value="' + _siteID + '">' + _city+ '</option>';
$(".user_city_choose_site_list").append(_str);
} }
} }
}); });
......
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