Commit 71f300fb authored by agping's avatar agping

修改

parent a3a55244
......@@ -230,7 +230,7 @@
</p>
<a id="jump_link" href="javascript:;">
<!--<img src="/app/images/img_btn@2x.png" class="pbl_xz">-->
<span class="pbl_xz">立即打开</span>
<span class="pbl_xz">立即下载</span>
</a>
</div>
......@@ -263,7 +263,7 @@
<script src="/app/js/swiper.js"></script>
<script src="/app/js/app_jump.js"></script>
<script src="/app/js/common.js" charset="utf-8"></script>
<script src="/app/js/detaila_tl.js?new1"></script>
<script src="/app/js/detaila_tuiguang.js?new1"></script>
<script src="/app/js/jquery.cookie.js"></script>
<script src="/app/js/Tab_min.js" charset="utf-8"></script>
</body>
......
/**
* Created by 刘丹 on 2017/10/16.
*/
(function() {
var line_a = "";
var line_a_ulul = "";
var b4_font = "";
var slider3 = "";
var _shangpuId = getUrlParam('id'); //从url获取的商铺id
var _panfang_name='';
var _panfang_img='';
var _panfang_tel='';
var generalize_id =getUrlParam('generalizeId');//分享链接的来源
var p_city = getUrlParam('city');
var p_type = getUrlParam('type');
var p_district_id = getUrlParam('p_district_id');
var p_store_id = getUrlParam('p_store_id');
var p_agent_id = getUrlParam('p_agent_id');
//site_area区分是c端还是b端
//来源 1.c端 3.b端
$.ajax({
url: ServerHostTempC + '/api/getShopDetail',
data: {
'id': _shangpuId,
'site_area': 1
},
type: "GET",
dataType: "json",
beforeSend: function() {},
success: function(response) {
if(typeof response === 'object') {
if(response['code'] == '200') {
_panfang_name=response.data.panParty[0].name;
_panfang_img="https://api.tonglianjituan.com/static/user_header/" + response.data.panParty[0].img;
_panfang_tel=response.data.panParty[0].phone;
isCity();
var shang = response.data.shop_type;
var shanpu = ' ';
if(shang == "0") {
//商场
$('.b3_span_shop_mianji').show();
// shanpu = '<span class="a_fontd">进场费:' + response.data.slotting_fee + '元</span>';
$('.slotting_fee_type').html('进场费');
$('.slotting_fee').html(response.data.slotting_fee+'元');
$(".pu_area").html(response.data.shop_area_start + '-' + response.data.shop_area_end + '㎡');
$(".b3_span").html("商场");
$('.pu_area_type').html('商铺面积');
$('.b3_span_build_type').html('项目总面积'+':');
$('has-housed').html('已入驻'+':');
} else if(shang == "1") {
//街铺
//隐藏 建筑面积
$('.b3_span_shop_mianji').hide();
// shanpu = '<span class="a_fontd">转让费:' + response.data.slotting_fee + '元</span>';
$('.slotting_fee_type').html('转让费');
//判断对外转让费
if(response.data.external_slotting_fee == -1){
$('.slotting_fee').html('面议');
}else{
$('.slotting_fee').html(response.data.external_slotting_fee+'元');
}
$(".pu_area").html(response.data.shop_area_start + '㎡');
$(".b3_span").html("街铺");
$('.pu_area_type').html('建筑面积');
$('.b3_span_build_type').html('建筑面积'+':');
$('.has-housed').html('当前经营'+':');
}
var title = response.data.title ? response.data.title : "";
var _tempStr = '';
if(response.data.rent_type == '1') {
$(".pu_price_type").html("租金");
_tempStr =response.data.rent_price + '元/月';
$(".pu_price").html(_tempStr);
} else if(response.data.rent_type == '2') {
$(".pu_price_type").html("租金");
_tempStr ='营业额扣点'+response.data.rent_price + '%';
$(".pu_price").html(_tempStr);
} else if(response.data.rent_type == '3') {
$(".pu_price_type").html("租金");
_tempStr = response.data.rent_price + '元/天/m²';
$(".pu_price").html(_tempStr);
}else if(response.data.rent_type == '4') {
$(".pu_price_type").html("租金");
_tempStr = response.data.rent_price + '元/年';
$(".pu_price").html(_tempStr);
};
line_a = '<p class="a_fonta">' + title + '</p>';
$(".line_a").html(line_a);
//渲染,部分完毕
var shangpu_tag = response.data.shop_sign;
if(shangpu_tag) {
shangpu_tags = shangpu_tag.split(",");
for(var i = 0; i < shangpu_tags.length; i++) {
line_a_ulul += '<li>' + shangpu_tags[i] + '</li>';
$(".line_a_ulul").html(line_a_ulul);
}
}
$('.b3_span0').html(response.data.management_fee + '元/月');
$('.b3_span_build').html(response.data.market_area + '㎡');
$(".b3_span_build_num").html(response.data.residue_num + '/' + response.data.total);
$(".b3_span2").html(response.data.industry_type);
$(".b3_spanhao").html(response.data.id);
$(".b3_span3").html(response.data.enter_num);
$(".b4_font_p1").html(response.data.external_item_advantage);
$(".terms-payment").html(response.data.payment_deposit);
$(".signing-year").html(response.data.age_limit);
$(".surrounding-complete").html(response.data.rim_mating);
$(".in-section").html(response.data.section);
$(".near-stream").html(response.data.crowd);
$(".other-supplementary").html(response.data.other);
$(".yingye-time").html(response.data.do_business_date);
$(".zhaoshang-time").html(response.data.opening_date);
$(".kaiye-time").html(response.data.start_business_date);
// $(".duinei").html(response.data.city + response.data.disc + response.data.external_address);
$(".duinei").html(response.data.address);
$(".jiaotong").html(response.data.traffic);
/*配套设施 */
$(".electric-quantity-details").html(response.data.electric_quantity+'KW');
$(".voltage-details").html(response.data.voltage+'V');
if(response.data.is_has_gas == 1){
$('.meiqi-details-li').hide();
};
if(response.data.running_water == 0){
$('.running-water-details-li').hide();
};
if(response.data.downriver == 0){
$('.downriver-details-li').hide();
};
if(response.data.exhaust_fume == 0){
$('.exhaust-fume-details-li').hide();
};
//面宽 进深
function switchDecoration(t){
switch(Number(t)){
case 1:return"毛坯";
case 2:return"现状";
case 3:return"简单装修";
case 4:return"精装修";
};
};
var has_decoration = switchDecoration(response.data.decoration);
$('.area-width-details').html(response.data.area_width+'米');
$('.depth-details').html(response.data.depth+'米');
$('.business-scope-details').html(response.data.business_scope);
$('.decoration-details').html(has_decoration);
var lp_img = response.data.images; //轮播图
var lp_img1 = response.data.plan_images; //楼层平面图
var img_item_ul = "";
//平面图 去掉
// if(lp_img1.length == "0") {
// $("#planter").hide();
// }
// for(var n = 0; n < lp_img1.length; n++) {
// slider3 += '<div class="slide"><img src="' + response.data.api_path + response.data.plan_images[n].img_name + '"></div>'
// $(".slider3").html(slider3);
// }
for(var n = 0; n < lp_img.length; n++) {
img_item_ul += '<li class="swiper-slide swiper-slide-active" data-index="1" data-totalindex="1" data-class="101" data-sum="6" style="width: 414px;"><a><img src="' + response.data.api_path + response.data.images[n].img_name + '" onerror="src=\'/app/images/pzz_.jpg\'"/></a></li>'
$("#img_item_ul").html(img_item_ul);
};
//地图相关暂未启用
var longitude = response.data.longitude;
var latitude = response.data.latitude;
// 百度地图API功能
// var map = new BMap.Map("allmap"); // 创建Map实例
// map.centerAndZoom(new BMap.Point(longitude, latitude), 11); // 初始化地图,设置中心点坐标和地图级别
// map.addControl(new BMap.MapTypeControl()); //添加地图类型控件
// map.setCurrentCity("上海"); // 设置地图显示的城市 此项是必须设置的
// map.enableScrollWheelZoom(true); //开启鼠标滚轮缩放
var swiper = new Swiper('.lp-bunner', {
preloadImages: false,
lazyLoading: true,
lazyLoadingOnTransitionStart: true,
onTransitionEnd: function(swiper) {
$('.lp-index').text(swiper.activeIndex + 1);
},
onInit: function(swiper) {
$('.lp-index').text(swiper.activeIndex + 1);
$('.lp-sum').text(swiper.imagesToLoad.length || swiper.imagesLoaded || $('img', '.lp-bunner').size());
}
});
var liWidth = $('.showBigClass li').click(function() {
$(this).addClass('on').siblings().removeClass('on');
var albumType = $(this).attr('data-index');
var $li = $(".shopBigBox .swiper-wrapper").find("[data-class=" + albumType + "]:first");
bimgSwiper.slideTo(+$li.data("totalindex") - 1, 500, true);
}).width();
typeSwiper = new Swiper('.showBigClass', {
width: liWidth ? liWidth : 52.5
});
//隐藏时间
if(shang == "0") {
//商场
$('.zhaoshang-time-p, .kaiye-time-p, .b3_span_shop_num').show();
} else if(shang == "1") {
//街铺
}
} else {
layerTipsX(response['msg']);
}
} else {
layerTipsX('data type error');
};
},
error: function() {
}
});
//获取房源动态
$.ajax({
url: '/api/getMarchInList',
data: {
'house_id': _shangpuId,
'is_return_list': 1
},
type: "GET",
dataType: "json",
beforeSend: function() {},
success: function(response) {
if(typeof response === 'object') {
if(response['code'] == '200') {
$('.take_look_7').html(response.data.week);
$('.take_look_30').html(response.data.month);
$('.take_look_focus').html(response.data.attention);
} else {
layerTipsX(response['msg']);
}
} else {
layerTipsX('data type error');
};
},
error: function() {
}
});
//添加下载app链接相关
var _share = getUrlParam('share');
if(_share == "1") {
$('.m_part3_w').hide();
var _fix_top = $(".public");
_fix_top.show();
$(".pbl_cha").click(function() {
_fix_top.hide();
});
var _name = getUrlParam('user_name');
var _name_img = getUrlParam('user_img');
var _tel = getUrlParam('user_tel');
// pc h5推广
//经纪人 商铺列表 微门店
if(_name || _tel) {
var _fix_bottom = $(".fix_area_bottom_new");
_fix_bottom.show();
$('.shop-list').show();
$("#fix_name").html(_name);
$("#fix_tel").attr("href", "tel:" + _tel);
if(_name_img){
$(".head-img-agent").attr("src", _name_img);
}else{
$(".head-img-agent").attr("src", "/app/images/ic_default_headpic.png");
}
//点击拨打 记录拨打次数 朱威
$("#fix_tel").click(function() {
var time = localStorage.getItem(_shangpuId+"_"+_tel);
var nowTime = (new Date()).getTime();
if(!time || nowTime-time > 24*3600*1000){
$.ajax({
url: '/api/addUserCallAgentV2',
type: 'POST',
async: true,
data: {
'phone': _tel
},
dataType: 'json',
success: function(data) {
localStorage.setItem(_shangpuId+"_"+_tel,(new Date()).getTime());
}
});
}
});
$("#fix_tel").click(function() {
var _time = localStorage.getItem(_tel+"_"+_shangpuId);
var _nowTime = (new Date()).getTime();
if(!_time || _nowTime-_time > 24*3600*1000){
$.ajax({
url: '/api/recordCallNumShare',
type: 'POST',
async: true,
data: {
'phone': _tel
},
dataType: 'json',
success: function(data) {
localStorage.setItem(_tel+"_"+_shangpuId,(new Date()).getTime());
}
});
}
});
$("#fix_area_bottom_btn").click(function() {
_fix_bottom.hide();
});
//点击 商铺详情的 更多商铺
$('.shop-list').click(function() {
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(p_city){
var _fix_bottom = $(".fix_area_bottom_new");
_fix_bottom.show();
$('.shop-list').show();
$("#fix_name").html(_panfang_name);
$("#fix_tel").attr("href", "tel:" + _panfang_tel);
if(_panfang_img){
$(".head-img-agent").attr("src", _panfang_img);
}else{
$(".head-img-agent").attr("src", "/app/images/ic_default_headpic.png");
}
//点击拨打 记录拨打次数 朱威
$("#fix_tel").click(function() {
var time = localStorage.getItem(_shangpuId+"_"+_tel);
var nowTime = (new Date()).getTime();
if(!time || nowTime-time > 24*3600*1000){
$.ajax({
url: '/api/addUserCallAgentV2',
type: 'POST',
async: true,
data: {
'phone': _panfang_tel,
'source':generalize_id
},
dataType: 'json',
success: function(data) {
localStorage.setItem(_shangpuId+"_"+_tel,(new Date()).getTime());
}
});
}
});
$("#fix_tel").click(function() {
var _time = localStorage.getItem(_tel+"_"+_shangpuId);
var _nowTime = (new Date()).getTime();
if(!_time || _nowTime-_time > 24*3600*1000){
$.ajax({
url: '/api/recordCallNumShare',
type: 'POST',
async: true,
data: {
'phone': _panfang_tel
},
dataType: 'json',
success: function(data) {
localStorage.setItem(_tel+"_"+_shangpuId,(new Date()).getTime());
}
});
}
});
$("#fix_area_bottom_btn").click(function() {
_fix_bottom.hide();
});
//点击 商铺详情的 更多商铺
$('.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+'&generalizeId=' + generalize_id;
});
};
};
//
$('#jump_link').click(function(){
location.href = ServerHost + '/app.php/app/download_c';
})
// $('#jump_link').attr("data-phone" , JSON.parse($('#open_id').val()).is_user)
// jumpEvent(); //添加跳转app页面事件
}
})();
$(document).ready(function(){
// $('#jump_link').attr("data-phone" , JSON.parse($('#open_id').val()).is_user)
})
\ No newline at end of file
......@@ -2,7 +2,7 @@
<div class="min-height-list">
<nav>
<div class="top-city-select-area flex-center">
<select @change="changeCity" v-model="initSelectCity">
<select @change="changeCity" v-model="initSelectCity" :disabled="isSelectDisabled">
<option value="上海市">上海市</option>
<option value="杭州市">杭州市</option>
<option value="深圳市">深圳市</option>
......@@ -136,6 +136,7 @@
site_area:2,
generalizeId:1,
isShowSearch:1,
isSelectDisabled:1,
initTabNumAreaCity:0,
initTabNumBusiness:0,
initMoreNum:0,
......@@ -172,6 +173,7 @@
let _this = this;
if(_this.$route.query.city){
_this.isShowSearch = 0;
_this.isSelectDisabled = 0;
_this.initSelectCity = decodeURIComponent(_this.$route.query.city);
_this.initTabNumMain = _this.$route.query.type*1 == 1?0:1;
_this.p_district_id = _this.$route.query.p_district_id;
......@@ -466,7 +468,7 @@
let _this = this;
//从推广链接 跳转
if(_this.$route.query.city){
var str = this.common.ServerHost + "/index/shareShop?id=" + id +'&share=1&isC=0&client=b&city=' + _this.$route.query.city +'&type=' + _this.$route.query.type +'&p_district_id=' + _this.$route.query.p_district_id+'&p_store_id=' + _this.$route.query.p_store_id +'&p_agent_id=' + _this.$route.query.p_agent_id+'&generalizeId=' + _this.$route.query.generalizeId;
var str = this.common.ServerHost + "/app.php/app/share_detail?id=" + id +'&share=1&isC=0&client=b&city=' + _this.$route.query.city +'&type=' + _this.$route.query.type +'&p_district_id=' + _this.$route.query.p_district_id+'&p_store_id=' + _this.$route.query.p_store_id +'&p_agent_id=' + _this.$route.query.p_agent_id+'&generalizeId=' + _this.$route.query.generalizeId;
}else{
var user_img = localStorage.getItem('shop_list_b_user_img');
var user_name = localStorage.getItem('shop_list_b_user');
......
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