bind-confirm.page.js
682 Bytes
/**
* 第三方绑定确认
* @author: TaoHuang
* @date: 2016/7/12
*/
var $ = require('yoho-jquery');
var $mobile = $('#mobile');
var $area = $('#area');
var $sourceType = $('#sourceType');
var $openId = $('#openId');
var $next = $('#relate-btn');
$next.on('click', function() {
return $.ajax({
type: 'POST',
url: '/passport/autouserinfo/bindMobile',
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;
}
});
});