Commit cc8a4062 by FE

del build

parents a984e4fd e8061abc
...@@ -3692,6 +3692,11 @@ ...@@ -3692,6 +3692,11 @@
"resolved": "https://registry.npmjs.org/cli-width/-/cli-width-2.2.0.tgz", "resolved": "https://registry.npmjs.org/cli-width/-/cli-width-2.2.0.tgz",
"integrity": "sha1-/xnt6Kml5XkyQUewwR8PvLq+1jk=" "integrity": "sha1-/xnt6Kml5XkyQUewwR8PvLq+1jk="
}, },
"clipboard-copy": {
"version": "3.1.0",
"resolved": "https://registry.npmjs.org/clipboard-copy/-/clipboard-copy-3.1.0.tgz",
"integrity": "sha512-Xsu1NddBXB89IUauda5BIq3Zq73UWkjkaQlPQbLNvNsd5WBMnTWPNKYR6HGaySOxGYZ+BKxP2E9X4ElnI3yiPA=="
},
"cliui": { "cliui": {
"version": "4.1.0", "version": "4.1.0",
"resolved": "https://registry.npmjs.org/cliui/-/cliui-4.1.0.tgz", "resolved": "https://registry.npmjs.org/cliui/-/cliui-4.1.0.tgz",
...@@ -3984,14 +3989,6 @@ ...@@ -3984,14 +3989,6 @@
"resolved": "https://registry.npmjs.org/copy-descriptor/-/copy-descriptor-0.1.1.tgz", "resolved": "https://registry.npmjs.org/copy-descriptor/-/copy-descriptor-0.1.1.tgz",
"integrity": "sha1-Z29us8OZl8LuGsOpJP1hJHSPV40=" "integrity": "sha1-Z29us8OZl8LuGsOpJP1hJHSPV40="
}, },
"copy-to-clipboard": {
"version": "3.2.0",
"resolved": "https://registry.npmjs.org/copy-to-clipboard/-/copy-to-clipboard-3.2.0.tgz",
"integrity": "sha512-eOZERzvCmxS8HWzugj4Uxl8OJxa7T2k1Gi0X5qavwydHIfuSHq2dTD09LOg/XyGq4Zpb5IsR/2OJ5lbOegz78w==",
"requires": {
"toggle-selection": "^1.0.6"
}
},
"core-js": { "core-js": {
"version": "2.6.5", "version": "2.6.5",
"resolved": "https://registry.npmjs.org/core-js/-/core-js-2.6.5.tgz", "resolved": "https://registry.npmjs.org/core-js/-/core-js-2.6.5.tgz",
...@@ -12087,15 +12084,6 @@ ...@@ -12087,15 +12084,6 @@
} }
} }
}, },
"react-copy-to-clipboard": {
"version": "5.0.1",
"resolved": "https://registry.npmjs.org/react-copy-to-clipboard/-/react-copy-to-clipboard-5.0.1.tgz",
"integrity": "sha512-ELKq31/E3zjFs5rDWNCfFL4NvNFQvGRoJdAKReD/rUPA+xxiLPQmZBZBvy2vgH7V0GE9isIQpT9WXbwIVErYdA==",
"requires": {
"copy-to-clipboard": "^3",
"prop-types": "^15.5.8"
}
},
"react-dev-utils": { "react-dev-utils": {
"version": "8.0.0", "version": "8.0.0",
"resolved": "https://registry.npmjs.org/react-dev-utils/-/react-dev-utils-8.0.0.tgz", "resolved": "https://registry.npmjs.org/react-dev-utils/-/react-dev-utils-8.0.0.tgz",
...@@ -14514,11 +14502,6 @@ ...@@ -14514,11 +14502,6 @@
"repeat-string": "^1.6.1" "repeat-string": "^1.6.1"
} }
}, },
"toggle-selection": {
"version": "1.0.6",
"resolved": "https://registry.npmjs.org/toggle-selection/-/toggle-selection-1.0.6.tgz",
"integrity": "sha1-bkWxJj8gF/oKzH2J14sVuL932jI="
},
"topo": { "topo": {
"version": "2.0.2", "version": "2.0.2",
"resolved": "https://registry.npmjs.org/topo/-/topo-2.0.2.tgz", "resolved": "https://registry.npmjs.org/topo/-/topo-2.0.2.tgz",
......
...@@ -37,6 +37,10 @@ class App extends Component { ...@@ -37,6 +37,10 @@ class App extends Component {
...this.props.location ...this.props.location
} }
records = []
firstLoad = true
componentDidMount() { componentDidMount() {
// 友盟统计 // 友盟统计
const script = document.createElement('script'); const script = document.createElement('script');
...@@ -44,7 +48,7 @@ class App extends Component { ...@@ -44,7 +48,7 @@ class App extends Component {
script.language = 'JavaScript'; script.language = 'JavaScript';
document.body.appendChild(script); document.body.appendChild(script);
this.setNavigationRecord(this.props.location) this.setNavigationRecord(this.props.location, this.props.history.action)
//平台信息 //平台信息
...@@ -58,9 +62,10 @@ class App extends Component { ...@@ -58,9 +62,10 @@ class App extends Component {
this.utm() this.utm()
const routeMatchRule = /binding-tel|forgot|set-password/ const routeMatchRule = /binding-tel|forgot|set-password/
const {history} = this.props const {history} = this.props
history.listen((location) => { history.listen((location, action) => {
this.firstLoad = false
this.setNavigationRecord(location, action)
this.utm() this.utm()
this.setNavigationRecord(location)
if (cookie.get('uid') && this.props.user.hasError) { if (cookie.get('uid') && this.props.user.hasError) {
this.getUser() this.getUser()
} }
...@@ -69,7 +74,7 @@ class App extends Component { ...@@ -69,7 +74,7 @@ class App extends Component {
if (routeMatchRule.test(pathname)) { if (routeMatchRule.test(pathname)) {
return return
} }
location.state = {from: this.previousLocation}; location.state = {...location.state, ...{from: this.previousLocation}};
} else { } else {
this.removeShareCodeCookie() this.removeShareCodeCookie()
} }
...@@ -82,17 +87,23 @@ class App extends Component { ...@@ -82,17 +87,23 @@ class App extends Component {
cookie.remove('share_code', {path: '/', domain: '.julyedu.com'}) cookie.remove('share_code', {path: '/', domain: '.julyedu.com'})
} }
setNavigationRecord = (location) => { setNavigationRecord = (location, action) => {
let {location: _location} = this.props const {pathname, search, hash} = location
let {state: _state = {}} = _location let isLastRecord = location.pathname === this.records.length && this.records[this.records.length - 1].pathname
let {state = {}} = location switch (action) {
location.state = { case 'POP':
...state, ...{ this.firstLoad ? this.records.push({pathname, search, hash}) : this.records.pop()
record: _state.record ? break
[..._state.record, {pathname: location.pathname, search: location.search, hash: location.hash}] : case 'REPLACE':
[{pathname: location.pathname, search: '', hash: ''}] this.records[this.records.length - 1] = {pathname, search, hash}
} break
default:
!isLastRecord && this.records.push({pathname, search, hash})
} }
location.state && location.state.records
? (location.state.records = this.records)
: (location.state = {records: this.records})
} }
...@@ -158,15 +169,33 @@ class App extends Component { ...@@ -158,15 +169,33 @@ class App extends Component {
} }
componentDidUpdate() { componentDidUpdate() {
const {location} = this.props
this.previousLocation = location.pathname.startsWith('/passport') ? this.setPreviousLocation()
this.previousLocation.pathname === '/' ? location : this.previousLocation : location
if (!this.props.user.hasError && getParam('redirect')) { if (!this.props.user.hasError && getParam('redirect')) {
window.location.href = getParam('redirect') window.location.href = getParam('redirect')
} }
} }
setPreviousLocation = () => {
const {location, history: {action}} = this.props
if (location.pathname.startsWith('/passport')) {
let index = this.records.findIndex(item => item.pathname.startsWith('/passport'))
this.previousLocation = index > 0
? this.records[index - 1]
: this.records.length
? this.records[this.records.length - 1]
: null
} else {
if (action === 'POP' || action === 'REPLACE') {
let index = this.records.findIndex(item => item.pathname.startsWith('/passport'))
this.previousLocation = index > 0 ? this.records[index - 1] : this.records[this.records.length - 1]
} else {
this.previousLocation = location
}
}
}
transformUser = res => { transformUser = res => {
let payload let payload
......
This source diff could not be displayed because it is too large. You can view the blob instead.
...@@ -422,6 +422,9 @@ Created by iconfont ...@@ -422,6 +422,9 @@ Created by iconfont
<glyph glyph-name="play_hovericon" unicode="&#59011;" d="M512 896c282.763636 0 512-229.236364 512-512s-229.236364-512-512-512S0 101.236364 0 384 229.236364 896 512 896z m182.760727-552.680727a46.545455 46.545455 0 0 1 0 81.361454l-311.086545 172.846546A23.272727 23.272727 0 0 1 349.090909 577.163636v-386.327272a23.272727 23.272727 0 0 1 34.583273-20.363637l311.086545 172.846546z" horiz-adv-x="1024" /> <glyph glyph-name="play_hovericon" unicode="&#59011;" d="M512 896c282.763636 0 512-229.236364 512-512s-229.236364-512-512-512S0 101.236364 0 384 229.236364 896 512 896z m182.760727-552.680727a46.545455 46.545455 0 0 1 0 81.361454l-311.086545 172.846546A23.272727 23.272727 0 0 1 349.090909 577.163636v-386.327272a23.272727 23.272727 0 0 1 34.583273-20.363637l311.086545 172.846546z" horiz-adv-x="1024" />
<glyph glyph-name="gengduo" unicode="&#58960;" d="M511.616 883.328c-137.344 0-254.72-49.024-352.128-147.2C61.824 638.72 13.184 521.344 13.184 384c0-137.856 48.768-255.616 146.304-353.024 97.408-97.536 214.912-146.304 352.128-146.304 137.856 0 255.616 48.768 353.152 146.304 97.408 97.408 146.176 215.168 146.176 353.024 0 137.344-48.768 254.72-146.176 352.256C767.104 834.304 649.472 883.328 511.616 883.328zM198.528 696.96C285.312 783.744 389.76 827.136 511.616 827.136c122.496 0 227.072-43.392 313.856-130.176 86.784-86.144 130.176-190.464 130.176-312.96 0-122.496-43.392-227.072-130.176-313.856C738.688-16.768 633.984-60.16 511.616-60.16c-122.496 0-226.816 43.52-313.088 130.304C111.744 156.928 68.352 261.504 68.352 383.872c0 121.856 43.52 226.304 130.176 313.088z m469.12-313.088c0-14.208 4.736-26.496 14.336-36.608 10.112-9.472 22.016-14.336 35.712-14.336 13.568-0.128 26.496 5.12 36.096 14.72s14.848 22.528 14.72 36.096c-0.128 13.312-5.504 26.112-15.104 35.456-9.472 9.344-22.4 14.592-35.712 14.464-13.696 0-25.6-4.736-35.712-14.208-9.6-9.984-14.336-21.76-14.336-35.584z m-105.216 0c0 13.696-4.736 25.6-14.336 35.712-9.856 9.344-22.912 14.464-36.608 14.208-13.696 0-25.6-4.736-35.712-14.208-9.472-10.112-14.336-22.016-14.336-35.712 0-14.208 4.736-26.496 14.336-36.608 10.112-9.472 22.016-14.336 35.712-14.336 14.336 0 26.496 4.736 36.608 14.336 9.472 9.984 14.592 23.168 14.336 36.608z m-206.08 0c0 13.696-4.736 25.6-14.336 35.712-9.6 9.216-22.4 14.336-35.712 14.208-27.776 0-50.432-22.528-50.432-50.432 0-27.776 22.528-50.432 50.432-50.432 13.696 0 25.6 4.736 35.712 14.336 9.472 9.984 14.592 23.04 14.336 36.608z m0 0" horiz-adv-x="1024" />
</font> </font>
......
...@@ -13,7 +13,7 @@ class HeaderBar extends Component { ...@@ -13,7 +13,7 @@ class HeaderBar extends Component {
if(browser.isWeixin && getParam('code') && getParam('state')){ if(browser.isWeixin && getParam('code') && getParam('state')){
window.history.go(-2) window.history.go(-2)
} }
if(state.record && state.record.length > 1){ if(state.records && state.records.length > 1){
window.history.go(-1); window.history.go(-1);
}else{ }else{
window.location.href = window.location.origin window.location.href = window.location.origin
......
...@@ -10,7 +10,7 @@ export const delCountryNum = () => ({ ...@@ -10,7 +10,7 @@ export const delCountryNum = () => ({
type: 'DEL_COUNTRY_NUM' type: 'DEL_COUNTRY_NUM'
}); });
export default (state = {}, action) => { export default (state = {num: 86, code: null}, action) => {
const { type, payload } = action; const { type, payload } = action;
switch (type) { switch (type) {
case ADD_COUNTRY_NUM: case ADD_COUNTRY_NUM:
......
...@@ -13,64 +13,8 @@ class Country extends Component { ...@@ -13,64 +13,8 @@ class Country extends Component {
constructor(props) { constructor(props) {
super(props); super(props);
this.state = { this.state = {
navs: ['A','B','C','D','E','F','G','H','I','J','K','L','M','N','O','P','Q','R','S','T','U','V','W','X','Y','Z'], currentNav: 'A',
currentNav: 'A' data: [
}
}
componentDidMount() {
// document.body.scrollIntoView();
document.addEventListener('scroll', this.judgeCurrentPosition)
}
componentWillUnmount() {
document.removeEventListener('scroll', this.judgeCurrentPosition)
}
judgeCurrentPosition = () => {
const { navs } = this.state;
let top = document.documentElement.scrollTop || document.body.scrollTop;
const lens = navs.map(item => {
let el = document.querySelector(`[data-type="${item}"]`);
if(el) {
return el.offsetTop;
}
return '';
});
lens.map((item,index) => {
if(item && (top + 200) > item) {
this.setState({
currentNav: navs[index]
})
}
});
}
toParentPage = (e, num) => {
// console.log(this.props);
const { history, addCountryNum } = this.props;
addCountryNum({
num,
code: getParam('share_code')
});
history.push(`/detail?id=${getParam('id')}`);
e.preventDefault();
}
scrollTo = (param) => {
const el = document.querySelector(`[data-type="${param}"]`)
if(el) {
this.setState({
currentNav: param
});
el.scrollIntoView({
behavior: 'smooth'
});
}
}
render() {
const data = [
{ {
type: '0', type: '0',
list: [ list: [
...@@ -79,17 +23,41 @@ class Country extends Component { ...@@ -79,17 +23,41 @@ class Country extends Component {
num: '86' num: '86'
}, },
{ {
name: '中国澳门', name: '美国',
num: '853' num: '1'
},
{
name: '日本',
num: '81'
}, },
{ {
name: '中国香港', name: '中国香港',
num: '852' num: '852'
}, },
{ {
name: '中国澳门',
num: '853'
},
{
name: '中国台湾', name: '中国台湾',
num: '886' num: '886'
} },
{
name: '澳大利亚',
num: '61'
},
{
name: '加拿大',
num: '1'
},
{
name: '英国',
num: '44'
},
{
name: '新西兰',
num: '64'
},
] ]
}, },
{ {
...@@ -162,14 +130,6 @@ class Country extends Component { ...@@ -162,14 +130,6 @@ class Country extends Component {
{ {
name: '爱沙尼亚', name: '爱沙尼亚',
num: '372' num: '372'
},
{
name: '爱沙尼亚',
num: '372'
},
{
name: '爱沙尼亚',
num: '372'
} }
] ]
}, },
...@@ -735,26 +695,6 @@ class Country extends Component { ...@@ -735,26 +695,6 @@ class Country extends Component {
{ {
name: '奥地利', name: '奥地利',
num: '43' num: '43'
},
{
name: '澳大利亚',
num: '61'
},
{
name: '澳大利亚',
num: '61'
},
{
name: '澳大利亚',
num: '61'
},
{
name: '澳大利亚',
num: '61'
},
{
name: '澳大利亚',
num: '61'
} }
] ]
}, },
...@@ -884,7 +824,6 @@ class Country extends Component { ...@@ -884,7 +824,6 @@ class Country extends Component {
{ {
type: 'T', type: 'T',
list: [ list: [
,
{ {
name: '塔吉克斯坦', name: '塔吉克斯坦',
num: '992' num: '992'
...@@ -1003,31 +942,31 @@ class Country extends Component { ...@@ -1003,31 +942,31 @@ class Country extends Component {
{ {
name: '印度', name: '印度',
num: '91' num: '91'
},, },
{ {
name: '印度尼西亚', name: '印度尼西亚',
num: '62' num: '62'
},, },
{ {
name: '伊朗', name: '伊朗',
num: '98' num: '98'
},, },
{ {
name: '伊拉克', name: '伊拉克',
num: '964' num: '964'
},, },
{ {
name: '以色列', name: '以色列',
num: '972' num: '972'
},, },
{ {
name: '意大利', name: '意大利',
num: '39' num: '39'
},, },
{ {
name: '牙买加', name: '牙买加',
num: '1876' num: '1876'
},, },
{ {
name: '约旦', name: '约旦',
num: '962' num: '962'
...@@ -1087,19 +1026,84 @@ class Country extends Component { ...@@ -1087,19 +1026,84 @@ class Country extends Component {
} }
] ]
} }
]; ]
const { currentNav, navs } = this.state; }
}
componentDidMount() {
// document.body.scrollIntoView();
document.addEventListener('scroll', this.judgeCurrentPosition)
}
componentWillUnmount() {
document.removeEventListener('scroll', this.judgeCurrentPosition)
}
judgeCurrentPosition = () => {
const { data } = this.state;
let top = document.documentElement.scrollTop || document.body.scrollTop;
const lens = data.map(item => {
let el = document.querySelector(`[data-type="${item['type']}"]`);
if(el) {
return el.offsetTop;
}
return '';
});
lens.map((item,index) => {
if(item && top >= item) {
this.setState({
currentNav: data[index]['type']
})
}
/*
if(item && (top + 200) > item) {
this.setState({
currentNav: data[index]['type']
})
}
*/
});
}
toParentPage = (e, num) => {
const { history, addCountryNum } = this.props;
addCountryNum({
num,
code: getParam('share_code')
});
// history.push(`/detail?id=${getParam('id')}`);
history.go(-1)
e.preventDefault();
}
scrollTo = (param) => {
const el = document.querySelector(`[data-type="${param}"]`)
if(el) {
this.setState({
currentNav: param
});
window.scrollTo({left: 0, top: el.offsetTop, behavior: 'smooth'})
/*
el.scrollIntoView({
behavior: 'smooth'
});
*/
}
}
render() {
const { currentNav, data } = this.state;
return ( return (
<> <>
<HeaderBar title="选择国家和地区" /> <HeaderBar title="选择国家和地区" arrow={true}/>
<ul className="letter-nav"> <ul className="letter-nav">
{navs.map((item, index) => { {data.map(item => {
return ( return (
<li <li
key={`nav-${index}`} key={`nav-${item['type']}`}
className={classnames("letter-nav__item", {"letter-nav__item--active": currentNav === item})} className={classnames("letter-nav__item", {"letter-nav__item--active": currentNav === item['type']})}
onClick={() => this.scrollTo(item)} onClick={() => this.scrollTo(item['type'])}
>{item}</li> >{item['type'] === '0' ? '常' : item['type']}</li>
) )
})} })}
</ul> </ul>
......
...@@ -33,7 +33,8 @@ body { ...@@ -33,7 +33,8 @@ body {
} }
.country-item { .country-item {
margin: 0 12px; margin-left: 12px;
padding-right: 22px;
} }
.country-item__link { .country-item__link {
......
...@@ -10,6 +10,8 @@ import Captcha from '@/common/Captcha'; ...@@ -10,6 +10,8 @@ import Captcha from '@/common/Captcha';
import FollowQRcode from './../followQRcode'; import FollowQRcode from './../followQRcode';
import './index.scss'; import './index.scss';
import cookie from 'js-cookie' import cookie from 'js-cookie'
import { Link } from "react-router-dom";
class RedPacket extends PureComponent { class RedPacket extends PureComponent {
...@@ -627,7 +629,6 @@ class RedPacket extends PureComponent { ...@@ -627,7 +629,6 @@ class RedPacket extends PureComponent {
bindInfo, bindInfo,
country country
} = this.state; } = this.state;
// console.log(share_code);
const cls = classnames('popup-mask',{ const cls = classnames('popup-mask',{
'popup-mask--no': type !== 2 'popup-mask--no': type !== 2
}); });
...@@ -851,12 +852,12 @@ class RedPacket extends PureComponent { ...@@ -851,12 +852,12 @@ class RedPacket extends PureComponent {
<Form className="popup-form__content"> <Form className="popup-form__content">
<h4 className="popup-form__title">绑定手机号</h4> <h4 className="popup-form__title">绑定手机号</h4>
<div className="popup-form__item"> <div className="popup-form__item">
<a <Link
className="popup-form__button--num" className="popup-form__button--num"
href={`/country?id=${getParam('id')}&share_code=${share_code}`}> to={`/country?id=${getParam('id')}&share_code=${share_code}`}>
+{country.num} +{country.num}
<i className="iconfont iconiconfront-69"></i> <i className="iconfont iconiconfront-69"/>
</a> </Link>
<Field <Field
name="tel" name="tel"
render={({field}) => { render={({field}) => {
......
...@@ -7,10 +7,6 @@ ...@@ -7,10 +7,6 @@
color: $color_666; color: $color_666;
} }
.tel {
margin-bottom: 21px;
}
.verification { .verification {
margin-bottom: 21px; margin-bottom: 21px;
} }
......
import React, { Component } from 'react'; import React, { Component } from 'react';
import './binding-tel.scss' import './binding-tel.scss'
import { withFormik, Field, Form } from "formik"; import { withFormik, Field, Form } from "formik";
import { validateTel, http, api, getParam } from "@/utils"; import { http, getParam } from "@/utils";
import { compose } from "redux"; import { compose } from "redux";
import { connect } from "react-redux"; import { connect } from "react-redux";
import { setCurrentUser } from "@/store/userAction"; import { setCurrentUser } from "@/store/userAction";
import Captcha from '@/common/Captcha' import Captcha from '@/common/Captcha'
import {HeaderBar} from '@/common' import { HeaderBar } from '@/common'
import ClearableInput from '@common/ClearableInput' // import ClearableInput from '@common/ClearableInput'
import ClearableInput from '../common/clearableInputWithCountryCodes'
import Button from '../common/Button' import Button from '../common/Button'
import VeriCodeInput from '../common/veriCodeInput' import VeriCodeInput from '../common/veriCodeInput'
import { Toast } from "antd-mobile"; import { Toast } from "antd-mobile";
...@@ -42,7 +43,8 @@ class BindingTel extends Component { ...@@ -42,7 +43,8 @@ class BindingTel extends Component {
render() { render() {
const { const {
values, values,
errors errors,
country
} = this.props } = this.props
return ( return (
<> <>
...@@ -59,9 +61,7 @@ class BindingTel extends Component { ...@@ -59,9 +61,7 @@ class BindingTel extends Component {
setFieldValue={form.setFieldValue} setFieldValue={form.setFieldValue}
placeholder={'请输入需要绑定的手机号'} placeholder={'请输入需要绑定的手机号'}
wrapperClass={'tel'} wrapperClass={'tel'}
icon={<i className={'iconfont iconshouji'} country={country}
style={{fontSize: '22px', left: '11px'}}
/>}
/> />
) )
...@@ -77,18 +77,21 @@ class BindingTel extends Component { ...@@ -77,18 +77,21 @@ class BindingTel extends Component {
icon={<i className={'iconfont iconduanxin'} icon={<i className={'iconfont iconduanxin'}
style={{fontSize: '20px', left: '12px'}} style={{fontSize: '20px', left: '12px'}}
/>} />}
placeholder={'验证码'}
account={values.tel} account={values.tel}
tel={values.tel} tel={values.tel}
challenge={this.state.validate} challenge={this.state.validate}
instance={this.state.captchaInstance} instance={this.state.captchaInstance}
action={'auth'} action={'auth'}
country={country}
/> />
) )
}} }}
/> />
<Captcha onVerify={this.onVerify} getInstance={this.getCaptchaInstance}/> <Captcha onVerify={this.onVerify} getInstance={this.getCaptchaInstance}/>
<Button className={'complete-btn'} active={values.tel && values.veriCode && isEmpty(errors)}>完成</Button> <Button className={'complete-btn'}
active={values.tel && values.veriCode && isEmpty(errors)}>完成</Button>
</Form> </Form>
</div> </div>
</> </>
...@@ -107,7 +110,7 @@ const formikConfig = { ...@@ -107,7 +110,7 @@ const formikConfig = {
validateOnChange: true, validateOnChange: true,
validate(values) { validate(values) {
let errors = {} let errors = {}
if (!validateTel(values.tel)) { if (!/\d/.test(values.tel)) {
errors.tel = '请输入正确的手机号' errors.tel = '请输入正确的手机号'
} }
if (!values.veriCode) { if (!values.veriCode) {
...@@ -120,6 +123,7 @@ const formikConfig = { ...@@ -120,6 +123,7 @@ const formikConfig = {
phone_num: values.tel, phone_num: values.tel,
phone_code: values.veriCode, phone_code: values.veriCode,
mkey: getParam('mkey'), mkey: getParam('mkey'),
area_code: props.country.num,
plat: 5 plat: 5
}).then(res => { }).then(res => {
const data = res.data const data = res.data
...@@ -135,7 +139,7 @@ const formikConfig = { ...@@ -135,7 +139,7 @@ const formikConfig = {
stage: 'binding' stage: 'binding'
}) })
props.history.replace(`/passport/set-password`) props.history.replace(`/passport/set-password`)
}else { } else {
location.assign(data.data['jump_url']) location.assign(data.data['jump_url'])
} }
...@@ -143,17 +147,12 @@ const formikConfig = { ...@@ -143,17 +147,12 @@ const formikConfig = {
} else { } else {
Toast.info(data.msg, 2, null, false) Toast.info(data.msg, 2, null, false)
} }
/*props.setCurrentUser({
hasError,
data
})*/
}) })
} }
} }
export default compose( export default compose(
connect( connect(
null, state => ({country: state.country}),
{setCurrentUser} {setCurrentUser}
), ),
withFormik(formikConfig), withFormik(formikConfig),
......
import React, { PureComponent } from 'react'; import React, { PureComponent } from 'react';
import { browser } from "@/utils"; import { browser } from "@/utils";
import './loginWays.scss' import './loginWays.scss'
import more from '../../icons/more.png'
class LoginWays extends PureComponent { class LoginWays extends PureComponent {
state = { state = {
ways: this.props.loginWays ways: browser.isWeixin ? this.props.loginWays.slice(0, 2) : this.props.loginWays.slice(0, 1),
} showMore: true
componentDidMount() {
if (!browser.isWeixin) {
this.setState({
ways: this.state.ways.filter(item => item.text !== '微信')
})
}
} }
...@@ -22,6 +15,17 @@ class LoginWays extends PureComponent { ...@@ -22,6 +15,17 @@ class LoginWays extends PureComponent {
this.props.onClick(text) this.props.onClick(text)
} }
filterWays = () => {
return browser.isWeixin ? this.props.loginWays : this.props.loginWays.filter(item => item.id !== 'wechat')
}
showMore = () => {
this.setState({
ways: this.filterWays(),
showMore: false
})
}
render() { render() {
return ( return (
<div className="login-ways"> <div className="login-ways">
...@@ -31,12 +35,19 @@ class LoginWays extends PureComponent { ...@@ -31,12 +35,19 @@ class LoginWays extends PureComponent {
this.state.ways.map((item, index) => { this.state.ways.map((item, index) => {
return ( return (
<li key={index} onClick={this.handleClick.bind(this, item.text)}> <li key={index} onClick={this.handleClick.bind(this, item.text)}>
<img src={item.logo} alt=""/> <img src={item.logo} alt={item.text}/>
<p>{item.text}</p> <p>{item.text}</p>
</li> </li>
) )
}) })
} }
{
this.state.showMore &&
<li className={'more'} onClick={this.showMore}>
<img src={more} alt="更多"/>
<p>更多</p>
</li>
}
</ul> </ul>
</div> </div>
); );
......
import React, { Component } from 'react';
import ClearableInput from '@common/ClearableInput'
import './index.scss'
import { Link } from "react-router-dom";
class ClearableInputWithCountryCodes extends Component {
render() {
const {country, ...rest} = this.props
return (
<div className={'clearable-input-with-country-codes'}>
<div className="country-code">
<Link to={'/country'}>
+{country && country.num || 86}
<i className={'iconfont iconiconfront-69'}/>
</Link>
</div>
<ClearableInput {...rest}/>
</div>
);
}
}
export default ClearableInputWithCountryCodes;
\ No newline at end of file
.clearable-input-with-country-codes {
display: flex;
border: 1px solid #ccc;
border-radius: 3px;
margin-bottom: 24px;
.clearable-input-wrapper {
margin-bottom: 0;
flex: 1 1 auto;
input {
padding-left: 10px;
border: none;
width: 100%;
padding-right: 34px;
}
}
.country-code {
flex-shrink: 0;
display: flex;
justify-content: center;
align-items: center;
font-size: 15px;
color: #333;
width: 63px;
text-align: center;
border-right: 1px solid #ccc;
.iconfont {
margin-left: 3px;
}
}
}
\ No newline at end of file
import React, { Component } from 'react';
import './index.scss'
import Input from '../Input'
import { Link } from "react-router-dom";
class InputWithCountryCodes extends Component {
render() {
const {country, ...rest} = this.props
return (
<div className={'input-with-country-codes'}>
<div className="country-codes">
<Link to={'/country'}>
+{country && country.num || 86}
<i className={'iconfont iconiconfront-69'}/>
</Link>
</div>
<Input {...rest}/>
</div>
);
}
}
export default InputWithCountryCodes;
\ No newline at end of file
.input-with-country-codes {
display: flex;
border: 1px solid #ccc;
border-radius: 3px;
margin-bottom: 24px;
.tel-input {
margin-bottom: 0;
.input {
padding-left: 10px;
border: none;
}
}
.country-codes {
flex-shrink: 0;
display: flex;
justify-content: center;
align-items: center;
font-size: 15px;
color: #333;
width: 63px;
text-align: center;
border-right: 1px solid #ccc;
}
}
\ No newline at end of file
import React, { Component } from 'react'; import React, { Component } from 'react';
import './veri-code-input.scss' import './veri-code-input.scss'
import { http, validateEmail, validateTel } from '@/utils'; import { http, validateEmail } from '@/utils';
import { Toast } from "antd-mobile"; import { Toast } from "antd-mobile";
import { has } from 'lodash' import { has } from 'lodash'
...@@ -47,8 +47,8 @@ class VeriCodeInput extends Component { ...@@ -47,8 +47,8 @@ class VeriCodeInput extends Component {
} }
getType = () => { getType = () => {
const {account} = this.props const {email} = this.props
if (validateEmail(account)) { if (validateEmail(email)) {
return 'email' return 'email'
} }
} }
...@@ -61,9 +61,9 @@ class VeriCodeInput extends Component { ...@@ -61,9 +61,9 @@ class VeriCodeInput extends Component {
} }
sendEmail = () => { sendEmail = () => {
const {account, challenge} = this.props const {email, challenge} = this.props
http.post(`${API['passport-api']}/send_email_code`, { http.post(`${API['passport-api']}/send_email_code`, {
email: account, email,
challenge challenge
}).then(res => { }).then(res => {
if (res.data.errno === 0) { if (res.data.errno === 0) {
...@@ -79,14 +79,15 @@ class VeriCodeInput extends Component { ...@@ -79,14 +79,15 @@ class VeriCodeInput extends Component {
} }
sendSMS = () => { sendSMS = () => {
const {action, tel, account, challenge, checking} = this.props const {action, tel, account, challenge, checking, country} = this.props
if (!tel && !account) { if (!tel) {
Toast.info('请输入手机号或邮箱地址') Toast.info('请输入手机号')
return return
} }
http.post(`${API['passport-api']}/quick_sms`, { http.post(`${API['passport-api']}/quick_sms`, {
phone_num: tel || account, phone_num: tel || account,
action: action || 'login', action: action || 'login',
area_code: country.num,
challenge, challenge,
checking checking
}).then(res => { }).then(res => {
...@@ -103,7 +104,7 @@ class VeriCodeInput extends Component { ...@@ -103,7 +104,7 @@ class VeriCodeInput extends Component {
validate = () => { validate = () => {
const {tel, challenge, account} = this.props const {tel, challenge, email} = this.props
let hasTel = has(this.props, 'tel') let hasTel = has(this.props, 'tel')
let content let content
...@@ -111,15 +112,15 @@ class VeriCodeInput extends Component { ...@@ -111,15 +112,15 @@ class VeriCodeInput extends Component {
if (!tel) { if (!tel) {
content = '手机号码不能为空' content = '手机号码不能为空'
} }
if (!validateTel(tel)) { if (!/\d/.test(tel)) {
content = '请输入正确格式的手机号码' content = '请输入正确格式的手机号码'
} }
} else { } else {
if (!account) { if (!email) {
content = '手机号或电子邮件不能为空' content = '电子邮件不能为空'
} }
if (!validateTel(account) && !validateEmail(account)) { if (!validateEmail(email)) {
content = '请输入正确格式的手机号或电子邮件' content = '请输入正确格式的电子邮件'
} }
} }
......
...@@ -4,6 +4,13 @@ ...@@ -4,6 +4,13 @@
.content { .content {
padding: 38px 36px; padding: 38px 36px;
text-align: center;
.to-email{
line-height: 55px;
font-size: 15px;
color: #666;
}
} }
...@@ -14,10 +21,6 @@ ...@@ -14,10 +21,6 @@
background: #56abff; background: #56abff;
} }
.tel-input {
margin-bottom: 21px;
}
.verify-code { .verify-code {
margin-bottom: 21px; margin-bottom: 21px;
} }
...@@ -25,4 +28,5 @@ ...@@ -25,4 +28,5 @@
.next_step { .next_step {
margin-top: 32px; margin-top: 32px;
} }
} }
\ No newline at end of file
...@@ -6,10 +6,12 @@ import { withFormik, Form, Field } from 'formik'; ...@@ -6,10 +6,12 @@ import { withFormik, Form, Field } from 'formik';
import { connect } from 'react-redux'; import { connect } from 'react-redux';
import { compose } from 'redux'; import { compose } from 'redux';
import { Toast } from "antd-mobile"; import { Toast } from "antd-mobile";
import { HeaderBar, Captcha, ClearableInput } from "@/common"; import { HeaderBar, Captcha } from "@/common";
import { validateTel, validateEmail, http, api } from "@/utils"; import ClearableInput from '../common/clearableInputWithCountryCodes'
import { http } from "@/utils";
import { quickLogin } from '@/store/userAction'; import { quickLogin } from '@/store/userAction';
import OnSubmissionError from '../common/OnSubmissionError' import OnSubmissionError from '../common/OnSubmissionError'
import { Link } from "react-router-dom";
class ForgotPassword extends Component { class ForgotPassword extends Component {
...@@ -42,7 +44,8 @@ class ForgotPassword extends Component { ...@@ -42,7 +44,8 @@ class ForgotPassword extends Component {
render() { render() {
const { const {
values, values,
isValid isValid,
country
} = this.props } = this.props
return ( return (
<div className={'forgot-password'}> <div className={'forgot-password'}>
...@@ -50,18 +53,16 @@ class ForgotPassword extends Component { ...@@ -50,18 +53,16 @@ class ForgotPassword extends Component {
<div className="content"> <div className="content">
<Form className='forgot-password-form'> <Form className='forgot-password-form'>
<Field <Field
name={'account'} name={'tel'}
render={({field, form}) => { render={({field, form}) => {
return ( return (
<ClearableInput <ClearableInput
{...field} {...field}
type={'tel'} type={'tel'}
placeholder={'请输入注册时的邮箱账号或手机号'} placeholder={'请输入注册时的手机号'}
wrapperClass={'tel-input'} wrapperClass={'tel-input'}
setFieldValue={form.setFieldValue} setFieldValue={form.setFieldValue}
icon={<i className={'iconfont iconshouji'} country={country}
style={{fontSize: '22px', left: '11px'}}
/>}
/>) />)
}} }}
/> />
...@@ -77,11 +78,12 @@ class ForgotPassword extends Component { ...@@ -77,11 +78,12 @@ class ForgotPassword extends Component {
icon={<i className={'iconfont iconduanxin'} icon={<i className={'iconfont iconduanxin'}
style={{fontSize: '20px', left: '12px'}} style={{fontSize: '20px', left: '12px'}}
/>} />}
account={values.account} tel={values.tel}
challenge={this.state.validate} challenge={this.state.validate}
instance={this.state.captchaInstance} instance={this.state.captchaInstance}
action={'auth'} action={'auth'}
checking={1} checking={1}
country={country}
/> />
) )
}} }}
...@@ -90,6 +92,7 @@ class ForgotPassword extends Component { ...@@ -90,6 +92,7 @@ class ForgotPassword extends Component {
<OnSubmissionError callback={this.onSubmissionError}/> <OnSubmissionError callback={this.onSubmissionError}/>
<Captcha getInstance={this.getCaptchaInstance} onVerify={this.onVerify}/> <Captcha getInstance={this.getCaptchaInstance} onVerify={this.onVerify}/>
<Button className={'next_step'} active={isValid}>下一步</Button> <Button className={'next_step'} active={isValid}>下一步</Button>
<Link className={'to-email'} to={`/passport/forgot-password-email`} replace>邮箱找回</Link>
</Form> </Form>
</div> </div>
</div> </div>
...@@ -101,37 +104,26 @@ class ForgotPassword extends Component { ...@@ -101,37 +104,26 @@ class ForgotPassword extends Component {
const formikConfig = { const formikConfig = {
mapPropsToValues: () => ({ mapPropsToValues: () => ({
account: '', tel: '',
veriCode: '' veriCode: ''
}), }),
validateOnChange: true, validateOnChange: true,
validateOnBlur: true, validateOnBlur: true,
validate: values => { validate: values => {
let errors = {} let errors = {}
if (!validateTel(values.account) && !validateEmail(values.account)) { if (!/\d/.test(values.tel)) {
errors.account = '请输入正确的手机号或邮箱地址' errors.tel = '请输入正确的手机号'
} }
values.veriCode.toString().length !== 6 && (errors.veriCode = '验证码格式不正确') values.veriCode.toString().length !== 6 && (errors.veriCode = '验证码格式不正确')
return errors return errors
}, },
handleSubmit(values, {props}) { handleSubmit(values, {props}) {
let account, address
if (validateEmail(values.account)) {
account = 'email'
address = 'check_email_code'
sessionStorage.setItem('r_type', 'email')
sessionStorage.setItem('email', values.account)
} else {
account = 'phone'
address = 'check_phone_code'
sessionStorage.setItem('r_type', 'phone') sessionStorage.setItem('r_type', 'phone')
sessionStorage.setItem('tel', values.account) sessionStorage.setItem('tel', values.tel)
} http.post(`${API['passport-api']}/check_phone_code`, {
phone: values.tel,
http.post(`${API['passport-api']}/${address}`, { code: values.veriCode,
[account]: values.account, area_code: props.country.num
code: values.veriCode
}).then(res => { }).then(res => {
if (res.data.errno == 0) { if (res.data.errno == 0) {
props.history.push('/passport/set-password', {from: props.location}) props.history.push('/passport/set-password', {from: props.location})
...@@ -145,7 +137,7 @@ const formikConfig = { ...@@ -145,7 +137,7 @@ const formikConfig = {
export default compose( export default compose(
connect( connect(
null, state => ({country: state.country}),
{quickLogin} {quickLogin}
), ),
withFormik(formikConfig) withFormik(formikConfig)
......
import React, { Component } from 'react'
import './index.scss'
import VeriCodeInput from '../common/veriCodeInput'
import Button from '../common/Button'
import { withFormik, Form, Field } from 'formik';
import { connect } from 'react-redux';
import { compose } from 'redux';
import { Toast } from "antd-mobile";
import { HeaderBar, Captcha, ClearableInput } from "@/common";
import { validateEmail, http, api } from "@/utils";
import { quickLogin } from '@/store/userAction';
import OnSubmissionError from '../common/OnSubmissionError'
import { Link } from "react-router-dom";
class ForgotPassword extends Component {
state = {
validate: null,
captchaInstance: null
}
getCaptchaInstance = instance => {
this.setState({
captchaInstance: instance
})
}
onVerify = (err, data) => {
if (err) {
console.log(err)
} else {
this.setState({
validate: data.validate
})
}
}
onSubmissionError = () => {
const errors = Object.values(this.props.errors);
errors.length && Toast.info(errors[0], 2, null, false)
}
render() {
const {
values,
isValid
} = this.props
return (
<div className={'forgot-password-email'}>
<HeaderBar title='忘记密码' arrow={true}/>
<div className="content">
<Form className='forgot-password-form'>
<Field
name={'email'}
render={({field, form}) => {
return (
<ClearableInput
{...field}
type={'email'}
placeholder={'请输入注册时的邮箱账号'}
wrapperClass={'email-input'}
setFieldValue={form.setFieldValue}
/>)
}}
/>
{
this.state.validate &&
<Field
name='veriCode'
render={({field}) => {
return (
<VeriCodeInput
{...field}
className={'verify-code'}
icon={<i className={'iconfont iconduanxin'}
style={{fontSize: '20px', left: '12px'}}
/>}
email={values.email}
challenge={this.state.validate}
instance={this.state.captchaInstance}
action={'auth'}
checking={1}
/>
)
}}
/>
}
<OnSubmissionError callback={this.onSubmissionError}/>
<Captcha getInstance={this.getCaptchaInstance} onVerify={this.onVerify}/>
<Button className={'next_step'} active={isValid}>下一步</Button>
<Link className={'to-phone'} to={'/passport/forgot-password'} replace>手机号找回</Link>
</Form>
</div>
</div>
);
}
}
const formikConfig = {
mapPropsToValues: () => ({
email: '',
veriCode: ''
}),
validateOnChange: true,
validateOnBlur: true,
validate: values => {
let errors = {}
if (!validateEmail(values.email)) {
errors.email = '请输入正确的邮箱地址'
}
values.veriCode.toString().length !== 6 && (errors.veriCode = '验证码格式不正确')
return errors
},
handleSubmit(values, {props}) {
sessionStorage.setItem('r_type', 'email')
sessionStorage.setItem('email', values.email)
http.post(`${API['passport-api']}/check_email_code`, {
email: values.email,
code: values.veriCode
}).then(res => {
if (res.data.errno == 0) {
props.history.push('/passport/set-password', {from: props.location})
} else {
Toast.info(res.data.msg, 2, null, false)
}
})
},
}
export default compose(
connect(
null,
{quickLogin}
),
withFormik(formikConfig)
)(ForgotPassword)
\ No newline at end of file
.forgot-password-email {
height: 100%;
.content {
padding: 38px 36px;
text-align: center;
.to-phone{
line-height: 55px;
font-size: 15px;
color: #666;
}
.email-input{
margin-bottom: 21px;
input{
padding-left: 10px;
}
}
}
.place {
width: 100%;
height: 39px;
margin-bottom: 33px;
background: #56abff;
}
.verify-code {
margin-bottom: 21px;
}
.next_step {
margin-top: 32px;
}
}
\ No newline at end of file
...@@ -8,14 +8,15 @@ import AccountLogin from './accountLogin' ...@@ -8,14 +8,15 @@ import AccountLogin from './accountLogin'
import ForgotPassword from './forgotPassword' import ForgotPassword from './forgotPassword'
import SetPassword from './setPassword' import SetPassword from './setPassword'
import BindingTel from './bindingTel' import BindingTel from './bindingTel'
import ForgotPasswordEmail from './forgotPasswordEmail'
import { connect } from "react-redux"; import { connect } from "react-redux";
import { compose } from "redux"; import { compose } from "redux";
import {getParam} from "@/utils";
import account from './account.png' import account from './icons/account.png'
import qq from './qq.png' import qq from './icons/qq.png'
import sina from './sina.png' import sina from './icons/sina.png'
import wechat from './wechat.png' import wechat from './icons/wechat.png'
import { getParam } from "@/utils";
class Passport extends Component { class Passport extends Component {
...@@ -32,23 +33,27 @@ class Passport extends Component { ...@@ -32,23 +33,27 @@ class Passport extends Component {
loginWays: [ loginWays: [
{ {
logo: account, logo: account,
text: '账号登录' text: '账号登录',
id: 'account'
}, },
{ {
logo: wechat, logo: wechat,
text: '微信', text: '微信',
url: '' url: '',
id: 'wechat'
}, },
{ {
logo: qq, logo: qq,
text: 'QQ', text: 'QQ',
url: `${API["passport-api"]}/mob/qqlogin?redirect_url=${this.redirectURL}` url: `${API["passport-api"]}/mob/qqlogin?redirect_url=${this.redirectURL}`,
id: 'qq'
}, },
{ {
logo: sina, logo: sina,
text: '新浪', text: '新浪',
url: `${API['passport-api']}/mob/sinalogin?redirect_url=${this.redirectURL}` url: `${API['passport-api']}/mob/sinalogin?redirect_url=${this.redirectURL}`,
}, id: 'sina'
}
] ]
} }
} }
...@@ -95,6 +100,7 @@ class Passport extends Component { ...@@ -95,6 +100,7 @@ class Passport extends Component {
}}/> }}/>
<Route path={match.url + '/account-login'} component={AccountLogin}/> <Route path={match.url + '/account-login'} component={AccountLogin}/>
<Route path={match.url + '/forgot-password'} component={ForgotPassword}/> <Route path={match.url + '/forgot-password'} component={ForgotPassword}/>
<Route path={match.url + '/forgot-password-email'} component={ForgotPasswordEmail}/>
<Route path={match.url + '/set-password'} component={SetPassword}/> <Route path={match.url + '/set-password'} component={SetPassword}/>
<Route path={match.url + '/binding-tel'} component={BindingTel}/> <Route path={match.url + '/binding-tel'} component={BindingTel}/>
</Switch> </Switch>
......
import React, { Component } from 'react' import React, { Component } from 'react'
import './wechatLogin.scss' import './wechatLogin.scss'
import Input from "../common/Input" // import Input from "../common/Input"
import Input from '../common/inputWithCountryCodes'
import LoginButton from '../common/LoginButton' import LoginButton from '../common/LoginButton'
import LoginWays from '../common/LoginWays' import LoginWays from '../common/LoginWays'
import Header from '../common/Header' import Header from '../common/Header'
...@@ -12,7 +13,6 @@ import { connect } from 'react-redux'; ...@@ -12,7 +13,6 @@ import { connect } from 'react-redux';
import { compose } from 'redux'; import { compose } from 'redux';
import { isEmpty } from 'lodash' import { isEmpty } from 'lodash'
import { Toast } from 'antd-mobile'; import { Toast } from 'antd-mobile';
import { validateTel, getParam } from "@/utils";
import { HeaderBar } from "@/common"; import { HeaderBar } from "@/common";
...@@ -69,7 +69,8 @@ class Login extends Component { ...@@ -69,7 +69,8 @@ class Login extends Component {
const { const {
loginWays, loginWays,
errors, errors,
values values,
country
} = this.props } = this.props
return ( return (
<div className='login'> <div className='login'>
...@@ -84,9 +85,7 @@ class Login extends Component { ...@@ -84,9 +85,7 @@ class Login extends Component {
type={'tel'} type={'tel'}
placeholder={'手机号快捷登录(免注册)'} placeholder={'手机号快捷登录(免注册)'}
wrapperClass={'tel-input'} wrapperClass={'tel-input'}
icon={<i className={'iconfont iconshouji'} country={country}
style={{fontSize: '22px', left: '10px'}}
/>}
/> />
)} )}
> >
...@@ -108,6 +107,7 @@ class Login extends Component { ...@@ -108,6 +107,7 @@ class Login extends Component {
errors={errors} errors={errors}
placeholder={'请输入验证码'} placeholder={'请输入验证码'}
instance={this.state.captchaInstance} instance={this.state.captchaInstance}
country={country}
/> />
)} )}
/> />
...@@ -132,7 +132,8 @@ const FormikConfig = { ...@@ -132,7 +132,8 @@ const FormikConfig = {
handleSubmit(values, {props}) { handleSubmit(values, {props}) {
props.quickLogin({ props.quickLogin({
phone_num: values.tel, phone_num: values.tel,
phone_code: values.veriCode phone_code: values.veriCode,
area_code: props.country.num
}).then(res => { }).then(res => {
if (res.hasError) { if (res.hasError) {
Toast.info(res.msg); Toast.info(res.msg);
...@@ -146,7 +147,7 @@ const FormikConfig = { ...@@ -146,7 +147,7 @@ const FormikConfig = {
validateOnChange: true, validateOnChange: true,
validate: (values) => { validate: (values) => {
let errors = {} let errors = {}
if (!validateTel(values.tel)) { if (!/\d/.test(values.tel)) {
errors.tel = '请填写正确格式的手机号' errors.tel = '请填写正确格式的手机号'
} }
if (!/[0-9]{6}/.test(values.veriCode)) { if (!/[0-9]{6}/.test(values.veriCode)) {
...@@ -158,7 +159,7 @@ const FormikConfig = { ...@@ -158,7 +159,7 @@ const FormikConfig = {
export default compose( export default compose(
connect( connect(
null, state => ({country: state.country}),
{quickLogin} {quickLogin}
), ),
withFormik(FormikConfig), withFormik(FormikConfig),
......
...@@ -8,9 +8,9 @@ ...@@ -8,9 +8,9 @@
padding: 0 38px; padding: 0 38px;
flex: 1 0 auto; flex: 1 0 auto;
.tel-input { /*.tel-input {
margin-bottom: 24px; margin-bottom: 24px;
} }*/
.verification{ .verification{
margin-bottom: 24px; margin-bottom: 24px;
......
...@@ -16,6 +16,7 @@ import { connect } from "react-redux"; ...@@ -16,6 +16,7 @@ import { connect } from "react-redux";
class SetPassword extends Component { class SetPassword extends Component {
render() { render() {
let {values, errors, location} = this.props let {values, errors, location} = this.props
let {from} = location.state || {from: {pathname: '/'}} let {from} = location.state || {from: {pathname: '/'}}
......
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