|
|
@@ -1,5 +1,19 @@
|
|
|
<template>
|
|
|
<div class="news newsB">
|
|
|
+ <van-sticky>
|
|
|
+ <van-notice-bar
|
|
|
+ text="RAEX宇宙,立即下载"
|
|
|
+ @click="download"
|
|
|
+ background="#3ab20010"
|
|
|
+ color="#3ab200"
|
|
|
+ mode="link"
|
|
|
+ v-if="!inApp && isShare"
|
|
|
+ >
|
|
|
+ <template #left-icon>
|
|
|
+ <img class="app-icon" src="@assets/raex_icon.png" alt="" />
|
|
|
+ </template>
|
|
|
+ </van-notice-bar>
|
|
|
+ </van-sticky>
|
|
|
<div class="detail" v-html="info.detail"></div>
|
|
|
<div class="news-btn" v-if="info.link">
|
|
|
<van-button round block type="primary" @click="goNext(info)">{{ info.buttonName }}</van-button>
|
|
|
@@ -31,24 +45,33 @@
|
|
|
<script>
|
|
|
import banner from '../../mixins/banner';
|
|
|
import resolveUrl from 'resolve-url';
|
|
|
+let inApp = /#cordova#/i.test(navigator.userAgent);
|
|
|
export default {
|
|
|
data() {
|
|
|
return {
|
|
|
- info: {}
|
|
|
+ info: {},
|
|
|
+ inApp,
|
|
|
+ isShare: false
|
|
|
};
|
|
|
},
|
|
|
mixins: [banner],
|
|
|
mounted() {
|
|
|
this.getDetail();
|
|
|
+ if (this.$route.query.share === 'true' || this.$route.query.share === true) {
|
|
|
+ this.isShare = true;
|
|
|
+ }
|
|
|
},
|
|
|
computed: {
|
|
|
shareText() {
|
|
|
- return `『绿洲新闻』${resolveUrl(this.$baseUrl, '9th/newsDetail?id=' + this.info.id)}「${
|
|
|
+ return `『绿洲新闻』${resolveUrl(this.$baseUrl, '9th/newsDetail?id=' + this.info.id + '&share=true')}「${
|
|
|
this.info.title
|
|
|
}」`;
|
|
|
}
|
|
|
},
|
|
|
methods: {
|
|
|
+ download() {
|
|
|
+ window.location.href = 'https://www.raex.vip/static/download_raex.html';
|
|
|
+ },
|
|
|
getDetail(str = '') {
|
|
|
if (str) {
|
|
|
this.$toast.success(str);
|
|
|
@@ -169,4 +192,13 @@ export default {
|
|
|
width: 50%;
|
|
|
}
|
|
|
}
|
|
|
+
|
|
|
+.app-icon {
|
|
|
+ width: 30px;
|
|
|
+ height: 30px;
|
|
|
+}
|
|
|
+
|
|
|
+/deep/.van-notice-bar__content {
|
|
|
+ padding-left: 16px;
|
|
|
+}
|
|
|
</style>
|