| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199 |
- <!DOCTYPE html>
- <html class="bg-white">
- <head>
- <meta charset="utf-8">
- <!--此行代码为禁止苹果手机自动识别电话号码-->
- <meta name="format-detection" content="telephone=no">
- <meta name="viewport"
- content="maximum-scale=1.0,minimum-scale=1.0,user-scalable=0,initial-scale=1.0,width=device-width"/>
- <meta name="format-detection" content="telephone=no,email=no,date=no,address=no">
- <title>注册</title>
- <link rel="stylesheet" type="text/css" href="{{asset('home/css/home.css')}}"/>
- <link rel="stylesheet" type="text/css" href="{{asset('home/css/style/edit.css')}}"/>
- <link rel="stylesheet" type="text/css" href="{{asset('home/css/alert.css')}}"/>
- <script src="{{asset('home/script/jQuery-2.2.0.min.js')}}"></script>
- <script src="{{asset('home/script/alert.js')}}"></script>
- <script src="{{asset('home/script/vue.js')}}"></script>
- <style>
- [v-cloak] {
- display: none;
- }
- </style>
- </head>
- <body>
- <div id="app" v-cloak>
- <div class="mui-content">
- <ul class="edit-list edit-list-4">
- <li>
- <div class="edit-list-con">
- <label>推 荐 人</label>
- <div class="edit-list-inp">
- <input type="text" v-model="invitation_code1" placeholder="邀请码或推荐人手机号码"/>
- </div>
- </div>
- </li>
- <li>
- <div class="edit-list-con">
- <label>手机账号</label>
- <div class="edit-list-inp">
- <input type="number" v-model="phone" placeholder="请输入手机号码"/>
- </div>
- </div>
- </li>
- <li>
- <div class="edit-list-con">
- <label>设置密码</label>
- <div class="edit-list-inp edit-list-icon">
- <input type="password" id="password" v-model="password" placeholder="请设置登录密码"/>
- <i @click="tgtype(2)" class="art-icon icon-nolook"></i>
- </div>
- </div>
- </li>
- <li>
- <div class="edit-list-con">
- <label>短信验证</label>
- <div class="edit-list-inp edit-list-msg">
- <input type="number" v-model="code" placeholder="请输入验证码"/>
- <div class="edit-list-btn" v-if="codedaojishinum*1<=0" @click="codedaojishiftel()">发送短信
- </div>
- <div class="edit-list-btn" v-else>
- <div>@{{codedaojishinum+' s'}}</div>
- </div>
- </div>
- </div>
- </li>
- </ul>
- <div class="edit-ft">
- <button class="edit-ft-btn edit-ft-btn-1" @click="submitform()" >确认注册</button>
- </div>
- <div class="edit-link">
- <div class="edit-link-l">
- 已有账号?
- <div class="edit-link-con" onclick="<?php echo url('down');?>">下载app</div>
- </div>
- </div>
- </div>
- </div>
- <!--加载动画样式-->
- <div id="allload" class="mine-dialog" v-cloak>
- <div class="loader-inner ball-spin-fade-loader">
- <div></div>
- <div></div>
- <div></div>
- <div></div>
- <div></div>
- <div></div>
- <div></div>
- <div></div>
- </div>
- </div>
- </div>
- <script>
- var daojishiintevaltel = null;
- $(function () {
- /**
- * vue 数据绑定
- */
- var vm = new Vue({
- el: '#app',
- data: {
- codedaojishinum: 0,
- //数据集
- is_loading: true,
- is_ajax: false,
- invitation_code1: '<?php echo $parent_id;?>',
- phone: '',
- code: '',
- password: ''
- },
- methods: {
- submitform: function () {
- if (this.is_ajax) {
- return false;
- }
- this.is_ajax = true;
- $.post('<?php echo url('/member/register')?>', {
- mobile: this.phone,
- password: this.password,
- invite_code: this.invitation_code1,
- sms: this.code,
- 'type': 'register_code'
- }, function (datas) {
- vm.is_ajax = false;
- if (datas.code == 1) {
- location.href = "<?php echo url('down');?>";
- }
- alert(datas.msg);
- }, 'json');
- },
- codedaojishiftel: function () {//发送验证码倒计时
- if (this.codedaojishinum > 0)return false;
- $.post('<?php echo url('/send/sms');?>', {
- 'type': 'register_code',
- phone: this.phone
- }, function (datas) {
- if (datas.code != 1) {
- vm.codedaojishinum = 0;
- } else {
- vm.codedaojishinum = 60;
- daojishiintevaltel = setInterval(function () {
- --vm.codedaojishinum;
- if (codedaojishi <= 0) {
- clearInterval(daojishiintevaltel);
- }
- }, 1000);
- }
- alert(datas.msg);
- }, 'json');
- },
- tgtype: function (num) {
- var itype = $("#password").attr("type");
- if (itype == "password") {
- $("#password").attr("type", "text");
- $(".edit-list li").eq(num).find("i").removeClass("icon-nolook").addClass("icon-openeyes");
- } else {
- $("#password").attr("type", "password");
- $(".edit-list li").eq(num).find("i").removeClass("icon-openeyes").addClass("icon-nolook");
- }
- },
- format: function (timestamp) {
- //timestamp是整数,否则要parseInt转换,不会出现少个0的情况
- var date = new Date(timestamp * 1000);
- var y = 1900 + date.getYear();
- var d_m = "0" + (date.getMonth() * 1 + 1);
- var d = "0" + date.getDate();
- var h = "0" + date.getHours();
- var m = "0" + date.getMinutes();
- var s = "0" + date.getSeconds();
- return y + "-" + d_m.substring(d_m.length - 2, d_m.length) + "-" + d.substring(d.length - 2, d.length);
- // return y.substring(y.length - 2, y.length) + "." + d_m.substring(d_m.length - 2, d_m.length) + "." + d.substring(d.length - 2, d.length);
- },
- },
- watch: {
- //数据监测函数
- },
- created: function () {
- //加载触发函数
- }
- });
- })
- </script>
- </body>
- </html>
|