This commit is contained in:
les
2019-09-11 19:12:24 +02:00
parent 93baf01a55
commit 2fe956d117
65 changed files with 762 additions and 721 deletions

View File

@@ -11,8 +11,7 @@
el-button(plain type="success" icon='el-icon-send', @click='change_password') {{$t('common.send')}}
div(v-else) {{$t('recover.not_valid_code')}}
</template>
<script>
import { Message } from 'element-ui'
@@ -22,13 +21,12 @@ export default {
data () {
return { new_password: '' }
},
async asyncData({ params, $axios }) {
async asyncData ({ params, $axios }) {
const code = params.code
try {
const valid = await $axios.$post('/user/check_recover_code', { recover_code: code })
return { valid, code }
}
catch (e) {
} catch (e) {
return { valid: false }
}
},
@@ -40,9 +38,9 @@ export default {
showClose: true,
type: 'success',
message: this.$t('common.password_updated')
})
})
this.$router.replace('/login')
} catch(e) {
} catch (e) {
Message({
showClose: true,
type: 'warning',
@@ -53,5 +51,3 @@ export default {
}
}
</script>