UIControlApe.js 1.4 KB
//*
// 控制UI界面的模块
// */

import Loger from "../Loger";
import Ape from "./Ape";
import $ from "jquery";
import ClassDataProxy from "proxy/ClassDataProxy";
let loger = Loger.getLoger('PC-UIControlApe');

class UIControlApe extends Ape {
    constructor() {
        super();
        this.init();
    }
    init(){
        //注册学生
        $('#signPhone').on('focus',this._signFocusHandler.bind(this));//注册判断手机号
        $('#signMail').on('focus',this._signFocusHandler.bind(this));//注册判断邮箱
        $('#signPassWord').on('focus',this._signFocusHandler.bind(this));//注册判断密码
        $('#securityCode').on('focus',this._signFocusHandler.bind(this));//注册判断验证码
        //注册老师
        $('#createUserPhone').on('focus',this._signFocusHandler.bind(this));//注册用户判断手机号
        $('#createUserMail').on('focus',this._signFocusHandler.bind(this));//注册用户判断邮箱
        $('#createUserPassWord').on('focus',this._signFocusHandler.bind(this));//注册用户判断密码
        $('#createUserIdentity').on('focus',this._signFocusHandler.bind(this));//注册用户判断身份证号

    }
    _signFocusHandler(evt){
        let _ele = $(evt.target);
        if(_ele.css('color') != 'rgb(0, 0, 0)'){
            _ele.val('')
                .css('color','#000');
        }
    }
}

export default new UIControlApe;