portal html css js resource

a.html 21KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615
  1. <!DOCTYPE html>
  2. <html>
  3. <head>
  4. <meta charset="UTF-8">
  5. <title>文章分享-科袖网</title>
  6. <meta name="viewport" content="width=device-width,initial-scale=1,minimum-scale=1,maximum-scale=1,user-scalable=no" />
  7. <link rel="stylesheet" href="../css/reset.css" />
  8. <link rel="stylesheet" href="../css/common.css" />
  9. <link rel="stylesheet" href="../css/share.css" />
  10. <script type="text/javascript" src="../js/jquery-1.11.1.js"></script>
  11. <script type="text/javascript" src="http://res.wx.qq.com/open/js/jweixin-1.0.0.js"></script>
  12. <script type="text/javascript" src="../js/public/shareCom.js"></script>
  13. <style>
  14. html,body {background: #FFFFFF;}
  15. </style>
  16. </head>
  17. <body>
  18. <div class="contentBody2">
  19. <div class="topFu clearfix">
  20. <div class="topLogo floatL"></div>
  21. <div class="goSpan floatR">
  22. <span class="openSpan">打开</span>
  23. </div>
  24. </div>
  25. <div class="showDetail" style="padding-top:56px;">
  26. <div class="h1Font hWeight" id="articleName"></div>
  27. <div class="madiaBlock">
  28. <ul class="mui-table-view noactiveTab">
  29. <li>
  30. <div class="flexCenter clearfix">
  31. <a id="personAL">
  32. <div class="madiaHead useHead" id="messImg"></div>
  33. <div class="madiaInfo">
  34. <p><span class="h1Font ellipsisSty" id="name"></span><em class="authiconNew" title="" id="auth"></em></p>
  35. <p class="h3Font" id="oTime"></p>
  36. </div>
  37. </a>
  38. <div class="goSpan">
  39. <span class="attenSpan">关注</span>
  40. </div>
  41. </div>
  42. </li>
  43. </ul>
  44. </div>
  45. <!--文章内容区-->
  46. <div class="showMain" id="articleContent">
  47. </div>
  48. <!--标签模块-->
  49. <ul class="tagList displayNone">
  50. <!--<li>
  51. <span class="h2Font">金属材料工程与腐</span>
  52. </li>-->
  53. </ul>
  54. <div class="madiaBlock displayNone" id="correlationExpert">
  55. <div class="madiaTit">相关专家</div>
  56. <ul class="mui-table-view" id="expertList">
  57. </ul>
  58. </div>
  59. <div class="madiaBlock displayNone" id="resource">
  60. <div class="madiaTit">相关资源</div>
  61. <ul class="mui-table-view" id="resourceList">
  62. </ul>
  63. </div>
  64. <div class="madiaBlock displayNone" id="correlationCompany">
  65. <div class="madiaTit">相关企业</div>
  66. <ul class="mui-table-view" id="companyList">
  67. </ul>
  68. </div>
  69. <!--点赞模块-->
  70. <div class="thumbBlock">
  71. <span class="thumbBtn"><span id="snum"></span></span><!-- thumbedBtn 已赞 201-->
  72. </div>
  73. <!--您可能感兴趣的文章-->
  74. <div class="madiaBlock displayNone" id="article">
  75. <div class="madiaTit">您可能感兴趣的文章</div>
  76. <ul class="mui-table-view" id="articleList">
  77. </ul>
  78. </div>
  79. <!--您可能感兴趣的文章-->
  80. <div class="madiaBlock displayNone" id="newarticle">
  81. <div class="madiaTit">最新文章</div>
  82. <ul class="mui-table-view" id="newarticleList">
  83. </ul>
  84. </div>
  85. <!--留言-->
  86. <div class="madiaBlock displayNone">
  87. <div class="madiaTit" id="olisten">留言</div>
  88. <ul class="mui-table-view commentBlock commentsArea">
  89. </ul>
  90. </div>
  91. </div>
  92. <div class="shareEcode">
  93. <img class="Ecodecon" src="../images/ecordCard.jpg" />
  94. </div>
  95. </div>
  96. <script type="text/javascript">
  97. $(document).ready(function() {
  98. var imgUrl ="http://www.ekexiu.com/images/logo180.png";
  99. var lineLink = document.location.href;
  100. var descContent="";
  101. var shareTitle;
  102. var appid = '';
  103. var articleId = GetQueryString("id");
  104. leword(500, 1);//liuyan
  105. wlog("article", articleId, 3)
  106. //进入发布者详情页面
  107. $("#personAL").on("click", function() {
  108. var reType = this.getAttribute("data-type");
  109. if(reType=="1"){
  110. var proId=this.getAttribute("data-id");
  111. location.href="http://" + window.location.host + "/e/p.html?id=" + proId;
  112. }else{
  113. var cmpId=this.getAttribute("data-id");
  114. location.href="http://" + window.location.host + "/e/c.html?id=" + cmpId;
  115. }
  116. })
  117. $("body").on("click",".goSpan,.thumbBtn",function(){
  118. location.href="http://a.app.qq.com/o/simple.jsp?pkgname=com.ekexiu.app";
  119. $(this).addClass("activeThis");
  120. })
  121. $("#articleList,#newarticleList").on("click","li", function() {
  122. var OdataId=this.getAttribute("data-id");
  123. location.href="http://" + window.location.host + "/e/a.html?id=" + OdataId;
  124. })
  125. $("#resourceList").on("click","li", function() {
  126. var OdataId=this.getAttribute("data-id");
  127. location.href="http://" + window.location.host + "/e/r.html?id=" + OdataId;
  128. })
  129. $("#expertList").on("click","li", function() {
  130. var OdataId=this.getAttribute("data-id");
  131. location.href="http://" + window.location.host + "/e/p.html?id=" + OdataId;
  132. })
  133. $(".commentBlock").on("click","li>.flexCenter",function(){
  134. var OdataId=this.getAttribute("data-id");
  135. location.href="http://" + window.location.host + "/e/p.html?id=" + OdataId;
  136. })
  137. $("#companyList").on("click","li", function() {
  138. var OdataId=this.getAttribute("data-id");
  139. location.href="http://" + window.location.host + "/e/c.html?id=" + OdataId;
  140. })
  141. var oArticleModule = {
  142. articleId: GetQueryString("id"),
  143. oAjaxGet: function(url, obj, oType, oFun) {
  144. $.ajax(url,{
  145. data: obj,
  146. dataType: 'json', //服务器返回json格式数据
  147. type: oType, //HTTP请求类型
  148. timeout: 10000, //超时时间设置为10秒;
  149. traditional: true,
  150. success: function(data) {
  151. if(data.success) {
  152. oFun(data.data);
  153. }
  154. },
  155. error: function(e) {
  156. return;
  157. }
  158. });
  159. },
  160. articleMess: function($data) {
  161. console.log($data);
  162. document.getElementById("articleName").innerHTML = $data.articleTitle;
  163. shareTitle=$data.articleTitle;
  164. document.title=$data.articleTitle;
  165. stt = $data.articleImg.substring(0, 9);
  166. imgUrl="http://www.ekexiu.com/data/article/" + stt + $data.articleId + "_s.jpg";
  167. console.log(stt)
  168. if($data.articleContent) {
  169. document.getElementById("articleContent").innerHTML = $data.articleContent;
  170. descContent=document.getElementById("articleContent").innerText.substr(0,40);
  171. }
  172. if($data.subject) {
  173. document.getElementsByClassName("tagList")[0].style.display = "block";
  174. var arr = $data.subject.split(",");
  175. for(var i in arr) {
  176. var oLi = document.createElement("li");
  177. oLi.innerHTML = '<span class="h2Font">' + arr[i] + '</span>'
  178. document.getElementsByClassName("tagList")[0].appendChild(oLi);
  179. }
  180. }
  181. document.getElementById("snum").innerHTML = $data.articleAgree;
  182. document.getElementById("oTime").innerHTML = commenTime($data.publishTime);
  183. document.getElementById("personAL").setAttribute("data-type",$data.articleType);
  184. if($data.articleType == 1) {
  185. oArticleModule.oAjaxGet("../ajax/article/ralateArticles", {
  186. "keys": arr,
  187. "professorId": oArticleModule.oWner,
  188. "articleId": oArticleModule.articleId,
  189. "rows": 5
  190. }, "get", oArticleModule.correlationArticle);
  191. document.getElementById("personAL").setAttribute("data-id",$data.professorId);
  192. oArticleModule.oAjaxGet("../ajax/professor/editBaseInfo/" + $data.professorId, "", "get", oArticleModule.professorMess);
  193. } else {
  194. oArticleModule.oAjaxGet("../ajax/article/ralateArticles", {
  195. "keys": arr,
  196. "orgId": oArticleModule.oWner,
  197. "articleId": oArticleModule.articleId,
  198. "rows": 5
  199. }, "get", oArticleModule.correlationArticle);
  200. document.getElementById("personAL").setAttribute("data-id",$data.orgId);
  201. oArticleModule.oAjaxGet("../ajax/org/" + $data.orgId, "", "get", oArticleModule.business);
  202. }
  203. },
  204. professorMess: function($data) {
  205. console.log($data);
  206. document.getElementById('name').innerHTML = $data.name;
  207. if($data.hasHeadImage == 1) {
  208. document.getElementById("messImg").style.backgroundImage = "url(../images/head/" + $data.id + "_l.jpg" + ")";
  209. }
  210. var userType = autho($data.authType, $data.orgAuth, $data.authStatus);
  211. document.getElementById("auth").classList.add(userType.sty);
  212. },
  213. business: function($data) {
  214. if($data.forShort) {
  215. document.getElementById('name').innerHTML = $data.forShort;
  216. }else{
  217. document.getElementById('name').innerHTML = $data.name;
  218. }
  219. var mgimg="../images/default-icon.jpg";
  220. if($data.hasOrgLogo) {
  221. mgimg="/images/org/" + $data.id + ".jpg";
  222. }
  223. document.getElementById("messImg").classList.add("cmpHead2");
  224. document.getElementById("messImg").innerHTML='<div class="boxBlock"><img class="boxBlockimg" id="companyImg" src="'+ mgimg+'"></div>'
  225. if($data.authStatus == 3) {
  226. document.getElementById("auth").classList.add("authicon-com-ok");
  227. }
  228. },
  229. correlationExpert: function($data) {
  230. if($data.length == 0) {
  231. return;
  232. }
  233. document.getElementById("correlationExpert").classList.remove("displayNone");
  234. for(var i = 0; i < $data.length; i++) {
  235. (function(n) {
  236. oArticleModule.oAjaxGet("../ajax/professor/editBaseInfo/" + $data[n].professorId, "", "get", oArticleModule.expertList);
  237. })(i)
  238. }
  239. },
  240. expertList: function($data) {
  241. var os = "";
  242. if($data.title) {
  243. if($data.orgName) {
  244. os = $data.title + "," + $data.orgName;
  245. } else {
  246. os = $data.title;
  247. }
  248. } else {
  249. if($data.office) {
  250. if($data.orgName) {
  251. os = $data.office + "," + $data.orgName;
  252. } else {
  253. os = $data.office;
  254. }
  255. } else {
  256. if($data.orgName) {
  257. os = $data.orgName;
  258. }
  259. }
  260. }
  261. var baImg = "../images/default-photo.jpg";
  262. if($data.hasHeadImage == 1) {
  263. baImg = "/images/head/" + $data.id + "_l.jpg";
  264. }
  265. var userType = autho($data.authType, $data.orgAuth, $data.authStatus);
  266. var li = document.createElement("li");
  267. li.setAttribute("data-id", $data.id);
  268. li.innerHTML = '<div class="flexCenter clearfix">' +
  269. '<div class="madiaHead useHead" style="background-image:url(' + baImg + ')"></div>' +
  270. '<div class="madiaInfo">' +
  271. '<p><span class="h1Font">' + $data.name + '</span><em class="authiconNew ' + userType.sty + '"></em></p>' +
  272. '<p class="ellipsisSty h2Font">' + os + '</p>' +
  273. '</div>' +
  274. '</div>'
  275. document.getElementById("expertList").appendChild(li);
  276. },
  277. correlationResource: function($data) {
  278. console.log($data);
  279. if($data.length == 0) {
  280. return;
  281. }
  282. document.getElementById("resource").classList.remove("displayNone");
  283. for(var i = 0; i < $data.length; i++) {
  284. oArticleModule.oAjaxGet( "../ajax/resource/queryOne", {
  285. "resourceId": $data[i].resourceId
  286. }, "get", oArticleModule.rsourceList);
  287. }
  288. },
  289. rsourceList: function($data) {
  290. var namepo, userType;
  291. if($data.resourceType == 1) {
  292. namepo = $data.editProfessor.name;
  293. userType = autho($data.editProfessor.authType, $data.editProfessor.orgAuth, $data.editProfessor.authStatus);
  294. } else {
  295. userType = {};
  296. if($data.organization.forShort){
  297. namepo = $data.organization.forShort;
  298. }else{
  299. namepo = $data.organization.name;
  300. }
  301. if($data.organization.authStatus == 3) {
  302. userType.sty = "authicon-com-ok"
  303. }
  304. }
  305. var rImg = "../images/default-resource.jpg";
  306. if($data.images.length>0){
  307. rImg = "/data/resource/" + $data.images[0].imageSrc;
  308. }
  309. var li = document.createElement("li");
  310. li.setAttribute("data-id", $data.resourceId);
  311. li.innerHTML = '<div class="flexCenter OflexCenter clearfix">' +
  312. ' <div class="madiaHead resouseHead" style="background-image:url(' + rImg + ')"></div>' +
  313. '<div class="madiaInfo OmadiaInfo">' +
  314. '<p class="ellipsisSty h1Font">' + $data.resourceName + '</p>' +
  315. '<p><span class="h2Font">' + namepo + '</span><em class="authiconNew ' + userType.sty + '" title="科袖认证专家"></em></p>' +
  316. '<p class="ellipsisSty-2 h2Font">用途:' + $data.supportedServices + '</p>' +
  317. '</div>' +
  318. '</div>'
  319. document.getElementById("resourceList").appendChild(li);
  320. },
  321. correlationArticle: function($data) {
  322. if($data.total) {
  323. if($data.data.length == 0) {
  324. return;
  325. }
  326. }else{
  327. if($data.length == 0) {
  328. return;
  329. }
  330. }
  331. var oo=1;
  332. if($data.total) {
  333. var $data=$data.data;
  334. document.getElementById('newarticle').style.display = "block";
  335. oo=0;
  336. }else{
  337. document.getElementById('article').style.display = "block";
  338. }
  339. for(var i = 0; i < $data.length; i++) {
  340. var ourl, of ;
  341. if($data[i].articleType == 1) {
  342. ourl = "/ajax/professor/editBaseInfo/" + $data[i].professorId; of = 1;
  343. } else {
  344. ourl = "/ajax/org/" + $data[i].orgId; of = 2;
  345. }
  346. var arImg = "../images/default-artical.jpg";
  347. if($data[i].articleImg) {
  348. arImg = "/data/article/" + $data[i].articleImg
  349. }
  350. var title = $data[i].articleTitle;
  351. $.ajax({
  352. url:ourl,
  353. dataType: 'json', //服务器返回json格式数据
  354. type: "get", //HTTP请求类型
  355. timeout: 10000, //超时时间设置为10秒;
  356. async: false,
  357. traditional: true,
  358. success: function(data) {
  359. if(data.success) {
  360. var namepo=""
  361. var li = document.createElement("li");
  362. if( of == 1) {
  363. namepo = data.data.name;
  364. var userType = autho(data.data.authType, data.data.orgAuth, data.data.authStatus);
  365. li.setAttribute("owner-id", data.data.id);
  366. li.setAttribute("data-type", 1);
  367. } else {
  368. if(data.data.forShort){
  369. namepo = data.data.forShort;
  370. }else{
  371. namepo = data.data.name;
  372. }
  373. var userType = {};
  374. if(data.data.authStatus == 3) {
  375. userType.sty = 'authicon-com-ok'
  376. } else {
  377. userType.sty = "e"
  378. }
  379. li.setAttribute("owner-id", data.data.id);
  380. li.setAttribute("data-type", 2);
  381. }
  382. li.setAttribute("data-id", $data[i].articleId);
  383. li.className = "mui-table-view-cell";
  384. li.innerHTML = '<div class="flexCenter OflexCenter clearfix">' +
  385. '<div class="madiaHead artHead" style="background-image:url(' + arImg + ')"></div>' +
  386. '<div class="madiaInfo OmadiaInfo">' +
  387. '<p class="ellipsisSty-2 h1Font">' + title + '</p>' +
  388. '<p><span class="h2Font" style="margin-right:10px">'+namepo+'</span><span class="time">'+commenTime($data[i].publishTime)+'</span></p>'+
  389. '</div>' +
  390. '</div>'
  391. if(oo==0){
  392. document.getElementById("newarticleList").appendChild(li)
  393. }else{document.getElementById("articleList").appendChild(li);}
  394. }
  395. },
  396. error: function() {
  397. }
  398. });
  399. }
  400. },
  401. correlationCompany: function($data) {
  402. console.log($data);
  403. if($data.length == 0) {
  404. return;
  405. }
  406. document.getElementById("correlationCompany").classList.remove("displayNone");
  407. for(var i = 0; i < $data.length; i++) {
  408. oArticleModule.oAjaxGet( "../ajax/org/"+ $data[i].orgId, {
  409. }, "get", oArticleModule.companyList);
  410. }
  411. },
  412. companyList: function($data) {
  413. var baImg = "../images/default-icon.jpg";
  414. if($data.hasHeadImage == 1) {
  415. baImg = "/images/org/" + $data.id + "_l.jpg";
  416. }
  417. var namepo,userType=""
  418. if($data.authStatus == 3){
  419. userType= "authicon-com-ok"
  420. }
  421. if($data.forShort){
  422. namepo = $data.forShort;
  423. }else{
  424. namepo = $data.name;
  425. }
  426. /*应用行业*/
  427. var proOther = "";
  428. if($data.industry) {
  429. proOther = $data.industry.replace(/,/gi, " | ");
  430. }
  431. var li = document.createElement("li");
  432. li.setAttribute("data-id", $data.id);
  433. li.innerHTML = '<div class="flexCenter OflexCenter clearfix">' +
  434. '<div class="madiaHead cmpHead">'+
  435. '<div class="boxBlock"><img class="boxBlockimg companyImg" id="oimg" src="'+ baImg +'"></div>'+
  436. '</div>' +
  437. '<div class="madiaInfo OmadiaInfo">' +
  438. '<p><span class="h1Font">' + namepo + '</span><em class="authiconNew ' + userType + '"></em></p>' +
  439. '<p class="ellipsisSty h2Font">' + proOther + '</p>' +
  440. '</div>' +
  441. '</div>'
  442. document.getElementById("companyList").appendChild(li);
  443. }
  444. }
  445. /*文章详细内容*/
  446. oArticleModule.oAjaxGet("../ajax/article/query", {
  447. articleId: oArticleModule.articleId
  448. }, "get", oArticleModule.articleMess);
  449. oArticleModule.oAjaxGet("../ajax/article/ralatePro", {
  450. "articleId": oArticleModule.articleId
  451. }, "get", oArticleModule.correlationExpert);
  452. oArticleModule.oAjaxGet("../ajax/article/ralateRes", {
  453. "articleId": oArticleModule.articleId
  454. }, "get", oArticleModule.correlationResource);
  455. oArticleModule.oAjaxGet("../ajax/article/ralateOrg", {
  456. "articleId": oArticleModule.articleId
  457. }, "get", oArticleModule.correlationCompany);
  458. oArticleModule.oAjaxGet("/ajax/article/find", {pageSize:5}, "get", oArticleModule.correlationArticle);
  459. //留言
  460. function leword(row, aa){
  461. $.ajax({
  462. url:"../ajax/leaveWord/ql",
  463. data: {
  464. "articleId":articleId,
  465. "rows":row },
  466. dataType: 'json', //服务器返回json格式数据
  467. type: 'get', //HTTP请求类型
  468. timeout: 10000, //超时时间设置为10秒;
  469. traditional: true,
  470. success: function(data) {
  471. if(data.success) {
  472. console.log(data)
  473. document.getElementsByClassName('commentBlock')[0].innerHTML = ""
  474. if(data.data.length == 0) {
  475. return;
  476. }
  477. document.getElementById("olisten").parentNode.classList.remove("displayNone");
  478. for(var i = 0; i < data.data.length; i++) {
  479. var oText = ""
  480. var userType = autho(data.data[i].professor.authType, data.data[i].professor.orgAuth, data.data[i].professor.authStatus);
  481. var baImg = "../images/default-photo.jpg";
  482. if(data.data[i].professor.hasHeadImage == 1) {
  483. baImg = "/images/head/" + data.data[i].professor.id + "_l.jpg";
  484. }
  485. var li = document.createElement("li");
  486. li.innerHTML = '<div class="flexCenter clearfix" data-id="' + data.data[i].professor.id + '">' +
  487. '<div class="madiaHead useHead useHeadMsg" style="background-image:url(' + baImg + ')"></div>' +
  488. '<div class="madiaInfo">' +
  489. '<p><span class="h1Font" data-id="' + data.data[i].professor.id + '">' + data.data[i].professor.name + '</span><em class="authiconNew ' + userType.sty + '" title="科袖认证专家"></em></p>' +
  490. '<p class="h2Font">' + data.data[i].content + '</p>' +
  491. '<p class="operateSpan">' +
  492. '<span class="commenttime">' + commenTime(data.data[i].createTime) + '</span>' +
  493. // '<span data-id="' + data.data[i].id + '" class="dele">' + oText + '</span>' +
  494. '</p>' +
  495. '</div>'
  496. document.getElementsByClassName("commentBlock")[0].appendChild(li);
  497. }
  498. }
  499. },
  500. error: function() {
  501. }
  502. });
  503. }
  504. //浏览量
  505. $.ajax({
  506. "url" : "../ajax/article/pageViews",
  507. "type" : "POST" ,
  508. "dataType" : "json",
  509. "data" :{"articleId":articleId},
  510. "success" : function(data) {
  511. if (data.success){
  512. console.log(data);
  513. }
  514. },
  515. "error":function(){
  516. }
  517. });
  518. /*微信分享*/
  519. $.ajax({
  520. url: "../ajax/weixin/jsapiTicket",
  521. type: 'get',
  522. dataType: 'json',
  523. contentType: "application/x-www-form-urlencoded; charset=utf-8",
  524. data: {
  525. 'url': location.href.split('#')[0]
  526. },
  527. success: function(data) {
  528. if(data.data) {
  529. wx.config({
  530. debug: false, //调试模式好犀利
  531. appId: data.data.appId,
  532. timestamp: data.data.timestamp,
  533. nonceStr: data.data.nonceStr,
  534. signature: data.data.signature,
  535. jsApiList: [ // 所有要调用的 API 都要加到这个列表中
  536. "onMenuShareAppMessage",
  537. "onMenuShareTimeline",
  538. "onMenuShareQQ",
  539. "onMenuShareQZone",
  540. "scanQRCode",
  541. ]
  542. });
  543. wx.ready(function() {
  544. // 在这里调用 API
  545. wx.onMenuShareAppMessage({ //分享给朋友
  546. title: shareTitle, // 分享标题
  547. desc: descContent, // 分享描述
  548. link: lineLink, // 分享链接
  549. imgUrl: imgUrl, // 分享图标
  550. success: share_success_callback,
  551. cancel: share_cancel_callback
  552. });
  553. wx.onMenuShareTimeline({ //分享到朋友圈
  554. title: shareTitle, // 分享标题
  555. desc: descContent, // 分享描述
  556. link: lineLink, // 分享链接
  557. imgUrl: imgUrl, // 分享图标
  558. success: share_success_callback,
  559. cancel: share_cancel_callback
  560. });
  561. wx.onMenuShareQQ({ //分享到QQ
  562. title: shareTitle, // 分享标题
  563. desc: descContent, // 分享描述
  564. link: lineLink, // 分享链接
  565. imgUrl: imgUrl, // 分享图标
  566. success: share_success_callback,
  567. cancel: share_cancel_callback
  568. });
  569. wx.onMenuShareQZone({ //分享到QQ空间
  570. title: shareTitle, // 分享标题
  571. desc: descContent, // 分享描述
  572. link: lineLink, // 分享链接
  573. imgUrl: imgUrl, // 分享图标
  574. success: share_success_callback,
  575. cancel: share_cancel_callback
  576. });
  577. });
  578. //分享成功后的回调函数
  579. function share_success_callback() {}
  580. //用户取消分享后执行的回调函数
  581. function share_cancel_callback() {}
  582. }
  583. }
  584. });
  585. })
  586. </script>
  587. </body>
  588. </html>