define(['zepto','medtap'],function($,medtap){
	var check = {
		wechatId:medtap.getRequest('wechatId'),
		agencyId:medtap.getRequest('agencyId'),
		bookId:medtap.getRequest('bookId'),
		init:function(){
			check.getUserAttentionWX();
		},
		//获取用户是否关注公众号
		getUserAttentionWX:function(){
			$.ajax({
				url:'https://testdevgw.medtap.cn/wechat/getWeChatAttention',
				type:'get',
				dataType:'json',
				contentType: "application/json",
				headers:{
					'apptype':'wechat'
				},
				success:function(res){
					if(res.success == true){
						
					}
				}
			})
		},
		//获取用户是否绑定过手机号
		checkUserMobile:function(){
			$.ajax({
				url: 'https://testdevgw.medtap.cn/user/getUserDetail',
				headers: {
					appType: 'wechat'
				},
				type: 'get',
				async: false,
				data:{
					wechatId:check.wechatId
				},
				success:function(res){
					if(res.success == true){
						var userData = res.content.userInfo;
						if(!!userData.mobile){
							//已经绑定过手机号
						}else{
							//未绑定手机号
						}
					}
				}
			})
		}
	}
	check.init();
})