mui.ready(function() {
	var userType = getParam("userType");
	var isDrp = getParam("isDrp");
	if(userType == '2' && isDrp == 'true') {
		$('.mui-bar-tab').hide();
		isDrp = 'false';
	} else {
		userType = 1;
	}
	mui.ajax(base_path + '/agent/memberInfo?dates=' + new Date().getTime(), {
		dataType: 'json',
		type: 'post',
		timeout: 15000,
		success: function(dt) {
			//console.log(dt)
			if(dt.status) {
				var shareOpenid = dt.data.userOpenid;
				var link = domanUrl + "/iamberry/wechat/agentWechat/goPublicity?shareOpenid=" + shareOpenid + "&userType=" + userType;
				//添加分享
				window.repleFlag = false;
				window.wxFriend = {
					"appId": "",
					"imgUrl":'http://static.iamberry.com/images/shop/naiji_xuanchuan.jpg',
					"link": link,
					"desc": "家里有了爱贝源智能冲奶机，宝宝喂奶，so easy...", //描述
					"title": "8秒冲奶，宝宝喂奶，让更多的妈妈睡个好觉", //标题
					"netError": "您的网络异常，请刷新重试!如多次刷新无效，请向我们反应 ~",
					"shareTimeSuccess": "分享成功", //分享朋友圈后回调
					"shareTimeCancel": "已取消分享", //取消分享朋友圈后回调
					"shareAppSuccess": "分享成功", //分享好友后回调
					"shareAppCancel": "已取消分享" //取消分享好友后回调
				};
				getConfig();
				document.querySelector('.loading-bg').style.display = 'none';
			} else {
				var btnArray = ['否', '是'];
				mui.confirm(dt.message + '是否刷新页面？', '爱贝源-提示', btnArray, function(e) {
					if(e.index == 1) {
						location.reload(true);
					}
				});
			}
		},
		error: function(xhr, type, errorThrown) {
			//异常处理；
			errorfn(xhr);
		}
	});
});