123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304 |
- <!DOCTYPE html>
- <html>
- <head>
- <meta charset="UTF-8">
- <title>激活代理商身份</title>
- <meta name="viewport" content="width=device-width, initial-scale=1,maximum-scale=1, user-scalable=no">
- <meta name="apple-mobile-web-app-capable" content="yes">
- <meta name="apple-mobile-web-app-status-bar-style" content="black">
- <link rel="stylesheet" type="text/css" href="//css.iamberry.com/tooth/css/mui.min.css?v=2017101701" />
- <link rel="stylesheet" type="text/css" href="//css.iamberry.com/tooth/css/iconfont.css?v=2017101701" />
- <link rel="stylesheet" type="text/css" href="//css.iamberry.com/tooth/css/style.css?v=2017101701" />
- <style>
- .vip-tt {position: relative;width:100%;height:120px;background:#36a4c6;text-align: center;}
- .vip-tt>img {width: 100%;}
- .tx {position: absolute;left:50%;top:10%;width: 4.5em;height: 4.5em;display: inline-block;-webkit-transform: translateX(-50%);transform: translateX(-50%);border-radius: 50%;background-color: #73b7d8;}
- .tx>img {width: 100%;border-radius: 50%;}
- .nikname {position: absolute;left:0;width:100%;top: 80%;color: #fff;line-height: 1.5;text-align: center;}
- .nikname>div{padding:3px 0;}
- .nikname>div:first-child{position: relative;width: 100%;overflow: hidden;text-overflow: ellipsis;}
- .mui-table-view-chevron .mui-badge{display:none;}
- .btn_share{background: #fff;border-radius:6px;padding:3px 10px;float: right;margin-right: 10px;color: #e9004c;font-size: 13px;}
- .head {height: 60px;}
- #head {line-height: 60px;}
- h3{margin-top:5px;margin-bottom: 0;}
- .btn-pull-code{position: absolute;right: 10px;top:7px;height:34px;padding:0 6px;border-radius: 5px; line-height: 34px;font-size: 12px; color: #fff; background: #24cae9;}
- .btn-pull-code .active{background: #c8c8c8;}
- .icon-fuxuankuang a{color: #24cae9;}
- .icon-yanse,.icon-youhui,.icon-fuxuankuang,.icon-jiage,.icon-songhuo{font-size: 15px;padding-left: 22px;}
- .icon-yanse:before,.icon-fuxuankuang:before,.icon-youhui:before,.icon-jiage:before,.icon-songhuo:before{font-size: 18px;color: #24cae9;position: absolute;left: 0;width: 20px;height: 18px;}
- .try_price{color: #f1436c;}
- .head-img {position: absolute;bottom: 15px;right: 13px;width: 60px;height: 60px;border-radius: 30px;border: 3px solid #E5E5E5;}
- .mui-table-view .mui-media .mui-media-body{height: 41px;line-height: 41px;color: #333;}
- .mui-table-view .mui-media .mui-media-body>span{color: #f1436c;}
- .my-table-view-try{border-top: .6em solid #f0f0f0;border-bottom: .6em solid #f0f0f0;padding-bottom: 10px;}
- .my-table-view-try .mui-table-view-cell{padding:10px 13px 10px 30px !important;font-size: 12px;}
- .mui-table-view-cell:after,.mui-table-view:before,.mui-table-view:after,.mui-input-group .mui-input-row:after,.mui-input-group:before,.mui-input-group:after{display: none;}
- .mui-table-view-cell>a:not(.mui-btn){color: #666;margin: -15px -15px;}
- .mui-table-view-cell>a .mui-pull-right{color: #999;font-size: 14px;}
- #btn_submit { color: #fff; padding: 10px 20px; font-size: 18px; background: #24cae9; width: 60%; margin: 0 auto; display: block;border:0; }
- .mui-btn-block.mui-active,.btn-pull-code.mui-active{background-color: #c8c8c8 !important;}
- .icon-fuxuankuang.mui-active:before{color: #c8c8c8;}
- .mui-content-padded{margin: 10px 13px;}
- .tips{padding: 20px 10px;background: #24cae9;text-align: center;color: #fff;}
- .mui-input-group .mui-input-row {height: 50px;padding: 5px 0;border: 1px solid rgba(0,0,0,.1); margin:10px 0;}
- .mui-input-row label{color: #666;width:27%;font-size: 15px;}
- .mui-input-row label~input{width:73%;}
- .mui-input-row label~input::-webkit-input-placeholder{font-size: 15px;}
- .triangle-down {width:0;height:0;border-left:7px solid transparent;border-right:7px solid transparent;border-top:7px solid #ccc;}
- .my-arrowright{position: absolute;right: 18px;top: 28px;color: #666;pointer-events:none;}
- .mui-btn-red{background-color: #e9004c;}
- .mui-input-group{padding:0 10px;}
- </style>
- <script type="text/javascript">
- // 屏蔽分享
- window.hiddenAllWechatMenu = true;
- </script>
- </head>
- <body style="background: #fff;">
- <div class="loading-bg">
- <div class="mui-loading">
- <div class="mui-spinner">
- </div>
- 加载中...
- </div>
- </div>
- <div class="mui-content" style="background: #fff;">
- <div class="vip-tt">
- <div class="tx bg-orange" id="headDiv">
- <!--<img src="images/image-12.jpg" id="userHead">-->
- </div>
- <div class="nikname">
- <span id="userNickname">微信昵称</span>
- </div>
- </div>
- <form class="mui-input-group">
- <div class="mui-input-row">
- <label>手机号码</label>
- <input type="tel" maxlength="11" class="mui-input-clear" placeholder="请填写您提交给上朵商务的号码" id="ipt-phone">
- </div>
- <div class="mui-input-row">
- <label>验 证 码</label>
- <input type="text" maxlength="4" placeholder="请填写收到的验证码" id="ipt-code">
- <span class="btn-pull-code" id="pull-code">获取验证码</span>
- </div>
- </form>
- <div style="color: #f00;font-size: 12px;padding: 0 10px;">提示:如有疑问请联系微信客服或拨打电话400-8006692</div>
- <div class="mui-content-padded">
- <button type="button" data-loading-icon="mui-spinner mui-spinner-custom" data-loading-text="提交中" class="mui-btn mui-btn-block mui-btn-outlined mui-active" id="btn_submit" disabled="disabled">提交</button>
- </div>
- </div>
- <script src="//s.iamberry.com/tooth/js/mui.min.js?v=2017101701"></script>
- <script src="//s.iamberry.com/tooth/js/jquery-2.1.1.min.js"></script>
- <script src="//s.iamberry.com/tooth/js/shop/main.js?v=2017101701"></script>
- <script src="//s.iamberry.com/tooth/js/shop/wechat-utils-1.0.js"></script>
- <script type="text/javascript">
- var check = false,alert_msg='';
- var mobile=/^(13|14|15|18)[0-9]{9}$/; //手机号码
- var uname = /^[\u4e00-\u9fa5]{1,12}$/; //中文英文
- var code = /^[0-9]{4}$/; //数字
- mui.ready(function(){
- mui.ajax(base_path + '/agentTooth/select_agent_info?dates=' + new Date().getTime(), {
- data: {},
- dataType: 'json',
- type: 'post',
- timeout: 15000,
- success: function(dt) {
- console.log(dt)
- if(dt.isRedirect) {
- location.href = dt.redirectURL;
- }else{
- if(dt.resultCode=="200"){
- console.log("获取代理商信息成功!");
- $("#headDiv").html('<img src="'+dt.data.userHead+'">');
- $("#userNickname").text(decodeURI(dt.data.userNickname));
- }else{
- mui.alert("短信发送失败!")
- }
- }
- },
- error: function(xhr, type, errorThrown) {
- console.log(xhr);
- }
- });
- document.querySelector('.loading-bg').style.display='none';
- });
- $(document).on('tap', '#pull-code', function() {
- if($("#ipt-phone").val().trim()=="" &&(!$("#pull-code").hasClass("mui-active"))){
- mui.alert("请填写手机号码");
- return;
- }else{
- if(!mobile.test($("#ipt-phone").val().trim())){
- mui.alert("手机号码不正确,请重新填写");
- return;
- }else{
- if($(this).hasClass("mui-active")){
- mui.alert();
- return;
- }else{
- $(this).addClass("mui-active");
- settime("pull-code");
- mui.ajax(base_path + '/qrcode/send_phone_code?dates=' + new Date().getTime(), {
- data: {
- phone: $("#ipt-phone").val()
- },
- dataType: 'json',
- type: 'post',
- timeout: 15000,
- success: function(dt) {
- console.log(dt)
- if(dt.isRedirect) {
- /*location.href = dt.redirectURL;*/
- }else{
- if(dt.resultCode=="200"){
- console.log("获取短信成功!");
- $("#btn-submit").removeAttr("disabled").addClass("active");
- }else{
- mui.alert("短信发送失败!")
- }
- }
- },
- error: function(xhr, type, errorThrown) {
- console.log(xhr);
- }
- });
- }
- }
- }
- });
- var countdown=60;
- function settime(val) {
- pullid=dc(val);
- if (countdown == 0) {
- pullid.removeAttribute("disabled");
- pullid.className='btn-pull-code';
- pullid.innerText="获取验证码";
- countdown = 60;
- return false;
- } else {
- pullid.setAttribute("disabled", true);
- pullid.className='btn-pull-code mui-active';
- pullid.innerText="重新发送(" + countdown + ")";
- countdown--;
- }
- setTimeout(function() {
- settime(val)
- },1000)
- }
- //实时监听文本框字数
- document.getElementById("ipt-phone").addEventListener("input", function() {
- var phone = this.value;
- var mobile = /^(13|14|15|17|18)[0-9]{9}$/; //手机号码
- if(phone.length == 11) {
- if(mobile.test(phone)) {
- $(".pull-code").removeAttr("disabled").addClass("active");
- } else {
- $(".pull-code").attr("disabled", "disabled").removeClass("active");
- }
- } else {
- $(".pull-code").attr("disabled", "disabled").removeClass("active");
- }
- });
- function change_input() {
- $(".mui-input-group input").each(function(index) {
- switch ($(this).attr("id")){
- case "ipt-phone":
- if($(this).val().trim()==""){
- alert_msg="请填写手机号";
- check=false;
- return false;
- }else{
- if(mobile.test($(this).val().trim())) {
- check=true;
- }else{
- alert_msg="手机号码不正确,请重新填写";
- check=false;
- return false;
- }
- }
- break;
- case "ipt-code":
- if($(this).val().trim()==""){
- alert_msg="请填写验证码";
- check=false;
- return false;
- }else{
- if(code.test($(this).val().trim())) {
- check=true;
- }else{
- alert_msg="验证码格式不正确,请重新填写";
- check=false;
- return false;
- }
- }
- break;
- default:
- break;
- }
- });
- }
- //提交
- mui('body').on('tap', '#btn_submit', function() {
- var positive_int = /^[0-9]\d*$/; //正整数0-9
- var code = $("#ipt-code").val();
- var phone = $("#ipt-phone").val();;
- if(code != '') {
- if(positive_int.test(code)) {
- change_input();
- if(check) {
- $.ajax(base_path + '/agentTooth/agent_activate?dates=' + new Date().getTime(), {
- data: {
- "agentTel": phone,
- "phoneCode":code
- },
- dataType: 'json',
- xhrFields: {
- withCredentials: true
- },
- crossDomain: true,
- type: 'post',
- timeout: 15000,
- success: function(dt) {
- console.log(dt);
- if(dt.isRedirect) {
- location.href = dt.redirectURL;
- } else {
- if(dt.resultCode == "200") {
- mui.alert("提交成功!",function(){
- location.href="agent_center.html";
- });
- } else {
- console.log("提交失败!请重试");
- mui.alert("提交失败!", function() {
- });
- }
- $("#btn-submit").removeAttr("disabled").addClass("active");
- }
- },
- error: function(xhr, type, errorThrown) {
- console.log(xhr);
- new Image().src = base_path + "/html_error?error=" + encodeURI(xhr.statusText);
- }
- });
- } else {
- mui.alert(show_msg);
- }
- } else {
- mui.alert("短信验证码格式不正确", function() {
- $("#ipt-code").val("");
- })
- }
- } else {
- mui.alert("请输入短信验证码");
- }
- });
- </script>
- </body>
- </html>
|