Commit 670ecc2b by zhanghaozhe

我的宝箱滑块验证样式

parent 0755e325
...@@ -7,14 +7,14 @@ const scene = 'nc_login_h5' ...@@ -7,14 +7,14 @@ const scene = 'nc_login_h5'
class CaptchaAli extends Component { class CaptchaAli extends Component {
nc = null nc = null
el = null
state = { state = {
isLoaded: false isLoaded: false
} }
componentDidMount() { componentDidMount() {
const _this = this const _this = this
const el = document.querySelector('#nc') this.el && initCaptchaNC(() => {
el && initCaptchaNC(() => {
const nc_token = [appkey, (new Date()).getTime(), Math.random()].join(':'); const nc_token = [appkey, (new Date()).getTime(), Math.random()].join(':');
this.nc = NoCaptcha.init({ this.nc = NoCaptcha.init({
renderTo: '#nc', renderTo: '#nc',
...@@ -46,7 +46,7 @@ class CaptchaAli extends Component { ...@@ -46,7 +46,7 @@ class CaptchaAli extends Component {
const {mb = 30} = this.props const {mb = 30} = this.props
return ( return (
<div id={'captcha'} style={{marginBottom: `${mb}px`}}> <div id={'captcha'} style={{marginBottom: `${mb}px`}}>
<div id="nc"></div> <div id="nc" ref={el => this.el = el}></div>
</div> </div>
); );
} }
......
...@@ -204,7 +204,7 @@ class BindPhone extends Component { ...@@ -204,7 +204,7 @@ class BindPhone extends Component {
}} }}
/> />
</div> </div>
<CaptchaAli getInstance={this.getCaptchaInstance} onVerify={this.onVerify}/> <CaptchaAli getInstance={this.getCaptchaInstance} onVerify={this.onVerify} mb={15}/>
<div className="popup-form__item"> <div className="popup-form__item">
<Field <Field
name="code" name="code"
......
...@@ -2,9 +2,10 @@ ...@@ -2,9 +2,10 @@
// .popup-form { // .popup-form {
// text-align: center; // text-align: center;
.popup-packet__button--bundle { .popup-packet__button--bundle {
margin-top: 5px; margin-top: 5px;
} }
// } // }
[data-skip="default"] { [data-skip="default"] {
...@@ -90,10 +91,44 @@ ...@@ -90,10 +91,44 @@
} }
.popup-form { .popup-form {
// width: 290px;
// height: 257px;
// padding: 20px 20px 0;
box-sizing: border-box; box-sizing: border-box;
#captcha {
margin: 0 auto;
width: 269px;
height: 40px;
#nc {
height: 100%;
}
._nc {
.stage1 {
height: 100%;
.slider {
height: 100%;
.label {
height: 40px;
line-height: 40px;
}
.button {
width: 40px;
height: 40px;
.icon{
left: 5px;
}
}
.bg-green{
height: 40px;
line-height: 40px;
}
}
}
}
}
} }
.popup-form__item { .popup-form__item {
......
...@@ -301,7 +301,7 @@ export default [ ...@@ -301,7 +301,7 @@ export default [
}, },
//限时免费落地页 //限时免费落地页
{ {
path:'/free', path: '/free',
exact: true, exact: true,
component: loadable(() => import(/*limit-free*/'@/components/limit-free')) component: loadable(() => import(/*limit-free*/'@/components/limit-free'))
}, },
...@@ -313,7 +313,7 @@ export default [ ...@@ -313,7 +313,7 @@ export default [
// 新的开宝箱活动-我的宝箱 // 新的开宝箱活动-我的宝箱
{ {
path: '/box/yearTreasure', path: '/box/yearTreasure',
component: loadable(() => import(/* webpackChunkName: 'treasure-box-mybox' */ '@components/activity/treasure-box/myTreasure/index')) component: loadable(() => import(/* webpackChunkName: 'treasure-box-mybox' */ '@components/activity/treasure-box/myTreasure/index')),
}, },
// 新的开宝箱活动-扫码、分享页 // 新的开宝箱活动-扫码、分享页
{ {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment