email-success.js 560 Bytes
/**
 * 找回密码-邮箱找回成功
 * @author: xuqi<qi.xu@yoho.cn>
 * @date: 2015/10/8
 */

var $ = require('yoho.zepto');

var $resend = $('#resend');

var tip = require('../../plugin/tip'),
    showErrTip = tip.show;

$resend.on('tap', function(e) {
    e.preventDefault();

    $.ajax({
        url: $resend.data('url'),
        type: 'GET',
        success: function(data) {
            if (data.code === 200) {
                showErrTip(data.message);
            } else {
                showErrTip(data.message);
            }
        }
    });
});