提交 7fa39e7f authored 作者: lihuihui's avatar lihuihui

修改样式

上级 b79d65c8
...@@ -1710,7 +1710,7 @@ ...@@ -1710,7 +1710,7 @@
"dependencies": { "dependencies": {
"debug": { "debug": {
"version": "2.6.9", "version": "2.6.9",
"resolved": "https://registry.npm.taobao.org/debug/download/debug-2.6.9.tgz", "resolved": "https://registry.npm.taobao.org/debug/download/debug-2.6.9.tgz?cache=0&sync_timestamp=1600502873540&other_urls=https%3A%2F%2Fregistry.npm.taobao.org%2Fdebug%2Fdownload%2Fdebug-2.6.9.tgz",
"integrity": "sha1-XRKFFd8TT/Mn6QpMk/Tgd6U2NB8=", "integrity": "sha1-XRKFFd8TT/Mn6QpMk/Tgd6U2NB8=",
"dev": true, "dev": true,
"requires": { "requires": {
...@@ -4379,7 +4379,7 @@ ...@@ -4379,7 +4379,7 @@
"dependencies": { "dependencies": {
"debug": { "debug": {
"version": "2.6.9", "version": "2.6.9",
"resolved": "https://registry.npm.taobao.org/debug/download/debug-2.6.9.tgz", "resolved": "https://registry.npm.taobao.org/debug/download/debug-2.6.9.tgz?cache=0&sync_timestamp=1600502873540&other_urls=https%3A%2F%2Fregistry.npm.taobao.org%2Fdebug%2Fdownload%2Fdebug-2.6.9.tgz",
"integrity": "sha1-XRKFFd8TT/Mn6QpMk/Tgd6U2NB8=", "integrity": "sha1-XRKFFd8TT/Mn6QpMk/Tgd6U2NB8=",
"dev": true, "dev": true,
"requires": { "requires": {
...@@ -5670,7 +5670,7 @@ ...@@ -5670,7 +5670,7 @@
}, },
"html-tags": { "html-tags": {
"version": "2.0.0", "version": "2.0.0",
"resolved": "https://registry.npm.taobao.org/html-tags/download/html-tags-2.0.0.tgz", "resolved": "https://registry.npmjs.org/html-tags/-/html-tags-2.0.0.tgz",
"integrity": "sha1-ELMKOGCF9Dzt41PMj6fLDe7qZos=" "integrity": "sha1-ELMKOGCF9Dzt41PMj6fLDe7qZos="
}, },
"html-webpack-plugin": { "html-webpack-plugin": {
...@@ -6633,7 +6633,7 @@ ...@@ -6633,7 +6633,7 @@
}, },
"lodash.kebabcase": { "lodash.kebabcase": {
"version": "4.1.1", "version": "4.1.1",
"resolved": "https://registry.npm.taobao.org/lodash.kebabcase/download/lodash.kebabcase-4.1.1.tgz", "resolved": "https://registry.npmjs.org/lodash.kebabcase/-/lodash.kebabcase-4.1.1.tgz",
"integrity": "sha1-hImxyw0p/4gZXM7KRI/21swpXDY=" "integrity": "sha1-hImxyw0p/4gZXM7KRI/21swpXDY="
}, },
"loglevel": { "loglevel": {
...@@ -9931,7 +9931,7 @@ ...@@ -9931,7 +9931,7 @@
}, },
"svg-tags": { "svg-tags": {
"version": "1.0.0", "version": "1.0.0",
"resolved": "https://registry.npm.taobao.org/svg-tags/download/svg-tags-1.0.0.tgz", "resolved": "https://registry.npmjs.org/svg-tags/-/svg-tags-1.0.0.tgz",
"integrity": "sha1-WPcc7jvVGbWdSyqEO2x95krAR2Q=" "integrity": "sha1-WPcc7jvVGbWdSyqEO2x95krAR2Q="
}, },
"swiper": { "swiper": {
...@@ -10987,7 +10987,7 @@ ...@@ -10987,7 +10987,7 @@
}, },
"eslint-scope": { "eslint-scope": {
"version": "4.0.3", "version": "4.0.3",
"resolved": "https://registry.npm.taobao.org/eslint-scope/download/eslint-scope-4.0.3.tgz", "resolved": "https://registry.npm.taobao.org/eslint-scope/download/eslint-scope-4.0.3.tgz?cache=0&sync_timestamp=1599933677754&other_urls=https%3A%2F%2Fregistry.npm.taobao.org%2Feslint-scope%2Fdownload%2Feslint-scope-4.0.3.tgz",
"integrity": "sha1-ygODMxD2iJoyZHgaqC5j65z+eEg=", "integrity": "sha1-ygODMxD2iJoyZHgaqC5j65z+eEg=",
"dev": true, "dev": true,
"requires": { "requires": {
......
...@@ -41,9 +41,9 @@ export default { ...@@ -41,9 +41,9 @@ export default {
}, },
methods: { methods: {
tab(index, title) { tab(index, title) {
if(this.$route.path === '/presence' && title === '学生风采') { // if(this.$route.path === '/presence' && title === '学生风采') {
this.$router.push({ path: '/index' }) // this.$router.push({ path: '/index' })
} // }
this.activeIndex = index this.activeIndex = index
this.$emit('changeTab', this.activeIndex) this.$emit('changeTab', this.activeIndex)
} }
......
...@@ -3,7 +3,8 @@ ...@@ -3,7 +3,8 @@
<banner-tab :data="bannerTabData" @changeTab="changeTab"></banner-tab> <banner-tab :data="bannerTabData" @changeTab="changeTab"></banner-tab>
<div class="pre-mian center97"> <div class="pre-mian center97">
<div class="list-box"> <div class="list-box">
<list :data="listData"></list> <list :data="listData[0]" v-if="activeIndex == 0"></list>
<list :data="listData[1]" v-if="activeIndex == 1"></list>
</div> </div>
<img src="https://zws-imgs-pub.ezijing.com/static/public/b998e6153f6814da345834d585fe28b7.png" alt="" /> <img src="https://zws-imgs-pub.ezijing.com/static/public/b998e6153f6814da345834d585fe28b7.png" alt="" />
</div> </div>
...@@ -31,21 +32,33 @@ export default { ...@@ -31,21 +32,33 @@ export default {
type: 58, type: 58,
project_id: 1000 project_id: 1000
}, },
listData: [] listData: {
0: [],
1: []
},
} }
}, },
mounted() { mounted() {
this.request() this.request(0)
}, },
methods: { methods: {
changeTab(index) { changeTab(index) {
const key = {
0: 58,
1: 54
}
this.requestParam.type = key[index]
this.request(index)
this.activeIndex = index this.activeIndex = index
}, },
request() { request(n) {
cAction.reportAction cAction.reportAction
.getNews(this.requestParam) .getNews(this.requestParam)
.then(json => { .then(json => {
this.listData = json if (Array.isArray(json)) {
json.length && (this.listData[n] = json)
console.log(this.listData)
}
}) })
.catch(e => { .catch(e => {
this.$message.error(e.message) this.$message.error(e.message)
......
...@@ -61,7 +61,7 @@ export default { ...@@ -61,7 +61,7 @@ export default {
}, },
goPage() { goPage() {
this.$router.push({ this.$router.push({
path: '/signup/index' path: '/my'
}) })
}, },
changeChildTab(index) { changeChildTab(index) {
......
...@@ -38,7 +38,7 @@ export default { ...@@ -38,7 +38,7 @@ export default {
methods: { methods: {
goPage() { goPage() {
this.$router.push({ this.$router.push({
path: '/signup/index' path: '/my'
}) })
}, },
getData() { getData() {
......
...@@ -5,8 +5,17 @@ ...@@ -5,8 +5,17 @@
<div class="module" v-if="activeIndex == 0"> <div class="module" v-if="activeIndex == 0">
<news :data="newsData"></news> <news :data="newsData"></news>
</div> </div>
<div class="module wid" v-if="activeIndex !== 0"> <div class="module" v-if="activeIndex === 1">
<div class="no-data">暂无数据</div> <list :data="listData[1]"></list>
<div class="no-data" v-if="!listData[1].length">暂无数据</div>
</div>
<div class="module" v-if="activeIndex === 2">
<list :data="listData[2]"></list>
<div class="no-data" v-if="!listData[2].length">暂无数据</div>
</div>
<div class="module" v-if="activeIndex === 3">
<list :data="listData[3]"></list>
<div class="no-data" v-if="!listData[3].length">暂无数据</div>
</div> </div>
</div> </div>
</div> </div>
...@@ -14,31 +23,26 @@ ...@@ -14,31 +23,26 @@
<script> <script>
import news from '@/components/news/news.vue' import news from '@/components/news/news.vue'
import bannerTab from '@/components/news/tab/bannerTab.vue' import bannerTab from '@/components/news/tab/bannerTab.vue'
import list from '@/components/news/newsList.vue'
import cAction from '@action' import cAction from '@action'
export default { export default {
components: { components: {
bannerTab, bannerTab,
news news,
list
}, },
data() { data() {
return { return {
listData: {
1: [],
2: [],
3: []
},
bannerTabData: { bannerTabData: {
menu: ['项目介绍', '宣传片', '教授采访', '学生风采'], menu: ['项目介绍', '宣传片', '教授采访', '学生风采'],
imgUrl: 'https://zws-imgs-pub.ezijing.com/static/public/24c97bb61b77949b415adcb06c7e43b1.png' imgUrl: 'https://zws-imgs-pub.ezijing.com/static/public/24c97bb61b77949b415adcb06c7e43b1.png'
}, },
newsData: [ newsData: [
{
id: 0,
title: '宣讲会实录',
content: '',
image: 'https://zws-imgs-pub.ezijing.com/static/public/09a620add2643574f9f0de4424db5ebe.png'
},
{
id: 1,
title: '项目介绍',
content: '',
image: 'https://zws-imgs-pub.ezijing.com/static/public/09a620add2643574f9f0de4424db5ebe.png'
}
], ],
activeIndex: 0, activeIndex: 0,
tabMenu: ['宣讲会实录', '项目介绍'], tabMenu: ['宣讲会实录', '项目介绍'],
...@@ -46,24 +50,60 @@ export default { ...@@ -46,24 +50,60 @@ export default {
requestParam: { requestParam: {
page: 1, page: 1,
per_page: 100, per_page: 100,
type: 50, type: 52,
project_id: 1000 project_id: 1000
} }
} }
}, },
methods: { methods: {
changeTab(index) { changeTab(index) {
const key = {
1: 52,
2: 53,
3: 54
}
if (index) {
this.requestParam.type = key[index]
this.requestList(index)
}
this.activeIndex = index this.activeIndex = index
}, },
changeChildTab(index) { changeChildTab(index) {
this.childActiveIndex = index this.childActiveIndex = index
}, },
request(n) { getData() {
this.requestParam.type = n const requestType = [
{
name: '宣讲会实录',
image: 'https://zws-imgs-pub.ezijing.com/static/public/09a620add2643574f9f0de4424db5ebe.png'
},
{
name: '项目介绍',
image: 'https://zws-imgs-pub.ezijing.com/static/public/09a620add2643574f9f0de4424db5ebe.png'
}
]
requestType.map((item, index) => {
this.request(item, index)
})
},
request(item, index) {
cAction.reportAction.getContent(item.name).then(json => {
this.newsData.push({
id: index,
title: item.name,
content: json === null ? '' : json[0].content,
image: item.image
})
this.newsData = this.newsData.sort((a, b) => a.id - b.id)
}).catch(e => { this.$message.error(e.message) }).finally(() => {})
},
requestList(n) {
cAction.reportAction cAction.reportAction
.getNews(this.requestParam) .getNews(this.requestParam)
.then(json => { .then(json => {
this.listData = json if (Array.isArray(json)) {
json.length && (this.listData[n] = json)
}
}) })
.catch(e => { .catch(e => {
this.$message.error(e.message) this.$message.error(e.message)
...@@ -72,6 +112,7 @@ export default { ...@@ -72,6 +112,7 @@ export default {
} }
}, },
mounted() { mounted() {
this.getData()
// this.request(50) // this.request(50)
} }
} }
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论