'; html += ''; html += ''; html += ''; html += '
'; html += '
'; html += '
'; html += '
'; html += ' '; html += '
'; html += '
'; html += '
闀挎寜璇嗗埆鎴栨壂鎻忎簩缁寸爜鏌ョ湅娲诲姩璇︽儏
'; if (!!userMobile) { html += '
' + userMobile.replace(/^(\d{3})\d{4}(\d+)/, "$1****$2") + '鍒嗕韩
'; } html += '
'; html += '
'; html += '
'; html += ''; html += ''; // var handleUrl= window.location.protocol + "//" +window.location.host+":9420"+"/handle/HtmlToImg.ashx"; var handleUrl = "/Ajax/HtmlToImg.ashx"; $.post(handleUrl, { html: encodeURIComponent(html), width: "1080", height: "1920" }, function (res) { console.log(res); if (res && res.imageUrl) { poster = res.imageUrl; if (callback) { callback(); } } console.log("娴锋姤鐢熸垚瀹屾瘯"); }, "json") } else { if (callback) { callback(); } } } /** * 鍑芥暟鍚嶇О锛歡etIosScAppVersionFromUserAgent * 鍑芥暟鎻忚堪锛氫粠userAgent鑾峰彇鍦f墠鐢靛瓙涔﹁嫻鏋渁pp鐨勭増鏈彿 */ function getIosScAppVersionFromUserAgent() { //鍦╝pp鍐呮墠鑳借皟鐢紝鍚﹀垯杩斿洖绌? var str = navigator.userAgent; var result; var scAppVersion; var regexp = new RegExp(/shengcaidianzishu_ios_([0-9.]*)_/g); while ((result = regexp.exec(str)) != null) { scAppVersion = result[1]; } return scAppVersion; } /** * 鍑芥暟鍚嶇О锛歡etAndroidScAppVersionFromUserAgent * 鍑芥暟鎻忚堪锛氫粠userAgent鑾峰彇鍦f墠鐢靛瓙涔﹀畨鍗揳pp鐨勭増鏈彿 */ function getAndroidScAppVersionFromUserAgent() { //鍦╝pp鍐呮墠鑳借皟鐢紝鍚﹀垯杩斿洖绌? var str = navigator.userAgent; var result; var scAppVersion; var regexp = new RegExp(/shengcaidianzishu_android_([0-9.]*)_/g); while ((result = regexp.exec(str)) != null) { scAppVersion = result[1]; } return scAppVersion; } function getIsCanUserNewShare() { if (/shengcaidianzishu/i.test(navigator.userAgent)) { if (/iphone|ipad/i.test(navigator.userAgent)) { var v = parseInt(getIosScAppVersionFromUserAgent().replace(/\./g, "")); if (v > 551) { isCanUserNewShare = true; } else { isCanUserNewShare = false; } } else if (/android/i.test(navigator.userAgent)) { var v = parseInt(getAndroidScAppVersionFromUserAgent().replace(/\./g, "")); if (v > 561) { isCanUserNewShare = true; } else { isCanUserNewShare = false; } } } } // 浣跨敤h5鐢熸垚娴锋姤骞跺脊鍑? function showH5Share() { createSharePoster(function () { $("#posterImgSrc").attr("src", poster); $("#fenxiaoPoster").show(); }) } // 鍏抽棴娴锋姤绐楀彛 function hidePoster() { $("#posterImgSrc").attr("src", ""); $("#fenxiaoPoster").hide(); } // 鑾峰彇鎴戠殑涓嬬骇鍒嗛攢鎬讳汉鏁? function getMyUsers(){ var count=0; if(!!ebookUid){ var handleUrl1="https://app.100xuexi.com/FenXiao/FenXiao.ashx?method=MyFirst&myUserId="+userId+"&pageSize=1&pageIndex=1"; var handleUrl2="https://app.100xuexi.com/FenXiao/FenXiao.ashx?method=MySecond&myUserId="+userId+"&pageSize=1&pageIndex=1"; $.get("/JsonDownload.ashx",{url:handleUrl1},function(res1){ if(res1 && res1.result==1){ count = res1.recordCount; $.get("/Jsondownload.ashx",{url:handleUrl2},function(res2){ count = parseInt(count)+parseInt(res2.recordCount); $("#userCount").text(count); },"json") } },"json") } } // 鑾峰彇鎴戠殑鍒嗛攢鏀剁泭 function getMyMoney(){ if(!!ebookUid){ var handleUrl="http://app.100xuexi.com/UserTradeLog/UserTradeDetail.ashx?method=GetDetail&userName="+ebookUid+"&UserPlat=Eshu&isFenXiao=1"; $.get("/JsonDownload.ashx",{url:handleUrl},function(res){ if(res && res.result==1){ $("#moneyCount").text(parseFloat(res.inputTotal).toFixed(2)); } },"json") } } $(function () { /*瀹氫箟鍒嗕韩鍙傛暟 begin*/ var pageTitle = "鍙備笌浜岀骇鍒嗛攢锛屽潗浜幇閲戞彁鎴?; //鍒嗕韩鏍囬 var pageDesc = "閭€璇锋湅鍙嬪弬涓庝簩绾у垎閿€锛屽潗浜幇閲戞彁鎴愶紝閭€璇疯秺澶氾紝璧氱殑瓒婂锛?; //鍒嗕韩鎻忚堪 var pageLink = "https://www.100xuexi.com/fenxiao/fenxiao.html"; //鍒嗕韩杩炴帴 var pageImgUrl = "https://www.100xuexi.com/fenxiao/images/fenxiao_0002.png?v=20200324"; //鍒嗕韩鍥剧墖 //濡傛灉鍒嗕韩鍥剧墖涓虹┖锛屽垯灏嗗垎浜浘鐗囪缃负鍦f墠鐢靛瓙涔︾殑logo if (pageImgUrl == "" || pageImgUrl == null) { pageImgUrl = "https://g.100xuexi.com/CssModel/100eshu/Images/SCebookLogo2.png?v=20200324"; } function sharePage() { console.log("pageTitle: " + pageTitle); console.log("pageDesc: " + pageDesc); console.log("pageLink: " + pageLink); console.log("pageImgUrl: " + pageImgUrl); var data = { //鍒嗕韩鍐呭 title: pageTitle, desc: pageDesc, link: pageLink, imgUrl: pageImgUrl, type: '', dataUrl: '' }; ebookShare(data); } // 璁剧疆浜岀淮鐮佸湴鍧€鍙婂弬涓庢椿鍔ㄥ叆鍙? function setCodeSrc() { var src = "http://service.100eshu.com/app/BookService.ashx?method=Get2DUrl&url=http://www.100xuexi.com/fenxiao/join.html" var joinLink = "http://www.100xuexi.com/fenxiao/join.html"; if (/shengcaidianzishu/i.test(navigator.userAgent)) { if (userId != "") { src += "?fenxiaoId=" + userId; joinLink += "?fenxiaoId=" + userId; } } else { if (fenxiaoId != "") { src += "?fenxiaoId=" + fenxiaoId; joinLink += "?fenxiaoId=" + fenxiaoId; } else { if (userId != "") { src += "?fenxiaoId=" + userId; joinLink += "?fenxiaoId=" + userId; } } } $(".fenxiao-code-img").attr("src", src); if (/shengcaidianzishu/i.test(navigator.userAgent)) { $(".btn-join").attr({ "href": "javascript:void(0)" }).off().on("click", function () { showAppShare(); }); } else { $(".btn-join").attr("href", joinLink); } } // 璁剧疆鍒嗕韩鍙傛暟 function setShareInfo() { if (/shengcaidianzishu/i.test(navigator.userAgent)) { if (userId != "") { pageLink = pageLink + "?fenxiaoId=" + userId; } } else { if (fenxiaoId != "") { pageLink = pageLink + "?fenxiaoId=" + fenxiaoId; } else { if (userId != "") { pageLink = pageLink + "?fenxiaoId=" + userId; } } } } function showAppShare() { if (/shengcaidianzishu/i.test(navigator.userAgent)) { getIsCanUserNewShare(); getUserIdFromUserAgent(function () { if (isCanUserNewShare) { createSharePoster(function () { if (/android/i.test(navigator.userAgent)) { window.do_question.webShareBillNow(pageTitle, pageDesc, pageImgUrl, pageLink, poster, 0); } else if (/ipad|iphone/i.test(navigator.userAgent)) { iosCallBack('showShareView://{"posterurl":"' + poster + '", "fenxiaoEnabled":"0", "title":"' + pageTitle + '", "desc":"' + pageDesc + '", "pic":"' + pageImgUrl + '", "url":"' + pageLink + '"}'); } }); } else { showH5Share() } }) } else { showH5Share(); } } if (/shengcaidianzishu/i.test(navigator.userAgent)) { getIsCanUserNewShare(); getUserIdFromUserAgent(function () { setCodeSrc(); setShareInfo(); if (isCanUserNewShare) { createSharePoster(function () { if (/android/i.test(navigator.userAgent)) { // window.do_question.webShareBill(String聽title,聽String聽desc,聽String聽pic,聽String聽url,String聽bill,String聽fenxiaoInch) window.do_question.webShareBill(pageTitle, pageDesc, pageImgUrl, pageLink, poster, 0); // window.do_question.webShareBillNow(String聽title,聽String聽desc,聽String聽pic,聽String聽url,String聽bill,String聽fenxiaoInch) // window.do_question.webShareBillNow(pageTitle, pageDesc, pageImgUrl, pageLink, poster , 0); } else if (/ipad|iphone/i.test(navigator.userAgent)) { iosCallBack('shengcaidianzishuReceiveShareInfo://{"posterurl":"' + poster + '", "fenxiaoEnabled":"0", "title":"' + pageTitle + '", "desc":"' + pageDesc + '", "pic":"' + pageImgUrl + '", "url":"' + pageLink + '"}'); } }); } else { sharePage(); } if(!!ebookUid && /ipad|iphone|android/i.test(navigator.userAgent)){ getMyUsers(); getMyMoney(); $(".user-statics").show(); } }) } else { getUserLoginStatus(function () { setShareInfo(); sharePage(); setCodeSrc(); if(!!ebookUid && /ipad|iphone|android/i.test(navigator.userAgent)){ getMyUsers(); getMyMoney(); $(".user-statics").show(); } }) } getProfitList(); getPopProfitList(); getStatistics(); }) /*瀹氫箟鍒嗕韩鍙傛暟 end*/