all completed,components/side is none commentpart
This commit is contained in:
@@ -1,6 +1,6 @@
|
|||||||
<template>
|
<template>
|
||||||
<view class="bannerlist">
|
<view class="bannerlist">
|
||||||
<view class="li" v-for="value in valuearray">
|
<view class="li" v-for="(value,index) in valuearray" @click="gowhere(index)">
|
||||||
<image :src="value[1]"></image>
|
<image :src="value[1]"></image>
|
||||||
<text>{{value[0]}}</text>
|
<text>{{value[0]}}</text>
|
||||||
</view>
|
</view>
|
||||||
@@ -13,14 +13,18 @@
|
|||||||
data() {
|
data() {
|
||||||
let valuearray = ["开门", "我的房屋", "我的车位", "物业缴费", "扫码取件", "社区公告", "社区电话", "投诉建议"]
|
let valuearray = ["开门", "我的房屋", "我的车位", "物业缴费", "扫码取件", "社区公告", "社区电话", "投诉建议"]
|
||||||
.map((value, index) => [value,
|
.map((value, index) => [value,
|
||||||
`../../static/${["open-door.png","house.png","feedback-1.png","property-bill.png","qr-pick.png","note.png","property-tel.png","feedback.png"][index]}`
|
`/static/${["open-door.png","house.png","feedback-1.png","property-bill.png","qr-pick.png","note.png","property-tel.png","feedback.png"][index]}`
|
||||||
])
|
])
|
||||||
return {
|
return {
|
||||||
valuearray
|
valuearray
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
|
gowhere(index) {
|
||||||
|
uni.navigateTo({
|
||||||
|
url:"/pages/index/addr"
|
||||||
|
})
|
||||||
|
}
|
||||||
},
|
},
|
||||||
mounted() {
|
mounted() {
|
||||||
console.log(this.valuearray)
|
console.log(this.valuearray)
|
||||||
|
|||||||
@@ -1,22 +1,49 @@
|
|||||||
<template>
|
<template>
|
||||||
<view>
|
<view class="begin">
|
||||||
|
<view class="title">
|
||||||
|
<view>{{this.value[3]}}</view>
|
||||||
|
<view>{{this.value[4]}}</view>
|
||||||
|
</view>
|
||||||
|
<view class="content" v-html="this.value[5]">
|
||||||
|
|
||||||
</view>
|
</view>
|
||||||
|
<view class="who">
|
||||||
|
</view>
|
||||||
|
</view>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
|
|
||||||
<script>
|
<script>
|
||||||
export default {
|
export default {
|
||||||
|
|
||||||
data() {
|
data() {
|
||||||
return {
|
return {
|
||||||
|
value: null
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
methods: {
|
methods: {},
|
||||||
|
onLoad(option) {
|
||||||
|
const id = option.id
|
||||||
|
this.value = JSON.parse(decodeURIComponent(option.data))
|
||||||
|
console.log('id:', id)
|
||||||
|
console.log('完整数据:', this.value)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
<style>
|
<style>
|
||||||
|
.begin {
|
||||||
|
margin: 10px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.title {
|
||||||
|
display: flex;
|
||||||
|
justify-content: space-between;
|
||||||
|
margin-bottom: 10px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.content {
|
||||||
|
font-size: 0.8rem;
|
||||||
|
text-indent: 2em;
|
||||||
|
}
|
||||||
</style>
|
</style>
|
||||||
11
pages.json
11
pages.json
@@ -30,9 +30,18 @@
|
|||||||
{
|
{
|
||||||
"path": "pages/index/addr",
|
"path": "pages/index/addr",
|
||||||
"style": {
|
"style": {
|
||||||
"navigationBarTitleText": ""
|
"navigationBarTitleText": "社区公告"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
,{
|
||||||
|
"path" : "pages/index/addr_more",
|
||||||
|
"style" :
|
||||||
|
{
|
||||||
|
"navigationBarTitleText": "",
|
||||||
|
"enablePullDownRefresh": false
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
],
|
],
|
||||||
"globalStyle": {
|
"globalStyle": {
|
||||||
"navigationBarTextStyle": "black",
|
"navigationBarTextStyle": "black",
|
||||||
|
|||||||
@@ -1,13 +1,184 @@
|
|||||||
<template>
|
<template>
|
||||||
|
<view class="page">
|
||||||
|
<uni-segmented-control :current="current" styleType="text" activeColor="dodgerblue" :values="value"
|
||||||
|
@clickItem="toggole()"></uni-segmented-control>
|
||||||
|
<view class="content">
|
||||||
|
<view v-show="current === 0">
|
||||||
|
<view v-for="unit in array">
|
||||||
|
<view class="header">
|
||||||
|
<text>{{unit[0]}}</text>
|
||||||
|
<text>未读</text>
|
||||||
|
</view>
|
||||||
|
<view class="content_text" v-html="unit[1]"></view>
|
||||||
|
<view class="bottom_content">
|
||||||
<view>
|
<view>
|
||||||
|
<image src="../../static/组 155.png"></image>
|
||||||
|
<text>{{unit[2]}}</text>
|
||||||
|
</view>
|
||||||
|
<view @click="goto(unit)">查看详情</view>
|
||||||
|
</view>
|
||||||
|
</view>
|
||||||
|
</view>
|
||||||
|
<view v-show="current === 1">
|
||||||
|
选项卡2的内容
|
||||||
|
</view>
|
||||||
|
<view v-show="current === 2">
|
||||||
|
选项卡3的内容
|
||||||
|
</view>
|
||||||
|
</view>
|
||||||
|
|
||||||
</view>
|
</view>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script setup>
|
<script>
|
||||||
|
export default {
|
||||||
|
data() {
|
||||||
|
return {
|
||||||
|
current: 0,
|
||||||
|
value: ["全部", "未读", "已读"],
|
||||||
|
array: null,
|
||||||
|
}
|
||||||
|
},
|
||||||
|
methods: {
|
||||||
|
async request(gest, path) {
|
||||||
|
let text
|
||||||
|
if (gest == "get") {
|
||||||
|
text = await fetch(`http://124.93.196.45:10091/Neusoft/community${path}`, {
|
||||||
|
method: "GET",
|
||||||
|
headers: {
|
||||||
|
"Content-Type": "application/json",
|
||||||
|
"Authorization": (await this.request("post", "/api/login")).token
|
||||||
|
},
|
||||||
|
})
|
||||||
|
} else if (gest == "post") {
|
||||||
|
text = await fetch(`http://124.93.196.45:10091/Neusoft/community${path}`, {
|
||||||
|
method: "POST",
|
||||||
|
headers: {
|
||||||
|
"Content-Type": "application/json",
|
||||||
|
},
|
||||||
|
body: JSON.stringify({
|
||||||
|
"password": "0CYdq6Hn",
|
||||||
|
"username": "6dOMIgIU",
|
||||||
|
})
|
||||||
|
})
|
||||||
|
}
|
||||||
|
const data = await text.json()
|
||||||
|
console.log(data)
|
||||||
|
return data
|
||||||
|
},
|
||||||
|
goto(value){
|
||||||
|
const itemStr = encodeURIComponent(JSON.stringify(value))
|
||||||
|
uni.navigateTo({
|
||||||
|
url:`/pages/index/addr_more?id=${value[3]}&data=${itemStr}`
|
||||||
|
})
|
||||||
|
|
||||||
|
}
|
||||||
|
},
|
||||||
|
async mounted() {
|
||||||
|
this.array = (await this.request("get", "/api/notice/list")).rows.map(x => [
|
||||||
|
x.noticeTitle,
|
||||||
|
x.noticeContent,
|
||||||
|
x.createTime,
|
||||||
|
x.noticeId
|
||||||
|
])
|
||||||
|
console.log(this.array)
|
||||||
|
}
|
||||||
|
}
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
<style>
|
<style>
|
||||||
|
* {
|
||||||
|
padding: 0;
|
||||||
|
margin: 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
.page {
|
||||||
|
background-color: #ECF4FD;
|
||||||
|
height: 95.3vh;
|
||||||
|
}
|
||||||
|
|
||||||
|
.content {
|
||||||
|
margin: 10px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.content view view {
|
||||||
|
background-color: white;
|
||||||
|
padding: 5px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.content>view>view {
|
||||||
|
margin: 10px;
|
||||||
|
border-radius: 10px;
|
||||||
|
box-shadow: 10px 10px 20px #f7f7f7;
|
||||||
|
}
|
||||||
|
|
||||||
|
.header {
|
||||||
|
display: flex;
|
||||||
|
justify-content: space-between;
|
||||||
|
}
|
||||||
|
.header text:nth-child(2){
|
||||||
|
color:#55ff7f;
|
||||||
|
}
|
||||||
|
.content_text {
|
||||||
|
height: 13vh;
|
||||||
|
overflow: hidden;
|
||||||
|
text-overflow: ellipsis;
|
||||||
|
padding: 8px 0px !important;
|
||||||
|
border-bottom: 1px solid black;
|
||||||
|
border-top: 1px solid black;
|
||||||
|
}
|
||||||
|
|
||||||
|
.bottom_content {
|
||||||
|
display: flex;
|
||||||
|
justify-content: space-between;
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
.bottom_content image {
|
||||||
|
height: 20px;
|
||||||
|
width: 20px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.bottom_content>view:first-child {
|
||||||
|
color: #d0d0d0;
|
||||||
|
}
|
||||||
|
|
||||||
|
.bottom_content>view {
|
||||||
|
display: flex;
|
||||||
|
align-items: center;
|
||||||
|
}
|
||||||
|
.bottom_content>view:nth-child(2){
|
||||||
|
color: blue;
|
||||||
|
}
|
||||||
|
.bottom {
|
||||||
|
display: flex;
|
||||||
|
position: fixed;
|
||||||
|
border: 1px solid black;
|
||||||
|
bottom: 0;
|
||||||
|
width: 100%;
|
||||||
|
height: 5vh;
|
||||||
|
}
|
||||||
|
|
||||||
|
.list-li {
|
||||||
|
flex: 1;
|
||||||
|
display: flex;
|
||||||
|
flex-direction: column;
|
||||||
|
align-items: center;
|
||||||
|
}
|
||||||
|
|
||||||
|
.list-li image {
|
||||||
|
height: 20px;
|
||||||
|
width: 20px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.list-li:nth-child(1) {
|
||||||
|
color: dodgerblue;
|
||||||
|
}
|
||||||
|
|
||||||
|
.list-li:nth-child(3) image {
|
||||||
|
width: 40px;
|
||||||
|
height: 40px;
|
||||||
|
border-radius: 50%;
|
||||||
|
border: 2px solid black;
|
||||||
|
}
|
||||||
</style>
|
</style>
|
||||||
|
|||||||
48
pages/index/addr_more.vue
Normal file
48
pages/index/addr_more.vue
Normal file
@@ -0,0 +1,48 @@
|
|||||||
|
<template>
|
||||||
|
<view class="begin">
|
||||||
|
<view class="title">
|
||||||
|
<view>{{this.item[0]}}</view>
|
||||||
|
<view>{{this.item[2]}}</view>
|
||||||
|
</view>
|
||||||
|
<view class="content" v-html="item[1]">
|
||||||
|
|
||||||
|
</view>
|
||||||
|
</view>
|
||||||
|
</template>
|
||||||
|
|
||||||
|
<script>
|
||||||
|
export default {
|
||||||
|
data() {
|
||||||
|
return {
|
||||||
|
item: null
|
||||||
|
}
|
||||||
|
},
|
||||||
|
methods: {
|
||||||
|
|
||||||
|
},
|
||||||
|
onLoad(options) {
|
||||||
|
const id = options.id
|
||||||
|
this.item = JSON.parse(decodeURIComponent(options.data))
|
||||||
|
console.log('id:', id)
|
||||||
|
console.log('完整数据:', this.item)
|
||||||
|
console.log('标题:', this.item[0])
|
||||||
|
console.log('内容:', this.item[1])
|
||||||
|
console.log('时间:', this.item[2])
|
||||||
|
}
|
||||||
|
}
|
||||||
|
</script>
|
||||||
|
|
||||||
|
<style>
|
||||||
|
.begin {
|
||||||
|
margin: 10px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.title {
|
||||||
|
display: flex;
|
||||||
|
justify-content: space-between;
|
||||||
|
}
|
||||||
|
.content{
|
||||||
|
font-size: 0.8rem;
|
||||||
|
}
|
||||||
|
|
||||||
|
</style>
|
||||||
@@ -5,7 +5,7 @@
|
|||||||
<text>友邻社区</text>
|
<text>友邻社区</text>
|
||||||
</view>
|
</view>
|
||||||
<view class="countryside_content">
|
<view class="countryside_content">
|
||||||
<view v-for="value in valuearray">
|
<view v-for="(value,index) in valuearray" @click="goto(value)">
|
||||||
<image :src="value[0]"></image>
|
<image :src="value[0]"></image>
|
||||||
<view>
|
<view>
|
||||||
<view>
|
<view>
|
||||||
@@ -20,7 +20,7 @@
|
|||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
<view class="bottom">
|
<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>
|
<image :src="part[1]"></image>
|
||||||
<text>{{part[0]}}</text>
|
<text>{{part[0]}}</text>
|
||||||
</view>
|
</view>
|
||||||
@@ -65,6 +65,25 @@
|
|||||||
const data = await text.json()
|
const data = await text.json()
|
||||||
console.log(data)
|
console.log(data)
|
||||||
return data
|
return data
|
||||||
|
},
|
||||||
|
gowhere(index){
|
||||||
|
switch(index){
|
||||||
|
case 0:
|
||||||
|
uni.navigateTo({
|
||||||
|
url:"/pages/index/index"
|
||||||
|
})
|
||||||
|
break
|
||||||
|
case 3:
|
||||||
|
uni.navigateTo({
|
||||||
|
url:"/pages/index/data"
|
||||||
|
})
|
||||||
|
}
|
||||||
|
},
|
||||||
|
goto(value){
|
||||||
|
const data =encodeURIComponent(JSON.stringify(value))
|
||||||
|
uni.navigateTo({
|
||||||
|
url:`/components/side?id=${value[1]}&data=${data}`
|
||||||
|
})
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
async mounted() {
|
async mounted() {
|
||||||
@@ -164,7 +183,7 @@
|
|||||||
width: 20px;
|
width: 20px;
|
||||||
}
|
}
|
||||||
|
|
||||||
.list-li:nth-child(1) {
|
.list-li:nth-child(2) {
|
||||||
color: dodgerblue;
|
color: dodgerblue;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
24
pages/index/data.vue
Normal file
24
pages/index/data.vue
Normal file
@@ -0,0 +1,24 @@
|
|||||||
|
<template>
|
||||||
|
<view>
|
||||||
|
<view id="chart" style="width: 100%; height: 400px;"></view>
|
||||||
|
<view id="pie" style="width: 100%; height: 400px;"></view>
|
||||||
|
<view id="line" style="width: 100%; height: 400px;"></view>
|
||||||
|
</view>
|
||||||
|
</template>
|
||||||
|
|
||||||
|
<script>
|
||||||
|
export default {
|
||||||
|
data() {
|
||||||
|
return {
|
||||||
|
|
||||||
|
}
|
||||||
|
},
|
||||||
|
methods: {
|
||||||
|
|
||||||
|
}
|
||||||
|
}
|
||||||
|
</script>
|
||||||
|
|
||||||
|
<style>
|
||||||
|
|
||||||
|
</style>
|
||||||
@@ -1,7 +1,7 @@
|
|||||||
<template>
|
<template>
|
||||||
<view class="begin">
|
<view class="begin">
|
||||||
<view class="title" v-if="notices">
|
<view class="title" v-if="notices">
|
||||||
{{notices[0][2]}}
|
{{notices[0][4]}}
|
||||||
</view>
|
</view>
|
||||||
<swiper class="first" :indicator-dots="false" :autoplay="true" :interval="3000" :duration="1000">
|
<swiper class="first" :indicator-dots="false" :autoplay="true" :interval="3000" :duration="1000">
|
||||||
<swiper-item v-for="path in imagePath">
|
<swiper-item v-for="path in imagePath">
|
||||||
@@ -10,8 +10,9 @@
|
|||||||
</view>
|
</view>
|
||||||
</swiper-item>
|
</swiper-item>
|
||||||
</swiper>
|
</swiper>
|
||||||
<swiper class="notice" :indicator-dots="false" :autoplay="false" :interval="3000" :duration="1000">
|
<swiper class="notice" vertical="true" :indicator-dots="false" :autoplay="true" :interval="3000"
|
||||||
<swiper-item v-for="notice in notices">
|
:duration="1000">
|
||||||
|
<swiper-item v-for="(notice,index) in notices" @click="goto(notice)">
|
||||||
<view class="swiper-item">
|
<view class="swiper-item">
|
||||||
{{notice[0]}}
|
{{notice[0]}}
|
||||||
<image src="../../static/联合 10.png"></image>
|
<image src="../../static/联合 10.png"></image>
|
||||||
@@ -46,11 +47,11 @@
|
|||||||
<view>{{active_content[2][1]}}</view>
|
<view>{{active_content[2][1]}}</view>
|
||||||
<view>{{active_content[2][3]}}评论 {{active_content[2][4]}}</view>
|
<view>{{active_content[2][3]}}评论 {{active_content[2][4]}}</view>
|
||||||
</view>
|
</view>
|
||||||
<image :src="active_content[2][0]" mode=""></image>
|
<image :src="active_content[2][0]"></image>
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
<view class="bottom">
|
<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>
|
<image :src="part[1]"></image>
|
||||||
<text>{{part[0]}}</text>
|
<text>{{part[0]}}</text>
|
||||||
</view>
|
</view>
|
||||||
@@ -102,13 +103,36 @@
|
|||||||
const data = await text.json()
|
const data = await text.json()
|
||||||
console.log(data)
|
console.log(data)
|
||||||
return 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() {
|
async mounted() {
|
||||||
this.imagePath = (await this.request("get", "/api/adv/list")).data.map(x =>
|
this.imagePath = (await this.request("get", "/api/adv/list")).data.map(x =>
|
||||||
`http://124.93.196.45:10091/Neusoft/community${x.image}`)
|
`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
|
this.notices = (await this.request("get", "/api/notice/list")).rows.map(x => [
|
||||||
.noticeContent,
|
x.noticeTitle,
|
||||||
|
x.noticeContent,
|
||||||
|
x.createTime,
|
||||||
|
x.noticeId,
|
||||||
x.unit
|
x.unit
|
||||||
])
|
])
|
||||||
this.active_content = (await this.request("get", "/api/cms/article/list")).rows.map(x => [
|
this.active_content = (await this.request("get", "/api/cms/article/list")).rows.map(x => [
|
||||||
|
|||||||
BIN
static/组 155.png
Normal file
BIN
static/组 155.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 1.2 KiB |
Reference in New Issue
Block a user