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

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

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

var api = require('../api'),
    showErrTip = api.showErrTip;

api.initErrTip();

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

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