Commit b6aaac47 by 梁建民

js

parent 6767420a
...@@ -22,15 +22,20 @@ ...@@ -22,15 +22,20 @@
<p class="t1">{{item.title}}</p> <p class="t1">{{item.title}}</p>
<div class="bar"> <div class="bar">
<p class="t2">已下载{{item.download_num}}次</p> <p class="t2">已下载{{item.download_num}}次</p>
<a class="btn" @click="download(item.data_id)">下载</a> <template v-if="loginCheck">
<a class="btn" @click="download(item.data_id)">下载</a>
</template>
<template>
<a class="btn" @click="toUrl">下载</a>
</template>
</div> </div>
</li> </li>
</ul> </ul>
</div> </div>
<template v-if="articleShowData.length <= 3"> <template v-if="!loginCheck">
<div class="islogin" @click="toUrl"> <div class="islogin" @click="toUrl">
<img src="../../assets/images/download/loading.png" alt=""> <img src="../../assets/images/download/loading.png" alt="">
<a href="javascript:;">点击登录查看更多 ></a> <a href="javascript:;">登录查看更多哦</a>
</div> </div>
</template> </template>
<div class="slide-bar" v-backTopWindow style="cursor: pointer;"> <div class="slide-bar" v-backTopWindow style="cursor: pointer;">
...@@ -63,7 +68,8 @@ ...@@ -63,7 +68,8 @@
computed: { computed: {
...mapState({ ...mapState({
getfileuploadbanner: state => state.download.getfileuploadbanner, getfileuploadbanner: state => state.download.getfileuploadbanner,
articleShowData: state => state.download.articleShowData articleShowData: state => state.download.articleShowData,
loginCheck: state => state.common.loginCheck
}) })
}, },
created() { created() {
...@@ -80,6 +86,10 @@ ...@@ -80,6 +86,10 @@
this.$store.dispatch({ this.$store.dispatch({
type: "articleShowData" type: "articleShowData"
}); });
this.$store.dispatch({
type: "loginCheck",
is_jump: false
});
}, },
download(id) { download(id) {
this.$store.dispatch({ this.$store.dispatch({
...@@ -94,7 +104,7 @@ ...@@ -94,7 +104,7 @@
}); });
setTimeout(() => { setTimeout(() => {
window.location.href = '/v3/login?from=download' window.location.href = '/v3/login?referer=%2fh5%2fview%2f%23%2fdownoad&from=download'
}, 2000) }, 2000)
}, },
......
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 sign in to comment