新增实名,修改post拦截
This commit is contained in:
@@ -1107,8 +1107,8 @@ function networkRequest(reqObj = {}, type) {
|
||||
},
|
||||
beforeSend: function (xhr) {
|
||||
if (reqObj.type.toLowerCase() == 'post') {
|
||||
let newSerializeStr = $.param(reqObj.data);
|
||||
reqObj.data = newSerializeStr
|
||||
// let newSerializeStr = $.param(reqObj.data);
|
||||
// reqObj.data = newSerializeStr
|
||||
}
|
||||
},
|
||||
});
|
||||
|
343
view/molistar/modules/identity/css/index.css
Normal file
343
view/molistar/modules/identity/css/index.css
Normal file
@@ -0,0 +1,343 @@
|
||||
@font-face {
|
||||
font-family: 'pingfang';
|
||||
src: url("../fonts/PingFangSCRegular.ttf");
|
||||
src: url("../fonts/PingFangSCRegular.ttf") format("woff"), url("../fonts/PingFangSCRegular.ttf") format("truetype"), url("../fonts/PingFangSCRegular.ttf") format("svg");
|
||||
}
|
||||
|
||||
html,
|
||||
body {
|
||||
font-family: 'pingfang';
|
||||
background-color: #1C1B22;
|
||||
}
|
||||
|
||||
img {
|
||||
width: 100%;
|
||||
vertical-align: top;
|
||||
}
|
||||
|
||||
.container {
|
||||
box-sizing: border-box;
|
||||
margin: 0 auto;
|
||||
margin-top: 4.09333rem;
|
||||
margin-bottom: 0.8rem;
|
||||
padding-bottom: 0.8rem;
|
||||
width: 9.2rem;
|
||||
background-color: #2A2A39;
|
||||
border-radius: 0.32rem;
|
||||
box-shadow: 0 4px 10px rgba(0, 0, 0, 0.2);
|
||||
box-sizing: border-box;
|
||||
}
|
||||
|
||||
.container .top {
|
||||
position: absolute;
|
||||
left: 0;
|
||||
top: 0;
|
||||
z-index: -1;
|
||||
}
|
||||
|
||||
.container .form-wrapper {
|
||||
margin: 0 auto;
|
||||
padding: 0.50667rem 0.4rem;
|
||||
box-sizing: border-box;
|
||||
}
|
||||
|
||||
.container .form-wrapper .list {
|
||||
margin-bottom: 0.38667rem;
|
||||
}
|
||||
|
||||
.container .form-wrapper .list p {
|
||||
font-size: 0.42667rem;
|
||||
color: #C6C6E9;
|
||||
}
|
||||
|
||||
.container .form-wrapper .list .input-wrapper {
|
||||
padding: 0.26667rem 0;
|
||||
border-bottom: 1px solid #353548;
|
||||
display: flex;
|
||||
display: -moz-box;
|
||||
-ms-align-items: center;
|
||||
align-items: center;
|
||||
-ms-justify-content: space-between;
|
||||
justify-content: space-between;
|
||||
}
|
||||
|
||||
.container .form-wrapper .list input {
|
||||
font-size: 0.37333rem;
|
||||
width: 5.6rem;
|
||||
outline: none;
|
||||
background-color: #2A2A39;
|
||||
caret-color: white;
|
||||
color: white;
|
||||
}
|
||||
|
||||
.container .form-wrapper .list input::-webkit-input-placeholder {
|
||||
color: #4F516A;
|
||||
}
|
||||
|
||||
.container .form-wrapper .list input::-moz-placeholder {
|
||||
/* Mozilla Firefox 19+ */
|
||||
color: #4F516A;
|
||||
}
|
||||
|
||||
.container .form-wrapper .list input:-moz-placeholder {
|
||||
/* Mozilla Firefox 4 to 18 */
|
||||
color: #4F516A;
|
||||
}
|
||||
|
||||
.container .form-wrapper .list input:-ms-input-placeholder {
|
||||
/* Internet Explorer 10-11 */
|
||||
color: #4F516A;
|
||||
}
|
||||
|
||||
.container .form-wrapper .button-identity-code {
|
||||
width: 2.48rem;
|
||||
height: 0.66667rem;
|
||||
line-height: 0.66667rem;
|
||||
color: #fff;
|
||||
background-image: linear-gradient(to right, #218EFF, #7727E4);
|
||||
border-radius: 0.33333rem;
|
||||
text-align: center;
|
||||
}
|
||||
|
||||
.container .form-wrapper .button-identity-code.disable {
|
||||
background: #DBDBDB;
|
||||
}
|
||||
|
||||
.container .rules-wrapper {
|
||||
margin-top: 0rem;
|
||||
padding: 0 0.50667rem;
|
||||
}
|
||||
|
||||
.container .rules-wrapper .title {
|
||||
font-size: 0.4rem;
|
||||
font-weight: bold;
|
||||
margin-bottom: 0.16rem;
|
||||
color: white;
|
||||
}
|
||||
|
||||
.container .rules-wrapper p {
|
||||
line-height: 0.53333rem;
|
||||
font-size: 0.32rem;
|
||||
color: #C6C6E9;
|
||||
}
|
||||
|
||||
.container .button-submit {
|
||||
text-align: center;
|
||||
background: linear-gradient(to right, #218EFF, #7727E4);
|
||||
width: 4.26667rem;
|
||||
margin: 0 auto;
|
||||
color: #fff;
|
||||
height: 1.06667rem;
|
||||
line-height: 1.06667rem;
|
||||
border-radius: 0.53333rem;
|
||||
margin-top: 0.4rem;
|
||||
margin-bottom: 0.4rem;
|
||||
font-size: 0.42667rem;
|
||||
}
|
||||
|
||||
.toast {
|
||||
position: absolute;
|
||||
width: 80%;
|
||||
background: rgba(0, 0, 0, 0.8);
|
||||
border-radius: 0.24rem;
|
||||
color: #fff;
|
||||
text-align: center;
|
||||
line-height: 0.93333rem;
|
||||
font-size: 0.37333rem;
|
||||
left: 50%;
|
||||
margin-left: -40%;
|
||||
bottom: 10%;
|
||||
display: none;
|
||||
}
|
||||
|
||||
.hidden-form {
|
||||
display: none;
|
||||
}
|
||||
|
||||
.status-mask {
|
||||
position: absolute;
|
||||
z-index: 999;
|
||||
left: 0;
|
||||
top: 0;
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
background: rgba(0, 0, 0, 0.6);
|
||||
position: fixed;
|
||||
display: none;
|
||||
}
|
||||
|
||||
.status-mask .wrapper {
|
||||
width: 8rem;
|
||||
height: 8rem;
|
||||
border-radius: 0.10667rem;
|
||||
position: absolute;
|
||||
left: 0;
|
||||
bottom: 0;
|
||||
top: 0;
|
||||
right: 0;
|
||||
margin: auto;
|
||||
background: #fff;
|
||||
display: flex;
|
||||
display: -moz-box;
|
||||
flex-direction: column;
|
||||
-ms-justify-content: center;
|
||||
justify-content: center;
|
||||
-ms-align-items: center;
|
||||
align-items: center;
|
||||
}
|
||||
|
||||
.status-mask .pic {
|
||||
width: 4.066667rem;
|
||||
height: 4.133333rem;
|
||||
background-size: 100% 100%;
|
||||
background-repeat: no-repeat;
|
||||
}
|
||||
|
||||
.status-mask .text {
|
||||
font-size: .426667rem;
|
||||
line-height: .533333rem;
|
||||
margin-bottom: 0.26667rem;
|
||||
margin-top: -0.26667rem;
|
||||
}
|
||||
|
||||
.status-mask .tips {
|
||||
color: #666666;
|
||||
font-size: 0.32rem;
|
||||
}
|
||||
|
||||
.status-mask .goto-change {
|
||||
width: 3.786667rem;
|
||||
height: 1.013333rem;
|
||||
background: #39ebdf;
|
||||
border: 2px solid #333333;
|
||||
border-radius: .506667rem;
|
||||
margin-top: .48rem;
|
||||
font-size: .4rem;
|
||||
color: #333333;
|
||||
outline: none;
|
||||
}
|
||||
|
||||
.status-mask.success .tips {
|
||||
display: none;
|
||||
}
|
||||
|
||||
.status-mask.success .pic {
|
||||
background-image: url("../images/success.png");
|
||||
}
|
||||
|
||||
.status-mask.have-identity .pic {
|
||||
background-image: url("../images/have_identity.png");
|
||||
}
|
||||
|
||||
.status-mask.failed .pic {
|
||||
background-image: url("../images/failed.png");
|
||||
}
|
||||
|
||||
.status-mask.failed .tips {
|
||||
color: #f34e48;
|
||||
}
|
||||
|
||||
#agree {
|
||||
display: none;
|
||||
}
|
||||
|
||||
#agree:checked + .agree-text .icon:before {
|
||||
background: #735FFE;
|
||||
}
|
||||
|
||||
.agree-wrapper {
|
||||
text-align: center;
|
||||
color: white;
|
||||
}
|
||||
|
||||
.agree-wrapper .icon {
|
||||
display: inline-block;
|
||||
position: relative;
|
||||
width: 0.37333rem;
|
||||
height: 0.37333rem;
|
||||
vertical-align: top;
|
||||
box-sizing: border-box;
|
||||
border-radius: 50%;
|
||||
border: 2px solid #735FFE;
|
||||
}
|
||||
|
||||
.agree-wrapper .icon:before {
|
||||
content: '';
|
||||
position: absolute;
|
||||
width: 0.16rem;
|
||||
height: 0.16rem;
|
||||
top: 0;
|
||||
left: 0;
|
||||
bottom: 0;
|
||||
right: 0;
|
||||
margin: auto;
|
||||
border-radius: 50%;
|
||||
}
|
||||
|
||||
.agree-wrapper .agree-text {
|
||||
font-size: 0.37333rem;
|
||||
}
|
||||
|
||||
a {
|
||||
color: #735FFE;
|
||||
}
|
||||
|
||||
.layer-box {
|
||||
position: fixed;
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
background: rgba(0, 0, 0, 0.5);
|
||||
top: 0;
|
||||
z-index: 1001;
|
||||
display: none;
|
||||
}
|
||||
|
||||
.layer-box-2 .layer-content {
|
||||
position: fixed;
|
||||
width: 7.333333rem;
|
||||
height: 5.333333rem;
|
||||
background: url(../images/layer-bg.png) no-repeat;
|
||||
background-size: 100% 100%;
|
||||
left: 50%;
|
||||
top: 50%;
|
||||
margin-left: -3.666667rem;
|
||||
margin-top: -2.666667rem;
|
||||
padding-top: .773333rem;
|
||||
box-sizing: border-box;
|
||||
}
|
||||
|
||||
.layer-box-2 .layer-content .layer-2-close {
|
||||
width: 2.8rem;
|
||||
height: 1.013333rem;
|
||||
display: block;
|
||||
position: absolute;
|
||||
bottom: .8rem;
|
||||
outline: none;
|
||||
left: .693333rem;
|
||||
}
|
||||
|
||||
.layer-box-2 .layer-content .goto-change-layer {
|
||||
width: 2.8rem;
|
||||
height: 1.013333rem;
|
||||
position: absolute;
|
||||
bottom: .8rem;
|
||||
outline: none;
|
||||
right: .693333rem;
|
||||
}
|
||||
|
||||
.hide {
|
||||
display: none;
|
||||
}
|
||||
|
||||
a,
|
||||
a:hover,
|
||||
a:active,
|
||||
a:visited,
|
||||
a:link,
|
||||
a:focus {
|
||||
-webkit-tap-highlight-color: rgba(0, 0, 0, 0);
|
||||
-webkit-tap-highlight-color: transparent;
|
||||
outline: none;
|
||||
background: none;
|
||||
text-decoration: none;
|
||||
}
|
374
view/molistar/modules/identity/css/index.scss
Normal file
374
view/molistar/modules/identity/css/index.scss
Normal file
@@ -0,0 +1,374 @@
|
||||
@function px2rem($px, $rem:75) {
|
||||
@return $px/$rem+rem;
|
||||
}
|
||||
|
||||
@import '../../../common/css/flex.scss';
|
||||
|
||||
@font-face {
|
||||
font-family: 'pingfang';
|
||||
src: url('../fonts/PingFangSCRegular.ttf');
|
||||
src: url('../fonts/PingFangSCRegular.ttf') format('woff'),
|
||||
url('../fonts/PingFangSCRegular.ttf') format('truetype'),
|
||||
url('../fonts/PingFangSCRegular.ttf') format('svg');
|
||||
}
|
||||
|
||||
html,
|
||||
body {
|
||||
font-family: 'pingfang';
|
||||
background-color: #1C1B22;
|
||||
}
|
||||
|
||||
img {
|
||||
width: 100%;
|
||||
vertical-align: top;
|
||||
}
|
||||
|
||||
.container {
|
||||
box-sizing: border-box;
|
||||
margin: 0 auto;
|
||||
margin-top: px2rem(307);
|
||||
margin-bottom: px2rem(60);
|
||||
padding-bottom: px2rem(60);
|
||||
width: px2rem(690);
|
||||
|
||||
// background: #fff;
|
||||
background-color: #2A2A39;
|
||||
border-radius: px2rem(24);
|
||||
box-shadow: 0 4px 10px rgba(0, 0, 0, 0.2);
|
||||
box-sizing: border-box;
|
||||
|
||||
.top {
|
||||
position: absolute;
|
||||
left: 0;
|
||||
top: 0;
|
||||
z-index: -1;
|
||||
}
|
||||
|
||||
.form-wrapper {
|
||||
margin: 0 auto;
|
||||
// width: px2rem(710);
|
||||
// background: #fff;
|
||||
// border-radius: 4px;
|
||||
// box-shadow: 0 4px 10px rgba(0, 0, 0, 0.2);
|
||||
padding: px2rem(38) px2rem(30);
|
||||
box-sizing: border-box;
|
||||
.list {
|
||||
margin-bottom: px2rem(29);
|
||||
|
||||
p {
|
||||
font-size: px2rem(32);
|
||||
color: #C6C6E9;
|
||||
}
|
||||
|
||||
.input-wrapper {
|
||||
padding: px2rem(20) 0;
|
||||
border-bottom: 1px solid #353548;
|
||||
@include flex();
|
||||
@include flex-align-center();
|
||||
@include flex-justify-between();
|
||||
}
|
||||
|
||||
input {
|
||||
font-size: px2rem(28);
|
||||
width: px2rem(420);
|
||||
outline: none;
|
||||
background-color: #2A2A39;
|
||||
caret-color: white;
|
||||
color: white;
|
||||
}
|
||||
|
||||
input::-webkit-input-placeholder {
|
||||
color: #4F516A;
|
||||
}
|
||||
|
||||
input::-moz-placeholder {
|
||||
/* Mozilla Firefox 19+ */
|
||||
color: #4F516A;
|
||||
}
|
||||
|
||||
input:-moz-placeholder {
|
||||
/* Mozilla Firefox 4 to 18 */
|
||||
color: #4F516A;
|
||||
}
|
||||
|
||||
input:-ms-input-placeholder {
|
||||
/* Internet Explorer 10-11 */
|
||||
color: #4F516A;
|
||||
}
|
||||
}
|
||||
|
||||
.button-identity-code {
|
||||
width: px2rem(186);
|
||||
height: px2rem(50);
|
||||
line-height: px2rem(50);
|
||||
color: #fff;
|
||||
// background: #8776FF;
|
||||
background-image: linear-gradient(to right, #218EFF, #7727E4);
|
||||
border-radius: px2rem(25);
|
||||
text-align: center;
|
||||
|
||||
&.disable {
|
||||
background: #DBDBDB;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
.rules-wrapper {
|
||||
margin-top: px2rem(0);
|
||||
padding: 0 px2rem(38);
|
||||
|
||||
.title {
|
||||
font-size: px2rem(30);
|
||||
font-weight: bold;
|
||||
margin-bottom: px2rem(12);
|
||||
color: white;
|
||||
}
|
||||
|
||||
p {
|
||||
line-height: px2rem(40);
|
||||
font-size: px2rem(24);
|
||||
color: #C6C6E9;
|
||||
}
|
||||
}
|
||||
|
||||
.button-submit {
|
||||
text-align: center;
|
||||
background: linear-gradient(to right, #218EFF, #7727E4);
|
||||
width: px2rem(320);
|
||||
margin: 0 auto;
|
||||
color: #fff;
|
||||
height: px2rem(80);
|
||||
line-height: px2rem(80);
|
||||
border-radius: px2rem(40);
|
||||
margin-top: px2rem(30);
|
||||
margin-bottom: px2rem(30);
|
||||
font-size: px2rem(32);
|
||||
}
|
||||
}
|
||||
|
||||
.toast {
|
||||
position: absolute;
|
||||
width: 80%;
|
||||
background: rgba(0, 0, 0, 0.8);
|
||||
border-radius: px2rem(18);
|
||||
color: #fff;
|
||||
text-align: center;
|
||||
line-height: px2rem(70);
|
||||
font-size: px2rem(28);
|
||||
left: 50%;
|
||||
margin-left: -40%;
|
||||
bottom: 10%;
|
||||
display: none;
|
||||
}
|
||||
|
||||
.hidden-form {
|
||||
display: none;
|
||||
}
|
||||
|
||||
.status-mask {
|
||||
position: absolute;
|
||||
z-index: 999;
|
||||
left: 0;
|
||||
top: 0;
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
background: rgba(0, 0, 0, 0.6);
|
||||
position: fixed;
|
||||
display: none;
|
||||
|
||||
.wrapper {
|
||||
width: 8rem;
|
||||
height: 8rem;
|
||||
border-radius: px2rem(8);
|
||||
position: absolute;
|
||||
left: 0;
|
||||
bottom: 0;
|
||||
top: 0;
|
||||
right: 0;
|
||||
margin: auto;
|
||||
background: #fff;
|
||||
@include flex();
|
||||
@include flexv();
|
||||
@include flex-justify-center();
|
||||
@include flex-align-center();
|
||||
}
|
||||
|
||||
.pic {
|
||||
width: 4.066667rem;
|
||||
height: 4.133333rem;
|
||||
//background: red;
|
||||
-webkit-background-size: 100% 100%;
|
||||
background-size: 100% 100%;
|
||||
background-repeat: no-repeat;
|
||||
}
|
||||
|
||||
.text {
|
||||
font-size: .426667rem;
|
||||
line-height: .533333rem;
|
||||
margin-bottom: px2rem(20);
|
||||
margin-top: px2rem(-20);
|
||||
}
|
||||
|
||||
.tips {
|
||||
color: #666666;
|
||||
font-size: px2rem(24);
|
||||
}
|
||||
|
||||
.goto-change {
|
||||
width: 3.786667rem;
|
||||
height: 1.013333rem;
|
||||
background: rgba(57, 235, 223, 1);
|
||||
border: 2px solid rgba(51, 51, 51, 1);
|
||||
border-radius: .506667rem;
|
||||
margin-top: .48rem;
|
||||
font-size: .4rem;
|
||||
color: rgba(51, 51, 51, 1);
|
||||
outline: none;
|
||||
}
|
||||
|
||||
&.success {
|
||||
.tips {
|
||||
display: none;
|
||||
}
|
||||
|
||||
.pic {
|
||||
background-image: url("../images/success.png");
|
||||
}
|
||||
}
|
||||
|
||||
&.have-identity {
|
||||
.pic {
|
||||
background-image: url("../images/have_identity.png");
|
||||
}
|
||||
}
|
||||
|
||||
&.failed {
|
||||
.pic {
|
||||
background-image: url("../images/failed.png");
|
||||
}
|
||||
|
||||
.tips {
|
||||
color: #f34e48;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
#agree {
|
||||
display: none;
|
||||
|
||||
&:checked {
|
||||
&+.agree-text {
|
||||
.icon {
|
||||
&:before {
|
||||
background: #735FFE;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
.agree-wrapper {
|
||||
text-align: center;
|
||||
color: white;
|
||||
.icon {
|
||||
display: inline-block;
|
||||
position: relative;
|
||||
width: px2rem(28);
|
||||
height: px2rem(28);
|
||||
vertical-align: top;
|
||||
box-sizing: border-box;
|
||||
border-radius: 50%;
|
||||
border: 2px solid #735FFE;
|
||||
|
||||
&:before {
|
||||
content: '';
|
||||
position: absolute;
|
||||
width: px2rem(12);
|
||||
height: px2rem(12);
|
||||
top: 0;
|
||||
left: 0;
|
||||
bottom: 0;
|
||||
right: 0;
|
||||
margin: auto;
|
||||
border-radius: 50%;
|
||||
//background: red;
|
||||
}
|
||||
}
|
||||
|
||||
.agree-text {
|
||||
font-size: px2rem(28);
|
||||
}
|
||||
}
|
||||
|
||||
a {
|
||||
color: #735FFE;
|
||||
}
|
||||
|
||||
.layer-box {
|
||||
position: fixed;
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
background: rgba(0, 0, 0, 0.5);
|
||||
top: 0;
|
||||
z-index: 1001;
|
||||
display: none;
|
||||
}
|
||||
|
||||
.layer-box-2 {
|
||||
.layer-content {
|
||||
position: fixed;
|
||||
width: 7.333333rem;
|
||||
height: 5.333333rem;
|
||||
background: url(../images/layer-bg.png) no-repeat;
|
||||
background-size: 100% 100%;
|
||||
left: 50%;
|
||||
top: 50%;
|
||||
margin-left: -3.666667rem;
|
||||
margin-top: -2.666667rem;
|
||||
padding-top: .773333rem;
|
||||
box-sizing: border-box;
|
||||
|
||||
.layer-2-close {
|
||||
width: 2.8rem;
|
||||
height: 1.013333rem;
|
||||
display: block;
|
||||
position: absolute;
|
||||
bottom: .8rem;
|
||||
outline: none;
|
||||
left: .693333rem;
|
||||
}
|
||||
|
||||
.goto-change-layer {
|
||||
width: 2.8rem;
|
||||
height: 1.013333rem;
|
||||
position: absolute;
|
||||
bottom: .8rem;
|
||||
outline: none;
|
||||
right: .693333rem;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
.hide {
|
||||
display: none;
|
||||
}
|
||||
|
||||
a,
|
||||
a:hover,
|
||||
a:active,
|
||||
a:visited,
|
||||
a:link,
|
||||
a:focus {
|
||||
|
||||
-webkit-tap-highlight-color: rgba(0, 0, 0, 0);
|
||||
|
||||
-webkit-tap-highlight-color: transparent;
|
||||
|
||||
outline: none;
|
||||
|
||||
background: none;
|
||||
|
||||
text-decoration: none;
|
||||
|
||||
}
|
87
view/molistar/modules/identity/css/mobile.css
Normal file
87
view/molistar/modules/identity/css/mobile.css
Normal file
@@ -0,0 +1,87 @@
|
||||
.container {
|
||||
background-color: #fff;
|
||||
box-sizing: border-box;
|
||||
padding: .72rem .666667rem 0 .666667rem;
|
||||
}
|
||||
|
||||
.tips {
|
||||
font-size: .373333rem;
|
||||
font-weight: 500;
|
||||
color: #333333;
|
||||
line-height: .6rem;
|
||||
margin-bottom: .266667rem;
|
||||
}
|
||||
|
||||
.input-wrapper {
|
||||
position: relative;
|
||||
height: .933333rem;
|
||||
border-bottom: 1px solid #CCCCCC;
|
||||
}
|
||||
|
||||
.input-wrapper .identity-code {
|
||||
width: 100%;
|
||||
height: .853333rem;
|
||||
font-size: .4rem;
|
||||
line-height: .933333rem;
|
||||
outline: none;
|
||||
}
|
||||
|
||||
.input-wrapper .button-identity-code {
|
||||
position: absolute;
|
||||
height: .933333rem;
|
||||
line-height: .933333rem;
|
||||
right: 0;
|
||||
top: 0;
|
||||
font-size: .4rem;
|
||||
font-weight: 400;
|
||||
color: #fe4c62;
|
||||
}
|
||||
|
||||
.code-text {
|
||||
font-size: .346667rem;
|
||||
font-weight: 400;
|
||||
color: #333333;
|
||||
margin-top: .533333rem;
|
||||
visibility: hidden;
|
||||
}
|
||||
|
||||
.submit {
|
||||
width: 8rem;
|
||||
height: 1.146667rem;
|
||||
background: rgba(255, 255, 255, 0);
|
||||
border: 2px solid #333333;
|
||||
border-radius: .573333rem;
|
||||
margin: 0 auto;
|
||||
font-size: .4rem;
|
||||
font-weight: 500;
|
||||
color: #333333;
|
||||
margin: 0 auto;
|
||||
margin-top: 1.506667rem;
|
||||
outline: none;
|
||||
}
|
||||
|
||||
.submit.ban {
|
||||
background: rgba(255, 255, 255, 0);
|
||||
border: 2px solid #b3b3b3;
|
||||
color: #b3b3b3;
|
||||
}
|
||||
|
||||
.warm {
|
||||
width: 6rem;
|
||||
background-color: rgba(0, 0, 0, 0.6);
|
||||
color: #fff;
|
||||
font-size: 0.3733rem;
|
||||
height: 0.7667rem;
|
||||
line-height: 0.7667rem;
|
||||
text-align: center;
|
||||
position: fixed;
|
||||
z-index: 10001;
|
||||
top: 50%;
|
||||
left: 50%;
|
||||
margin-left: -3rem;
|
||||
border-radius: 5px;
|
||||
}
|
||||
|
||||
.hide {
|
||||
display: none;
|
||||
}
|
1
view/molistar/modules/identity/css/mobile.min.css
vendored
Normal file
1
view/molistar/modules/identity/css/mobile.min.css
vendored
Normal file
@@ -0,0 +1 @@
|
||||
.container{background-color:#fff;box-sizing:border-box;padding:.72rem .666667rem 0 .666667rem}.tips{font-size:.373333rem;font-weight:500;color:#333;line-height:.6rem;margin-bottom:.266667rem}.input-wrapper{position:relative;height:.933333rem;border-bottom:1px solid #CCCCCC}.input-wrapper .identity-code{width:100%;height:.853333rem;font-size:.4rem;line-height:.933333rem;outline:none}.input-wrapper .button-identity-code{position:absolute;height:.933333rem;line-height:.933333rem;right:0;top:0;font-size:.4rem;font-weight:400;color:#fe4c62}.code-text{font-size:.346667rem;font-weight:400;color:#333;margin-top:.533333rem;visibility:hidden}.submit{width:8rem;height:1.146667rem;background:rgba(255,255,255,0);border:2px solid #333;border-radius:.573333rem;margin:0 auto;font-size:.4rem;font-weight:500;color:#333;margin:0 auto;margin-top:1.506667rem;outline:none}.submit.ban{background:rgba(255,255,255,0);border:2px solid #b3b3b3;color:#b3b3b3}.warm{width:6rem;background-color:rgba(0,0,0,0.6);color:#fff;font-size:0.3733rem;height:0.7667rem;line-height:0.7667rem;text-align:center;position:fixed;z-index:10001;top:50%;left:50%;margin-left:-3rem;border-radius:5px}.hide{display:none}
|
84
view/molistar/modules/identity/css/mobile.scss
Normal file
84
view/molistar/modules/identity/css/mobile.scss
Normal file
@@ -0,0 +1,84 @@
|
||||
.container{
|
||||
background-color: #fff;
|
||||
box-sizing: border-box;
|
||||
padding: .72rem .666667rem 0 .666667rem;
|
||||
}
|
||||
.tips{
|
||||
// width: 8rem;
|
||||
font-size: .373333rem;
|
||||
font-weight:500;
|
||||
color:rgba(51,51,51,1);
|
||||
line-height:.6rem;
|
||||
margin-bottom: .266667rem;
|
||||
}
|
||||
|
||||
.input-wrapper{
|
||||
position: relative;
|
||||
height: .933333rem;
|
||||
border-bottom: 1px solid #CCCCCC;
|
||||
.identity-code{
|
||||
width: 100%;
|
||||
height: .853333rem;
|
||||
font-size: .4rem;
|
||||
line-height: .933333rem;
|
||||
outline: none;
|
||||
}
|
||||
.button-identity-code{
|
||||
position: absolute;
|
||||
height: .933333rem;
|
||||
line-height: .933333rem;
|
||||
right: 0;
|
||||
top: 0;
|
||||
font-size:.4rem;
|
||||
font-weight:400;
|
||||
color:rgba(254,76,98,1);
|
||||
}
|
||||
}
|
||||
|
||||
.code-text{
|
||||
font-size:.346667rem;
|
||||
font-weight:400;
|
||||
color:rgba(51,51,51,1);
|
||||
margin-top: .533333rem;
|
||||
visibility :hidden;
|
||||
}
|
||||
|
||||
.submit{
|
||||
width:8rem;
|
||||
height:1.146667rem;
|
||||
background:rgba(255,255,255,0);
|
||||
border:2px solid rgba(51, 51, 51, 1);
|
||||
border-radius:.573333rem;
|
||||
margin: 0 auto;
|
||||
font-size:.4rem;
|
||||
font-weight:500;
|
||||
color:rgba(51,51,51,1);
|
||||
margin: 0 auto;
|
||||
margin-top: 1.506667rem;
|
||||
outline: none;
|
||||
&.ban{
|
||||
background:rgba(255,255,255,0);
|
||||
border:2px solid rgba(179,179,179,1);
|
||||
color:rgba(179,179,179,1);
|
||||
}
|
||||
}
|
||||
|
||||
.warm{
|
||||
width: 6rem;
|
||||
background-color: rgba(0,0,0,0.6);
|
||||
color: #fff;
|
||||
font-size: 0.3733rem;
|
||||
height: 0.7667rem;
|
||||
line-height: 0.7667rem;
|
||||
text-align: center;
|
||||
position: fixed;
|
||||
z-index: 10001;
|
||||
top: 50%;
|
||||
left: 50%;
|
||||
margin-left: -3rem;
|
||||
border-radius: 5px;
|
||||
}
|
||||
|
||||
.hide{
|
||||
display: none;
|
||||
}
|
BIN
view/molistar/modules/identity/fonts/PingFangSCRegular.ttf
Normal file
BIN
view/molistar/modules/identity/fonts/PingFangSCRegular.ttf
Normal file
Binary file not shown.
BIN
view/molistar/modules/identity/images/failed.png
Normal file
BIN
view/molistar/modules/identity/images/failed.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 7.4 KiB |
BIN
view/molistar/modules/identity/images/have_identity.png
Normal file
BIN
view/molistar/modules/identity/images/have_identity.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 11 KiB |
BIN
view/molistar/modules/identity/images/layer-bg.png
Normal file
BIN
view/molistar/modules/identity/images/layer-bg.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 22 KiB |
BIN
view/molistar/modules/identity/images/success.png
Normal file
BIN
view/molistar/modules/identity/images/success.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 8.6 KiB |
BIN
view/molistar/modules/identity/images/tutu-top.png
Normal file
BIN
view/molistar/modules/identity/images/tutu-top.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 609 KiB |
71
view/molistar/modules/identity/index.html
Normal file
71
view/molistar/modules/identity/index.html
Normal file
@@ -0,0 +1,71 @@
|
||||
<!DOCTYPE html>
|
||||
<html lang="en">
|
||||
<head>
|
||||
<meta charset="UTF-8">
|
||||
<meta name="viewport"
|
||||
content="width=device-width, user-scalable=no, initial-scale=1.0, maximum-scale=1.0, minimum-scale=1.0">
|
||||
<title>实名认证</title>
|
||||
<link rel="stylesheet" href="../../common/css/reset.css">
|
||||
<link rel="stylesheet" href="./css/index.css">
|
||||
<script src="../../common/js/flexible.js"></script>
|
||||
</head>
|
||||
<body>
|
||||
<div class="container">
|
||||
<div class="top"><img src="./images/tutu-top.png" alt=""></div>
|
||||
<div class="form-wrapper">
|
||||
<div class="list">
|
||||
<p>真实姓名</p>
|
||||
<div class="input-wrapper">
|
||||
<input type="text" placeholder="请输入您的真实姓名" class="name" />
|
||||
</div>
|
||||
</div>
|
||||
<div class="list">
|
||||
<p>身份证号</p>
|
||||
<div class="input-wrapper">
|
||||
<input type="text" placeholder="请输入您的真实身份证号" class="person-id" />
|
||||
</div>
|
||||
</div>
|
||||
<div class="list">
|
||||
<p>手机号</p>
|
||||
<div class="input-wrapper">
|
||||
<input type="text" placeholder="请输入您的手机号" class="phone" />
|
||||
<div class="button-identity-code">获取验证码</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="list">
|
||||
<p>验证码</p>
|
||||
<div class="input-wrapper">
|
||||
<input type="text" placeholder="请输入验证码" class="identity-code" />
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<!--<div class="hidden-form">-->
|
||||
<!--<form id="hidden-form">-->
|
||||
<!--<input type="hidden" name="deviceId" class="deviceId">-->
|
||||
<!--</form>-->
|
||||
<!--</div>-->
|
||||
<div class="rules-wrapper">
|
||||
<div class="title">认证须知</div>
|
||||
<p>1.该认证仅支持中国内地(不含港澳台地区)的用户。</p>
|
||||
<p>2.请确保填写身份证信息真实并与本人一致。</p>
|
||||
<p>3.根据国家相关的法律法规,您需要提供您的真实身份信息(真实姓名、身份证号)、身份证正反面照片、面部信息以完成实名验证。您所提供的身份信息仅用于身份验证,未经您本人的许可不会被用于其他用途。这些信息属于个人敏感信息,我们将会尽可能的保护您个人敏感信息的安全。如果您不提供这些信息,您将不能使用提现等相关功能,但不影响您继续使用"MoliStar"的其他服务。</p>
|
||||
<p>4.为保护用户权益,开启实名认证后我们将不提供解除恢复的功能,请谅解。</p>
|
||||
<p>5.一个身份证最多用于5个用户账号的实名认证。</p>
|
||||
</div>
|
||||
<div class="button-submit">提交</div>
|
||||
|
||||
</div>
|
||||
<div class="toast">测试文案</div>
|
||||
<div class="status-mask">
|
||||
<div class="wrapper">
|
||||
<div class="pic"></div>
|
||||
<div class="text">fewf</div>
|
||||
<div class="tips">fwefw</div>
|
||||
</div>
|
||||
</div>
|
||||
<script src="../../common/js/jquery-3.2.1.min.js"></script>
|
||||
<script src="../../common/js/common.js"></script>
|
||||
<script src="../../common/js/vconsole.min.js"></script>
|
||||
<script src="./js/index.js"></script>
|
||||
</body>
|
||||
</html>
|
244
view/molistar/modules/identity/js/index.js
Normal file
244
view/molistar/modules/identity/js/index.js
Normal file
@@ -0,0 +1,244 @@
|
||||
/**
|
||||
* Created by raymondjack on 2018/12/21.
|
||||
*/
|
||||
|
||||
var info = {};
|
||||
var $toast = $('.toast');
|
||||
$(function () {
|
||||
var browser = checkVersion();
|
||||
var api = locateJudge();
|
||||
var timer = null;
|
||||
var lockBol = false;
|
||||
var env = EnvCheck();
|
||||
if(env == 'test') {
|
||||
var vConsole = new VConsole();
|
||||
}
|
||||
var main = {
|
||||
init: function () {
|
||||
this.getDeviceMsg();
|
||||
this.eventRegister();
|
||||
var that = this;
|
||||
setTimeout(function () {
|
||||
that.getData();
|
||||
},200)
|
||||
|
||||
},
|
||||
getDeviceMsg: function () {
|
||||
if(browser.app){
|
||||
if(browser.android){
|
||||
info.uid = parseInt(window.androidJsObj.getUid());
|
||||
info.deviceId = window.androidJsObj.getDeviceId();
|
||||
info.ticket = window.androidJsObj.getTicket();
|
||||
}else{
|
||||
info.uid = tools.cookieUtils.get("uid");
|
||||
if(!info.uid){
|
||||
window.webkit.messageHandlers.getUid.postMessage(null);
|
||||
}
|
||||
window.webkit.messageHandlers.getDeviceId.postMessage(null);
|
||||
window.webkit.messageHandlers.getTicket.postMessage(null);
|
||||
}
|
||||
}else{
|
||||
info.uid = 2;
|
||||
info.deviceId = "204aa0c983384f1e84a3625b4f04bac1";
|
||||
}
|
||||
|
||||
// setTimeout(function () {
|
||||
// $('.deviceId').val(info.deviceId);
|
||||
// },200)
|
||||
},
|
||||
getData: function () {
|
||||
$.ajax({
|
||||
type: "get",
|
||||
url: api + "/certification/isCertify",
|
||||
headers:{
|
||||
"pub_ticket": info.ticket
|
||||
},
|
||||
data: {
|
||||
uid: info.uid,
|
||||
ticket: info.ticket
|
||||
},
|
||||
success:function (res) {
|
||||
if (res.code == 200) {
|
||||
var checkBol = res.data;
|
||||
if (checkBol) {
|
||||
var $mask = $('.status-mask');
|
||||
$mask.addClass("have-identity");
|
||||
$mask.find(".text").html("您已通过实名认证");
|
||||
$mask.find(".tips").html("系统已成功审核您的实名认证");
|
||||
$mask.show();
|
||||
}
|
||||
}
|
||||
}
|
||||
})
|
||||
},
|
||||
eventRegister: function () {
|
||||
$('.button-submit').on('click',function () {
|
||||
|
||||
var name = $('.name').val();
|
||||
var personId = $('.person-id').val();
|
||||
var phone = $('.phone').val();
|
||||
var identityCode = $('.identity-code').val();
|
||||
if(!name.trim()){
|
||||
toastShow("名字不能为空");
|
||||
return;
|
||||
}
|
||||
|
||||
if(!personId.trim()){
|
||||
toastShow("身份证号不能为空");
|
||||
return;
|
||||
}
|
||||
|
||||
if(!phone.trim()){
|
||||
toastShow("手机号不能为空");
|
||||
return;
|
||||
}
|
||||
|
||||
if(!identityCode.trim()){
|
||||
toastShow("验证码不能为空");
|
||||
return;
|
||||
}
|
||||
|
||||
if(!(/^[\u4e00-\u9fa5]+$/.test(name.trim()))){
|
||||
toastShow("名字不符合规格");
|
||||
return;
|
||||
}
|
||||
|
||||
if(!(/(^\d{15}$)|(^\d{18}$)|(^\d{17}(\d|X|x)$)/).test(personId.trim())){
|
||||
toastShow("身份证号不符合规格");
|
||||
return;
|
||||
}
|
||||
|
||||
if(!(/^1[3|4|5|6|7|8|9][0-9]\d{8}$/).test(phone.trim())){
|
||||
toastShow("手机号不符合规格");
|
||||
return;
|
||||
}
|
||||
if(lockBol){
|
||||
return;
|
||||
}
|
||||
lockBol = true;
|
||||
|
||||
var requestParam = {
|
||||
uid: info.uid,
|
||||
userName: name,
|
||||
identityNumber: personId,
|
||||
phone: phone,
|
||||
code: identityCode,
|
||||
ticket: info.ticket
|
||||
};
|
||||
if(browser.android){
|
||||
requestParam.deviceInfo = JSON.stringify({
|
||||
deviceId: info.deviceId
|
||||
});
|
||||
}
|
||||
$.ajax({
|
||||
type: "post",
|
||||
url: api + "/certification/doCheck",
|
||||
data: requestParam,
|
||||
headers: {
|
||||
"pub_ticket": info.ticket
|
||||
},
|
||||
success: function (res) {
|
||||
console.log(res);
|
||||
var $mask = $('.status-mask');
|
||||
$mask.attr("class","status-mask");
|
||||
if(res.code == 200){
|
||||
$mask.addClass("success");
|
||||
$mask.find(".text").html("认证成功");
|
||||
}else if(res.code == 10109){
|
||||
$mask.addClass("failed");
|
||||
$mask.find(".text").html("实名认证失败");
|
||||
$mask.find(".tips").html("该身份证实名认证已达5次");
|
||||
}else if(res.code == 10110){
|
||||
$mask.addClass("have-identity");
|
||||
$mask.find(".text").html("您已通过实名认证");
|
||||
$mask.find(".tips").html("系统已成功审核您的实名认证");
|
||||
}else if(res.code == 4003){
|
||||
$mask.addClass("failed");
|
||||
$mask.find(".text").html("实名认证失败");
|
||||
$mask.find(".tips").html("验证码错误");
|
||||
} else{
|
||||
$mask.addClass("failed");
|
||||
$mask.find(".text").html("实名认证失败");
|
||||
$mask.find(".tips").html("请填写真实有效的身份证信息");
|
||||
}
|
||||
$mask.show();
|
||||
setTimeout(function () {
|
||||
$('.status-mask').hide();
|
||||
},4000);
|
||||
lockBol = false;
|
||||
}
|
||||
});
|
||||
// $.post(api + "/certification/doCheck",requestParam,function (res) {
|
||||
//
|
||||
// })
|
||||
})
|
||||
|
||||
$('.button-identity-code').on('click',function () {
|
||||
var phone = $('.phone').val();
|
||||
if(!phone.trim()){
|
||||
toastShow("手机号不能为空");
|
||||
return;
|
||||
}
|
||||
if(!(/^1[3|4|5|6|7|8|9][0-9]\d{8}$/).test(phone.trim())){
|
||||
toastShow("手机号不符合规格");
|
||||
return;
|
||||
}
|
||||
if($(this).hasClass("disable")){
|
||||
return;
|
||||
}
|
||||
$(this).addClass('disable');
|
||||
var time = 60;
|
||||
var $that = $(this);
|
||||
$(this).html(time + 's后重新获取');
|
||||
timer = setInterval(function () {
|
||||
time--;
|
||||
$that.html(time + "s后重新获取");
|
||||
if(time < 0){
|
||||
clearInterval(timer);
|
||||
$that.removeClass('disable');
|
||||
$that.html("获取验证码");
|
||||
}
|
||||
},1000)
|
||||
|
||||
var requestParam = {
|
||||
phone: phone,
|
||||
uid: info.uid,
|
||||
ticket: info.ticket
|
||||
};
|
||||
|
||||
if(browser.android){
|
||||
requestParam.deviceInfo = JSON.stringify({
|
||||
deviceId: info.deviceId
|
||||
});
|
||||
}
|
||||
|
||||
$.ajax({
|
||||
type: "post",
|
||||
url: api + "/certification/send/code",
|
||||
headers:{
|
||||
"pub_ticket":info.ticket
|
||||
},
|
||||
data: requestParam,
|
||||
success:function (res) {
|
||||
|
||||
}
|
||||
});
|
||||
|
||||
})
|
||||
}
|
||||
};
|
||||
main.init();
|
||||
|
||||
});
|
||||
|
||||
function toastShow(text) {
|
||||
$toast.html(text);
|
||||
$toast.show();
|
||||
setTimeout(function () {
|
||||
$toast.hide();
|
||||
},2000);
|
||||
}
|
||||
|
||||
function getMessage(key,value) {
|
||||
info[key] = value;
|
||||
}
|
1
view/molistar/modules/identity/js/jsvm_all.js
Normal file
1
view/molistar/modules/identity/js/jsvm_all.js
Normal file
File diff suppressed because one or more lines are too long
211
view/molistar/modules/identity/js/mobile.js
Normal file
211
view/molistar/modules/identity/js/mobile.js
Normal file
@@ -0,0 +1,211 @@
|
||||
/**
|
||||
* Created by raymondjack on 2018/12/21.
|
||||
*/
|
||||
|
||||
var info = {};
|
||||
$(function () {
|
||||
var browser = checkVersion();
|
||||
var api = locateJudge();
|
||||
var timer = null;
|
||||
var env = EnvCheck();
|
||||
if(env == 'test') {
|
||||
var vConsole = new VConsole();
|
||||
}
|
||||
var main = {
|
||||
init: function () {
|
||||
this.getDeviceMsg();
|
||||
this.eventRegister();
|
||||
var that = this;
|
||||
setTimeout(function () {
|
||||
that.getData();
|
||||
},200)
|
||||
|
||||
},
|
||||
getDeviceMsg: function () {
|
||||
if(browser.app){
|
||||
if(browser.android){
|
||||
info.uid = parseInt(window.androidJsObj.getUid());
|
||||
info.deviceId = window.androidJsObj.getDeviceId();
|
||||
info.ticket = window.androidJsObj.getTicket();
|
||||
}else{
|
||||
info.uid = tools.cookieUtils.get("uid");
|
||||
if(!info.uid){
|
||||
window.webkit.messageHandlers.getUid.postMessage(null);
|
||||
}
|
||||
window.webkit.messageHandlers.getDeviceId.postMessage(null);
|
||||
window.webkit.messageHandlers.getTicket.postMessage(null);
|
||||
}
|
||||
}else{
|
||||
info.uid = 922473;
|
||||
info.deviceId = "204aa0c983384f1e84a3625b4f04bac1";
|
||||
}
|
||||
|
||||
// setTimeout(function () {
|
||||
// $('.deviceId').val(info.deviceId);
|
||||
// },200)
|
||||
},
|
||||
getData: function () {
|
||||
$.ajax({
|
||||
type: "post",
|
||||
url: api + "/user/h5/getSimpleUserByUid",
|
||||
headers:{
|
||||
"pub_ticket": info.ticket
|
||||
},
|
||||
data: {
|
||||
uid: info.uid,
|
||||
ticket: info.ticket
|
||||
},
|
||||
success:function (res) {
|
||||
if (res.code == 200) {
|
||||
$('.code-text').find('span').html(res.data.phone)
|
||||
info.phone = res.data.phone
|
||||
// info.phone = '13610174071'
|
||||
}
|
||||
},
|
||||
error: function (res) {
|
||||
// if (res.status == 401 ) {
|
||||
$('.warm').html(res.message).removeClass('hide')
|
||||
setTimeout(function() {
|
||||
$('.warm').addClass('hide')
|
||||
}, 1500)
|
||||
// }
|
||||
console.log(res, '报错啦');
|
||||
}
|
||||
})
|
||||
},
|
||||
eventRegister: function () {
|
||||
// 获取短信
|
||||
$('.button-identity-code').on('click',function () {
|
||||
// var phone = $('.phone').val();
|
||||
// if(!phone.trim()){
|
||||
// toastShow("手机号不能为空");
|
||||
// return;
|
||||
// }
|
||||
// if(!(/^1[3|4|5|6|7|8|9][0-9]\d{8}$/).test(phone.trim())){
|
||||
// toastShow("手机号不符合规格");
|
||||
// return;
|
||||
// }
|
||||
if($(this).hasClass("disable")){
|
||||
return;
|
||||
}
|
||||
$(this).addClass('disable');
|
||||
var time = 60;
|
||||
var $that = $(this);
|
||||
$(this).html(time + 's后重新获取');
|
||||
timer = setInterval(function () {
|
||||
time--;
|
||||
$that.html(time + "s后重新获取");
|
||||
if(time < 0){
|
||||
clearInterval(timer);
|
||||
$that.removeClass('disable');
|
||||
$that.html("获取验证码");
|
||||
}
|
||||
},1000)
|
||||
|
||||
var requestParam = {
|
||||
phone: info.phone,
|
||||
uid: info.uid,
|
||||
ticket: info.ticket
|
||||
};
|
||||
|
||||
if(browser.android){
|
||||
requestParam.deviceInfo = JSON.stringify({
|
||||
deviceId: info.deviceId
|
||||
});
|
||||
}
|
||||
console.log('发送请求')
|
||||
$.ajax({
|
||||
type: "post",
|
||||
url: api + "/certification/send/code",
|
||||
headers:{
|
||||
"pub_ticket":info.ticket
|
||||
},
|
||||
data: requestParam,
|
||||
success: function (res) {
|
||||
console.log(res,'请求成功')
|
||||
if (res.code == 200) {
|
||||
$('.code-text').css('visibility','visible')
|
||||
} else {
|
||||
console.log('res')
|
||||
$('.warm').html(res.message).removeClass('hide')
|
||||
setTimeout(function () {
|
||||
$('.warm').addClass('hide');
|
||||
// window.location.reload(true);
|
||||
}, 1500)
|
||||
}
|
||||
},
|
||||
error: function (res) {
|
||||
// if (res.status == 401 ) {
|
||||
$('.warm').html(res.message).removeClass('hide')
|
||||
setTimeout(function() {
|
||||
$('.warm').addClass('hide')
|
||||
}, 1500)
|
||||
// }
|
||||
console.log(res, '报错啦');
|
||||
}
|
||||
});
|
||||
})
|
||||
|
||||
// 监控输入框
|
||||
$(".identity-code").bind("input propertychange", function (event) {
|
||||
var value = $(".identity-code").val();
|
||||
console.log($(".identity-code").val());
|
||||
if (value.length >= 4) {
|
||||
$('.submit').removeClass('ban').attr('disabled', false);
|
||||
} else {
|
||||
$('.submit').addClass('ban').attr('disabled', true);
|
||||
}
|
||||
});
|
||||
|
||||
$('.submit').on('click', function () {
|
||||
var code = $(".identity-code").val()
|
||||
console.log('1111');
|
||||
$.ajax({
|
||||
type: "post",
|
||||
url: api + "/certification/smsCode/auth",
|
||||
headers:{
|
||||
"pub_ticket": info.ticket
|
||||
},
|
||||
data: {
|
||||
uid: info.uid,
|
||||
ticket: info.ticket,
|
||||
phone: info.phone,
|
||||
code: code
|
||||
},
|
||||
success: function (res) {
|
||||
console.log(res)
|
||||
if (res.code == 200 && res.data.result) {
|
||||
$('.warm').html('验证成功!正在为您跳转').removeClass('hide')
|
||||
setTimeout(function () {
|
||||
window.location.href = 'new.html?auth=' + res.data.auth
|
||||
}, 1500)
|
||||
} else {
|
||||
$('.warm').html(res.message).removeClass('hide')
|
||||
setTimeout(function () {
|
||||
$('.warm').addClass('hide');
|
||||
// window.location.reload(true);
|
||||
}, 1500)
|
||||
}
|
||||
},
|
||||
error: function (res) {
|
||||
// if (res.status == 401 ) {
|
||||
$('.warm').html(res.message).removeClass('hide')
|
||||
setTimeout(function() {
|
||||
$('.warm').addClass('hide')
|
||||
}, 1500)
|
||||
// }
|
||||
console.log(res, '报错啦');
|
||||
}
|
||||
})
|
||||
})
|
||||
|
||||
}
|
||||
};
|
||||
main.init();
|
||||
|
||||
});
|
||||
|
||||
|
||||
function getMessage(key,value) {
|
||||
info[key] = value;
|
||||
}
|
401
view/molistar/modules/identity/js/new.js
Normal file
401
view/molistar/modules/identity/js/new.js
Normal file
@@ -0,0 +1,401 @@
|
||||
/**
|
||||
* Created by raymondjack on 2018/12/21.
|
||||
*/
|
||||
|
||||
// var pubInfo = {};
|
||||
var $toast = $('.toast');
|
||||
var $mask = $('.status-mask');
|
||||
var lockBol = false;
|
||||
let urlPrefix = getUrlPrefix()
|
||||
var goToPage = null;
|
||||
// 封装layer消息提醒框
|
||||
let layerIndex
|
||||
const showLoading = (content = '获取结果中...') => {
|
||||
layer.open({
|
||||
type: 2,
|
||||
shadeClose: false,
|
||||
content,
|
||||
success (e) {
|
||||
layerIndex = $(e).attr('index')
|
||||
}
|
||||
})
|
||||
}
|
||||
const hideLoading = (index) => {
|
||||
layer.close(index)
|
||||
}
|
||||
const toastMsg = (content = '操作完成', time = 2) => {
|
||||
layer.open({
|
||||
content,
|
||||
time,
|
||||
skin: 'msg'
|
||||
})
|
||||
}
|
||||
$(function () {
|
||||
getInfoFromClient()
|
||||
var browser = checkVersion();
|
||||
var api = getUrlPrefix();
|
||||
var timer = null;
|
||||
var env = EnvCheck();
|
||||
var urlObj = getQueryString();
|
||||
console.log(urlObj.uid);
|
||||
if (urlObj.uid) {
|
||||
sessionStorage.setItem("uid", urlObj.uid);
|
||||
sessionStorage.setItem("ticket", urlObj.ticket);
|
||||
}
|
||||
if (env == 'test') {
|
||||
var vConsole = new VConsole();
|
||||
}
|
||||
|
||||
getInfoFromClient && getInfoFromClient()
|
||||
if (browser.app) {
|
||||
if (browser.android) {
|
||||
let channel = JSON.parse(pubInfo.deviceInfo).channel
|
||||
if (channel.indexOf('toutiao') != -1 || channel.indexOf('kuaishou') != -1) {
|
||||
$('.appName').html('MoliStar')
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
var main = {
|
||||
init: function () {
|
||||
this.getDeviceMsg();
|
||||
this.eventRegister();
|
||||
var that = this;
|
||||
setTimeout(function () {
|
||||
that.getData();
|
||||
}, 200)
|
||||
|
||||
},
|
||||
getDeviceMsg: function () {
|
||||
// if (browser.app) {
|
||||
// if (browser.android) {
|
||||
// pubInfo.uid = parseInt(window.androidJsObj.getUid());
|
||||
// pubInfo.deviceId = window.androidJsObj.getDeviceId();
|
||||
// pubInfo.ticket = window.androidJsObj.getTicket();
|
||||
// } else {
|
||||
// pubInfo.uid = tools.cookieUtils.get("uid");
|
||||
// if (!pubInfo.uid) {
|
||||
// window.webkit.messageHandlers.getUid.postMessage(null);
|
||||
// }
|
||||
// window.webkit.messageHandlers.getDeviceId.postMessage(null);
|
||||
// window.webkit.messageHandlers.getTicket.postMessage(null);
|
||||
// }
|
||||
// } else {
|
||||
// pubInfo.uid = 922473;
|
||||
// pubInfo.deviceId = "204aa0c983384f1e84a3625b4f04bac1";
|
||||
// }
|
||||
|
||||
// setTimeout(function () {
|
||||
// $('.deviceId').val(pubInfo.deviceId);
|
||||
// },200)
|
||||
},
|
||||
getData: function () {
|
||||
console.log(urlObj, 'urlObj')
|
||||
if (urlObj) {
|
||||
pubInfo.auth = urlObj.auth
|
||||
} else {
|
||||
pubInfo.auth = ''
|
||||
}
|
||||
console.log(pubInfo.auth, 'pubInfo.auth')
|
||||
networkRequest({
|
||||
type: 'get',
|
||||
url: urlPrefix + '/certification/hasCertify',
|
||||
data: {
|
||||
uid: pubInfo.uid,
|
||||
auth: pubInfo.auth,
|
||||
ticket: pubInfo.ticket,
|
||||
},
|
||||
success: function (res) {
|
||||
if (res.code == 200) {
|
||||
var checkBol = res.data;
|
||||
var $mask = $('.status-mask');
|
||||
var bool = !(checkBol.authResult == null || checkBol.authResult == undefined);
|
||||
function successFun () {
|
||||
hideLoading(layerIndex)
|
||||
goToPage = true;
|
||||
$mask.addClass("have-identity");
|
||||
$mask.find(".text").html("您已通过实名认证");
|
||||
$mask.find(".tips").html("系统已成功审核您的实名认证");
|
||||
$mask.find(".goto-change").removeClass('hide');
|
||||
$mask.show();
|
||||
}
|
||||
if (bool) {
|
||||
if (checkBol.authResult == false && checkBol.canCertify == true && checkBol.hasCertify == false) {
|
||||
//重复调用
|
||||
showLoading();
|
||||
main.getData();
|
||||
}else if (checkBol.authResult == false && checkBol.canCertify == false && checkBol.hasCertify == true) {
|
||||
//成功
|
||||
successFun()
|
||||
} else if (checkBol.authResult == true && checkBol.canCertify == false && checkBol.hasCertify == true) {
|
||||
//成功
|
||||
successFun()
|
||||
} else if (checkBol.authResult == true && checkBol.canCertify == true && checkBol.hasCertify == false) {
|
||||
//失败
|
||||
goToPage = false;
|
||||
$mask.addClass("failed");
|
||||
$mask.find(".text").html("您未通过实名认证");
|
||||
$mask.find(".tips").html("系统审核您的实名认证失败");
|
||||
$mask.find(".goto-change").removeClass('hide');
|
||||
$mask.show();
|
||||
hideLoading(layerIndex)
|
||||
}
|
||||
} else {
|
||||
if (checkBol.canCertify == false && checkBol.hasCertify == true) {
|
||||
//成功
|
||||
successFun()
|
||||
} else {//(authResult == null || authResult == undefined) && canCertify == true && hasCertify == false;
|
||||
//正在操作
|
||||
console.log('继续操作');
|
||||
}
|
||||
hideLoading(layerIndex)
|
||||
}
|
||||
}
|
||||
},
|
||||
error (err) {
|
||||
console.log(err);
|
||||
}
|
||||
})
|
||||
},
|
||||
eventRegister: function () {
|
||||
$('.button-submit').on('click', function () {
|
||||
var name = $('.name').val();
|
||||
var personId = $('.person-id').val();
|
||||
var phone = `${$('.phone').val()}`;
|
||||
var identityCode = $('.identity-code').val();
|
||||
var agree = $('#agree').prop("checked");
|
||||
if (!agree) {
|
||||
toastShow("请同意直播协议");
|
||||
return;
|
||||
}
|
||||
if (!name.trim()) {
|
||||
toastShow("名字不能为空");
|
||||
return;
|
||||
}
|
||||
|
||||
if (!personId.trim()) {
|
||||
toastShow("身份证号不能为空");
|
||||
return;
|
||||
}
|
||||
|
||||
if (!phone.trim()) {
|
||||
toastShow("手机号不能为空");
|
||||
return;
|
||||
}
|
||||
|
||||
if (!identityCode.trim()) {
|
||||
toastShow("验证码不能为空");
|
||||
return;
|
||||
}
|
||||
|
||||
if (!(/(^\d{15}$)|(^\d{18}$)|(^\d{17}(\d|X|x)$)/).test(personId.trim())) {
|
||||
toastShow("身份证号不符合规格");
|
||||
return;
|
||||
}
|
||||
|
||||
if (!(/^1[3|4|5|6|7|8|9][0-9]\d{8}$/).test(phone.trim())) {
|
||||
toastShow("手机号不符合规格");
|
||||
return;
|
||||
}
|
||||
if (lockBol) {
|
||||
return;
|
||||
}
|
||||
lockBol = true;
|
||||
var metaInfo = window.getMetaInfo();
|
||||
var requestParam = {
|
||||
certType: 0,
|
||||
code: identityCode,
|
||||
identityNumber: encryptDes(personId, "1ea53d260ecf11e7b56e00163e046a26"),
|
||||
metaInfo: JSON.stringify(metaInfo),
|
||||
phone: encryptDes(86 + phone, "1ea53d260ecf11e7b56e00163e046a26"),
|
||||
returnUrl: urlPrefix + `/molistar/modules/identity/new.html?uid=${sessionStorage.getItem("uid")}&ticket=${sessionStorage.getItem("ticket")}`,
|
||||
uid: pubInfo.uid,
|
||||
username: encryptDes(name, "1ea53d260ecf11e7b56e00163e046a26"),
|
||||
};
|
||||
networkRequest({
|
||||
type: 'post',
|
||||
url: urlPrefix + '/certification/initFace',
|
||||
data: requestParam,
|
||||
success: function (res) {
|
||||
if (res.code == 200) {
|
||||
window.location.href = res.data.certifyUrl;
|
||||
} else {
|
||||
$mask.addClass("failed");
|
||||
$mask.find(".text").html("实名认证失败");
|
||||
$mask.find(".tips").html(res.message);
|
||||
$mask.show();
|
||||
lockBol = false;
|
||||
setTimeout(function () {
|
||||
$('.status-mask').hide();
|
||||
}, 4000);
|
||||
lockBol = false;
|
||||
}
|
||||
},
|
||||
error (err) {
|
||||
console.log(err);
|
||||
}
|
||||
})
|
||||
})
|
||||
|
||||
$('.button-identity-code').on('click', function () {
|
||||
var phone = $('.phone').val();
|
||||
if (!phone.trim()) {
|
||||
toastShow("手机号不能为空");
|
||||
return;
|
||||
}
|
||||
if (!(/^1[3|4|5|6|7|8|9][0-9]\d{8}$/).test(phone.trim())) {
|
||||
toastShow("手机号不符合规格");
|
||||
return;
|
||||
}
|
||||
if ($(this).hasClass("disable")) {
|
||||
return;
|
||||
}
|
||||
$(this).addClass('disable');
|
||||
var time = 60;
|
||||
var $that = $(this);
|
||||
$(this).html(time + 's后重新获取');
|
||||
timer = setInterval(function () {
|
||||
time--;
|
||||
$that.html(time + "s后重新获取");
|
||||
if (time < 0) {
|
||||
clearInterval(timer);
|
||||
$that.removeClass('disable');
|
||||
$that.html("获取验证码");
|
||||
}
|
||||
}, 1000)
|
||||
|
||||
var requestParam = {
|
||||
phone: encryptDes(86 + phone, "1ea53d260ecf11e7b56e00163e046a26"),
|
||||
uid: pubInfo.uid,
|
||||
ticket: pubInfo.ticket
|
||||
};
|
||||
|
||||
if (browser.android) {
|
||||
requestParam.deviceInfo = JSON.stringify({
|
||||
deviceId: pubInfo.deviceId
|
||||
});
|
||||
}
|
||||
|
||||
networkRequest({
|
||||
type: 'post',
|
||||
url: urlPrefix + '/certification/send/code',
|
||||
data: requestParam,
|
||||
success: function (res) {
|
||||
if (res.code == 200) {
|
||||
toastShow('发送成功');
|
||||
} else {
|
||||
toastShow(res.message);
|
||||
}
|
||||
},
|
||||
error (err) {
|
||||
console.log(err);
|
||||
}
|
||||
})
|
||||
})
|
||||
|
||||
// 点击我要修改
|
||||
$('.goto-change').on('click', function () {
|
||||
$mask.hide();
|
||||
$('.layer-box-2').show();
|
||||
})
|
||||
|
||||
// 点击关闭弹层
|
||||
$('.layer-2-close').on('click', function () {
|
||||
$('.layer-box-2').hide();
|
||||
$mask.show();
|
||||
})
|
||||
|
||||
// 点击跳转手机验证
|
||||
$('.goto-change-layer').on('click', function () {
|
||||
window.location.href = 'mobile.html';
|
||||
})
|
||||
}
|
||||
};
|
||||
main.init();
|
||||
|
||||
});
|
||||
|
||||
function toastShow (text) {
|
||||
$toast.html(text);
|
||||
$toast.show();
|
||||
setTimeout(function () {
|
||||
$toast.hide();
|
||||
}, 2000);
|
||||
}
|
||||
|
||||
function getMessage (key, value) {
|
||||
pubInfo[key] = value;
|
||||
}
|
||||
|
||||
|
||||
function renderByStatus (status) {
|
||||
$mask.attr('class', 'status-mask');
|
||||
console.log("开始回调," + "状态为" + status);
|
||||
|
||||
networkRequest({
|
||||
type: 'post',
|
||||
url: urlPrefix + '/certification/notify',
|
||||
data: {
|
||||
uid: pubInfo.uid,
|
||||
ticket: pubInfo.ticket,
|
||||
token: pubInfo.token,
|
||||
statusCode: status
|
||||
},
|
||||
success: function (res) {
|
||||
console.log(res);
|
||||
lockBol = false;
|
||||
if (res.code == 200) {
|
||||
console.log("success");
|
||||
if (status == 2) {
|
||||
$mask.addClass("success");
|
||||
$mask.find(".text").html("认证成功");
|
||||
$mask.find('.tips').html('');
|
||||
$mask.show();
|
||||
} else {
|
||||
if (status == -2) {
|
||||
$mask.addClass("failed");
|
||||
$mask.find(".text").html("认证失败");
|
||||
$mask.find(".tips").html("网络不通或者网络异常");
|
||||
} else if (status == 1) {
|
||||
$mask.addClass("failed");
|
||||
$mask.find(".text").html("认证失败");
|
||||
$mask.find(".tips").html("审核失败");
|
||||
} else {
|
||||
console.log('存在异常,status=' + status);
|
||||
// window.location.reload();
|
||||
return;
|
||||
}
|
||||
$mask.show();
|
||||
setTimeout(function () {
|
||||
$mask.hide();
|
||||
}, 4000);
|
||||
}
|
||||
}
|
||||
},
|
||||
error (err) {
|
||||
console.log(err);
|
||||
}
|
||||
})
|
||||
|
||||
console.log('status', status);
|
||||
|
||||
}
|
||||
|
||||
//DES加密
|
||||
const encryptDes = (message, key) => {
|
||||
var keyHex = CryptoJS.enc.Utf8.parse(key);
|
||||
var encrypted = CryptoJS.DES.encrypt(message, keyHex, {
|
||||
mode: CryptoJS.mode.ECB,
|
||||
padding: CryptoJS.pad.Pkcs7
|
||||
});
|
||||
return encrypted.toString();
|
||||
}
|
||||
|
||||
$('.status-mask').click(function () {
|
||||
if (goToPage) {
|
||||
window.location.href = urlPrefix + '/molistar/modules/h5Income/withdrawal.html'
|
||||
} else {
|
||||
$('.status-mask').hide();
|
||||
}
|
||||
})
|
33
view/molistar/modules/identity/mobile.html
Normal file
33
view/molistar/modules/identity/mobile.html
Normal file
@@ -0,0 +1,33 @@
|
||||
<!DOCTYPE html>
|
||||
<html lang="en">
|
||||
<head>
|
||||
<meta charset="UTF-8">
|
||||
<meta name="viewport"
|
||||
content="width=device-width, user-scalable=no, initial-scale=1.0, maximum-scale=1.0, minimum-scale=1.0">
|
||||
<title>实名认证</title>
|
||||
<link rel="stylesheet" href="../../common/css/reset.css">
|
||||
<link rel="stylesheet" href="./css/mobile.css">
|
||||
<script src="../../common/js/flexible.js"></script>
|
||||
</head>
|
||||
<body>
|
||||
|
||||
<div class="container">
|
||||
<div class="tips">
|
||||
为保障账号安全,修改实名认证信息需本人操作,<br>
|
||||
请先通过短信验证码进行认证:
|
||||
</div>
|
||||
<div class="input-wrapper">
|
||||
<input type="tel" placeholder="请输入验证码" class="identity-code" maxlength="5"/>
|
||||
<div class="button-identity-code">获取验证码</div>
|
||||
</div>
|
||||
<div class="code-text">验证码已发送至您绑定的手机号<span></span></div>
|
||||
<button class="submit ban" disabled="disabled">提交</button>
|
||||
</div>
|
||||
|
||||
<div class="warm hide"></div>
|
||||
<script src="../../common/js/jquery-3.2.1.min.js"></script>
|
||||
<script src="../../common/js/common.js"></script>
|
||||
<script src="../../common/js/vconsole.min.js"></script>
|
||||
<script src="./js/mobile.js"></script>
|
||||
</body>
|
||||
</html>
|
97
view/molistar/modules/identity/new.html
Normal file
97
view/molistar/modules/identity/new.html
Normal file
@@ -0,0 +1,97 @@
|
||||
<!DOCTYPE html>
|
||||
<html lang="en">
|
||||
|
||||
<head>
|
||||
<meta charset="UTF-8">
|
||||
<meta name="viewport"
|
||||
content="width=device-width, user-scalable=no, initial-scale=1.0, maximum-scale=1.0, minimum-scale=1.0">
|
||||
<title>实名认证</title>
|
||||
<link rel="stylesheet" href="../../common/css/reset.css">
|
||||
<link rel="stylesheet" href="./css/index.css?v=1.0">
|
||||
<script src="../../common/js/flexible.js"></script>
|
||||
</head>
|
||||
|
||||
<body>
|
||||
<div class="container">
|
||||
<div class="top"><img src="./images/tutu-top.png" alt=""></div>
|
||||
<div class="form-wrapper">
|
||||
<div class="list">
|
||||
<p>真实姓名</p>
|
||||
<div class="input-wrapper">
|
||||
<input type="text" placeholder="请输入您的真实姓名" class="name" />
|
||||
</div>
|
||||
</div>
|
||||
<div class="list">
|
||||
<p>身份证号</p>
|
||||
<div class="input-wrapper">
|
||||
<input type="text" placeholder="请输入您的真实身份证号" maxlength="18" class="person-id" />
|
||||
</div>
|
||||
</div>
|
||||
<div class="list">
|
||||
<p>手机号</p>
|
||||
<div class="input-wrapper">
|
||||
<input type="text" placeholder="请输入您的手机号" maxlength="11" class="phone" />
|
||||
<div class="button-identity-code">获取验证码</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="list">
|
||||
<p>验证码</p>
|
||||
<div class="input-wrapper">
|
||||
<input type="text" placeholder="请输入验证码" maxlength="5" class="identity-code" />
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<!--<div class="hidden-form">-->
|
||||
<!--<form id="hidden-form">-->
|
||||
<!--<input type="hidden" name="deviceId" class="deviceId">-->
|
||||
<!--</form>-->
|
||||
<!--</div>-->
|
||||
<div class="rules-wrapper">
|
||||
<div class="title">认证须知</div>
|
||||
<p>1.该认证仅支持中国内地(不含港澳台地区)的用户。</p>
|
||||
<p>2.请确保填写身份证信息真实并与本人一致。</p>
|
||||
<p>3.根据国家相关的法律法规,您需要提供您的真实身份信息(真实姓名、身份证号)、身份证正反面照片、面部信息以完成实名验证。您所提供的身份信息仅用于身份验证,未经您本人的许可不会被用于其他用途。这些信息属于个人敏感信息,我们将会尽可能的保护您个人敏感信息的安全。如果您不提供这些信息,您将不能使用提现等相关功能,但不影响您继续使用本产品的其他服务。</p>
|
||||
<p>4.为保护用户权益,开启实名认证后我们将不提供解除恢复的功能,请谅解。</p>
|
||||
<p>5.一个身份证最多用于2个用户账号的实名认证。</p>
|
||||
<p>6.若人脸认证遇到问题,<a href="../rule/identity-rule.html">请点击这里</a></p>
|
||||
</div>
|
||||
<div class="button-submit">开始认证</div>
|
||||
<div class="agree-wrapper">
|
||||
<input type="checkbox" id="agree" name="isAgree" class="agree" />
|
||||
<label for="agree" class="agree-text">
|
||||
<i class="icon"></i>
|
||||
我已同意<a href="../rule/live-protocol.html" class="link-1">《交友直播协议》</a>
|
||||
</label>
|
||||
</div>
|
||||
</div>
|
||||
<div class="toast">测试文案</div>
|
||||
<div class="status-mask">
|
||||
<div class="wrapper">
|
||||
<div class="pic"></div>
|
||||
<div class="text">fewf</div>
|
||||
<div class="tips">fwefw</div>
|
||||
<!-- <button class="goto-change hide">我要修改</button> -->
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<!-- layer start -->
|
||||
<div class="layer-box layer-box-2">
|
||||
<div class="layer-content">
|
||||
<a href="javascript:;" class="layer-2-close"></a>
|
||||
<a href="javascript:;" class="goto-change-layer"></a>
|
||||
<!-- <div class="layer-2-body"></div> -->
|
||||
</div>
|
||||
</div>
|
||||
<!-- layer end -->
|
||||
|
||||
<script src="../../common/js/jquery-3.2.1.min.js"></script>
|
||||
<!-- <script src="../../common/js/common.js"></script> -->
|
||||
<script src="../../common/js/common2.js"></script>
|
||||
<script src="../../common/js/vconsole.min.js"></script>
|
||||
<script src="../../common/js/crypto-js.js"></script>
|
||||
<script src="../../common/js/layer.js"></script>
|
||||
<script src="./js/jsvm_all.js"></script>
|
||||
<script src="./js/new.js?=2.2"></script>
|
||||
</body>
|
||||
|
||||
</html>
|
Reference in New Issue
Block a user