村民圈

This commit is contained in:
花有清香月有阴
2022-02-18 09:36:31 +08:00
parent edfed81029
commit 047b4d6972
2 changed files with 33 additions and 27 deletions

View File

@@ -81,6 +81,7 @@ export default {
}, },
onshow() { onshow() {
uni.$on('updateList', () => { uni.$on('updateList', () => {
this.current = 1
this.getList() this.getList()
}) })
}, },

View File

@@ -1,16 +1,16 @@
<template> <template>
<div class="Page"> <div class="Page">
<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> <u-tabs class="u-tabs1" :list="tabs" :is-scroll="false" :current="tabIndex0" @change="change" bg-color="#197df0" style="width: 50%" active-color="#FFF;" inactive-color="#FFF"></u-tabs>
<div class="top"> <div class="top">
<div class="tabIndex012" v-if="tabIndex1 != 3"> <div class="tabIndex012" v-if="tabIndex0 != 3">
<div class="tags" v-for="(items, i) in $dict.getDict('villagerCircleTopic')" :key="i">{{ items.dictName }}</div> <div class="tags" v-for="(items, i) in $dict.getDict('villagerCircleTopic')" :key="i">{{ items.dictName }}</div>
</div> </div>
<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> <u-tabs class="u-tabs2" :list="tabList" :is-scroll="false" :current="tabCurrent1" @change="changetabIndex" bg-color="#fff" active-color="#333;" inactive-color="#999" v-if="tabIndex0 == 3"></u-tabs>
<div class="indexTab3" v-if="tabIndex1 == 3"> <div class="indexTab22" v-if="tabIndex0 == 3">
<div class="tags" v-for="(e, i) in itemList" :key="i" :class="indexTab3 == i ? 'active' : 'noactive'" @click="hander(i)">{{ e.name }}</div> <div class="tags" v-for="(e, i) in itemList" :key="i" :class="indexTab2 == i ? 'active' : 'noactive'" @click="hander(i)">{{ e.name }}</div>
</div> </div>
</div> </div>
@@ -29,14 +29,16 @@
<!-- :style="{ class: item.auditStatus == 0 ? 'status0' : item.auditStatus == 1 ? 'status1' : 'status2' }" --> <!-- :style="{ class: item.auditStatus == 0 ? 'status0' : item.auditStatus == 1 ? 'status1' : 'status2' }" -->
<div class="statusDele"> <div class="statusDele">
<div class="status status0" v-if="tabIndex1 == 3">审核中</div> <div class="status status0" v-if="tabIndex0 == 3">审核中</div>
<img src="../../static/AppVillager/4.png" alt="" @click.stop="delShow = true" class="dels" /> <div class="dels" @click.stop="toAdd(item)">编辑</div>
<div class="dels" @click.stop=";(delShow = true), (deleId = item.id)">删除</div>
<!-- <img src="../../static/AppVillager/4.png" alt="" @click.stop="delShow = true" class="dels" /> -->
</div> </div>
</div> </div>
</div> </div>
<div class="tabCurrent0" v-if="tabIndex1 != 3 || tabCurrent2 == 0"> <div class="tabCurrent0" v-if="tabIndex0 != 3 || tabCurrent1 == 0">
<div class="cardConts">秋穿上漫步森林在阳光下呼吸伸展在安逸的天也许是兰天名字的由来吧</div> <div class="cardConts">秋穿上漫步森林在阳光下呼吸伸展在安逸的天也许是兰天名字的由来吧</div>
<div class="cardImg"> <div class="cardImg">
@@ -49,7 +51,7 @@
<span>东湖生态旅游风景区听涛景区</span> <span>东湖生态旅游风景区听涛景区</span>
</div> </div>
<div class="icones" v-if="tabIndex1 != 3"> <div class="icones" v-if="tabIndex0 != 3">
<div class="img1"> <div class="img1">
<img src="../../static/AppVillager/1.png" alt="" class="img11" /> <img src="../../static/AppVillager/1.png" alt="" class="img11" />
</div> </div>
@@ -62,7 +64,7 @@
</div> </div>
</div> </div>
<div class="tabCurrent1" v-if="tabIndex1 == 3 && tabCurrent2 == 1"> <div class="tabCurrent11" v-if="tabIndex0 == 3 && tabCurrent1 == 1">
<div class="cardsConts">针不戳</div> <div class="cardsConts">针不戳</div>
<div class="reply"> <div class="reply">
@@ -80,10 +82,10 @@
<AiEmpty description="暂无数据" class="emptyWrap"></AiEmpty> <AiEmpty description="暂无数据" class="emptyWrap"></AiEmpty>
</div> </div>
<!-- <AiFixedBtn v-if="tabIndex1 == 3 && tabCurrent2 == 1" @click.native="toAdd()"> <!-- <AiFixedBtn v-if="tabIndex0 == 3 && tabCurrent1 == 1" @click.native="toAdd()">
<div class="addBtn iconfont iconfont-iconfangda">发起审核</div> <div class="addBtn iconfont iconfont-iconfangda">发起审核</div>
</AiFixedBtn> --> </AiFixedBtn> -->
<div class="addBtn" v-if="tabIndex1 == 3 && tabCurrent2 == 1" @click.native="toAdd()">发起审核</div> <div class="addBtn" v-if="tabIndex0 == 3 && tabCurrent1 == 1" @click.native="toAdd()">发起审核</div>
<u-modal v-model="delShow" content="确定删除该数据" :mask-close-able="true" @confirm="confirmDel"></u-modal> <u-modal v-model="delShow" content="确定删除该数据" :mask-close-able="true" @confirm="confirmDel"></u-modal>
</div> </div>
@@ -111,7 +113,7 @@ export default {
name: '我参与的', name: '我参与的',
}, },
], ],
tabIndex1: 3, tabIndex0: 0,
tabList: [ tabList: [
{ {
name: '我的话题', name: '我的话题',
@@ -120,27 +122,27 @@ export default {
name: '我的评论', name: '我的评论',
}, },
], ],
tabCurrent2: 0, tabCurrent1: 0,
data: [{ value: 0, title: '弃捐勿复道,努力加餐饭' }], data: [{ value: 0, title: '弃捐勿复道,努力加餐饭' }],
itemList: [ itemList: [
{ {
name: '全部', name: '全部',
indexTab3: 0, indexTab2: 0,
}, },
{ {
name: '已通过', name: '已通过',
indexTab3: 1, indexTab2: 1,
}, },
{ {
name: '未通过', name: '未通过',
indexTab3: 2, indexTab2: 2,
}, },
{ {
name: '审核中', name: '审核中',
indexTab3: 3, indexTab2: 3,
}, },
], ],
indexTab3: 0, indexTab2: 0,
delShow: false, delShow: false,
current: 1, current: 1,
} }
@@ -176,26 +178,29 @@ export default {
change(index) { change(index) {
// this.data = [] // this.data = []
this.tabIndex1 = index this.tabIndex0 = index
this.current = 1 this.current = 1
// this.getList() // this.getList()
}, },
changetabIndex(e) { changetabIndex(e) {
this.tabCurrent2 = e this.tabCurrent1 = e
}, },
hander(i) { hander(i) {
this.indexTab3 = i this.indexTab2 = i
}, },
toDetail(item) { toDetail(item) {
this.$linkTo(`./detail?id=${item.id}`) this.$linkTo(`./detail?id=${item.id}`)
}, },
toAdd() { toAdd(item) {
console.log(1) if (item) {
this.$linkTo(`./add`) this.$linkTo(`./add?id=${item.id}`)
} else {
this.$linkTo(`./add`)
}
}, },
confirmDel() { confirmDel() {
@@ -265,7 +270,7 @@ export default {
} }
} }
.indexTab3 { .indexTab22 {
padding-top: 32px; padding-top: 32px;
display: flex; display: flex;
.tags { .tags {
@@ -392,7 +397,7 @@ export default {
} }
} }
.tabCurrent1 { .tabCurrent11 {
.cardsConts { .cardsConts {
margin-top: 24px; margin-top: 24px;
font-size: 32px; font-size: 32px;