/** * 下载,阅读,购买权限验证 */ function checkPicturePriv(contentId) { var shopSiteID = privParam.shopSiteID; var shopURL = 'https://vip.ssap.com.cn/vip/'; var currentURL = privParam.currentURL; var currentSiteID = privParam.currentSiteID; var currentMemberID = privParam.currentMemberID; var popup = privParam.popup var dc = { "contentId": contentId, "contentType": "imagedata0", "siteId": currentSiteID, "memberid": currentMemberID } $.post(currentURL + "CommonPriv/checkMemberPriv", dc, function(response) { response = JSON.parse(response); var result = response.result; if (!result) { popup.confirm("温馨提示", "出错了!请刷新页面重试", function() { window.location.reload(); }); return; } if (result == 'free' || result == 'free_limited') { location.href=currentURL + "XCImageDetail?SiteID=" + currentSiteID + "&ID=" + contentId + "&type=Picture"; } else if (result == 'buy') { // 跳转到购买页面 var ref = "XCImageDetail?SiteID=" + currentSiteID + "&ID=" + contentId + "&type=Picture"; ref = ref.replace(/\?/g, '_ask_').replace(/&/g, '_and_'); location.href=shopURL + "member/pay?SiteID=12&dataSiteID=" + currentSiteID + "&ProductSN=" + contentId + "&GoodsType=imagedata0&ref=" + ref; } else if (result == 'branchNo') { popup.confirm("温馨提示", "您所在的机构无该资源使用权限,请切换为个人用户查看或购买!", function() { location.href = currentURL + "ssologin?siteId=" + currentSiteID + "&NeedNewLogin=true"; }); } else if (result == 'order') { popup.confirm("温馨提示", "您的订单尚未支付,请支付后阅读", function() { location.href = currentURL + "member/MyOrder?Type=Content&Current=MyOrder&SiteID=" + currentSiteID; }); } else { popup.confirm("温馨提示", "请先登录", function() { location.href = currentURL + "ssologin?siteId=" + currentSiteID; }); } }); }