123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303 |
- <!DOCTYPE html>
- <html lang="zh-CN">
- <head>
- <meta charset="UTF-8">
- <meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=0">
- <meta name="description" content="分享文章">
- <link rel="icon" href="../static/img/favicon2.ico" type="img/x-ico">
- <link rel="stylesheet" href="../static/css/index.css?v=1.0.0.1">
- <link rel="stylesheet" href="../static/css/vant.css" />
- <script src="../static/js/vender/vue/vue.min.js"></script>
- <script src="../static/js/vender/vue/vant.min.js"></script>
- <script src="../static/js/vender/config.js"></script>
- <title>分享文章</title>
- <style>
- .container {
- display: flex;
- height: 100vh;
- /* align-items: center;
- justify-content: center; */
- }
- .footer {
- position: fixed;
- bottom: 0rem;
- height: 1.36rem;
- padding: 0 1.14rem;
- width: 100%;
- display: flex;
- justify-content: center;
- left: 0;
- }
- .footer img {
- width: 5.22rem;
- height: 100%;
- }
- .hideContainer {
- width: 7.5rem;
- display: flex;
- justify-content: center;
- align-items: center;
- height: calc(100vh - 1.36rem);
- text-align: center;
- margin: 0 auto;
- }
- .hideContainer img {
- width: 2.8rem;
- height: 2.8rem;
- }
- .hideContainer p {
- font-size: 0.28rem;
- margin-top: 0.3rem;
- font-family: PingFangSC-Regular, PingFang SC;
- color: #999999;
- }
- .top-content {
- width: 7.5rem;
- margin: 0 auto;
- padding: 0.2rem 0.3rem;
- }
- .top-content .title {
- font-size: 0.44rem;
- font-family: PingFangSC-Medium, PingFang SC;
- color: #000000;
- letter-spacing: 0.01rem;
- margin-bottom: 0.2rem;
- }
- .topic-info {
- padding-bottom: 1.6rem;
- display: none;
- }
- .line {
- width: 100%;
- height: 0.02rem;
- background: #D8D8D8;
- margin-bottom: 0.2rem;
- }
- .createTime {
- font-size: 0.28rem;
- font-family: PingFangSC-Regular, PingFang SC;
- font-weight: 400;
- color: #999999;
- margin-bottom: 0.2rem;
- }
- .topic-info img {
- max-width: 100%;
- width: auto;
- height: auto;
- border-radius: 0.2rem;
- margin-bottom: 0.2rem;
- margin-top: 0.2rem;
- }
- .topic-info {
- font-size: 0.32rem;
- letter-spacing: 0.02rem;
- font-family: PingFangSC-Regular, PingFang SC;
- color: #333333;
- }
- .topic-info p {
- font-size: 0.36rem;
- font-family: PingFangSC-Regular, PingFang SC;
- font-weight: 400;
- color: #333333;
- letter-spacing: 0.02rem;
- }
- h1,
- h2,
- h3,
- h4,
- h5 {
- font-size: 0.32rem;
- font-family: PingFangSC-Semibold, PingFang SC;
- font-weight: 600;
- color: #333333;
- /* margin-bottom: 0.12rem;
- margin-top: 0.12rem; */
- }
- .hide {
- display: none !important;
- }
- .prompt {
- position: fixed;
- top: 0;
- left: 0;
- bottom: 0;
- right: 0;
- width: 100%;
- height: 100%;
- background: rgba(0, 0, 0, 0.5);
- /* display: none; */
- }
- .prompt img {
- width: 200px;
- position: absolute;
- right: 15px;
- top: 6px;
- }
- </style>
- </head>
- <body>
- <div id="app" v-cloak class="container">
- <div v-if='isshow' class="hideContainer">
- <div>
- <img src="../static/offImg/404.png" alt="" />
- <p>该资讯已被删除</p>
- </div>
- </div>
- <div class="top-content" v-if='!isshow&&topic.content'>
- <p class="hide">分享文章</p>
- <p class="title">{{topic.title}}</p>
- <p class="createTime"> 发布日期:{{topic.createTime}}</p>
- <p class="line"></p>
- <div v-html="topic.content" class="topic-info" id="topic-info"></div>
- </div>
- <div class="footer">
- <img src="../static/offImg/downLoad.png" alt="" @click="download" />
- </div>
- <div class="prompt" v-show='showD'>
- <img src="../static/offImg/zhiyin_pic.png" alt="">
- </div>
- </div>
- <script type="text/javascript" src="https://res.wx.qq.com/open/js/jweixin-1.2.0.js"></script>
- <script src="../static/js/vender/vue/axios.min.js"></script>
- <script src="../static/js/vender/vue/config.js"></script>
- <script src="../static/js/vender/vue/api.js"></script>
- <script type="text/javascript">
- new Vue({
- el: '#app',
- data: {
- isshow: false,
- id: GetRequest().id ? GetRequest().id : 404,
- topic: {},
- showD: false,
- },
- created() {
- // window.location.href = 'investigate.html'
- },
- mounted() {
- this.getList()
- },
- methods: {
- download() {
- var u = navigator.userAgent,
- app = navigator.appVersion;
- var isAndroid = u.indexOf('Android') > -1 || u.indexOf('Linux') > -1; //g
- var isIOS = !!u.match(/\(i[^;]+;( U;)? CPU.+Mac OS X/); //ios终端
- if (isAndroid) {
- this.getBrowser()
- } else if (isIOS) {
- window.location.href = 'https://www.pgyer.com/gemini6';
- } else {}
- },
- getBrowser() {
- var ua = navigator.userAgent.toLowerCase();
- if (ua.match(/MicroMessenger/i) == "micromessenger" || ua.match(/QQ\/[0-9]/i)) {
- this.showD = true;
- return;
- } else {
- if(window.location.href.includes('prese.phone.androidscloud.com')){
- window.location.href = 'http://14.18.190.144:18888/admin/attachment/download/2117e9b7f3734b16b81b9d7bb1c5a601'
- } else {
- window.location.href ='http://www.androidscloud.com/admin/attachment/download/2117e9b7f3734b16b81b9d7bb1c5a601';
- }
- }
- },
- getList() {
- this.$toast.loading({
- duration: 0,
- message: '加载中...',
- forbidClick: true,
- loadingType: 'spinner',
- });
- getEvantDetails(this.id).then(res => {
- this.$toast.clear();
- console.log(res);
- if (res.status == 0) {
- if (res.data) {
- this.isshow = false;
- this.topic = res.data;
- var u = navigator.userAgent,
- app = navigator.appVersion;
- var isAndroid = u.indexOf('Android') > -1 || u.indexOf('Linux') > -1; //g
- var isIOS = !!u.match(/\(i[^;]+;( U;)? CPU.+Mac OS X/); //ios终端
- // if (isAndroid && !window.native) {
- setTimeout(() => {
- let node = document.getElementById('topic-info');
- let span = document.getElementsByTagName('span');
- node.firstChild.style.backgroundColor = '#FFFFFF';
- node.style.display = 'block';
- for(var o in span){
- if(span[o].style){
- span[o].style.color = '#333333';
- }
- }
- },100)
- // }
- if (isAndroid && !window.native) {
- setTimeout(() => {
- let node = document.getElementById('topic-info');
- node.firstChild.style.backgroundColor = '#FFFFFF';
- node.style.display = 'block';
- },100)
- }
- if(isIOS) {
- try {
- window.webkit.messageHandlers.share.postMessage();
- } catch(error) {
- setTimeout(() => {
- let node = document.getElementById('topic-info');
- let span = document.getElementsByTagName('span');
- node.firstChild.style.backgroundColor = '#FFFFFF';
- node.style.display = 'block';
- for(var o in span){
- if(span[o].style){
- span[o].style.color = '#333333';
- }
- }
- },100)
- }
- }
- } else {
- this.isshow = true;
- }
- } else {
- }
- }).catch((error) => {
- console.log(error)
- this.$toast('网络异常');
- });
- }
- }
- })
- </script>
- </body>
- </html>
|