Commit 717fb0ee authored by agping's avatar agping

商铺详情修改

parent 0d5b8ed4
...@@ -45,6 +45,7 @@ ...@@ -45,6 +45,7 @@
_panfang_name=response.data.panParty[0].name; _panfang_name=response.data.panParty[0].name;
_panfang_img="https://api.tonglianjituan.com/static/user_header/" + response.data.panParty[0].img; _panfang_img="https://api.tonglianjituan.com/static/user_header/" + response.data.panParty[0].img;
_panfang_tel=response.data.panParty[0].phone; _panfang_tel=response.data.panParty[0].phone;
isCity();
var shang = response.data.shop_type; var shang = response.data.shop_type;
var shanpu = ' '; var shanpu = ' ';
if(shang == "0") { if(shang == "0") {
...@@ -287,17 +288,22 @@ ...@@ -287,17 +288,22 @@
// var _name_img = getUrlParam('user_img'); // var _name_img = getUrlParam('user_img');
// var _tel = getUrlParam('user_tel'); // var _tel = getUrlParam('user_tel');
// pc h5推广 // pc h5推广
if(_city){
//经纪人 商铺列表 微门店
if(_name || _tel) {
var _fix_bottom = $(".fix_area_bottom_new"); var _fix_bottom = $(".fix_area_bottom_new");
_fix_bottom.show(); _fix_bottom.show();
$('.shop-list').show(); $('.shop-list').show();
$("#fix_name").html(_panfang_name); $("#fix_name").html(_name);
$("#fix_tel").attr("href", "tel:" + _panfang_tel); // $("#fix_tel").attr("href", "tel:" + _tel).html(_tel);
if(_panfang_img){ $("#fix_tel").attr("href", "tel:" + _tel);
$(".head-img-agent").attr("src", _panfang_img); if(_name_img){
$(".head-img-agent").attr("src", _name_img);
}else{ }else{
$(".head-img-agent").attr("src", "/app/images/ic_default_headpic.png"); $(".head-img-agent").attr("src", "/app/images/ic_default_headpic.png");
} }
//点击拨打 记录拨打次数 朱威 //点击拨打 记录拨打次数 朱威
$("#fix_tel").click(function() { $("#fix_tel").click(function() {
var time = localStorage.getItem(_shangpuId+"_"+_tel); var time = localStorage.getItem(_shangpuId+"_"+_tel);
...@@ -308,8 +314,7 @@ ...@@ -308,8 +314,7 @@
type: 'POST', type: 'POST',
async: true, async: true,
data: { data: {
'phone': _tel, 'phone': _tel
'source':generalize_id
}, },
dataType: 'json', dataType: 'json',
success: function(data) { success: function(data) {
...@@ -341,24 +346,24 @@ ...@@ -341,24 +346,24 @@
}); });
//点击 商铺详情的 更多商铺 //点击 商铺详情的 更多商铺
$('.shop-list').click(function() { $('.shop-list').click(function() {
location.href = ServerHost + "/app/dist/#/shopList?city=" + p_city +'&type=' + p_type +'&p_district_id=' + p_district_id+'&p_store_id=' + p_store_id +'&p_agent_id=' + p_agent_id; localStorage.setItem('shop_list_b_user',_name);
localStorage.setItem('shop_list_b_user_tel',_tel);
localStorage.setItem('shop_list_b_user_img',_name_img);
location.href = ServerHost + '/app/dist/#/shopList';
}); });
}; };
function isCity(){//判断是 推广链接
//经纪人 商铺列表 微门店 if(_city){
if(_name || _tel) {
var _fix_bottom = $(".fix_area_bottom_new"); var _fix_bottom = $(".fix_area_bottom_new");
_fix_bottom.show(); _fix_bottom.show();
$('.shop-list').show(); $('.shop-list').show();
$("#fix_name").html(_name); $("#fix_name").html(_panfang_name);
// $("#fix_tel").attr("href", "tel:" + _tel).html(_tel); $("#fix_tel").attr("href", "tel:" + _panfang_tel);
$("#fix_tel").attr("href", "tel:" + _tel); if(_panfang_img){
if(_name_img){ $(".head-img-agent").attr("src", _panfang_img);
$(".head-img-agent").attr("src", _name_img);
}else{ }else{
$(".head-img-agent").attr("src", "/app/images/ic_default_headpic.png"); $(".head-img-agent").attr("src", "/app/images/ic_default_headpic.png");
} }
//点击拨打 记录拨打次数 朱威 //点击拨打 记录拨打次数 朱威
$("#fix_tel").click(function() { $("#fix_tel").click(function() {
var time = localStorage.getItem(_shangpuId+"_"+_tel); var time = localStorage.getItem(_shangpuId+"_"+_tel);
...@@ -369,7 +374,8 @@ ...@@ -369,7 +374,8 @@
type: 'POST', type: 'POST',
async: true, async: true,
data: { data: {
'phone': _tel 'phone': _tel,
'source':generalize_id
}, },
dataType: 'json', dataType: 'json',
success: function(data) { success: function(data) {
...@@ -401,12 +407,10 @@ ...@@ -401,12 +407,10 @@
}); });
//点击 商铺详情的 更多商铺 //点击 商铺详情的 更多商铺
$('.shop-list').click(function() { $('.shop-list').click(function() {
localStorage.setItem('shop_list_b_user',_name); location.href = ServerHost + "/app/dist/#/shopList?city=" + p_city +'&type=' + p_type +'&p_district_id=' + p_district_id+'&p_store_id=' + p_store_id +'&p_agent_id=' + p_agent_id;
localStorage.setItem('shop_list_b_user_tel',_tel);
localStorage.setItem('shop_list_b_user_img',_name_img);
location.href = ServerHost + '/app/dist/#/shopList';
}); });
}; };
};
$('#jump_link').attr("data-phone" , JSON.parse($('#open_id').val()).is_user) $('#jump_link').attr("data-phone" , JSON.parse($('#open_id').val()).is_user)
jumpEvent(); //添加跳转app页面事件 jumpEvent(); //添加跳转app页面事件
} }
......
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