Commit e56e1de8 authored by 神楽坂玲奈's avatar 神楽坂玲奈

travis

parent db292f14
This diff is collapsed.
language: node_js
node_js: node
#sudo: false
#dist: trusty
env:
global:
secure: pL8y9VeZcluWZ1DmYg1wt7N9A6BV98lBuP9jWSnBr98vra2e/Ivcr40CxIXbIVC5DAgoIPpLl9FzoHmm2rudG+6HBxzOAaXNCO7U2HtmDP0o7n4eXUu6PUseRs88R/h6QhiTTxwwVnv8H5OyvsR5wsqzs0c8WKwTf5+Gxq3rHFam7dccY7UMGNRAu565veT/uhBnEXrI5vqb3DEs6hPv0YJZIOWsV109s5E/j9sbGZOaDx4XJAe1kGWKI98A2K5mvmm61yKyb2V14F+NDoICgKBgnLNYsCuaNR+88iOAAvblb/ZbPj49cfim2rMnE8W3wjm8cgzThrw+d+Q982zq9pq9AO4pdP+Od1xKe+c0eU57DZ2KUEwfQm9rc4OENYHfUU8Vr35dJ4nJCOzYOIuJCIJVsfLcZejSpSUCEodp8WypaJbiZa8QAlhmDyhtK2WaGwOAsy6qGBT3M5+Om2sNcckvsQXYpCdGLSNvlZ30KpiNrrVYn7reJzk+FEN5gHh1PajgMuXo88ix3g56ZTE4s8S1KoZ2PghZlIUmhEiUuxkWjC++E9ha9tEmE/7JdVPhzgpx6iWRKGB20VB4MZGays+u/CqX4PEkJ4DhvKu5oC8aaaoUfEG3uA7hdRQPb8zDAwf3usB55n4UrAFnvLd4MZjtZJnWPjXoP1WHOWiUBfE=
script: npm run build
before_deploy:
- curl --location --retry 5 --output ossutil 'https://github.com/mycard/ossutil/releases/download/1.0.0.Beta2/ossutil'
- chmod +x ossutil
- ./ossutil config --endpoint oss-cn-hangzhou.aliyuncs.com --access-key-id $ALIYUN_ID --access-key-secret $ALIYUN_SECRET
deploy:
provider: script
script: ./ossutil cp -rf dist oss://mycard/accounts
skip_cleanup: true
on:
branch: master
......@@ -204,19 +204,17 @@ export default {
const token = localStorage.getItem('token');
if (token) {
dispatch({ type: 'getAuthUser', payload: { token } });
} else {
if(location.pathname == '/profiles') {
dispatch(routerRedux.replace('/signin'))
}
} else if (location.pathname === '/profiles') {
dispatch(routerRedux.replace('/signin'));
}
history.listen(({ pathname, query }) => {
if (pathname === '/') {
dispatch({ type: 'preLogin', payload: { token } });
}
if (pathname === '/reset' || pathname == "/activate"){
if (!query["key"]) {
message.error("缺少参数")
if (pathname === '/reset' || pathname === '/activate') {
if (!query.key) {
message.error('缺少参数');
}
}
});
......
......@@ -101,29 +101,31 @@ class Profiles extends React.Component {
<Form onSubmit={this.onUpdateSubmit}>
<FormItem style={{ display: 'flex', justifyContent: 'center' }}>
<div style={{ display: isUpload ? 'flex' : 'none', flexDirection: 'column'}}>
<div style={{ display: isUpload ? 'flex' : 'none', flexDirection: 'column' }}>
<Cropper
ref={cropper => {
ref={(cropper) => {
this.cropper = cropper;
}}
src={ imageUrl || defaultAvatar}
src={imageUrl || defaultAvatar}
style={{ height: '20vw', width: '20vw' }}
aspectRatio={1 / 1}
guides={true}
guides
/>
<Button type="primary" onClick={this.handleUpload}>
<Icon type="upload"/> upload
</Button>
</div>
<div style={{ display: !isUpload ? 'flex' : 'none', flexDirection: 'column'}}>
<img src={avatar || imageUrl || defaultAvatar}/>
<Button onClick={() => { dispatch({ type: 'upload/start' }) }}>
<div style={{ display: !isUpload ? 'flex' : 'none', flexDirection: 'column' }}>
<img alt="avatar" src={avatar || imageUrl || defaultAvatar}/>
<Button onClick={() => { dispatch({ type: 'upload/start' }); }}>
<label>
<Icon type="plus"/> Change Avatar
<input type="file" onChange={this.onGetFile} ref={file => {
<input
type="file" onChange={this.onGetFile} ref={(file) => {
this.file = file;
}} style={{ display: 'none' }}/>
}} style={{ display: 'none' }}
/>
</label>
</Button>
</div>
......
......@@ -60,12 +60,12 @@ class Register extends React.Component {
const emailProps = {
hasFeedback: true,
validateStatus: checkEmail,
extra: isEmailExists ? messages['i_email_exists'] : '',
extra: isEmailExists ? messages.i_email_exists : '',
};
const emailInputProps = {
onBlur: () => !form.getFieldError("email") && dispatch({ type: 'auth/checkEmail', payload: { ...form.getFieldsValue() } }),
onBlur: () => !form.getFieldError('email') && dispatch({ type: 'auth/checkEmail', payload: { ...form.getFieldsValue() } }),
placeholder: messages.email,
};
......@@ -76,7 +76,7 @@ class Register extends React.Component {
};
const usernameInputProps = {
onBlur: () => !form.getFieldError("username") && dispatch({ type: 'auth/checkUsername', payload: { ...form.getFieldsValue() } }),
onBlur: () => !form.getFieldError('username') && dispatch({ type: 'auth/checkUsername', payload: { ...form.getFieldsValue() } }),
placeholder: messages.username,
};
......
......@@ -69,7 +69,8 @@ class Verify extends React.Component {
return (
<div
style={{ display: 'flex', flex: 1, justifyContent: 'center', alignItems: 'center', height: '100%' }}>
style={{ display: 'flex', flex: 1, justifyContent: 'center', alignItems: 'center', height: '100%' }}
>
<Spin spinning={loading} delay={100}>
<Steps size="large" current={1}>
......
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