Commit 17bbd6c1 authored by linlinjava's avatar linlinjava
Browse files

fix[litemall-vue]

parent ce2720b5
...@@ -7,6 +7,7 @@ Vue.use(Vuex) ...@@ -7,6 +7,7 @@ Vue.use(Vuex)
const state = { const state = {
showHeader:true, showHeader:true,
title:''
} }
export default new Vuex.Store({ export default new Vuex.Store({
......
...@@ -3,10 +3,9 @@ ...@@ -3,10 +3,9 @@
<van-cell-group> <van-cell-group>
<van-field <van-field
label="新密码" label="手机号码"
v-model="password" v-model="mobile"
type="password" placeholder="请输入手机号码"
placeholder="请输入新密码"
/> />
<van-field <van-field
...@@ -15,7 +14,7 @@ ...@@ -15,7 +14,7 @@
@click-icon="getCode" @click-icon="getCode"
placeholder="请输入验证码"> placeholder="请输入验证码">
<span slot="icon" <span slot="button"
class="verifi_code red" class="verifi_code red"
:class="{verifi_code_counting: counting}" :class="{verifi_code_counting: counting}"
@click="getCode"> @click="getCode">
...@@ -25,6 +24,21 @@ ...@@ -25,6 +24,21 @@
<span v-else>获取验证码</span> <span v-else>获取验证码</span>
</span> </span>
</van-field> </van-field>
<van-field
label="新密码"
v-model="password"
type="password"
placeholder="请输入新密码"
/>
<van-field
label="确认密码"
v-model="password2"
type="password"
placeholder="请再次输入密码"
/>
</van-cell-group> </van-cell-group>
<div class="bottom_btn"> <div class="bottom_btn">
...@@ -37,11 +51,12 @@ ...@@ -37,11 +51,12 @@
<script> <script>
import { authCaptcha, authReset, authLogout } from '@/api/api'; import { authCaptcha, authReset, authLogout } from '@/api/api';
import { removeLocalStorage } from '@/utils/local-storage'; import { removeLocalStorage } from '@/utils/local-storage';
import { Field } from 'vant'; import { Field, Toast } from 'vant';
export default { export default {
data: () => ({ data: () => ({
password: '', password: '',
password2: '',
mobile: '', mobile: '',
code: '', code: '',
counting: false counting: false
...@@ -58,6 +73,8 @@ export default { ...@@ -58,6 +73,8 @@ export default {
.then(() => { .then(() => {
this.$dialog.alert({ message: '保存成功, 请重新登录.' }) this.$dialog.alert({ message: '保存成功, 请重新登录.' })
authLogout(); authLogout();
}).catch (error => {
Toast.fail(error.data.errmsg);
}); });
} }
}, },
......
Supports Markdown
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