Commit ca6ef774 authored by agping's avatar agping

收藏商铺

parent 23d520b0
......@@ -53,10 +53,16 @@
<div class="">
<div class="panel panel-default">
<div class="panel-heading breadcrumb">
<li>
<li style="margin-bottom: 6px;">
<a href="javascript:;">商铺收藏</a>
</li>
<li> <span class="btn btn-info btn3 " id="fresh_btn">刷新</span></li>
<br />
<div>
<select class="form-control btn4" id="user_city">
</select>
<span class="btn btn-info btn3 " id="fresh_btn">搜索</span>
</div>
</div>
<div class="panel-body">
<div class="table-responsive">
......
......@@ -66,7 +66,8 @@ define(['doT', 'text!temp/my_collection_shop_template_tpl.html', 'css!style/home
var day_start = getPreMonth(day_end);
$('#create_time_start').val(day_start);
$('#create_time_end').val(day_end);//商铺跟进 添加 默认时间 一个月
house.getList(0);//商铺跟进列表
house.getSiteList();//商铺收藏 获取转勤账号
// house.getList(0);//商铺跟进列表
//收藏 取消收藏
$(document).delegate(".is_show_shoucang", "click", function() { //点击禁用
if(!confirm('是否继续?')) {
......@@ -221,7 +222,8 @@ define(['doT', 'text!temp/my_collection_shop_template_tpl.html', 'css!style/home
params.pageNo = house.pageNo;
params.pageSize = house.pageSize;
params.AuthToken = user_info_obj.AuthToken;
params.agents_id = user_info_obj.id;
// params.agents_id = user_info_obj.id;
params.agents_id = $('.user_city').val();//城市筛选
params.from =1;
......@@ -255,6 +257,51 @@ define(['doT', 'text!temp/my_collection_shop_template_tpl.html', 'css!style/home
};
}
});
},
//获取转勤账号城市
getSiteList: function() {
var user_info_obj = JSON.parse(decodeURIComponent(localStorage.getItem('pcUserInfo'))); //读取缓存
var params = {};
params.AuthToken = user_info_obj.AuthToken;
// params.agent_phone = user_info_obj.phone;
params.agent_phone = 15601652311;
$.ajax({
type: 'GET',
url: '/broker/getAgentSiteListV2', //商铺跟进 对接接口
data: params,
timeout: 30000,
dataType: 'json',
beforeSend: function() {},
success: function(data) {
if(typeof data === 'object') {
if(data.code == 200) {
//获取转勤账号
var _str = '';
$.each(_data, function(i, item) {
_str += '<option value="' + item.id + '">' + item.store_name + '</option>';
});
$('.user_city').html(_str);
//默认显示本账号所在城市
$('.user_city').val(user_info_obj.id);
house.getList(1);//搜索列表
} else {
alert(data['msg']);
};
} else {
alert('数据错误');
};
},
error: function() {
alert('error');
},
complete: function(xhr, textStatus) {
if(textStatus === 'timeout') {
alert('请求超时');
};
}
});
},
getFollowupList: function(){
$.ajax({
......
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