村民圈

This commit is contained in:
花有清香月有阴
2022-02-17 18:17:40 +08:00
parent 7f8c3ff490
commit c7aadf184c
4 changed files with 203 additions and 76 deletions

View File

@@ -1,20 +1,16 @@
<template>
<div class="Page">
<u-tabs class="u-tabs1" :list="tabs" :is-scroll="false" :current="tabIndex" @change="change" bg-color="#197df0" style="width: 50%" active-color="#FFF;" inactive-color="#FFF"></u-tabs>
<u-tabs class="u-tabs1" :list="tabs" :is-scroll="false" :current="tabIndex1" @change="change" bg-color="#197df0" style="width: 50%" active-color="#FFF;" inactive-color="#FFF"></u-tabs>
<div class="top">
<div class="tabIndex012" v-if="tabIndex != 3">
<div class="tags">美丽庭院</div>
<div class="tags">美丽庭院</div>
<div class="tags">美丽庭院</div>
<div class="tabIndex012" v-if="tabIndex1 != 3">
<div class="tags" v-for="(items, i) in $dict.getDict('villagerCircleTopic')" :key="i">{{ items.dictName }}</div>
</div>
<u-tabs class="u-tabs2" :list="tabList" :is-scroll="false" :current="tabCurrent" @change="changetabIndex" bg-color="#fff" active-color="#333;" inactive-color="#999" v-if="tabIndex == 3"></u-tabs>
<u-tabs class="u-tabs2" :list="tabList" :is-scroll="false" :current="tabCurrent2" @change="changetabIndex" bg-color="#fff" active-color="#333;" inactive-color="#999" v-if="tabIndex1 == 3"></u-tabs>
<div class="indexTab" v-if="tabIndex == 3">
<div class="tags" v-for="(e, i) in itemList" :key="i" :class="indexTab == i ? 'active' : 'noactive'" @click="hander(i)">{{ e.name }}</div>
<div class="indexTab3" v-if="tabIndex1 == 3">
<div class="tags" v-for="(e, i) in itemList" :key="i" :class="indexTab3 == i ? 'active' : 'noactive'" @click="hander(i)">{{ e.name }}</div>
</div>
</div>
@@ -32,11 +28,15 @@
</div>
<!-- :style="{ class: item.auditStatus == 0 ? 'status0' : item.auditStatus == 1 ? 'status1' : 'status2' }" -->
<div class="status status0" v-if="tabIndex == 3">审核中</div>
<div class="statusDele">
<div class="status status0" v-if="tabIndex1 == 3">审核中</div>
<img src="../../static/AppVillager/4.png" alt="" @click.stop="delShow = true" class="dels" />
</div>
</div>
</div>
<div class="tabCurrent0" v-if="tabIndex != 3 || tabCurrent == 0">
<div class="tabCurrent0" v-if="tabIndex1 != 3 || tabCurrent2 == 0">
<div class="cardConts">秋穿上漫步森林在阳光下呼吸伸展在安逸的天也许是兰天名字的由来吧</div>
<div class="cardImg">
@@ -49,7 +49,7 @@
<span>东湖生态旅游风景区听涛景区</span>
</div>
<div class="icones" v-if="tabIndex != 3">
<div class="icones" v-if="tabIndex1 != 3">
<div class="img1">
<img src="../../static/AppVillager/1.png" alt="" class="img11" />
</div>
@@ -62,7 +62,7 @@
</div>
</div>
<div class="tabCurrent1" v-if="tabIndex == 3 && tabCurrent == 1">
<div class="tabCurrent1" v-if="tabIndex1 == 3 && tabCurrent2 == 1">
<div class="cardsConts">针不戳</div>
<div class="reply">
@@ -80,9 +80,12 @@
<AiEmpty description="暂无数据" class="emptyWrap"></AiEmpty>
</div>
<AiFixedBtn v-if="tabIndex == 3 && tabCurrent == 1">
<div class="addBtn iconfont iconfont-iconfangda" @tap.stop="toAdd()"></div>
</AiFixedBtn>
<!-- <AiFixedBtn v-if="tabIndex1 == 3 && tabCurrent2 == 1" @click.native="toAdd()">
<div class="addBtn iconfont iconfont-iconfangda">发起审核</div>
</AiFixedBtn> -->
<div class="addBtn" v-if="tabIndex1 == 3 && tabCurrent2 == 1" @click.native="toAdd()">发起审核</div>
<u-modal v-model="delShow" content="确定删除该数据" :mask-close-able="true" @confirm="confirmDel"></u-modal>
</div>
</template>
@@ -108,7 +111,7 @@ export default {
name: '我参与的',
},
],
tabIndex: 0,
tabIndex1: 3,
tabList: [
{
name: '我的话题',
@@ -117,32 +120,38 @@ export default {
name: '我的评论',
},
],
tabCurrent: 0,
tabCurrent2: 0,
data: [{ value: 0, title: '弃捐勿复道,努力加餐饭' }],
itemList: [
{
name: '全部',
indexTab: 0,
indexTab3: 0,
},
{
name: '已通过',
indexTab: 1,
indexTab3: 1,
},
{
name: '未通过',
indexTab: 2,
indexTab3: 2,
},
{
name: '审核中',
indexTab: 3,
indexTab3: 3,
},
],
indexTab: 0,
indexTab3: 0,
delShow: false,
}
},
computed: {},
watch: {},
onLoad() {},
onLoad() {
this.$dict.load('villagerCircleTopic').then(() => {
// this.getList()
console.log(this.$dict.getDict('villagerCircleTopic'))
})
},
onShow() {
uni.$on('updateList', () => {
this.getList()
@@ -151,17 +160,17 @@ export default {
methods: {
change(index) {
// this.data = []
this.tabIndex = index
this.tabIndex1 = index
this.current = 1
// this.getList()
},
changetabIndex(e) {
this.tabCurrent = e
this.tabCurrent2 = e
},
hander(i) {
this.indexTab = i
this.indexTab3 = i
},
toDetail(item) {
@@ -169,8 +178,26 @@ export default {
},
toAdd() {
console.log(1)
this.$linkTo(`./add`)
},
confirmDel() {
this.$instance
.post(`/app/appvillagercircleinfo/delete?ids=${this.deleId}`)
.then((res) => {
if (res?.data) {
this.deleShow = false
this.modalShow = false
this.deleId = ''
this.getDetail()
}
})
.catch((e) => {
this.$hideLoading()
this.$u.toast(e)
})
},
},
}
</script>
@@ -205,6 +232,7 @@ export default {
.tabIndex012 {
padding-top: 32px;
display: flex;
flex-wrap: wrap;
.tags {
padding: 8px 32px;
background: #ffffff;
@@ -212,9 +240,12 @@ export default {
margin-left: 16px;
border: 1px solid #4181ff;
}
.tags:nth-child(n + 4) {
margin-top: 10px;
}
}
.indexTab {
.indexTab3 {
padding-top: 32px;
display: flex;
.tags {
@@ -266,17 +297,27 @@ export default {
margin-top: 6px;
}
}
.status {
font-size: 28px;
}
.status0 {
color: #42d784;
}
.status1 {
color: #ff4466;
}
.status2 {
color: #ff883c;
.statusDele {
display: flex;
align-items: center;
.status {
font-size: 28px;
}
.status0 {
color: #42d784;
}
.status1 {
color: #ff4466;
}
.status2 {
color: #ff883c;
}
.dels {
margin-left: 20px;
width: 68px;
height: 68px;
}
}
}
}
@@ -381,5 +422,19 @@ export default {
}
}
}
.addBtn {
position: fixed;
right: 5%;
bottom: 15%;
width: 96px;
height: 96px;
line-height: 96px;
text-align: center;
font-size: 24px;
color: #1365dd;
border-radius: 50%;
box-shadow: 0 8px 16px 0 rgba(0, 0, 0, 0.2);
}
}
</style>