Toggle navigation
Toggle navigation
This project
Loading...
Sign in
fe
/
xianyu-ufo-app-web
·
Commits
Go to a project
GitLab
Go to group
Project
Activity
Files
Commits
Pipelines
0
Builds
0
Graphs
Milestones
Issues
0
Merge Requests
0
Members
Labels
Wiki
Forks
Network
Create a new issue
Download as
Email Patches
Plain Diff
Browse Files
Authored by
shuaiguo
5 years ago
Commit
16f58ca626bf1e926c5ebd1600f4e356bd28577f
1 parent
af4f2d72
feat: 资源位跳转根据查询参数isNeedLogin='1' 判断是否登录
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
14 additions
and
1 deletions
apps/components/layout/layout-link.vue
package.json
apps/components/layout/layout-link.vue
View file @
16f58ca
...
...
@@ -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
...
...
package.json
View file @
16f58ca
{
"name"
:
"xianyu-ufo-app-web"
,
"version"
:
"0.0.
1-RELEASE
"
,
"version"
:
"0.0.
2-beta-1
"
,
"private"
:
true
,
"description"
:
"Xianyu Project With Express"
,
"repository"
:
{
...
...
Please
register
or
login
to post a comment