Commit db298ed1 authored by agping's avatar agping

业绩

parent a5854bdf
......@@ -158,25 +158,27 @@
if(response.data.code == 200) {
if(response.data.data){
localStorage.setItem('tlAppSiteList',encodeURIComponent(JSON.stringify(response.data.data)));
let _tempSiteId = _this.$route.query.siteId;
// let _tempSiteId = _this.$route.query.siteId;
let _tempSiteId = '10001';//默认上海
let _tempAgentId = localStorage.getItem('userid');
// console.log(_tempSiteId);
if(!_tempSiteId){
//如果app里没传siteid,则默认为上海
_tempSiteId = '10001';
};
let _tempArr = response.data.data.filter((v, i) => (v.site_id == _tempSiteId));//找出列表里站点site_id和url里相同的一项
if(_tempArr.length === 0){
let _tempArr2 = response.data.data.filter((v, i) => (v.id == _tempAgentId));//找出列表里经纪人id和缓存里相同的一项
if(_tempArr2.length === 0){
_tempSiteId = '10001';
}else{
_tempSiteId = _tempArr2[0].site_id;
}
}else{
_tempAgentId = _tempArr[0].id;
}
//注释
// let _tempArr = response.data.data.filter((v, i) => (v.site_id == _tempSiteId));//找出列表里站点site_id和url里相同的一项
// if(_tempArr.length === 0){
// let _tempArr2 = response.data.data.filter((v, i) => (v.id == _tempAgentId));//找出列表里经纪人id和缓存里相同的一项
// if(_tempArr2.length === 0){
// _tempSiteId = '10001';
// }else{
// _tempSiteId = _tempArr2[0].site_id;
// }
// }else{
// _tempAgentId = _tempArr[0].id;
// }
localStorage.setItem('tlSiteid',String(_tempSiteId));
localStorage.setItem('tlYjAgentId', _tempAgentId);//业绩里业务员id会变
......
......@@ -31,7 +31,7 @@
let _tempValue = JSON.parse(e.target.value);
// localStorage.setItem('tlSiteid', _tempValue.site_id);
localStorage.setItem('tlSiteid', _tempValue.id);
localStorage.setItem('tlYjAgentId', _tempValue.id);//业绩里业务员id会变
// localStorage.setItem('tlYjAgentId', _tempValue.id);//业绩里业务员id会变
_this.$emit('changeCity', _tempValue.site_id);
}
},
......
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