1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192 |
- /**
- * Created by xiaofeng on 2017/8/9.
- */
- csrfToken = $('meta[name=csrf-token]').prop('content');
- function ReturnInfo(info) {
- if(info != null){
- var strmsg = '';
- if(typeof info == 'string'){
- return info;
- }
- $.each(info,function (kk,vv) {
- strmsg +=vv[0]+'<br>';
- })
- if(typeof strmsg == 'string'){
- return strmsg;
- }
- }
- }
- //价格转换
- function house_price($a,$b) {
- if($a == '' || $a == 0 || $a == null){
- return '待定';
- }else{
- return $a+'<i>'+$b+'</i>';
- }
- }
- //转换楼盘没有的数据
- function house_params($a) {
- if($a == '' || $a == 0 || $a == null){
- return '暂无数据';
- }
- return $a;
- }
- var feng_cityTel;
- $('.y_call').click(function(){
- var y_call=$('#feng_citytel').text();
- if (typeof y_call === 'string' && y_call != '') {
- return window.location.href = 'tel:'+y_call;
- }
-
- $.ajax({
- url:'/index/telrand',
- dataType:"json",
- type:'POST',
- data:{city:feng_cityTel,csrf_token_m:csrfToken},
- success:function(data){
- if(data.code == 200){
- return window.location.href = 'tel:'+data.data.tel;
- }
- },
- error:function(){
- }
- });
- })
- $(function(){
- // ������һ��������
- $('.y_lpleft').on('click',function(){
- history.back(-1);
- })
- })
- //获取GET请求参数
- function getUrlParams(url) {
- var theRequest = new Object();
- if (!url)
- url = location.href;
- if (url.indexOf("?") !== -1)
- {
- var str = url.substr(url.indexOf("?") + 1) + "&";
- var strs = str.split("&");
- for (var i = 0; i < strs.length - 1; i++)
- {
- var key = strs[i].substring(0, strs[i].indexOf("="));
- var val = strs[i].substring(strs[i].indexOf("=") + 1);
- theRequest[key] = val;
- }
- }
- return theRequest;
- }
|