123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145 |
- <!DOCTYPE html>
- <html class="h100p">
- <head>
- <meta charset="utf-8">
- <title>分享注册2-创业帮</title>
- <meta name="keywords" content="分享注册2-创业帮">
- <meta name="description" content="分享注册2-创业帮">
- <meta content="width=device-width,minimum-scale=1.0,maximum-scale=1.0,shrink-to-fit=no,user-scalable=no" name="viewport" viewport="cover">
- <meta name="apple-mobile-web-app-capable" content="yes">
- <meta name="apple-mobile-web-app-status-bar-style" content="black-translucent">
- <meta content="telephone=no" name="format-detection">
- <meta content="email=no" name="format-detection">
- <meta name="apple-mobile-web-app-title" content="分享注册2-创业帮">
- <meta http-equiv="Cache-Control" content="no-siteapp">
- <link rel="stylesheet" href="./static/css/main.css">
- <style>.invite-regist-box-input .van-field__button .van-button--default{background-color:#FBFBFB;}</style>
- </head>
- <body class="invite_bg h100p nopb" style="padding-top:0;">
- <div id="app" v-cloak>
- <van-nav-bar class="user_rank_explan_title" title="创业帮新用户注册" v-if="toptitleisshow" left-arrow>
- <template #left> <img src="./static/images/left.png" alt=""></template>
- </van-nav-bar>
- <div class="invite-user tc">
- <div class="f18 c333 b">您的好友<span v-cloak>{{inviteinfo.name}}</span>诚邀您加入创业帮</div>
- </div>
- <div class="pl16 pr16 rel">
- <div class="invite-regist-box-input bgcfff">
- <div class="f16 c333 b mb12">新用户注册</div>
- <van-field class="mb12" v-model="userInfo.Mobile" @input="checkLogin" type="number" placeholder="请输入注册手机号"></van-field>
- <van-field class="user-phone mb12" center clearable placeholder="请输入验证码" @input="checkLogin" v-model="userInfo.MobileCode">
- <template #button>
- <van-button class="fl" plain color="#FD824D" @click="getsmscode" v-if="codeisclick">获取验证码</van-button>
- <van-button class="fl" plain color="#FD824D" disabled v-else>{{countdown}}s</van-button>
- </template>
- </van-field>
- <van-field class="mb12" v-model="'推荐码:'+ inviteinfo.code" readonly></van-field>
- <van-field v-model="userInfo.LoginPwd" @input="checkLogin" :type="isShowPwd ? 'text' : 'password'" placeholder="请设置登录密码">
- <template #button>
- <van-button class="fr" @click="showPwd()"><img class="fr" :src="isShowPwd ? './static/images/show-icon@3x.png' : './static/images/noshow-icon@3x.png'" alt=""></van-button>
- </template>
- </van-field>
- <div class="df pt16">
- <van-checkbox v-model="agreement" @input="checkLogin" icon-size=".426667rem" checked-color="#FFD500"><span class="f14 c999">我已阅读并同意</span></van-checkbox><span class="f14 c333" @click="gotoservice">「创业帮服务协议」</span>
- </div>
- <div class="pt16 bc333" v-cloak>
- <van-button type="primary" block round color="#FFD500" :disabled="canRegist ? false : true" @click="regist">注册</van-button>
- </div>
- <div class="pt16 tc">
- <div class="f12 c999">注意:用户年龄必须18-60周岁</div>
- </div>
- </div>
- </div>
- </div>
- <script src="./static/js/klm-vv.min.js"></script>
- <script src="./static/js/appfunc.min.js"></script>
- <script src="./static/js/klm-axios-config.js"></script>
- <script src="./static/js/publicfn.js?j=123456"></script>
- <script src="//res.wx.qq.com/open/js/jweixin-1.4.0.js"></script>
- <script>
- // 通过 CDN 引入时不会自动注册 Lazyload 组件
- // 可以通过下面的方式手动注册
- Vue.use(vant.Lazyload);
-
- // 在 #app 标签下渲染一个按钮组件
- let app = new Vue({
- el: '#app',
- data() {
- return {
- toptitleisshow:false,
- active: 0,
- isShowPwd: false,
- inviteinfo:{
- name:'',
- code:''
- },
- userInfo:{
- Mobile: '',
- MobileCode: '',
- ReferenceCode:'',
- LoginPwd: '',
- OpenId:PublicLib.getCookieInfo('openid'),
- },
- agreement: true,
- canRegist: false,
- codeisclick:true,
- countdown:60
- };
- },
- created(){
- this.inviteinfo.code = PublicLib.getCookieInfo('inviteCode');
- this.userInfo.ReferenceCode = PublicLib.getCookieInfo('inviteCode');
- this.inviteinfo.name = PublicLib.getCookieInfo('inviteName');
- },
- methods: {
- //- getUrlParam(name){
- //- var reg = new RegExp("(^|&)" + name + "=([^&]*)(&|$)"); //构造一个含有目标参数的正则表达式对象
- //- var r = window.location.search.substr(1).match(reg); //匹配目标参数
- //- if (r != null) return unescape(r[2]);
- //- return null; //返回参数值
- //- },
- showPwd(){
- this.isShowPwd = !this.isShowPwd;
- },
- //- 获取验证码
- async getsmscode(){
- if(verification(this.userInfo.Mobile)) return;
- this.codeisclick = false;
- setTimeout(()=>{
- this.codeisclick = true;
- },60000);
- const timer = setInterval(()=>{
- this.countdown--;
- if(this.countdown === 0) {
- this.countdown = 60;
- clearInterval(timer)
- }
- },1000);
- const res = await postRequest('api/v1/mobilecodecheck/sendsms',JSON.stringify({Mobile:this.userInfo.Mobile}));
- if(res) tips('验证码已发送,请注意查收');
- },
- //- 点击注册
- async regist(){
- if(verification(this.userInfo.Mobile)) return;
- if(verificationpassword(this.userInfo.LoginPwd)) return;
- if(verificationmobilecode(this.userInfo.MobileCode)) return;
- const value = JSON.stringify(this.userInfo);
- const res = await postRequest('api/v1/users/register',value);
- if(res.status !== '1') return tips(res.info);
- tips('注册成功,2s后自动关闭,请下载app查看');
- setTimeout(()=>{
- //- WeixinJSBridge.call('closeWindow')
- window.location.href = 'https://a.app.qq.com/o/simple.jsp?pkgname=com.kexiaoshuang.creator'; // 跳转应用宝
- },2000)
- },
- checkLogin(){
- this.canRegist = (this.userInfo.Mobile !== '' && this.userInfo.LoginPwd !== '' && this.userInfo.MobileCode !== '' && this.agreement === true) ? true : false;
- },
- gotoservice(){
- window.location.href = ' /p/user-maker-code';
- },
- }
- });
- </script>
- </body>
- </html>
|