relate-confirm.page.js
659 Bytes
/**
* Created by TaoHuang on 2016/7/12.
*/
var $ = require('yoho-jquery');
var $mobile = $('#mobile');
var $area = $('#area');
var $sourceType = $('#sourceType');
var $openId = $('#openId');
var $relate = $('#relate-btn');
$relate.on('click', function() {
return $.ajax({
type: 'POST',
url: '/passport/autouserinfo/relateMobile',
data: {
mobile: $mobile.val(),
area: $area.val(),
sourceType: $sourceType.val(),
openId: $openId.val()
}
}).then(function(result) {
if (result.code === 200) {
location.href = result.data.refer;
}
});
});