Skip to content

Commit

Permalink
Merge 1f86590 into e6cb1d3
Browse files Browse the repository at this point in the history
  • Loading branch information
haixiangyan committed Apr 26, 2020
2 parents e6cb1d3 + 1f86590 commit dc1edbe
Show file tree
Hide file tree
Showing 4 changed files with 14 additions and 5 deletions.
7 changes: 7 additions & 0 deletions mocks/routes/auth.ts
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,13 @@ AuthRouter.post('/login', (req, res) => {
}))
})

// 更新 token
AuthRouter.post('/refresh', (req, res) => {
res.json(Mock.mock({
token: '@ID'
}))
})

// 激活
AuthRouter.post('/activate', (req, res) => {
res.json(Mock.mock({
Expand Down
2 changes: 1 addition & 1 deletion nuxt.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -84,7 +84,7 @@ module.exports = {
strategies: {
local: {
endpoints: {
login: {url: '/auth/login', method: 'post', propertyName: 'token'},
login: {url: '/auth/login', method: 'post', propertyName: 'accessToken'},
logout: false,
user: {url: '/users', method: 'get', propertyName: false}
},
Expand Down
2 changes: 1 addition & 1 deletion pages/my/refer-list.vue
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@
</el-table-column>
<el-table-column prop="source" label="原贴">
<template slot-scope="scope">
<el-link :href="scope.row.source">
<el-link v-if="scope.row.job.source" :href="scope.row.job.source">
原贴
<i class="el-icon-top-right"></i>
</el-link>
Expand Down
8 changes: 5 additions & 3 deletions pages/user/index.vue
Original file line number Diff line number Diff line change
Expand Up @@ -15,9 +15,11 @@
</div>
<div v-if="job" class="job-link">
<span>内推链接: </span>
<el-link type="primary" :href="`/refer/apply/${job.jobId}`">
{{jobLink}}
</el-link>
<nuxt-link :to="`/refer/apply/${job.jobId}`" tag="span">
<el-link type="primary">
{{jobLink}}
</el-link>
</nuxt-link>
<el-tooltip effect="dark" :content="copyText" placement="bottom">
<i v-clipboard:copy="jobLink" v-clipboard:success="() => copyText = '已复制'"
class="el-icon-document-copy"/>
Expand Down

0 comments on commit dc1edbe

Please sign in to comment.