bug
This commit is contained in:
@@ -28,7 +28,7 @@
|
|||||||
<el-table-column slot="options" label="操作" align="center" fixed="right" width="140px">
|
<el-table-column slot="options" label="操作" align="center" fixed="right" width="140px">
|
||||||
<template v-slot="{ row }">
|
<template v-slot="{ row }">
|
||||||
<div class="table-options">
|
<div class="table-options">
|
||||||
<el-button type="text" @click="collection(row.id, row.isFavorite)">{{ row.isFavorite === '0' ? '收藏' : '已收藏' }}</el-button>
|
<el-button type="text" @click="collection(row.id, row.isFavorite)">{{ row.isFavorite === '0' ? '收藏' : '取消收藏' }}</el-button>
|
||||||
<el-button type="text" @click="toDetail(row.url)">详情</el-button>
|
<el-button type="text" @click="toDetail(row.url)">详情</el-button>
|
||||||
</div>
|
</div>
|
||||||
</template>
|
</template>
|
||||||
@@ -53,10 +53,10 @@
|
|||||||
search: {
|
search: {
|
||||||
current: 1,
|
current: 1,
|
||||||
size: 10,
|
size: 10,
|
||||||
isFavorite: 0,
|
|
||||||
categoryId: ''
|
categoryId: ''
|
||||||
},
|
},
|
||||||
cateList: []
|
cateList: [],
|
||||||
|
isFavorite: 0
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
|
||||||
@@ -72,13 +72,20 @@
|
|||||||
|
|
||||||
onChange (e) {
|
onChange (e) {
|
||||||
if (e === 'isFavorite') {
|
if (e === 'isFavorite') {
|
||||||
this.search.isFavorite = 1
|
this.$http.post('/api/learning/favoritePage', null, {
|
||||||
} else {
|
params: {
|
||||||
this.search.isFavorite = 0
|
...this.search
|
||||||
}
|
}
|
||||||
|
}).then(res => {
|
||||||
|
if (res.code === 0) {
|
||||||
|
this.tableData = res.data.records
|
||||||
|
this.total = res.data.total
|
||||||
|
}
|
||||||
|
})
|
||||||
|
} else {
|
||||||
this.search.current = 1
|
this.search.current = 1
|
||||||
this.getList()
|
this.getList()
|
||||||
|
}
|
||||||
},
|
},
|
||||||
|
|
||||||
collection (id, isFavorite) {
|
collection (id, isFavorite) {
|
||||||
@@ -108,8 +115,7 @@
|
|||||||
getList () {
|
getList () {
|
||||||
this.$http.post('/api/learning/pluginPage', null, {
|
this.$http.post('/api/learning/pluginPage', null, {
|
||||||
params: {
|
params: {
|
||||||
...this.search,
|
...this.search
|
||||||
categoryId: this.search.isFavorite === 1 ? '' : this.search.categoryId
|
|
||||||
}
|
}
|
||||||
}).then(res => {
|
}).then(res => {
|
||||||
if (res.code === 0) {
|
if (res.code === 0) {
|
||||||
|
|||||||
@@ -167,7 +167,7 @@
|
|||||||
margin-bottom: 14px;
|
margin-bottom: 14px;
|
||||||
color: #333;
|
color: #333;
|
||||||
font-size: 15px;
|
font-size: 15px;
|
||||||
text-indent: 2em;
|
white-space: pre-line;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -65,9 +65,13 @@
|
|||||||
this.$refs.form.validate((valid) => {
|
this.$refs.form.validate((valid) => {
|
||||||
if (valid) {
|
if (valid) {
|
||||||
this.btnLoading = true
|
this.btnLoading = true
|
||||||
|
const devVersion = require('../../manifest.development.json').version
|
||||||
|
const prodVersion = require('../../manifest.production.json').version
|
||||||
|
const version = process.env.NODE_ENV === 'production' ? prodVersion : devVersion
|
||||||
this.$http.post(`/api/mobile/token`, this.form, {
|
this.$http.post(`/api/mobile/token`, this.form, {
|
||||||
params: {
|
params: {
|
||||||
...this.form
|
...this.form,
|
||||||
|
version
|
||||||
},
|
},
|
||||||
headers: {
|
headers: {
|
||||||
Authorization: 'Basic YXBwOmFwcA=='
|
Authorization: 'Basic YXBwOmFwcA=='
|
||||||
|
|||||||
Reference in New Issue
Block a user