$('.recommend_title img').eq(0).attr('src', hyhImgUrl('static/app2/img/goods_title.png'));
$('.recommend_title img').eq(1).attr('src', hyhImgUrl('static/app2/img/coupon_title.png'));
$('.recommend_title img').eq(0).css('display', 'none');
$('.recommend_title img').eq(1).css('display', 'none');
 var shopId = localStorage.getItem('shopId');
 var shopLat = localStorage.getItem('shopLat');
 var shopLng = localStorage.getItem('shopLng');
 var shopName = localStorage.getItem('shopName');
 var phone = localStorage.getItem('phone');
 var userName = localStorage.getItem('userName');
mui.plusReady(function() {
	// var data = JSON.parse(localStorage.getItem('shop_data'));
var self = plus.webview.currentWebview();
from_id = self.from_id?self.from_id:0;
 var userLat='';
 var userLng='';
 var scheme = "";
 var arr = [];
 var title = {};
 var shopAddress="";
 // 加载地图
 getLocation(function(data) {
 	// console.log(data);
 	if (1 == data.status) {
 		$('#lng').val(data.lng);
 		$('#lat').val(data.lat);
 		getMap(shopLng, shopLat)
 		// //console.log(JSON.stringify(data));
 	} else {
 		mui.alert(data.errStr);
 		return;
 	}
 });
 $.getJSON('http://api.map.baidu.com/geocoder/v2/?ak=Zm7kae5pzZogp8a0uwIOlyyz&callback=?&location='+shopLat+','+shopLng+'&output=json&pois=1',function(res){
 	// //console.log(res);
 //addressComponent => {city: "广州市", district: "天河区", province: "广东省", street: "广州大道", street_number: "中922号-之101-128"} 
 // //console.log(res.result.addressComponent.city)
  $(".shopAddress").html(res.result.formatted_address);
  // $("#location-r").html(res.result.addressComponent.city);
 
 })
//  $.getScript('http://int.dpool.sina.com.cn/iplookup/iplookup.php?format=js',function(){  
//  alert(remote_ip_info.country);//国家  
//  alert(remote_ip_info.province);//省份  
//  alert(remote_ip_info.city);//城市  
// });  
// 获取用户地址
plus.geolocation.getCurrentPosition(function (p) {
	//console.log(p.coords.latitude);
	//console.log(p.coords.longitude);
userLat=p.coords.latitude;
userLng=p.coords.longitude
},function (err) {
	
})
// 	mui.ajax(ectUrl('app/Shops/getHome'), {
// 		data: {
// 			shopId: shopId
// 		},
// 		dataType: 'json', //服务器返回json格式数据  
// 		type: 'post', //HTTP请求类型
// 		timeout: 10000, //超时时间设置为10秒;  
// 		success: function(data) { //服务器返回响应,根据响应结果,分析是否登录成功;  
// 
// 			if (data.status == 1) {
// 				var data = data.data;
// 				if (data.shop.shopAds.length > 0) {
// 					var html = '';
// 					$.each(data.shop.shopAds, function() {
// 						html += '
 + ')
 + '.png') +
// 							')
点击领取
满' + this.useMoney + '使用
' + this.couponValue +
// 							'
' + this.catName + '
';
// 				//				});
// 				//				$('.label').html(html3);
// 				//				$('.l_block').each(function(num) {
// 				//					if((num + 1) % 4 == 0) {
// 				//						$(this).addClass('lbrr');
// 				//					}
// 				//				})
// 				var html4 = '';
// 				if (data.rec == '') {
// 					$('.recommend_title').eq(1).css('display', 'none');
// 				} else {
// 					$.each(data.rec, function() {
// 						html4 += ' +
// 							')
自营' + this.goodsName +
// 							'
¥' + this.shopPrice +
// 							'满减
可用木吉抵扣20%货款
