Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
event = event || window.event;
event.preventDefault();
$.confirm('登录后操作', '操作提示', function () {
window.location.href = sign + window.location.origin + window.location.pathname;
},
function () {
});
return false;
});
};
/* 检查登录 */
var user = $(ele).attr('sign-in-id');
var upload = $(ele).find('.photo-album-wrap').attr('upload');
var request = $(ele).find('.photo-album-wrap').attr('upload-pic');
var film = $(ele).find('.photo-album-wrap').attr('film');
$.get(user, function (res) {
console.log(res);
if (res.response === '-2') {
promptLogin('#imgInput0');
promptLogin('#imgInput1');
} else {
// 上传拼图图片
upLoadPic('#imgInput0', upload, function (res) {
console.log(res);
photoAlbumWrap.find('.upload-num')
.find('.now-cnt')
.text(+photoAlbumWrap.find('.upload-num').find('.file-limit').text() - res.data.left_cnt);
setImgModal();
if (res.data.left_cnt <= 5) {
$.toptip('请上传 jpg 或者 png 图片!', 'success');
$.post(request + cpId, function (res) {
console.log(res);
function loadScrollMoreList(apiUrl, currPage, container) {
var url = '';
if (apiUrl.indexOf('?') > 0) {
url = apiUrl + '&page=' + currPage;
}
else {
url = apiUrl + '?page=' + currPage;
}
$.get(url, function (htmlPack) {
if (htmlPack !== 'no_data') {
container.append(htmlPack);
// 展开收起
element.find('.user-list-content-more').each(function (i, j) {
var idText = $(j).attr('id');
var ids = idText.split('_');
var page = ids[1];
var id = ids[2];
$(j).unbind('click').click(function () {
event.preventDefault();
showAllContent($(j), id, page);
});
});
// 点击播放
element.find('.user-list-audio').each(function (i, j) {
var idText = $(j).find('label').attr('id');
ipLoad(function (data) {
province = data.province;
city = data.city;
ip = data.ip;
$.get(url, function (datas) {
var res = '';
try {
res = $.parseJSON(datas);
if (res.succ === 'Y') { // 不等于空
var paramsArry = params.split(':');
var cmJsonData = $.parseJSON(res.html);
var lenGood = parseInt(paramsArry[0], 0); // 好评回答数量
var lenOther = parseInt(paramsArry[1], 0); // 普通答案数量
var qSourceType = paramsArry[2]; // 来源
var commercialSource = paramsArry[3]; // 商业广告类型
var qTags = paramsArry[4]; // 标签
var mainTags = paramsArry[5]; // 病种
var nowTime = getSysTime(); // 时间
var qCid = paramsArry[6] || '79';
var bCid = paramsArry[7];
var sCid = paramsArry[8];
$('.okReport').click(function () {
var reportList = '';
$('.reportList li').each(function () {
var fake = $(this).find('span').attr('class');
if (fake === 'fakeChecked') {
reportList += $(this).text().trim() + '-';
}
});
if (reportList === '') {
alert('请选择举报原因!');
}
else {
var checkLoginUrl = 'https://mipp.iask.cn/checkLogin?mip=' + Math.random();
$.get(checkLoginUrl,
function (e) {
if (e == null || e === 'null') {
// 跳转到登录页面
var thisHref = window.location.href;
window.location.href = 'https://mipp.iask.cn/login?source=' + thisHref;
}
else {
var questionId = $('.report_id').text();
var type = $('.report_type').text();
var typeId = $('.report_typeId').text();
$.post('http://m.iask.sina.com.cn/question/reportnew', {
'reportList': reportList,
'questionId': questionId,
'type': type,
'typeId': typeId
},
var nowTime = getSysTime();
var startTime = ele.querySelectorAll('.bxStartTime')[0].innerText;
var endTime = ele.querySelectorAll('.bxEndTime')[0].innerText;
if (startTime <= nowTime && nowTime < endTime) {
// 商业广告-保险标签投放
var url = 'https://mipp.iask.cn/t/wlsh?type=BX&bxt=';
if (mainTags.indexOf('少儿险') > -1) {
url += 'jl';
}
else if (mainTags.indexOf('品牌词') > -1 || mainTags.indexOf('意外险') > -1 || mainTags.indexOf('保险') > -1) {
url += 'at';
}
else if (mainTags.indexOf('重疾险') > -1) {
url += 'il';
}
$.get(url, function (data) {
iaskInsurance(data);
});
}
}
else if (sourceType !== 'COOPERATE_HUASHENG' && sourceType !== 'COOPERATE_HUASHENG_QA') {
if (tags) {
loadURLJS(tags, params, sourceType);
}
var $thatLog = ele.querySelectorAll('.href_log');
if ($thatLog.length === 0) {
sourceType = 'COOPERATE_EFFECT';
$thatParam.setAttribute('sources', sourceType);
// 商业效果广告
effectAvertisement(questionId, sourceType);
}
}
userLocationLon = data.coords.longitude;
} else {
userLocationLat = data.position.getLat();
userLocationLon = data.position.getLng();
}
if (locationNaCode === undefined && locationNaCode === null) {
// 储存经纬度cookie
var date = new Date();
date.setDate(date.getDate() + 3);
var strcookie = 'LocationNavigatorCode=' + userLocationLat + '';
strcookie += ',' + userLocationLon + ';path=/;expires=' + date.toGMTString() + '';
document.cookie = strcookie;
}
// 获取城市name
var code = $('#userinfor').attr('data-citycode');
$.get('https://mip.zhaopin.com/Home/GetCityInfoByLatLng',
{lat: userLocationLat, lng: userLocationLon},
function (data, textStatus, jqxhr) {
if ($('.j_searchTop .position span').text() === '全国') {
$('.j_searchTop .position span').text(data.cityname);
}
});
}
// 获得经纬度失败执行函数
checkLogin: function () {
/*该参数是作为组件外部参数,所以需要用到全局选择器*/
var $that = document.querySelector('.paramDiv');
var cid = $that.getAttribute('cid');
var checkLoginUrl = '//m.iask.sina.com.cn/checkLogin?mip=' + Math.random() + '&cid=' + cid;
$.get(checkLoginUrl);
},
userInfoHide: function () {
function checkLogin() {
$.get('https://mip.linkeddb.com/check_user/', function (res) {
if (res.response === '-2') {
$.confirm('登录后评论', '登录提示', function () {
window.top.location.href = 'https://mip.linkeddb.com/sign_in/?callUrl='
+ window.top.location.pathname;
}, function () {
});
return false;
} else {
$(ele).find('.review-modal-overlay').toggleClass('review-modal-overlay-visible');
$(ele).find('.write-comment').toggleClass('show');
$(ele).parent().parent().parent().find('.content').toggleClass('z-index-11');
}
});
}
ipLoad(function (data) {
ip = data.ip || '';
province = data.province || '';
city = data.city || '';
if (!!materialTag) {
materialTag = materialTag.replace('[', '').replace(']', '');
}
pv = encodeURI('pv=' + mode + '_' + qid + '_' + ip + '_' + province + '_' + city + '_' + materialTag
+ '_' + qcid + '_' + cid + '_' + source + '_' + uid + '_' + pos);
var url = httpPath + '/advLogInfo?' + pv;
$.get(url);
});
};
function more(element, options) {
var bd = $(element).find('.bd');
var htmlStr = '';
$.get(options.url, {page: page, scon: options.scon, sid: options.sid}, function (data) {
if (window.parseInt(data.status) === 200) {
$.each(data.content, function (key, val) {
htmlStr += '<dl class="cl">';
htmlStr += '<a href="http://m.onlinedown.net/soft/' + val.id + '.htm">';
htmlStr += '<dt class=""></dt>';
htmlStr += '<dd>';
htmlStr += '<ul class="cl">';
htmlStr += '<li><h2>' + val.title + '</h2></li>';
htmlStr += '<li><span>' + val.filesize + 'M</span>';
htmlStr += '<span class="pipe">/</span><span>' + val.language + '</span>';
htmlStr += '<span class="pipe">/</span><span>' + val.lastdotime + '</span></li>';
htmlStr += '<li></li>';
htmlStr += '</ul>';
htmlStr += '</dd>';
htmlStr += '<i class="icon-xiazai"></i>';
htmlStr += '</a>';</dl>