暫無描述
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

index.htm 9.0KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193
  1. <!DOCTYPE html>
  2. <html>
  3. <head>
  4. <title>{$eyou.field.seo_title}</title>
  5. <meta name="description" content="{$eyou.field.seo_description}" />
  6. <meta name="keywords" content="{$eyou.field.seo_keywords}" />
  7. <meta name="renderer" content="webkit" />
  8. <meta charset="utf-8" />
  9. <meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1" />
  10. <meta name="viewport" content="width=device-width, initial-scale=1.0,user-scalable=0,minimal-ui" />
  11. <link href="{eyou:global name='web_cmspath' /}/favicon.ico" rel="shortcut icon" type="image/x-icon" />
  12. {eyou:static file="skin/css/eyoucms.css" code="ask"/}
  13. {eyou:static file="skin/css/ask.css" code="ask"/}
  14. {eyou:static file="/public/static/common/js/jquery.min.js"/}
  15. </head>
  16. <body class="askpn" style="">
  17. <!-- 头部 -->
  18. {eyou:include file="ask/pc/ask_header.htm" /}
  19. <!-- END -->
  20. <main class="mian-body container">
  21. <aside class="aside-left col-md-9">
  22. <!-- 栏目导航、搜索 -->
  23. {eyou:include file="ask/pc/hotsearch.htm" /}
  24. <!-- END -->
  25. <!-- 最新、推荐、待回答 -->
  26. <div class="article-nav">
  27. {eyou:empty name="$eyou.field.PendingAsk"}
  28. {eyou:empty name="$eyou.field.SearchName"}
  29. {eyou:empty name='$eyou.field.TypeId'}
  30. <span {eyou:eq name="$eyou.field.IsRecom" value="0"}class="act"{/eyou:eq} onclick="window.location.href='{$eyou.field.NewDateUrl}'">最新</span>
  31. <span {eyou:eq name="$eyou.field.IsRecom" value="1"}class="act"{/eyou:eq}onclick="window.location.href='{$eyou.field.RecomDateUrl}'">推荐</span>
  32. {notempty name='$eyou.field.conf.reward_switch'}
  33. <span {eyou:eq name="$eyou.field.IsRecom" value="3"}class="act"{/eyou:eq}onclick="window.location.href='{$eyou.field.RewardUrl}'">悬赏{eyou:eq name="$eyou.field.conf.reward_type" value="scores"}<i class="iconfont icon-jifenguizeguankong2" style="color:#f44747;margin-left: 2px"></i>{eyou:else/}<i class="iconfont icon-hongbao" style="color:#f44747;margin-left: 2px"></i>{/eyou:eq}</span>
  34. {/notempty}
  35. {eyou:else/}
  36. <span class="act">{$eyou.field.TypeName}</span>
  37. {/eyou:empty}
  38. {eyou:else/}
  39. <span class="act">{$eyou.field.SearchNameRed}</span>
  40. {/eyou:empty}
  41. {eyou:else/}
  42. <span class="act">{$eyou.field.PendingAsk}</span>
  43. {/eyou:empty}
  44. <button onclick="window.location.href='{$eyou.field.PendingAnswerUrl}';">
  45. <i class="fa icon-TobeAnswered"></i>待回答
  46. </button>
  47. </div>
  48. <!-- END -->
  49. <!-- 问题列表数据 -->
  50. <div class="article-list" id="newDiv">
  51. <ul class="article-ul">
  52. {eyou:empty name="$eyou.field.AskData"}
  53. <div class="huifu-edit">
  54. <div class="huifu-null" > <p style="margin-top: 10px;">没有符合条件的问题!</p> </div>
  55. </div>
  56. {eyou:else/}
  57. {eyou:volist name="$eyou.field.AskData" id="vo"}
  58. <li class="article-list-item">
  59. {if condition="$vo.money > 0 && 1 == $eyou.field.conf.reward_switch"}
  60. <a class="list-avter">
  61. <!-- p为红色圆圈图标 .p.g为灰色图标 -->
  62. <div class="p {gt name='$vo.bestanswer_id' value='20'}g{/gt}" style="">
  63. {eyou:eq name="$eyou.field.conf.reward_type" value="scores"}<em class="iconfont icon-jifenguizeguankong2" style="color:#f44747;margin-left: 2px"></em>{eyou:else/}<em class="iconfont icon-hongbao" style="color:#f44747;margin-left: 2px"></em>{/eyou:eq}
  64. </div>
  65. <div class="rmbb" style=" ">{eyou:eq name="$eyou.field.conf.reward_type" value="scores"}{eyou:else/}¥{/eyou:eq}{$vo.money}{eyou:eq name="$eyou.field.conf.reward_type" value="scores"}积分{/eyou:eq}</div>
  66. </a>
  67. {else /}
  68. <a class="list-avter user_card avatar" href="javascript:void(0);">
  69. <img src="{$vo.head_pic}">
  70. {if condition="!empty($vo.level) and $vo.level > 1"}
  71. <i class="svip"></i>
  72. {/if}
  73. </a>
  74. {/if}
  75. <div>
  76. <a href="{$vo.AskUrl}" class="went-head">
  77. {eyou:eq name="$eyou.field.IsRecom" value="1"}
  78. {eyou:eq name="$vo.is_recom" value='1'}
  79. <span class="jxuan"><i class="fa icon-best"></i>推荐</span>
  80. {/eyou:eq}
  81. {/eyou:eq}
  82. <span class="went-head-text">{$vo.ask_title}</span>
  83. </a>
  84. <div class="tx-list">
  85. {eyou:volist name="$vo.HeadPic" id="pic"}
  86. <a href="javascript:void(0);">
  87. <img src="{$pic.head_pic}">
  88. </a>
  89. {/eyou:volist}
  90. <i class="fa icon-people-more" style="font-size:20px;color:#e5e5e5;margin-right: 10px;"></i>
  91. <div class="list-text">
  92. {$vo.UsersConut} | {$vo.add_time} |
  93. <a href="{$vo.TypeUrl}" target="_blank">{$vo.type_name}</a>
  94. </div>
  95. <div style=" flex-grow:1 "></div>
  96. <div class="more-info">
  97. <span style="margin-right:5px">
  98. <i class="icon wb-eye"></i>{$vo.click}
  99. </span> |
  100. <span style="margin-left:5px">
  101. <i class="fa fa-comments-o"></i>{$vo.replies}
  102. </span>
  103. </div>
  104. </div>
  105. </div>
  106. </li>
  107. {/eyou:volist}
  108. {/eyou:empty}
  109. </ul>
  110. </div>
  111. {$eyou.field.pageStr}
  112. <!-- END -->
  113. </aside>
  114. <!-- 右侧 -->
  115. <aside class="aside-right col-md-3">
  116. <!-- 个人信息 -->
  117. <div class="wt-opti">
  118. {eyou:notempty name="$users.nickname"}
  119. <div class="people-info">
  120. <a class="user_card" href="{$eyou.field.UsersIndexUrl}" target="_blank">
  121. <img src="{$users.head_pic}" style="width:40px;height:40px;border-radius:100%;cursor: pointer">
  122. </a>
  123. <div class="people-info-a">
  124. <h3>{$users.nickname}</h3>
  125. <div></div>
  126. </div>
  127. </div>
  128. {/eyou:notempty}
  129. <div class="people-btn">
  130. <button class="act tw" onclick="window.location.href='{$eyou.field.AddAskUrl}';">
  131. <i class="fa fa-edit"></i>我要提问
  132. </button>
  133. </div>
  134. </div>
  135. <!-- END -->
  136. <!-- 热门帖子 -->
  137. {eyou:include file="ask/pc/hotpost.htm" /}
  138. <!-- END -->
  139. </aside>
  140. <!-- END -->
  141. </main>
  142. {empty name='$eyou.field.TypeId'}
  143. <script>
  144. var minAwayBtm = 700; // 距离页面底部的最小距离
  145. var page = 1;
  146. var loading = false;
  147. var IsRecom = parseInt("{$eyou.field.IsRecom}");
  148. var total_page = 2;
  149. $(function () {
  150. $(window).scroll(function () {
  151. var awayBtm = $(document).height() - $(window).scrollTop() - $(window).height();
  152. if (awayBtm <= minAwayBtm) {
  153. next_page();
  154. }
  155. });
  156. })
  157. function next_page() {
  158. if (loading == false && page < total_page) {
  159. loading = true;
  160. page++;
  161. if ($('#mobile_more_msg')){
  162. $('#mobile_more_msg').text('加载中...');
  163. }
  164. $.ajax({
  165. type: 'post',
  166. url: "{:url('plugins/Ask/ajax_list', ['_ajax'=>1])}",
  167. data: {is_recom: IsRecom, search_name: "{$eyou.field.SearchName}", page: page, _ajax: 1},
  168. dataType: 'json',
  169. success: function (res) {
  170. total_page = res.data.total;
  171. if (res.data.html){
  172. $('.article-ul').append(res.data.html);
  173. }
  174. loading = false;
  175. $('#mobile_more_msg').text('加载更多');
  176. },
  177. error: function (e) {
  178. alert(e.responseText);
  179. }
  180. });
  181. }
  182. }
  183. </script>
  184. {/empty}
  185. </body>
  186. </html>