share.html 5.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262
  1. <!DOCTYPE html>
  2. <html lang="zh-CN">
  3. <head>
  4. <meta charset="UTF-8">
  5. <meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=0">
  6. <meta name="description" content="分享文章">
  7. <link rel="icon" href="../static/img/favicon2.ico" type="img/x-ico">
  8. <link rel="stylesheet" href="../static/css/index.css?v=1.0.0.1">
  9. <link rel="stylesheet" href="../static/css/vant.css" />
  10. <script src="../static/js/vender/vue/vue.min.js"></script>
  11. <script src="../static/js/vender/vue/vant.min.js"></script>
  12. <script src="../static/js/vender/config.js"></script>
  13. <title>分享文章</title>
  14. <style>
  15. .container {
  16. display: flex;
  17. height: 100vh;
  18. /* align-items: center;
  19. justify-content: center; */
  20. }
  21. .footer {
  22. position: fixed;
  23. bottom: 0rem;
  24. height: 1.36rem;
  25. padding: 0 1.14rem;
  26. width: 100%;
  27. display: flex;
  28. justify-content: center;
  29. left: 0;
  30. }
  31. .footer img {
  32. width: 5.22rem;
  33. height: 100%;
  34. }
  35. .hideContainer {
  36. width: 7.5rem;
  37. display: flex;
  38. justify-content: center;
  39. align-items: center;
  40. height: calc(100vh - 1.36rem);
  41. text-align: center;
  42. margin: 0 auto;
  43. }
  44. .hideContainer img {
  45. width: 2.8rem;
  46. height: 2.8rem;
  47. }
  48. .hideContainer p {
  49. font-size: 0.28rem;
  50. margin-top: 0.3rem;
  51. font-family: PingFangSC-Regular, PingFang SC;
  52. color: #999999;
  53. }
  54. .top-content {
  55. width: 7.5rem;
  56. margin: 0 auto;
  57. padding: 0.2rem 0.3rem;
  58. }
  59. .top-content .title {
  60. font-size: 0.44rem;
  61. font-family: PingFangSC-Medium, PingFang SC;
  62. color: #000000;
  63. letter-spacing: 0.01rem;
  64. margin-bottom: 0.2rem;
  65. }
  66. .topic-info {
  67. padding-bottom: 1.6rem;
  68. }
  69. .line {
  70. width: 100%;
  71. height: 0.02rem;
  72. background: #D8D8D8;
  73. margin-bottom: 0.2rem;
  74. }
  75. .createTime {
  76. font-size: 0.28rem;
  77. font-family: PingFangSC-Regular, PingFang SC;
  78. font-weight: 400;
  79. color: #999999;
  80. margin-bottom: 0.2rem;
  81. }
  82. .topic-info img {
  83. max-width: 100%;
  84. width: auto;
  85. height: auto;
  86. border-radius: 0.2rem;
  87. margin-bottom: 0.2rem;
  88. margin-top: 0.2rem;
  89. }
  90. .topic-info {
  91. font-size: 0.32rem;
  92. letter-spacing: 0.02rem;
  93. font-family: PingFangSC-Regular, PingFang SC;
  94. color: #333333;
  95. }
  96. .topic-info p {
  97. font-size: 0.36rem;
  98. font-family: PingFangSC-Regular, PingFang SC;
  99. font-weight: 400;
  100. color: #333333;
  101. letter-spacing: 0.02rem;
  102. }
  103. h1,
  104. h2,
  105. h3,
  106. h4,
  107. h5 {
  108. font-size: 0.32rem;
  109. font-family: PingFangSC-Semibold, PingFang SC;
  110. font-weight: 600;
  111. color: #333333;
  112. /* margin-bottom: 0.12rem;
  113. margin-top: 0.12rem; */
  114. }
  115. .hide {
  116. display: none !important;
  117. }
  118. .prompt {
  119. position: fixed;
  120. top: 0;
  121. left: 0;
  122. bottom: 0;
  123. right: 0;
  124. width: 100%;
  125. height: 100%;
  126. background: rgba(0, 0, 0, 0.5);
  127. /* display: none; */
  128. }
  129. .prompt img {
  130. width: 200px;
  131. position: absolute;
  132. right: 15px;
  133. top: 6px;
  134. }
  135. </style>
  136. </head>
  137. <body>
  138. <div id="app" v-cloak class="container">
  139. <div v-if='isshow' class="hideContainer">
  140. <div>
  141. <img src="../static/offImg/404.png" alt="" />
  142. <p>该资讯已被删除</p>
  143. </div>
  144. </div>
  145. <div class="top-content" v-if='!isshow&&topic.content'>
  146. <p class="hide">分享文章</p>
  147. <p class="title">{{topic.title}}</p>
  148. <p class="createTime"> 发布日期:{{topic.createTime}}</p>
  149. <p class="line"></p>
  150. <div v-html="topic.content" class="topic-info"></div>
  151. </div>
  152. <div class="footer">
  153. <img src="../static/offImg/downLoad.png" alt="" @click="download" />
  154. </div>
  155. <div class="prompt" v-show='showD'>
  156.         <img src="../static/offImg/zhiyin_pic.png" alt="">
  157. </div>
  158. </div>
  159. <script type="text/javascript" src="https://res.wx.qq.com/open/js/jweixin-1.2.0.js"></script>
  160. <script src="../static/js/vender/vue/axios.min.js"></script>
  161. <script src="../static/js/vender/vue/config.js"></script>
  162. <script src="../static/js/vender/vue/api.js"></script>
  163. <script type="text/javascript">
  164. new Vue({
  165. el: '#app',
  166. data: {
  167. isshow: false,
  168. id: GetRequest().id ? GetRequest().id : 404,
  169. topic: {},
  170. showD: false,
  171. },
  172. created() {
  173. // window.location.href = 'investigate.html'
  174. },
  175. mounted() {
  176. this.getList()
  177. },
  178. methods: {
  179. download() {
  180. var u = navigator.userAgent,
  181. app = navigator.appVersion;
  182. var isAndroid = u.indexOf('Android') > -1 || u.indexOf('Linux') > -1; //g
  183. var isIOS = !!u.match(/\(i[^;]+;( U;)? CPU.+Mac OS X/); //ios终端
  184. if (isAndroid) {
  185. this.getBrowser()
  186. } else if (isIOS) {
  187. window.location.href = 'https://www.pgyer.com/gemini6';
  188. } else {}
  189. },
  190. getBrowser() {
  191. var ua = navigator.userAgent.toLowerCase();
  192. if (ua.match(/MicroMessenger/i) == "micromessenger" || ua.match(/QQ\/[0-9]/i)) {
  193. this.showD = true;
  194. return;
  195. } else {
  196. if(window.location.href.includes('prese.phone.androidscloud.com')){
  197. window.location.href = 'http://14.18.190.144:18888/admin/attachment/download/2117e9b7f3734b16b81b9d7bb1c5a601'
  198. } else {
  199. window.location.href ='http://www.androidscloud.com/admin/attachment/download/2117e9b7f3734b16b81b9d7bb1c5a601';
  200. }
  201. }
  202. },
  203. getList() {
  204. this.$toast.loading({
  205. duration: 0,
  206. message: '加载中...',
  207. forbidClick: true,
  208. loadingType: 'spinner',
  209. });
  210. getEvantDetails(this.id).then(res => {
  211. this.$toast.clear();
  212. console.log(res);
  213. if (res.status == 0) {
  214. if (res.data) {
  215. this.isshow = false;
  216. this.topic = res.data;
  217. } else {
  218. this.isshow = true;
  219. }
  220. } else {
  221. }
  222. }).catch((error) => {
  223. console.log(error)
  224. this.$toast('网络异常');
  225. });
  226. }
  227. }
  228. })
  229. </script>
  230. </body>
  231. </html>