share.html 6.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288
  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. position: absolute;
  131. right: 15px;
  132. top: 6px;
  133. }
  134. </style>
  135. </head>
  136. <body>
  137. <div id="app" v-cloak class="container">
  138. <div v-if='isshow' class="hideContainer">
  139. <div>
  140. <img src="../static/offImg/404.png" alt="" />
  141. <p>该资讯已被删除</p>
  142. </div>
  143. </div>
  144. <div class="top-content" v-if='!isshow&&topic.content'>
  145. <p class="hide">分享文章</p>
  146. <p class="title">{{topic.title}}</p>
  147. <p class="createTime"> 发布日期:{{topic.createTime}}</p>
  148. <p class="line"></p>
  149. <div v-html="topic.content" class="topic-info"></div>
  150. </div>
  151. <div class="footer">
  152. <img src="../static/offImg/downLoad.png" alt="" @click="download" />
  153. </div>
  154. <div class="prompt" v-show='showD'>
  155.         <img src="../static/offImg/zhiyin_pic.png" alt="">
  156. </div>
  157. </div>
  158. <script type="text/javascript" src="https://res.wx.qq.com/open/js/jweixin-1.2.0.js"></script>
  159. <script src="../static/js/vender/vue/axios.min.js"></script>
  160. <script src="../static/js/vender/vue/config.js"></script>
  161. <script src="../static/js/vender/vue/api.js"></script>
  162. <script type="text/javascript">
  163. new Vue({
  164. el: '#app',
  165. data: {
  166. isshow: false,
  167. id: GetRequest().id ? GetRequest().id : 404,
  168. topic: {},
  169. showD: false,
  170. },
  171. created() {
  172. // window.location.href = 'investigate.html'
  173. },
  174. mounted() {
  175. console.log(1111);
  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. },
  191. getBrowser() {
  192. var browser = {
  193. versions: function () {
  194. var u = navigator.userAgent,
  195. app = navigator.appVersion;
  196. return {
  197. trident: u.indexOf('Trident') > -1, //IE内核
  198. presto: u.indexOf('Presto') > -1, //opera内核
  199. webKit: u.indexOf('AppleWebKit') > -1, //苹果、谷歌内核
  200. gecko: u.indexOf('Gecko') > -1 && u.indexOf('KHTML') == -1, //火狐内核
  201. mobile: !!u.match(/AppleWebKit.*Mobile.*/), //是否为移动终端
  202. ios: !!u.match(/\(i[^;]+;( U;)? CPU.+Mac OS X/), //ios终端
  203. android: u.indexOf('Android') > -1 || u.indexOf('Adr') > -1, //android终端
  204. iPhone: u.indexOf('iPhone') > -1, //是否为iPhone或者QQHD浏览器
  205. iPad: u.indexOf('iPad') > -1, //是否iPad
  206. webApp: u.indexOf('Safari') == -1, //是否web应该程序,没有头部与底部
  207. weixin: u.indexOf('MicroMessenger') > -1, //是否微信 (2015-01-22新增)
  208. qq: u.match(/QQ/i) == "qq" //是否QQ
  209. };
  210. }(),
  211. language: (navigator.browserLanguage || navigator.language).toLowerCase()
  212. }
  213. if (browser.versions.weixin || navigator.userAgent.toLowerCase().toString().indexOf('qqbrowser') >-1) { //qq 微信
  214. this.showD = true;
  215. return;
  216. }else{
  217. window.location.href ='http://www.androidscloud.com/admin/attachment/download/2117e9b7f3734b16b81b9d7bb1c5a601';
  218. }
  219. },
  220. getList() {
  221. this.$toast.loading({
  222. duration: 0,
  223. message: '加载中...',
  224. forbidClick: true,
  225. loadingType: 'spinner',
  226. });
  227. getEvantDetails(this.id).then(res => {
  228. this.$toast.clear();
  229. console.log(res);
  230. if (res.status == 0) {
  231. if (res.data) {
  232. this.isshow = false;
  233. this.topic = res.data;
  234. } else {
  235. this.isshow = true;
  236. }
  237. } else {
  238. }
  239. }).catch((error) => {
  240. console.log(error)
  241. this.$toast('网络异常');
  242. });
  243. }
  244. }
  245. })
  246. </script>
  247. </body>
  248. </html>