webpackJsonp([15],{

/***/ 220:
/***/ (function(module, exports, __webpack_require__) {

"use strict";
/* WEBPACK VAR INJECTION */(function(Vue) {

var _public = __webpack_require__(4);

_public.iot.ready(init); /**
                         * v_register.js
                         * Version: 0.1
                         * User: wy
                         * Date: 2017-09-06
                         * Copyright(c)  2017. U-GEN Tech.Co,Ltd. All Rights Reserved.
                         * 注册页面
                         */

function init() {
    //通用 input、按钮、dialog、loading组件
    _public.uPublic.componentsInit(['u-text', 'u-button', 'u-dialog', 'u-loading']);
    var app = new Vue({
        data: {
            numberTel: null,
            textCode: null,
            codeDisabledFlag: false,
            textPassword: null,
            textErrorTip: null,
            //配置组件
            componentsConfig: initComponentsConfig()
        },
        mounted: function mounted() {},

        methods: {
            getCodeDisabledFlag: function getCodeDisabledFlag() {
                return this.codeDisabledFlag;
            },
            setCodeDisabledFlag: function setCodeDisabledFlag(boolean) {
                this.codeDisabledFlag = boolean;
            },
            onTelChange: function onTelChange(number) {
                telChange(this, number);
            },
            onCodeChange: function onCodeChange(text) {
                codeChange(this, text);
            },
            onPasswordChange: function onPasswordChange(text) {
                passwordChange(this, text);
            },

            //tap <
            onBackTap: function onBackTap() {
                backTap();
            },

            //tap 获取验证码
            onCodeButtonTap: function onCodeButtonTap() {
                codeButtonTap(this);
            },

            //tap 注册
            onRegisterButtonTap: function onRegisterButtonTap() {
                registerButtonTap();
            }
        }
    }).$mount('#app');
}

//配置组件参数
function initComponentsConfig() {
    return {
        telInput: {
            initParam: {
                class: 'custom-text',
                icon: '&#xe6e8;',
                placeholder: Vue.t('register.telInputTip'),
                maxlength: 11,
                minlength: 11
            }
        },
        codeInput: {
            initParam: {
                class: 'custom-code-text',
                icon: '&#xe805;',
                placeholder: Vue.t('register.codeInputTip')
            }
        },
        //获取验证码 button 参数
        codeButton: {
            initParam: {
                class: 'custom-code-button',
                text: Vue.t('btn.getCode')
            }
        },
        passwordInput: {
            initParam: {
                class: 'custom-password-text',
                icon: '&#xe64d;',
                placeholder: Vue.t('register.passwordInputTip'),
                type: 'password',
                maxlength: 6,
                minlength: 6
            }
        },
        //注册 button 参数
        registerButton: {
            initParam: {
                class: 'custom-button',
                text: Vue.t('btn.register')
            }
        },
        dialog: {
            initParam: {
                class: 'custom-dialog'
            }
        },
        loading: {
            initParam: {
                class: 'custom-loading'
            }
        }
    };
}

function telChange(self, number) {
    self.numberTel = number;
    console.log('telChange: ' + self.numberTel);
}

function codeChange(self, text) {
    self.textCode = text;
    console.log('codeChange: ' + self.textCode);
}

//tap 获取验证码
function codeButtonTap(self) {
    self.setCodeDisabledFlag(true);
}

function passwordChange(self, text) {
    self.textPassword = text;
    console.log('passwordChange: ' + self.textPassword);
}

//tap <
function backTap() {
    _public.iot.navigator.back();
}

//tap 注册
function registerButtonTap() {
    _public.iot.navigator.openWindow({
        url: '../device/index.html',
        id: 'device'
    });
}
/* WEBPACK VAR INJECTION */}.call(exports, __webpack_require__(2)["default"]))

/***/ }),

/***/ 321:
/***/ (function(module, exports, __webpack_require__) {

module.exports = __webpack_require__(220);


/***/ })

},[321]);
//# sourceMappingURL=register.js.map