(function () {
    var $header = null;
    var stuNo = '';
    var page = {
        isScroll: true,
        init: function ($page, param) {
            stuNo = param.stuNo;
            // 添加头部按钮列表 
            $header = $page.parents('.f-page').find('.f-page-header');
            learun.httpget(config.webapi + 'learun/EducationalAdministration/StuInfoBasic/stuinfoDetail',stuNo, function (data) {
                console.log(data);
                $('.sQrList div strong').eq(0).html(data.stuInfo.StuName);
                $('.sQrList div strong').eq(1).html(data.majorInfo.MajorName);
                $('.sQrList div strong').eq(2).html(data.classInfo.ClassName);
                $('.sQrList div strong').eq(3).html(data.stuInfo.StuNo);
                $('.sQrList div strong').eq(4).html(data.roomInfo);
                //$('.sQrList div strong').eq(4).html(data.stuInfo.Photo); //学生照片
                if (data.stuInfo.Photo != '') {
                    $('.sQrTypePhoto img').attr('src', config.web + data.stuInfo.Photo);
                } else {
                    if (data.stuInfo.GenderNo) {

                        $('.sQrTypePhoto img').attr('src', '/images/on-boy.jpg');
                    } else {

                        $('.sQrTypePhoto img').attr('src', '/images/on-girl.jpg');
                    }
                }
                learun.code.encode({ id: 'lr_mycode_qrcode', text: data.stuInfo.StuNo });
            }) 

            page.bind($page, param);

        },
        bind: function ($page, param) {

        }, destroy: function (pageinfo) {
            $header = null;
        }
    };


    return page;


})();