123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255 |
- <!DOCTYPE html>
- <html>
- <head>
- <meta charset="UTF-8">
- <title>回答分享-科袖网</title>
- <meta name="viewport" content="width=device-width,initial-scale=1,minimum-scale=1,maximum-scale=1,user-scalable=no" />
- <link rel="stylesheet" href="../css/reset.css" />
- <link rel="stylesheet" href="../css/common.css" />
- <link rel="stylesheet" href="../css/share.css" />
- <style>
- html,body {background: #FFFFFF;}
- </style>
- <script type="text/javascript" src="../js/jquery-1.11.1.js"></script>
- <script type="text/javascript" src="http://res.wx.qq.com/open/js/jweixin-1.0.0.js"></script>
- <script type="text/javascript" src="../js/public/baseUtil.js"></script>
- <script type="text/javascript" src="../js/public/shareCom.js"></script>
- <script type="text/javascript" src="../js/public/shareLeaveWord.js"></script>
- <script type="text/javascript" src="../js/public/openApp.js"></script>
- </head>
- <body>
- <div class="contentBody2">
- <div class="showDetail">
- <div class="qa-top flexCenter">
- <div class="h1Font hWeight flex-pright" id="questTit"></div>
- <em></em>
- </div>
- <div class="madiaBlock">
- <ul class="mui-table-view noactiveTab">
- <li class="mui-table-view-cell">
- <div class="flexCenter flex-pright" id="ownerCon">
-
- <div class="madiaInfo">
- <p><span class="h1Font">张某某</span><em class="authicon authicon-pro" title="科袖认证专家"></em></p>
- <p class="ellipsisSty h2Font">职称/职位,所在机构</p>
- </div>-->
- </div>
- <div class="goSpan">
- <span class="attenSpan">关注</span>
- </div>
- </li>
- </ul>
- </div>
-
- <div class="showMain" id="answerCnt"></div>
- <div class="h3Font" style="margin-top: 10px;" id="answerTime"></div>
-
- <div class="thumbBlock">
- <span class="thumbBtn">赞 <span id="snum"></span></span>
- <span class="stepBtn">踩</span>
- </div>
-
- <div class="madiaBlock">
- <div class="madiaTit" id="olisten">留言</div>
- <ul class="mui-table-view commentBlock noactiveTab">
- </ul>
- </div>
- </div>
- <div class="shareEcode">
- <img class="Ecodecon" src="../images/ecordCard.jpg" />
- <div class="Ecodeinfo">
- <a href="http://a.app.qq.com/o/simple.jsp?pkgname=com.ekexiu.app"><button class="frmbtn frmactive">下载移动客户端</button></a>
- </div>
- </div>
- </div>
- <script type="text/javascript">
- $(document).ready(function() {
- var imgUrl = "http://www.ekexiu.com/images/logo180.png",
- lineLink = document.location.href,
- descContent = "",
- shareTitle,
- appid = '';
- var answerId = GetQueryString("id");
- wlog("answer",answerId,'3');
- module.lWord(answerId,4);
- var oAjax = function(url, dataS, otype, oFun) {
- $.ajax({
- url: url,
- dataType: 'json',
- type: otype,
- data: dataS,
- success: function(res) {
- if(res.success) {
- oFun(res)
- }
- }
- });
- },
- getConmain = function() {
- oAjax('/ajax/question/answer', {
- "id": answerId
- }, "get", function(res) {
- var $da = res.data
- document.getElementById("answerTime").innerHTML = commenTime($da.createTime);
- document.getElementById("snum").innerHTML = $da.agree;
- if($da.cnt) {
- document.getElementById("answerCnt").innerHTML = ($da.cnt).replace(/\n/g,"<br />");
- descContent =document.getElementById("answerCnt").innerHTML.substr(0, 70);
- }
- proinfo($da.uid)
- questioninfo($da.qid)
- })
- },
- proinfo = function(uid) {
- oAjax("/ajax/professor/baseInfo/" + uid, {}, "get", function(res) {
- var dataStr = res.data
- var baImg = "../images/default-photo.jpg";
- if(dataStr.hasHeadImage == 1) {
- baImg = "/images/head/" + dataStr.id + "_l.jpg";
- }
- var userType = autho(dataStr.authType, dataStr.orgAuth, dataStr.authStatus);
- var os = "";
- if(dataStr.title) {
- if(dataStr.orgName) {
- os = dataStr.title + "," + dataStr.orgName;
- } else {
- os = dataStr.title;
- }
- } else {
- if(dataStr.office) {
- if(dataStr.orgName) {
- os = dataStr.office + "," + dataStr.orgName;
- } else {
- os = dataStr.office;
- }
- } else {
- if(dataStr.orgName) {
- os = dataStr.orgName;
- }
- }
- }
- var styStr='<em class="authiconNew ' + userType.sty + '" title="' + userType.title + '"></em>'
- if(userType.sty=="e"){
- styStr=""
- }
- var str = '<div class="madiaHead useHead" style="background-image:url(' + baImg + ')"></div>' +
- '<div class="madiaInfo">' +
- '<p><span class="h1Font">' + dataStr.name + '</span><em class="authicon ' + userType.sty + ' title="' + userType.title + '"></em></p>' +
- '<p class="ellipsisSty h2Font">' + os + '</p>' +
- '</div>'
- document.getElementById("ownerCon").innerHTML = str
- document.getElementById("ownerCon").setAttribute("data-id", uid);
- });
- },
- questioninfo = function(qid) {
- oAjax("/ajax/question/qo", {
- "id": qid,
- }, "get", function(res) {
- document.getElementById("questTit").innerHTML = res.data.title;
- document.getElementById("questTit").setAttribute("data-id", qid);
-
- if(res.data.img) {
- var subs=strToAry(res.data.img)
- imgUrl="/data/question"+subs[0].replace(/.jpg/,"_s.jpg");
- }
-
- shareTitle = res.data.title;
- document.title = res.data.title;
- });
- }
- getConmain()
- var this_ = "../html/qa-answer-show.html?anid=" + answerId;
- wcFresh(this_);
- $("body").on("click", ".goSpan,.collectBtn,.thumbBtn,.stepBtn,.plusbtn,.replyLew", function() {
- isInstalled(this_, true);
- $(this).addClass("activeThis");
- })
- $("#ownerCon").on("click", function() {
- var id = this.getAttribute("data-id");
- location.href = "http://" + window.location.host + "/e/p.html?id=" + id;
- })
- $("#questTit").on("click", function() {
- var id = this.getAttribute("data-id");
- location.href = "http://" + window.location.host + "/e/wen.html?id=" + id;
- })
-
- $.ajax({
- url: "../ajax/weixin/jsapiTicket",
- type: 'get',
- dataType: 'json',
- contentType: "application/x-www-form-urlencoded; charset=utf-8",
- data: {
- 'url': location.href.split('#')[0]
- },
- success: function(data) {
- if(data.data) {
- wx.config({
- debug: false,
- appId: data.data.appId,
- timestamp: data.data.timestamp,
- nonceStr: data.data.nonceStr,
- signature: data.data.signature,
- jsApiList: [
- "onMenuShareAppMessage",
- "onMenuShareTimeline",
- "onMenuShareQQ",
- "onMenuShareQZone",
- "scanQRCode",
- ]
- });
- wx.ready(function() {
-
- wx.onMenuShareAppMessage({
- title: shareTitle,
- desc: descContent,
- link: lineLink,
- imgUrl: imgUrl,
- success: share_success_callback,
- cancel: share_cancel_callback
- });
- wx.onMenuShareTimeline({
- title: shareTitle,
- desc: descContent,
- link: lineLink,
- imgUrl: imgUrl,
- success: share_success_callback,
- cancel: share_cancel_callback
- });
- wx.onMenuShareQQ({
- title: shareTitle,
- desc: descContent,
- link: lineLink,
- imgUrl: imgUrl,
- success: share_success_callback,
- cancel: share_cancel_callback
- });
- wx.onMenuShareQZone({
- title: shareTitle,
- desc: descContent,
- link: lineLink,
- imgUrl: imgUrl,
- success: share_success_callback,
- cancel: share_cancel_callback
- });
- });
-
- function share_success_callback() {}
-
- function share_cancel_callback() {}
- }
- }
- });
- })
- </script>
- </body>
- </html>
|