Authored by shuaiguo

feat: 资源位跳转根据查询参数isNeedLogin='1' 判断是否登录

... ... @@ -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
... ...
{
"name": "xianyu-ufo-app-web",
"version": "0.0.1-RELEASE",
"version": "0.0.2-beta-1",
"private": true,
"description": "Xianyu Project With Express",
"repository": {
... ...