Commit 369d2aa8 authored by 何毅恒's avatar 何毅恒

分享优化

parent 91959458
......@@ -3,13 +3,19 @@
<h2>{{ informationDetail.title }}</h2>
<div class="downBox">
<span>{{ formatDate(informationDetail.add_time) }}</span>
<!-- <a
v-if="informationDetail.is_down"
<a
v-if="informationDetail.is_down && downType == 1"
:href="imgUrl + informationDetail.pdf_url"
:download="informationDetail.title"
>点击下载</a
> -->
<div class="downLoadBtn" @click="downLoad">点击下载</div>
>
<div
class="downLoadBtn"
v-if="informationDetail.is_down && downType == 0"
@click="downLoad"
>
点击下载
</div>
</div>
<p v-html="informationDetail.content"></p>
</div>
......@@ -40,7 +46,21 @@ onMounted(() => {
script.type = "text/javascript";
script.src = "https://res.wx.qq.com/open/js/jweixin-1.3.2.js";
document.body.appendChild(script);
//微信环境下
if (globalProperties.$wx.isWeixin()) {
wx.miniProgram.getEnv(function (res) {
if (res.miniprogram) {
// 小程序环境下逻辑
downType.value = 0;
} else {
//非小程序环境下逻辑
downType.value = 1;
}
});
}
});
let downType: any = ref(0);
let id = route.currentRoute.value.query.id;
let informationDetail: any = ref();
const getInformationDetail = async (id) => {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment