Compare commits

..

2 Commits

  1. 1
      jeecgboot-vue3/src/views/demo/main-home/components/NewsList/index.vue
  2. 1
      jeecgboot-vue3/src/views/demo/main-home/components/articleManagement/index.vue
  3. 1
      jeecgboot-vue3/src/views/demo/main-home/components/columnManagement/index.vue
  4. 9
      jeecgboot-vue3/src/views/demo/main-home/components/homePage/index.vue
  5. 10
      jeecgboot-vue3/src/views/demo/main-home/components/newsInfo/index.vue

@ -100,6 +100,7 @@
path: '/main-home/newsInfo', path: '/main-home/newsInfo',
query: { query: {
id: item.id, id: item.id,
type:1
}, },
}); });
}; };

@ -90,6 +90,7 @@
path: '/main-home/newsInfo', path: '/main-home/newsInfo',
query: { query: {
id: item.id, id: item.id,
type:3
}, },
}) })
} }

@ -91,6 +91,7 @@
path: '/main-home/newsInfo', path: '/main-home/newsInfo',
query: { query: {
id: item.id, id: item.id,
type:2
}, },
}) })
} }

@ -41,7 +41,7 @@
</div> </div>
<div class="inner"> <div class="inner">
<ul> <ul>
<li v-for="item in noticeList" :key="item.id" @click="goToNewInfo(item)">{{ item.title }}</li> <li v-for="item in noticeList" :key="item.id" @click="goToNewInfo(item,2)">{{ item.title }}</li>
</ul> </ul>
</div> </div>
</div> </div>
@ -57,7 +57,7 @@
</div> </div>
<div class="inner"> <div class="inner">
<ul> <ul>
<li v-for="item in newList" :key="item.id" @click="goToNewInfo(item)">{{ item.title }}</li> <li v-for="item in newList" :key="item.id" @click="goToNewInfo(item,1)">{{ item.title }}</li>
</ul> </ul>
</div> </div>
</div> </div>
@ -68,7 +68,7 @@
</div> </div>
<div class="inner"> <div class="inner">
<ul> <ul>
<li v-for="item in gzdtList" :key="item.id" @click="goToNewInfo(item)">{{ item.title }}</li> <li v-for="item in gzdtList" :key="item.id" @click="goToNewInfo(item,3)">{{ item.title }}</li>
</ul> </ul>
</div> </div>
</div> </div>
@ -150,11 +150,12 @@
const goToNewList = () => { const goToNewList = () => {
router.push('/main-home/newsList'); router.push('/main-home/newsList');
}; };
const goToNewInfo = (item) => { const goToNewInfo = (item,type=1) => {
router.push({ router.push({
path: '/main-home/newsInfo', path: '/main-home/newsInfo',
query: { query: {
id: item.id, id: item.id,
type:type
}, },
}); });
}; };

@ -28,6 +28,8 @@
import {getindexarticleitem} from '@/api/mainHome' import {getindexarticleitem} from '@/api/mainHome'
import { useRoute,useRouter } from 'vue-router'; import { useRoute,useRouter } from 'vue-router';
import { ref } from 'vue'; import { ref } from 'vue';
import { useSettingStore } from '/@/store/modules/setting';
const settingStore = useSettingStore();
const route = useRoute() const route = useRoute()
const router = useRouter() const router = useRouter()
const id = route.query.id const id = route.query.id
@ -43,6 +45,14 @@ const getInfo = async () => {
info.value = res[0] info.value = res[0]
} }
getInfo() getInfo()
if(Object.keys(route.query).length > 1 && route.query.type == 2) {
console.log('设置');
settingStore.serIndex(5)
}else if(Object.keys(route.query).length > 1 && route.query.type == 3) {
settingStore.serIndex(6)
}
</script> </script>
<style scoped lang="less"> <style scoped lang="less">

Loading…
Cancel
Save