diff --git a/src/view/Learning.vue b/src/view/Learning.vue index d0b1d94..25e4808 100644 --- a/src/view/Learning.vue +++ b/src/view/Learning.vue @@ -28,7 +28,7 @@ @@ -53,10 +53,10 @@ search: { current: 1, size: 10, - isFavorite: 0, categoryId: '' }, - cateList: [] + cateList: [], + isFavorite: 0 } }, @@ -72,13 +72,20 @@ onChange (e) { if (e === 'isFavorite') { - this.search.isFavorite = 1 + this.$http.post('/api/learning/favoritePage', null, { + params: { + ...this.search + } + }).then(res => { + if (res.code === 0) { + this.tableData = res.data.records + this.total = res.data.total + } + }) } else { - this.search.isFavorite = 0 + this.search.current = 1 + this.getList() } - - this.search.current = 1 - this.getList() }, collection (id, isFavorite) { @@ -108,8 +115,7 @@ getList () { this.$http.post('/api/learning/pluginPage', null, { params: { - ...this.search, - categoryId: this.search.isFavorite === 1 ? '' : this.search.categoryId + ...this.search } }).then(res => { if (res.code === 0) { diff --git a/src/view/Welcome.vue b/src/view/Welcome.vue index d9c793d..c154420 100644 --- a/src/view/Welcome.vue +++ b/src/view/Welcome.vue @@ -167,7 +167,7 @@ margin-bottom: 14px; color: #333; font-size: 15px; - text-indent: 2em; + white-space: pre-line; } } diff --git a/src/view/login/Login.vue b/src/view/login/Login.vue index 95691c9..9fd4e3e 100644 --- a/src/view/login/Login.vue +++ b/src/view/login/Login.vue @@ -65,9 +65,13 @@ this.$refs.form.validate((valid) => { if (valid) { 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, { params: { - ...this.form + ...this.form, + version }, headers: { Authorization: 'Basic YXBwOmFwcA=='