Skip to content

Commit

Permalink
Style(word): pv -> pageviews
Browse files Browse the repository at this point in the history
  • Loading branch information
Armour committed Jun 3, 2019
1 parent b0f48f8 commit dbaa022
Show file tree
Hide file tree
Showing 6 changed files with 23 additions and 23 deletions.
12 changes: 6 additions & 6 deletions mock/article.ts
Original file line number Diff line number Diff line change
Expand Up @@ -75,17 +75,17 @@ export default [
},

{
url: '/article/pv',
url: '/article/pageviews',
type: 'get',
response: (_: any) => {
return {
code: 20000,
data: {
pvData: [
{ key: 'PC', pv: 1024 },
{ key: 'mobile', pv: 1024 },
{ key: 'ios', pv: 1024 },
{ key: 'android', pv: 1024 }
pageviewsData: [
{ key: 'PC', pageviews: 1024 },
{ key: 'mobile', pageviews: 1024 },
{ key: 'ios', pageviews: 1024 },
{ key: 'android', pageviews: 1024 }
]
}
}
Expand Down
4 changes: 2 additions & 2 deletions mock/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4,13 +4,13 @@ import { param2Obj } from '@/utils'
import user from './user'
import role from './role'
import article from './article'
import remoteSearch from './remote-serach'
import search from './remote-serach'

const mocks = [
...user,
...role,
...article,
...remoteSearch
...search
]

// For frontend mock
Expand Down
Binary file modified public/favicon.ico
Binary file not shown.
2 changes: 1 addition & 1 deletion public/manifest.json
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,6 @@
],
"start_url": "./index.html",
"display": "standalone",
"background_color": "#000000",
"background_color": "#fff",
"theme_color": "#4DBA87"
}
6 changes: 3 additions & 3 deletions src/api/article.ts
Original file line number Diff line number Diff line change
Expand Up @@ -50,11 +50,11 @@ export const fetchArticleDetail = (id: string) =>
params: { id }
})

export const fetchPageviews = (pv: string) =>
export const fetchPageviews = (pageviews: string) =>
request({
url: '/article/pv',
url: '/article/pageviews',
method: 'get',
params: { pv }
params: { pageviews }
})

export const createArticle = (data: any) =>
Expand Down
22 changes: 11 additions & 11 deletions src/views/table/complex-table.vue
Original file line number Diff line number Diff line change
Expand Up @@ -328,11 +328,11 @@
</el-dialog>

<el-dialog
:visible.sync="dialogPvVisible"
:visible.sync="dialogPageviewsVisible"
title="Reading statistics"
>
<el-table
:data="pvData"
:data="pageviewsData"
border
fit
highlight-current-row
Expand All @@ -343,8 +343,8 @@
label="Channel"
/>
<el-table-column
prop="pv"
label="Pv"
prop="pageviews"
label="Pageviews"
/>
</el-table>
<span
Expand All @@ -353,7 +353,7 @@
>
<el-button
type="primary"
@click="dialogPvVisible = false"
@click="dialogPageviewsVisible = false"
>{{ $t('table.confirm') }}</el-button>
</span>
</el-dialog>
Expand Down Expand Up @@ -422,8 +422,8 @@ export default class ComplexTable extends Vue {
update: 'Edit',
create: 'Create'
}
private dialogPvVisible = false
private pvData = []
private dialogPageviewsVisible = false
private pageviewsData = []
private rules = {
type: [{ required: true, message: 'type is required', trigger: 'change' }],
timestamp: [{ type: 'number', required: true, message: 'timestamp is required', trigger: 'change' }],
Expand Down Expand Up @@ -556,10 +556,10 @@ export default class ComplexTable extends Vue {
this.list.splice(index, 1)
}
private handlefetchPageviews(pv: string) {
fetchPageviews(pv).then(response => {
this.pvData = response.data.pvData
this.dialogPvVisible = true
private handlefetchPageviews(Pageviews: string) {
fetchPageviews(Pageviews).then(response => {
this.pageviewsData = response.data.pageviewsData
this.dialogPageviewsVisible = true
})
}
Expand Down

0 comments on commit dbaa022

Please sign in to comment.