除了数据分析和底边登录其余完成

This commit is contained in:
2026-04-15 00:40:21 +08:00
parent 4b6a45afb3
commit c87a4f63e3
11 changed files with 246 additions and 47 deletions

View File

@@ -7,14 +7,9 @@
</view>
<view class="headers_middle">
<swiper :indicator-dots="false" :autoplay="true" :interval="3000" :duration="1000">
<swiper-item v-if="banner_content">
<view class="swiper-item">
</view>
</swiper-item>
<swiper-item>
<view class="swiper-item">
<swiper-item v-for="path in banner_content">
<view class="swiper-item" >
<image :src="`http://124.93.196.45:10091/Neusoft/times-model${path}`"></image>
</view>
</swiper-item>
</swiper>
@@ -61,14 +56,14 @@
data() {
const imagepath = Array.from({
length: 4
}).map((_, x) => `../../static/c${x+1}.png`)
}).map((_, x) => `../../static/a${x+1}.png`)
const textarray = ["首页", "公益", "心得", "我的"]
const endbottom = imagepath.map((value, index) => [value, textarray[index]])
return {
endbottom,
banner_title: null,
part_nums: 5,
banner_content:null
banner_content: null
}
},
computed: {
@@ -86,9 +81,9 @@
methods: {
showmore() {
this.part_nums = 10
this.part_nums = Math.min(this.part_nums + 5, 42)
},
async requests(updown,path) {
async requests(updown, path) {
let response
if (updown == "up") {
response = await fetch(`http://124.93.196.45:10091/Neusoft/times-model${path}`, {
@@ -106,10 +101,10 @@
method: "GET",
headers: {
"Content-Type": "application/json",
"Authorization": "eyJhbGciOiJIUzUxMiJ9.eyJsb2dpbl91c2VyX2tleSI6ImJjYtrrMxSx0OvYuqZ_0UL738RhVLuq-IxBIyHH1kt0gXAANbdsg"
"Authorization":(await this.requests("up", "/app/login")).token
},
})
}
const data = await response.json()
console.log(data)
@@ -117,8 +112,14 @@
}
},
async mounted() {
this.banner_title = await this.requests("down","/appNotice/app-o/modelSpirit")
this.banner_content =await this.requests("down","/appNotice/app-o/modelSpirit")
this.banner_title = await this.requests("down", "/appNotice/app-o/modelSpirit")
let datavalue = []
for (let i = 1; i < 4; i++) {
datavalue.push(this.requests("down", `/appNotice/app-o/loopMapDetail?id=${i}`))
}
datavalue = (await Promise.all(datavalue)).map(x => x.data.picPath)
this.banner_content =datavalue
console.log(datavalue)
},
}
</script>
@@ -152,11 +153,17 @@
}
.headers_middle {
height: 20vh;
height: 25vh;
border: 1px red solid;
background-color: #fff !important;
}
.headers_middle swiper{
height: 100%;
}
.headers_middle swiper .swiper-item image{
width: 100%;
height: 25vh;
}
.headers_bottom {
height: 10vh;
display: flex;
@@ -250,4 +257,4 @@
.nav_bottom:nth-child(1) p {
color: #C2050F;
}
</style>
</style>