Je kunt niet meer dan 25 onderwerpen selecteren
			Onderwerpen moeten beginnen met een letter of nummer, kunnen streepjes bevatten ('-') en kunnen maximaal 35 tekens lang zijn.
		
		
		
		
		
			
		
			
				
					
					
						
							77 regels
						
					
					
						
							3.1 KiB
						
					
					
				
			
		
		
		
			
			
			
				
					
				
				
					
				
			
		
		
	
	
							77 regels
						
					
					
						
							3.1 KiB
						
					
					
				
								{{template "header" .}}
							 | 
						|
								<meta name="keywords" content="码农随笔,个人随笔,博客,个人博客,个人笔记,技术博客,免费云笔记,云笔记,随笔,IT博客,谷歌地图,码农笔录,aiprose">
							 | 
						|
								<title>注册 - 码农随笔</title>
							 | 
						|
								</head>
							 | 
						|
								<body>
							 | 
						|
								<div class="root-container">
							 | 
						|
								{{template "nav" .}}
							 | 
						|
								    <div class="login-root">
							 | 
						|
								        <div class="input-container">
							 | 
						|
								            <div class="input-root">
							 | 
						|
								                <div class="inputs-class regist">
							 | 
						|
								                    <i-form>
							 | 
						|
								                        <form-item prop="user">
							 | 
						|
								                            <i-input type="text" v-model="user.username" placeholder="请输入用户名">
							 | 
						|
								                                <Icon type="ios-person-outline" slot="prepend"></Icon>
							 | 
						|
								                            </i-input>
							 | 
						|
								                        </form-item>
							 | 
						|
								                        <form-item prop="password">
							 | 
						|
								                            <i-input type="password" v-model="user.userpwd" placeholder="请输入密码">
							 | 
						|
								                                <Icon type="ios-lock-outline" slot="prepend"></Icon>
							 | 
						|
								                            </i-input>
							 | 
						|
								                        </form-item>
							 | 
						|
								                        <form-item prop="password">
							 | 
						|
								                            <i-input type="password" v-model="user.userpwdrepeat" placeholder="请重复密码">
							 | 
						|
								                                <Icon type="ios-lock-outline" slot="prepend"></Icon>
							 | 
						|
								                            </i-input>
							 | 
						|
								                        </form-item>
							 | 
						|
								                        <i-button type="info" long @click="regist">快速注册</i-button>
							 | 
						|
								                    </i-form>
							 | 
						|
								                    <div class="login-bottom">
							 | 
						|
								                        <a href="/login">快速登录</a>
							 | 
						|
								                    </div>
							 | 
						|
								                </div>
							 | 
						|
								            </div>
							 | 
						|
								        </div>
							 | 
						|
								    </div>
							 | 
						|
								</div>
							 | 
						|
								</body>
							 | 
						|
								<script>
							 | 
						|
								    var app = new Vue({
							 | 
						|
								        el: ".root-container",
							 | 
						|
								        delimiters: ['${', '}'],
							 | 
						|
								        data: {
							 | 
						|
								            user: {}
							 | 
						|
								        },
							 | 
						|
								        methods: {
							 | 
						|
								            regist (){
							 | 
						|
								                var _this= this
							 | 
						|
								                if (this.user.username.trim().length < 4) {
							 | 
						|
								                    this.$Message.warning('用户名最低4位');
							 | 
						|
								                    return
							 | 
						|
								                }
							 | 
						|
								                if (this.user.userpwd.trim().length < 6) {
							 | 
						|
								                    this.$Message.warning('密码最低6位');
							 | 
						|
								                    return
							 | 
						|
								                }
							 | 
						|
								                if (!this.user.userpwdrepeat || (this.user.userpwdrepeat.trim() != this.user.userpwd.trim())) {
							 | 
						|
								                    this.$Message.warning('两次密码输入不一致');
							 | 
						|
								                    return
							 | 
						|
								                }
							 | 
						|
								                $.post('/api/regist', this.user,
							 | 
						|
								                    function (data) {
							 | 
						|
								                        if (data.Status == 1) {
							 | 
						|
								                            _this.$Message.warning(data.Msg);
							 | 
						|
								                        } else {
							 | 
						|
								                            _this.$Message.success("注册成功,现在去登陆哦");
							 | 
						|
								                            setTimeout(function () {
							 | 
						|
								                                window.location.href = "/login"
							 | 
						|
								                            }, 800)
							 | 
						|
								                        }
							 | 
						|
								                    }, 'json')
							 | 
						|
								            }
							 | 
						|
								        }
							 | 
						|
								    })
							 | 
						|
								</script>
							 | 
						|
								<script type="text/javascript" src="/static/js/seo.js"></script>
							 | 
						|
								</html>
							 |