pwd.vue 1.4 KB
Newer Older
郭胜强 已提交
1 2 3 4 5
<template>
    <view class="content">
        <view class="input-group">
            <view class="input-row">
                <text class="title">邮箱:</text>
6
                <uni-input type="text" focus clearable v-model="email" placeholder="请输入邮箱"></uni-input>
郭胜强 已提交
7 8 9 10 11 12 13 14 15 16 17
            </view>
        </view>

        <view class="btn-row">
            <button type="primary" class="primary" @tap="findPassword">提交</button>
        </view>
    </view>
</template>

<script>
    import service from '../../service.js';
18
    import uniInput from '../../components/uni-input.vue';
郭胜强 已提交
19 20

    export default {
21 22 23
        components: {
            uniInput
        },
郭胜强 已提交
24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53
        data() {
            return {
                email: ''
            }
        },
        methods: {
            findPassword() {
                /**
                 * 仅做示例
                 */
                if (this.email.length < 3 || !~this.email.indexOf('@')) {
                    uni.showToast({
                        icon: 'none',
                        title: '邮箱地址不合法',
                    });
                    return;
                }
                uni.showToast({
                    icon: 'none',
                    title: '已发送重置邮件至注册邮箱,请注意查收。',
                    duration: 3000
                });
            }
        }
    }
</script>

<style>

</style>