完成了api获取
This commit is contained in:
117
components/index_page.vue
Normal file
117
components/index_page.vue
Normal file
@@ -0,0 +1,117 @@
|
|||||||
|
<template>
|
||||||
|
<view>
|
||||||
|
<text class="title">楷模列表</text>
|
||||||
|
<view class="page">
|
||||||
|
<view></view>
|
||||||
|
<view>
|
||||||
|
<p>中宣部授予肖文儒“时代楷模”楷模楷模楷模楷模楷模楷模楷模楷模楷模楷模楷模楷模楷模楷模</p>
|
||||||
|
<p>模特姓名:肖文儒</p>
|
||||||
|
<p>38年来,国家安全生产应急救援中心副主任兼工程师肖文儒参与过多次重大建设工程重大建设工程重大建设工程重大建设工程重大建设工程重大建设工程重大建设工程</p>
|
||||||
|
</view>
|
||||||
|
</view>
|
||||||
|
</view>
|
||||||
|
</template>
|
||||||
|
|
||||||
|
<script>
|
||||||
|
export default {
|
||||||
|
data() {
|
||||||
|
return {
|
||||||
|
result:[]
|
||||||
|
}
|
||||||
|
},
|
||||||
|
async onLoad() {
|
||||||
|
for(let i=1;i<4;i++){
|
||||||
|
this.result.push(this.requests("down", `appNotice/app-o/loopMapDetail?id=${i}`))
|
||||||
|
}
|
||||||
|
this.result = await Promise.all(this.result);
|
||||||
|
this.result=this.result.map(x=>[x.data.modelName,x.data.content,x.data.picPath])
|
||||||
|
console.log(this.result);
|
||||||
|
},
|
||||||
|
methods: {
|
||||||
|
async requests(updown, path) {
|
||||||
|
let response
|
||||||
|
if (updown == "up") {
|
||||||
|
response = await fetch(`http://124.93.196.45:10091/Neusoft/times-model/${path}`, {
|
||||||
|
method: "POST",
|
||||||
|
headers: {
|
||||||
|
"Content-Type": "application/json",
|
||||||
|
},
|
||||||
|
body: JSON.stringify({
|
||||||
|
"password": "0CYdq6Hn",
|
||||||
|
"username": "6dOMIgIU"
|
||||||
|
})
|
||||||
|
})
|
||||||
|
} else if (updown == "down") {
|
||||||
|
response = await fetch(`http://124.93.196.45:10091/Neusoft/times-model/${path}`, {
|
||||||
|
method: "GET",
|
||||||
|
headers: {
|
||||||
|
"Content-Type": "application/json",
|
||||||
|
"Authorization": "eyJhbGciOiJIUzUxMiJ9.eyJsb2dpbl91c2VyX2tleSI6ImJjYtrrMxSx0OvYuqZ_0UL738RhVLuq-IxBIyHH1kt0gXAANbdsg"
|
||||||
|
},
|
||||||
|
})
|
||||||
|
|
||||||
|
}
|
||||||
|
const data = await response.json()
|
||||||
|
console.log(data)
|
||||||
|
return data
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
</script>
|
||||||
|
|
||||||
|
<style>
|
||||||
|
template>view{
|
||||||
|
background-color: black;
|
||||||
|
}
|
||||||
|
.title {
|
||||||
|
display: block;
|
||||||
|
border-left: 5px firebrick solid;
|
||||||
|
font-weight: bold;
|
||||||
|
font-size: 1.3rem;
|
||||||
|
margin-bottom: 10px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.page {
|
||||||
|
border-radius: 15px;
|
||||||
|
background-color: #fff;
|
||||||
|
height: 12vh;
|
||||||
|
display: flex;
|
||||||
|
border-radius: 15px;
|
||||||
|
align-items: center;
|
||||||
|
}
|
||||||
|
|
||||||
|
.page view:first-of-type {
|
||||||
|
width: 25%;
|
||||||
|
height: 75%;
|
||||||
|
margin: 3%;
|
||||||
|
background-color: red;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
.page view:nth-child(2) {
|
||||||
|
width: 75%;
|
||||||
|
}
|
||||||
|
|
||||||
|
.page view:nth-child(2) p:first-of-type {
|
||||||
|
font-size: 1.2rem;
|
||||||
|
overflow: hidden;
|
||||||
|
text-overflow: ellipsis;
|
||||||
|
white-space: nowrap;
|
||||||
|
}
|
||||||
|
|
||||||
|
.page view:nth-child(2) p:nth-child(2) {
|
||||||
|
font-size: 0.9rem;
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
.page view:nth-child(2) p:nth-child(3) {
|
||||||
|
width: 100%;
|
||||||
|
font-size: 0.9rem;
|
||||||
|
display: -webkit-box;
|
||||||
|
-webkit-box-orient: vertical;
|
||||||
|
-webkit-line-clamp: 2;
|
||||||
|
overflow: hidden;
|
||||||
|
text-overflow: ellipsis;
|
||||||
|
word-break: break-word;
|
||||||
|
}
|
||||||
|
</style>
|
||||||
@@ -57,9 +57,6 @@
|
|||||||
this.rightoffsetx = 20;
|
this.rightoffsetx = 20;
|
||||||
this.isopen = false;
|
this.isopen = false;
|
||||||
}
|
}
|
||||||
},
|
|
||||||
deleteItem() {
|
|
||||||
this.$emit('delete', this.index);
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
18
js_sdk/u-charts/echarts.min.js
vendored
Normal file
18
js_sdk/u-charts/echarts.min.js
vendored
Normal file
File diff suppressed because one or more lines are too long
@@ -36,7 +36,13 @@
|
|||||||
"enablePullDownRefresh": false
|
"enablePullDownRefresh": false
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
},
|
||||||
|
{
|
||||||
|
"path": "components/index_page",
|
||||||
|
"style": {
|
||||||
|
"navigationBarTitleText": ""
|
||||||
|
}
|
||||||
|
}
|
||||||
],
|
],
|
||||||
"globalStyle": {
|
"globalStyle": {
|
||||||
"navigationBarTextStyle": "black",
|
"navigationBarTextStyle": "black",
|
||||||
|
|||||||
@@ -36,7 +36,12 @@
|
|||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
|
<view class="index_end">
|
||||||
|
<view class="nav_bottom" v-for="path_image in endbottom">
|
||||||
|
<image :src="path_image[0]"></image>
|
||||||
|
<p>{{path_image[1]}}</p>
|
||||||
|
</view>
|
||||||
|
</view>
|
||||||
</view>
|
</view>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
@@ -47,28 +52,22 @@
|
|||||||
card
|
card
|
||||||
},
|
},
|
||||||
data() {
|
data() {
|
||||||
|
const imagepath = Array.from({
|
||||||
|
length: 4
|
||||||
|
}).map((_, x) => `../../static/c${x+1}.png`)
|
||||||
|
const textarray = ["首页", "公益", "心得", "我的"]
|
||||||
|
const endbottom = imagepath.map((value, index) => [value, textarray[index]])
|
||||||
return {
|
return {
|
||||||
isRed: false,
|
isRed: false,
|
||||||
list: [{
|
endbottom
|
||||||
id: 1,
|
|
||||||
name: ""
|
|
||||||
}]
|
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
computed: {
|
computed: {
|
||||||
textColor() {
|
|
||||||
return this.isRed ? 'red' : 'black'
|
|
||||||
},
|
|
||||||
imagepaths() {
|
imagepaths() {
|
||||||
|
|
||||||
let Path = Array.from({
|
let Path = Array.from({
|
||||||
length: 6
|
length: 6
|
||||||
}, (_, x) => `../../static/c${x+1}.png`);
|
}, (_, x) => `../../static/c${x+1}.png`);
|
||||||
// let value = Array.from({
|
|
||||||
// length: 6
|
|
||||||
// }, (_, x) => `英雄故事`);
|
|
||||||
let value = ["楷模列表", "英雄故事", "身边英雄", "物资捐赠", "数据分析", "更多"]
|
let value = ["楷模列表", "英雄故事", "身边英雄", "物资捐赠", "数据分析", "更多"]
|
||||||
|
|
||||||
return Path.map((path, index) => ({
|
return Path.map((path, index) => ({
|
||||||
path: path,
|
path: path,
|
||||||
value: value[index]
|
value: value[index]
|
||||||
@@ -79,11 +78,16 @@
|
|||||||
toggleColor() {
|
toggleColor() {
|
||||||
this.isRed = !this.isRed
|
this.isRed = !this.isRed
|
||||||
}
|
}
|
||||||
}}
|
}
|
||||||
|
}
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
<style>
|
<style>
|
||||||
|
* {
|
||||||
|
padding: 0;
|
||||||
|
margin: 0;
|
||||||
|
}
|
||||||
|
|
||||||
.begin {
|
.begin {
|
||||||
background-color: rgb(246, 246, 246);
|
background-color: rgb(246, 246, 246);
|
||||||
}
|
}
|
||||||
@@ -229,4 +233,24 @@
|
|||||||
text-overflow: ellipsis;
|
text-overflow: ellipsis;
|
||||||
word-break: break-word;
|
word-break: break-word;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.index_end {
|
||||||
|
display: flex;
|
||||||
|
justify-content: space-around;
|
||||||
|
}
|
||||||
|
|
||||||
|
.nav_bottom {
|
||||||
|
display: flex;
|
||||||
|
flex-direction: column;
|
||||||
|
align-items: center;
|
||||||
|
}
|
||||||
|
|
||||||
|
.nav_bottom image {
|
||||||
|
width: 6vw;
|
||||||
|
height: 3vh;
|
||||||
|
}
|
||||||
|
|
||||||
|
.nav_bottom:nth-child(1) p {
|
||||||
|
color: #C2050F;
|
||||||
|
}
|
||||||
</style>
|
</style>
|
||||||
@@ -20,7 +20,6 @@
|
|||||||
</view>
|
</view>
|
||||||
|
|
||||||
<view class="student_end">
|
<view class="student_end">
|
||||||
|
|
||||||
<view class="nav_bottom" v-for="path_image in endbottom">
|
<view class="nav_bottom" v-for="path_image in endbottom">
|
||||||
<image :src="path_image[0]"></image>
|
<image :src="path_image[0]"></image>
|
||||||
<p>{{path_image[1]}}</p>
|
<p>{{path_image[1]}}</p>
|
||||||
@@ -105,73 +104,6 @@
|
|||||||
font-size: 1.1rem;
|
font-size: 1.1rem;
|
||||||
}
|
}
|
||||||
|
|
||||||
/* .page_div {
|
|
||||||
background-color: #fff;
|
|
||||||
border-radius: 15px;
|
|
||||||
padding: 3%;
|
|
||||||
margin: 2%;
|
|
||||||
}
|
|
||||||
|
|
||||||
.page_div>view:first-child {
|
|
||||||
border-bottom: 1px solid darkgray;
|
|
||||||
padding-bottom: 10px;
|
|
||||||
}
|
|
||||||
|
|
||||||
.page_div>view:first-child p:first-child {
|
|
||||||
font-size: 1.1rem;
|
|
||||||
}
|
|
||||||
|
|
||||||
.page_div>view:first-child p:nth-child(2) {
|
|
||||||
font-size: 0.8rem;
|
|
||||||
}
|
|
||||||
|
|
||||||
.page_div>view:first-child p:nth-child(3) {
|
|
||||||
font-size: 0.9rem;
|
|
||||||
display: -webkit-box;
|
|
||||||
-webkit-box-orient: vertical;
|
|
||||||
-webkit-line-clamp: 2;
|
|
||||||
overflow: hidden;
|
|
||||||
text-overflow: ellipsis;
|
|
||||||
|
|
||||||
}
|
|
||||||
|
|
||||||
.page_div>view:nth-child(2) {
|
|
||||||
display: flex;
|
|
||||||
flex-direction: column;
|
|
||||||
padding-bottom: 5px;
|
|
||||||
border-bottom: 1px solid darkgray;
|
|
||||||
}
|
|
||||||
|
|
||||||
.page_div>view:nth-child(2)>view:first-child {
|
|
||||||
display: flex;
|
|
||||||
justify-content: space-between;
|
|
||||||
}
|
|
||||||
|
|
||||||
.page_div>view:nth-child(2)>view:first-child p:nth-child(2) {
|
|
||||||
color: #C2050F;
|
|
||||||
}
|
|
||||||
|
|
||||||
.page_div>view:nth-child(2)>view:nth-child(2) {
|
|
||||||
background-color: darkgray;
|
|
||||||
border-radius: 10px;
|
|
||||||
padding: 5px;
|
|
||||||
|
|
||||||
}
|
|
||||||
|
|
||||||
.page_div>view:last-child {
|
|
||||||
margin-top: 10px;
|
|
||||||
height: 5vh;
|
|
||||||
color: rgb(255, 56, 59);
|
|
||||||
display: flex;
|
|
||||||
justify-content: center;
|
|
||||||
align-items: center;
|
|
||||||
|
|
||||||
}
|
|
||||||
|
|
||||||
.page_div>view:last-child image {
|
|
||||||
width: 3vw;
|
|
||||||
height: 3vh;
|
|
||||||
} */
|
|
||||||
|
|
||||||
.student_end {
|
.student_end {
|
||||||
display: flex;
|
display: flex;
|
||||||
|
|||||||
BIN
static/baoming_icon.png
Normal file
BIN
static/baoming_icon.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 486 B |
BIN
static/hero.png
Normal file
BIN
static/hero.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 156 KiB |
BIN
static/homebg.png
Normal file
BIN
static/homebg.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 125 KiB |
BIN
static/img_my_hero_add.png
Normal file
BIN
static/img_my_hero_add.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 1.7 KiB |
BIN
static/listbg.png
Normal file
BIN
static/listbg.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 18 KiB |
BIN
static/listbg2.png
Normal file
BIN
static/listbg2.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 20 KiB |
Reference in New Issue
Block a user