mui.plusReady(function() {
	var level = '';
	JZL.ajax(qlgUrl('app/users/myFriend'), {}, function(data) {
		//console.log(data);
		if (1 == data.status) {
			var data = data.data;
			var html = '',
				html1 = '';

			html1 = '<p class="">' + data.pInfo.trueName + '<span class="orange">' + data.pInfo.userStatus +
				'</span></p><span class="shop_info">' + data.pInfo.userLevel + '</span><span class="shop_info">' + data.pInfo.userPhone +
				'</span>';
			html =
				'<div class="row shadown_wai" data-level="-1"><label for="">我推荐</label><label for=""><span class="lock"></>' +
				data.lockUserCount +
				'</span><span class="lock">（禁用）</span></label></div><div class="row shadown_wai" data-level="0"><label for="">购户</label><label for="">' +
				data.userCount +
				'</label></div><div class="row shadown_wai" data-level="1"><label for="">商户</label><label for="">' + data.shopCount +
				'</label></div><div class="row shadown_wai" data-level="2"><label for="">商超</label><label for="">' + data.storeCount +
				'</label></div><div class="row shadown_wai" data-level="3"><label for="">商厦</label><label for="">' + data.mallCount +
				'</label></div><div class="row shadown_wai" data-level="4"><label for="">商都</label><label for="">' + data.marketCount +
				'</label></div>';
			// html1=data.user.loginName+" "+data.user.userId
			$('.fri-con').html(html)
			$('.shop_info').html(html1)
			$('.userInfo').text(data.user.loginName)
			//二维码生成
			// var  content=''
			var qrcode = new QRCode(document.getElementById("qrcode"), {
				width: 100, //设置宽高
				height: 100
			});
			//console.log(data.share_url);
			//$('body').append('<div id="qrcode" class="qrcode_img" style="display:none;"></div>');
			qrcode.makeCode(data.share_url);
			// //console.log('http://t.ect99.com/mobile/users/reg?pName='+ data.user.loginName);		
			$('#qrcode').show();
		}else{
				mui.alert(data.msg)
			}
	})

	$('body').on("tap", '.row', function() {
		// alert(1)
		level = $(this).attr('data-level');
		JZL.openWindow('friendsList.html', 'friendsList.html', {
			'level': level
		})
	})



})
