j
This commit is contained in:
1 parent
1710369239
commit
f7bc7f9fde
3 files changed
+40
-10
No files matched your search
@@ -54,10 +54,12 @@
|
||||
{{limitText(x.text)}}
|
||||
</v-card-text>
|
||||
<v-card-actions>
|
||||
<!-- :to="'/news'" -->
|
||||
<v-btn
|
||||
color="#3E8890"
|
||||
variant="text"
|
||||
:to="'/news'"
|
||||
:to="'/news?id=2'"
|
||||
|
||||
>
|
||||
Подробнее
|
||||
</v-btn>
|
||||
@@ -210,9 +212,9 @@
|
||||
|
||||
|
||||
</v-card>
|
||||
|
||||
|
||||
<v-pagination
|
||||
<div v-show="pages=='news'">
|
||||
<my-helper :pretext = 'newss'/>
|
||||
<v-pagination
|
||||
v-model="page"
|
||||
:length="newss.allnews"
|
||||
prev-icon="mdi-menu-left"
|
||||
@@ -225,6 +227,9 @@
|
||||
variant="outlined"
|
||||
:items="['1', '2', '3', '4', '5', '6']"
|
||||
></v-select>
|
||||
</div>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
@@ -277,14 +282,14 @@
|
||||
|
||||
<script>
|
||||
|
||||
import { ref, watch, onBeforeUpdate } from 'vue'
|
||||
import { ref, watch, onBeforeUpdate, onMounted } from 'vue'
|
||||
import {useAccountStore} from '@/store/AccountStore'
|
||||
import {getfromserver} from '@/utils/universal_functions'
|
||||
import { baseURL } from '@/utils/axios-api'
|
||||
import myHelper from './UI/my-helper.vue'
|
||||
import { axiosApiInstance } from '@/utils/axios-api'
|
||||
import { format } from 'date-fns'
|
||||
|
||||
import { useRoute } from 'vue-router'
|
||||
|
||||
const accountStore = useAccountStore()
|
||||
|
||||
@@ -311,6 +316,14 @@ export default {
|
||||
const page = ref(1)
|
||||
const selecnews = ref(2)
|
||||
|
||||
const route = useRoute()
|
||||
|
||||
// onMounted(() => {
|
||||
// // console.log('ssss') ${route.query.id}
|
||||
// getfromserver(`api/navigation/news/?name=${props.pages}&page=${page.value-1}&selected=${selecnews.value}&id=2`)
|
||||
|
||||
// })
|
||||
|
||||
const toggleIncrementLike = (news, scores) => {
|
||||
axiosApiInstance.post(`api/navigation/news/`, {news: news, scores: scores}).then(result => {
|
||||
newss.value.result[newss.value.result.findIndex(e=> e.id==news)].scores= result.data
|
||||
@@ -360,6 +373,11 @@ export default {
|
||||
idnews.value = news
|
||||
}
|
||||
|
||||
const oneNews = (id) => {
|
||||
console.log(id);
|
||||
// getfromserver(`api/navigation/news/?name=${props.pages}&id=${id}`)
|
||||
}
|
||||
|
||||
|
||||
const limitText=(text)=> {
|
||||
const t = text.split(' ').slice(0, 25)
|
||||
@@ -392,7 +410,8 @@ export default {
|
||||
pagelistNews,
|
||||
divs,
|
||||
page,
|
||||
selecnews
|
||||
selecnews,
|
||||
oneNews
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user