...
|
...
|
@@ -5,6 +5,9 @@ |
|
|
</template>
|
|
|
|
|
|
<script>
|
|
|
import { mapGetters } from 'vuex';
|
|
|
import queryString from 'querystring'
|
|
|
|
|
|
export default {
|
|
|
name: 'LayoutLink',
|
|
|
props: {
|
...
|
...
|
@@ -14,6 +17,9 @@ export default { |
|
|
},
|
|
|
reportEvent: String,
|
|
|
},
|
|
|
computed: {
|
|
|
...mapGetters(['getLogin'])
|
|
|
},
|
|
|
watch: {
|
|
|
report: function(newVal) {
|
|
|
},
|
...
|
...
|
@@ -24,6 +30,13 @@ export default { |
|
|
if (!this.href) {
|
|
|
return;
|
|
|
}
|
|
|
// 资源位跳转 领券等需判断是否登录
|
|
|
// 判断条件为查询参数 isNeedLogin
|
|
|
const qsParams = queryString.parse(this.href.split('?')[1]);
|
|
|
if(!this.getLogin && +qsParams.isNeedLogin === 1) {
|
|
|
this.$yoho.auth();
|
|
|
return;
|
|
|
}
|
|
|
|
|
|
this.$xianyu.goXianyuNewPage({
|
|
|
url: this.href
|
...
|
...
|
|