invite-share.js
798 Bytes
/**
* 邀请码分享头部
*/
require('common');
let $ = require('yoho-jquery');
let inviteCode = window.queryString.inviteCode;
(function() {
let inviteShare = require('common/invite-share.hbs');
console.log('qqqqqqqqqq');
if (inviteCode) {
$.ajax({
type: 'GET',
url: '/activity/invite-uesr-info',
data: {
inviteCode: inviteCode
},
success: function(result) {
if (result.code === 200 && parseInt(result.data.isDisplay, 10) === 1) {
let shareData = inviteShare({
inviteShare: result.data
});
$('body').prepend(shareData); // 放置最前
}
}
});
}
}());