all completed,components/side is none commentpart
This commit is contained in:
@@ -1,7 +1,7 @@
|
||||
<template>
|
||||
<view class="begin">
|
||||
<view class="title" v-if="notices">
|
||||
{{notices[0][2]}}
|
||||
{{notices[0][4]}}
|
||||
</view>
|
||||
<swiper class="first" :indicator-dots="false" :autoplay="true" :interval="3000" :duration="1000">
|
||||
<swiper-item v-for="path in imagePath">
|
||||
@@ -10,8 +10,9 @@
|
||||
</view>
|
||||
</swiper-item>
|
||||
</swiper>
|
||||
<swiper class="notice" :indicator-dots="false" :autoplay="false" :interval="3000" :duration="1000">
|
||||
<swiper-item v-for="notice in notices">
|
||||
<swiper class="notice" vertical="true" :indicator-dots="false" :autoplay="true" :interval="3000"
|
||||
:duration="1000">
|
||||
<swiper-item v-for="(notice,index) in notices" @click="goto(notice)">
|
||||
<view class="swiper-item">
|
||||
{{notice[0]}}
|
||||
<image src="../../static/联合 10.png"></image>
|
||||
@@ -46,11 +47,11 @@
|
||||
<view>{{active_content[2][1]}}</view>
|
||||
<view>{{active_content[2][3]}}评论 {{active_content[2][4]}}</view>
|
||||
</view>
|
||||
<image :src="active_content[2][0]" mode=""></image>
|
||||
<image :src="active_content[2][0]"></image>
|
||||
</view>
|
||||
</view>
|
||||
<view class="bottom">
|
||||
<view class="list-li" v-for="part in list">
|
||||
<view class="list-li" v-for="(part,index) in list" @click="gowhere(index)">
|
||||
<image :src="part[1]"></image>
|
||||
<text>{{part[0]}}</text>
|
||||
</view>
|
||||
@@ -102,13 +103,36 @@
|
||||
const data = await text.json()
|
||||
console.log(data)
|
||||
return data
|
||||
},
|
||||
gowhere(index) {
|
||||
switch (index) {
|
||||
case 1:
|
||||
uni.navigateTo({
|
||||
url: "/pages/index/countryside"
|
||||
})
|
||||
break
|
||||
case 3:
|
||||
uni.navigateTo({
|
||||
url: "/pages/index/data"
|
||||
})
|
||||
}
|
||||
},
|
||||
goto(value) {
|
||||
const itemStr = encodeURIComponent(JSON.stringify(value))
|
||||
uni.navigateTo({
|
||||
url: `/pages/index/addr_more?id=${value[3]}&data=${itemStr}`
|
||||
})
|
||||
|
||||
}
|
||||
},
|
||||
async mounted() {
|
||||
this.imagePath = (await this.request("get", "/api/adv/list")).data.map(x =>
|
||||
`http://124.93.196.45:10091/Neusoft/community${x.image}`)
|
||||
this.notices = (await this.request("get", "/api/notice/list")).rows.map(x => [x.noticeTitle, x
|
||||
.noticeContent,
|
||||
this.notices = (await this.request("get", "/api/notice/list")).rows.map(x => [
|
||||
x.noticeTitle,
|
||||
x.noticeContent,
|
||||
x.createTime,
|
||||
x.noticeId,
|
||||
x.unit
|
||||
])
|
||||
this.active_content = (await this.request("get", "/api/cms/article/list")).rows.map(x => [
|
||||
@@ -312,4 +336,4 @@
|
||||
border-radius: 50%;
|
||||
border: 2px solid black;
|
||||
}
|
||||
</style>
|
||||
</style>
|
||||
|
||||
Reference in New Issue
Block a user