Ei kuvausta
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.

view_zczygz_article_detail.htm 7.2KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212
  1. {eyou:assign name='page' value='article-detail' /}
  2. {eyou:php}
  3. $route_param = request()->route();
  4. $tid = $route_param['tid']?(int)$route_param['tid']:0;
  5. //var_dump($route_param);
  6. $number = $route_param['aid'];
  7. //处理域名获取当前域名名称
  8. $route_domain = request()->domain();
  9. $domain = explode('//',$route_domain);
  10. $domain = explode('.',$domain[1]);
  11. $site = $domain[0];
  12. //var_dump($site);
  13. if(!empty($site) || $site != 'zc' || $site != 'www'){
  14. //判定为二级域名
  15. }else{
  16. $site = 'www';
  17. }
  18. //处理城市参数
  19. if(!empty($route_param['site'])){
  20. $city_domain = $route_param['site'];
  21. }else{
  22. $city_domain = 'none';
  23. }
  24. {/eyou:php}
  25. {eyou:sql sql="select * from ey_citysite where domain='$site'" cachetime='3600' id='res'}
  26. <!--获取到省份ID-->
  27. {eyou:assign name='provid' value="$res.id" /}
  28. {eyou:assign name='provid_name' value="$res.name" /}
  29. {/eyou:sql}
  30. {eyou:sql sql="select * from ey_citysite where domain='$city_domain'" cachetime='3600' id='res'}
  31. <!--获取到市级ID-->
  32. {eyou:assign name='cityid' value="$res.id" /}
  33. {eyou:assign name='cityid_name' value="$res.name" /}
  34. {/eyou:sql}
  35. <?php
  36. //判断tid
  37. /*
  38. * T:职称论文模板_(抓取文章标题)
  39. K:抓取文章标题,职称论文
  40. D:抓取文章摘要的前70个字符
  41. */
  42. function strip_tags_and_substr($string, $length = 70) {
  43. // 去除HTML标签
  44. $withoutTags = strip_tags($string);
  45. // 截取指定长度的字符串
  46. $result = mb_substr($withoutTags, 0, $length);
  47. return $result;
  48. }
  49. //默认值
  50. $seo_title = $eyou['field']['seo_title'];
  51. $key_keywords = $eyou['field']['seo_keywords'];
  52. $desc_ription = $eyou['field']['seo_description'];
  53. //var_dump($eyou['field']['typeid']);
  54. //var_dump($eyou["field"]["seo_title"]);
  55. //var_dump($eyou["field"]["aid"]);
  56. ?>
  57. {eyou:if condition='((int)$eyou.field.typeid === 127 && empty($eyou["field"]["seo_title"]))'}
  58. {eyou:php}
  59. //如果是职称论文参考
  60. $seo_title = '职称论文模板_'.$eyou['field']['title'];
  61. $key_keywords = $eyou['field']['title'].",职称论文";
  62. $content_sql = $eyou['field']['content_5'];
  63. //处理字符串
  64. $processedString = strip_tags_and_substr($content_sql, 70);
  65. $desc_ription = $processedString;
  66. {/eyou:php}
  67. {eyou:else /}
  68. {eyou:if condition='(empty($eyou["field"]["seo_title"]))'}
  69. {eyou:php}
  70. //如果是其他栏目文章 且 默认seo为空
  71. //评审攻略 //职称答辩 //职称补贴 //职称评审常见问题 //职称评审政策资讯
  72. $seo_title = $eyou['field']['title'];
  73. $key_keywords = $eyou['field']['title'];
  74. $content_sql = $eyou['field']['content_5'];
  75. //处理字符串
  76. $processedString = strip_tags_and_substr($content_sql, 70);
  77. $desc_ription = $processedString;
  78. {/eyou:php}
  79. {/eyou:if}
  80. {/eyou:if}
  81. <!DOCTYPE html>
  82. <html>
  83. <head>
  84. <meta charset="utf-8">
  85. <meta name="viewport" content="width=device-width, user-scalable=no, initial-scale=1.0, maximum-scale=1.0, minimum-scale=1.0">
  86. <title>{$seo_title}</title>
  87. <meta name="keywords" content="{$key_keywords}">
  88. <meta name="description" content="{$desc_ription}">
  89. <link rel="stylesheet" href="https://oss.zc10000.com/static/plug/layui/css/layui.css?v=<?php echo rand(1,100000); ?>" media="all">
  90. <link rel="stylesheet" href="/template/mobile/css/common.css?v=<?php echo rand(1,100000); ?>" media="all">
  91. <!--后续修改样式 在extend.css?v=<?php echo rand(1,100000); ?> 补充叠加 不修改原来的样式文件-->
  92. <link rel="stylesheet" href="/template/mobile/css/extend.css?v=<?php echo rand(1,100000); ?>" media="all">
  93. <script src="https://oss.zc10000.com/static/plug/layui/layui.js"></script>
  94. <script>
  95. layui.config({
  96. version: '1632428048355' //为了更新 js 缓存,可忽略
  97. });
  98. </script>
  99. </head>
  100. <body>
  101. {eyou:include file='/template/mobile/common/background.htm' /}
  102. <div id="header">
  103. {eyou:include file='/template/mobile/common/header.htm' /}
  104. </div>
  105. <!--复制 copy/article.htm 页面名称: 文章详情页-->
  106. <div id="article-detail">
  107. <link rel="stylesheet" href="/template/mobile/css/article.css?v=<?php echo rand(1,100000); ?>" media="all">
  108. {eyou:include file='/template/mobile/components/nav/style_1.htm' /}
  109. {eyou:include file='/template/mobile/components/flow/style_1.htm' /}
  110. <div class="content">
  111. <div class="box">
  112. <div class="box-left">
  113. <?php
  114. $title="";
  115. ?>
  116. {eyou:include file='/template/mobile/components/detail/style_3.htm' /}
  117. </div>
  118. <div class="box-right">
  119. <?php
  120. /*$title = "职称政策资讯";
  121. $cat_id = '115';
  122. $son_id = '115';
  123. $con = 1;
  124. $ty = "right";*/
  125. //var_dump($page);
  126. /*
  127. * eyou:include file='/template/mobile/components/list/style_4.htm'
  128. */
  129. $title = "热门标签";
  130. ?>
  131. {eyou:sql sql='select * from ey_arctype where article_id=$tid limit 0,1' cachetime='3600' empty='' id="tag_list"}
  132. {eyou:php}
  133. $cat_id_tag = $tag_list['id'];
  134. {/eyou:php}
  135. {/eyou:sql}
  136. <?php
  137. if(empty($cat_id_tag)){
  138. $cat_id_tag = 371;
  139. }
  140. ?>
  141. {eyou:include file='/template/mobile/components/tag/style_2.htm' /}
  142. <?php
  143. $title = "职称评审攻略";
  144. $cat_id = '117';
  145. $son_id = '117';
  146. $con = 2;
  147. $ty = "right";
  148. //var_dump($page);
  149. ?>
  150. {eyou:include file='/template/mobile/components/list/style_4.htm' /}
  151. <?php
  152. $title = '快速评审客服';
  153. $kefu_id = '15';
  154. $con = 1;
  155. $is_kefu = 1;
  156. ?>
  157. {eyou:include file='/template/mobile/components/text/style_4.htm' /}
  158. <?php
  159. $title = '职称论文发表客服';
  160. $kefu_id = '23';
  161. $con = 2;
  162. $is_kefu = 1;
  163. ?>
  164. {eyou:include file='/template/mobile/components/text/style_4.htm' /}
  165. <?php
  166. $title = '职称专利申请客服';
  167. $kefu_id = '24';
  168. $con = 3;
  169. $is_kefu = 1;
  170. ?>
  171. {eyou:include file='/template/mobile/components/text/style_4.htm' /}
  172. </div>
  173. </div>
  174. </div>
  175. <!--职称评审工具包-->
  176. {eyou:include file='/template/mobile/components/list/style_6.htm' /}
  177. </div>
  178. <div id="footer">
  179. {eyou:include file='/template/mobile/common/footer.htm' /}
  180. </div>
  181. {eyou:include file='/template/mobile/common/common_bot.htm' /}
  182. {eyou:include file='/template/mobile/common/button.htm' /}