村民圈
This commit is contained in:
		@@ -20,30 +20,35 @@
 | 
			
		||||
      <div class="datas" v-if="data.length">
 | 
			
		||||
        <div class="card" v-for="(item, index) in data" :key="index" @click="toDetail(item)">
 | 
			
		||||
          <div class="cardTop">
 | 
			
		||||
            <img :src="item.avatarUrl" alt="" />
 | 
			
		||||
            <img :src="item.avatarUrl || user.avatarUrl" alt="" />
 | 
			
		||||
 | 
			
		||||
            <div class="rightTop">
 | 
			
		||||
              <div class="leftStaus">
 | 
			
		||||
                <span class="names">{{ item.createUserName }}</span>
 | 
			
		||||
                <span class="names">{{ item.createUserName || user.realName }}</span>
 | 
			
		||||
 | 
			
		||||
                <span class="titless">{{ $dict.getLabel('villagerCircleTopic', item.topic) }} | {{ item.createTime }}</span>
 | 
			
		||||
                <span class="titless">
 | 
			
		||||
                  <span v-if="item.topic" class="topics"> {{ $dict.getLabel('villagerCircleTopic', item.topic) }} |</span>
 | 
			
		||||
                  <span> {{ item.createTime }}</span>
 | 
			
		||||
                </span>
 | 
			
		||||
              </div>
 | 
			
		||||
 | 
			
		||||
              <div class="statusDele">
 | 
			
		||||
                <div class="status status0" :class="item.auditStatus == 0 ? 'status0' : item.auditStatus == 1 ? 'status1' : 'status2'" v-if="tabIndex0 == 3">{{ $dict.getLabel('auditStatus', item.status) }}</div>
 | 
			
		||||
 | 
			
		||||
                <div class="dels" @click.stop="toAdd(item)">编辑</div>
 | 
			
		||||
                <div class="dels" @click.stop=";(delShow = true), (deleId = item.id)">删除</div>
 | 
			
		||||
                <!-- <img src="https://cdn.cunwuyun.cn/dvcp/AppVillager4.png" alt="" @click.stop="delShow = true" class="dels" /> -->
 | 
			
		||||
                <div class="statusRight">
 | 
			
		||||
                  <div class="dels" @click.stop="toAdd(item)">编辑</div>
 | 
			
		||||
                  <div class="dels" @click.stop=";(delShow = true), (deleId = item.id)">删除</div>
 | 
			
		||||
                </div>
 | 
			
		||||
                <!-- <img src="https://cdn.cunwuyun.cn/dvcp/AppVillager/4.png" alt="" @click.stop="delShow = true" class="dels" /> -->
 | 
			
		||||
              </div>
 | 
			
		||||
            </div>
 | 
			
		||||
          </div>
 | 
			
		||||
 | 
			
		||||
          <div class="tabCurrent0" v-if="tabIndex0 != 3">
 | 
			
		||||
          <div class="tabCurrent0" v-if="tabCurrent1 != 1">
 | 
			
		||||
            <div class="cardConts">{{ item.content }}</div>
 | 
			
		||||
 | 
			
		||||
            <div class="cardImg" v-if="item.pictures">
 | 
			
		||||
              <img :src="item.url" alt="" v-for="(items, i) in item.pictures" :key="i" @click.stop="previewImage(item.pictures, item.url)" />
 | 
			
		||||
              <img :src="items.url" alt="" v-for="(items, i) in item.pictures" :key="i" @click.stop="previewImage(item.pictures, items.url)" />
 | 
			
		||||
            </div>
 | 
			
		||||
 | 
			
		||||
            <div class="cardBot">
 | 
			
		||||
@@ -54,28 +59,30 @@
 | 
			
		||||
 | 
			
		||||
              <div class="icones" v-if="tabIndex0 != 3">
 | 
			
		||||
                <div class="img1">
 | 
			
		||||
                  <img src="https://cdn.cunwuyun.cn/dvcp/AppVillager1.png" alt="" class="img11" />
 | 
			
		||||
                  <img src="https://cdn.cunwuyun.cn/dvcp/AppVillager/1.png" alt="" class="img11" />
 | 
			
		||||
                </div>
 | 
			
		||||
 | 
			
		||||
                <div class="rightFlex">
 | 
			
		||||
                  <img src="https://cdn.cunwuyun.cn/dvcp/AppVillager2.png" alt="" class="img2" />
 | 
			
		||||
                  <img src="https://cdn.cunwuyun.cn/dvcp/AppVillager3.png" alt="" class="img3" />
 | 
			
		||||
                  <img src="https://cdn.cunwuyun.cn/dvcp/AppVillager/2.png" alt="" class="img2" />
 | 
			
		||||
 | 
			
		||||
                  <img src="https://cdn.cunwuyun.cn/dvcp/AppVillager/3.png" alt="" class="img3" @click.stop="like(item)" v-if="item.upFlag == 0" />
 | 
			
		||||
                  <img src="https://cdn.cunwuyun.cn/dvcp/AppVillager/33.png" alt="" class="img3" @click.stop="like(item)" v-if="item.upFlag == 1" />
 | 
			
		||||
                </div>
 | 
			
		||||
              </div>
 | 
			
		||||
            </div>
 | 
			
		||||
          </div>
 | 
			
		||||
 | 
			
		||||
          <div class="tabCurrent11" v-if="tabIndex0 == 3 && tabCurrent1 == 1">
 | 
			
		||||
            <div class="cardsConts">针不戳!</div>
 | 
			
		||||
            <div class="cardsConts">{{ item.content }}</div>
 | 
			
		||||
 | 
			
		||||
            <div class="reply">
 | 
			
		||||
              <span class="toReply">回复的话</span>
 | 
			
		||||
              <span class="contens"></span>
 | 
			
		||||
              <span class="toReply">回复的话题 :</span>
 | 
			
		||||
              <span class="contens">{{ item.villagerCircleInfo.content }}</span>
 | 
			
		||||
            </div>
 | 
			
		||||
 | 
			
		||||
            <div class="nopass">
 | 
			
		||||
            <div class="nopass" v-if="item.status == 2">
 | 
			
		||||
              <span>未通过理由:</span>
 | 
			
		||||
              <span>请勿带情绪进行评论</span>
 | 
			
		||||
              <span>{{ item.auditOpinion }}</span>
 | 
			
		||||
            </div>
 | 
			
		||||
          </div>
 | 
			
		||||
        </div>
 | 
			
		||||
@@ -152,6 +159,7 @@ export default {
 | 
			
		||||
      show: false,
 | 
			
		||||
      TopicValue: '0',
 | 
			
		||||
      TopicName: '美丽庭院',
 | 
			
		||||
      flag: false,
 | 
			
		||||
    }
 | 
			
		||||
  },
 | 
			
		||||
  computed: { ...mapState(['user']) },
 | 
			
		||||
@@ -174,8 +182,9 @@ export default {
 | 
			
		||||
            size: 6,
 | 
			
		||||
            current: this.current,
 | 
			
		||||
            topic: this.tabIndex0 != 3 ? this.TopicValue : '',
 | 
			
		||||
            status: this.tabIndex0 == 3 && this.indexTab2 == 0 ? '' : this.tabIndex0 == 3 && this.indexTab2 == 1 ? 1 : this.tabIndex0 == 3 && this.indexTab2 == 2 ? 2 : this.tabIndex0 == 3 && this.indexTab2 == 3 ? 0 : '',
 | 
			
		||||
 | 
			
		||||
            areaId: this.tabIndex0 != 3 ? this.user.areaId : '',
 | 
			
		||||
            residentId: this.tabIndex0 != 3 ? this.user.residentId : '',
 | 
			
		||||
            listType: this.tabIndex0 == 3 && this.tabCurrent1 == 0 ? '0' : this.tabIndex0 == 3 && this.tabCurrent1 == 1 ? '1' : this.tabIndex0 == 0 ? '0' : this.tabIndex0 == 1 ? '1' : this.tabIndex0 == 2 ? '2' : '',
 | 
			
		||||
          },
 | 
			
		||||
        })
 | 
			
		||||
@@ -186,23 +195,34 @@ export default {
 | 
			
		||||
        })
 | 
			
		||||
    },
 | 
			
		||||
 | 
			
		||||
    change(index) {
 | 
			
		||||
    init() {
 | 
			
		||||
      this.data = []
 | 
			
		||||
      this.tabIndex0 = index
 | 
			
		||||
      this.current = 1
 | 
			
		||||
      this.getList()
 | 
			
		||||
    },
 | 
			
		||||
 | 
			
		||||
    change(index) {
 | 
			
		||||
      this.tabIndex0 = index
 | 
			
		||||
      this.init()
 | 
			
		||||
    },
 | 
			
		||||
 | 
			
		||||
    changetabIndex(e) {
 | 
			
		||||
      this.tabCurrent1 = e
 | 
			
		||||
      this.$nextTick(() => {
 | 
			
		||||
        this.indexTab2 = 0
 | 
			
		||||
        this.init()
 | 
			
		||||
      })
 | 
			
		||||
    },
 | 
			
		||||
 | 
			
		||||
    hander(i) {
 | 
			
		||||
      this.indexTab2 = i
 | 
			
		||||
      this.$nextTick(() => {
 | 
			
		||||
        this.init()
 | 
			
		||||
      })
 | 
			
		||||
    },
 | 
			
		||||
 | 
			
		||||
    toDetail(item) {
 | 
			
		||||
      this.$linkTo(`./detail?id=${item.id}&avatarUrl=${item.avatarUrl}`)
 | 
			
		||||
      this.$linkTo(`./detail?id=${item.id}&avatarUrl=${item.avatarUrl ? item.avatarUrl : ''}&tabCurrent1=${this.tabCurrent1}`)
 | 
			
		||||
    },
 | 
			
		||||
 | 
			
		||||
    toAdd(item) {
 | 
			
		||||
@@ -233,6 +253,9 @@ export default {
 | 
			
		||||
    conTopic(e) {
 | 
			
		||||
      this.TopicValue = e[0].value
 | 
			
		||||
      this.TopicName = e[0].label
 | 
			
		||||
      this.$nextTick(() => {
 | 
			
		||||
        this.init()
 | 
			
		||||
      })
 | 
			
		||||
    },
 | 
			
		||||
 | 
			
		||||
    previewImage(images, img) {
 | 
			
		||||
@@ -241,6 +264,27 @@ export default {
 | 
			
		||||
        current: img,
 | 
			
		||||
      })
 | 
			
		||||
    },
 | 
			
		||||
 | 
			
		||||
    like(item) {
 | 
			
		||||
      if (this.flag) return
 | 
			
		||||
 | 
			
		||||
      this.flag = true
 | 
			
		||||
      this.$instance
 | 
			
		||||
        .post(`/app/appvillagercircleinfo/up?id=${item.id}`)
 | 
			
		||||
        .then((res) => {
 | 
			
		||||
          if (res.code === 0) {
 | 
			
		||||
            this.$u.toast(item.upFlag == 0 ? '点赞成功' : '取消点赞成功')
 | 
			
		||||
            this.init()
 | 
			
		||||
            setTimeout(() => {
 | 
			
		||||
              this.flag = false
 | 
			
		||||
            }, 600)
 | 
			
		||||
          }
 | 
			
		||||
        })
 | 
			
		||||
        .catch((err) => {
 | 
			
		||||
          this.$u.toast(err)
 | 
			
		||||
          this.flag = false
 | 
			
		||||
        })
 | 
			
		||||
    },
 | 
			
		||||
  },
 | 
			
		||||
  onReachBottom() {
 | 
			
		||||
    this.current = this.current + 1
 | 
			
		||||
@@ -344,6 +388,9 @@ export default {
 | 
			
		||||
                font-size: 26px;
 | 
			
		||||
                color: #6e727a;
 | 
			
		||||
                margin-top: 6px;
 | 
			
		||||
                .topics {
 | 
			
		||||
                  margin-right: 8px;
 | 
			
		||||
                }
 | 
			
		||||
              }
 | 
			
		||||
            }
 | 
			
		||||
 | 
			
		||||
@@ -362,10 +409,15 @@ export default {
 | 
			
		||||
              .status2 {
 | 
			
		||||
                color: #ff883c;
 | 
			
		||||
              }
 | 
			
		||||
              .dels {
 | 
			
		||||
                margin-left: 20px;
 | 
			
		||||
                width: 68px;
 | 
			
		||||
                height: 68px;
 | 
			
		||||
              .statusRight {
 | 
			
		||||
                display: flex;
 | 
			
		||||
                flex-direction: column;
 | 
			
		||||
                align-items: center;
 | 
			
		||||
                .dels {
 | 
			
		||||
                  margin-left: 20px;
 | 
			
		||||
                  // width: 68px;
 | 
			
		||||
                  // height: 68px;
 | 
			
		||||
                }
 | 
			
		||||
              }
 | 
			
		||||
            }
 | 
			
		||||
          }
 | 
			
		||||
 
 | 
			
		||||
@@ -6,20 +6,20 @@
 | 
			
		||||
 | 
			
		||||
    <div class="middle">
 | 
			
		||||
      <div class="cardTop">
 | 
			
		||||
        <img :src="avatarUrl" alt="" />
 | 
			
		||||
        <img :src="avatarUrl || user.avatarUrl" alt="" />
 | 
			
		||||
 | 
			
		||||
        <div class="rightTop">
 | 
			
		||||
          <div class="leftStaus">
 | 
			
		||||
            <span class="names">{{ detail.createUserName }}</span>
 | 
			
		||||
 | 
			
		||||
            <span class="titless">{{ $dict.getLabel('villagerCircleTopic', detail.topic) }} | {{ detail.status }}</span>
 | 
			
		||||
            <span class="titless">{{ $dict.getLabel('villagerCircleTopic', detail.topic) }} | {{ detail.createTime }}</span>
 | 
			
		||||
          </div>
 | 
			
		||||
 | 
			
		||||
          <div class="statusDele">
 | 
			
		||||
            <div class="status status0" :class="detail.auditStatus == 0 ? 'status0' : detail.auditStatus == 1 ? 'status1' : 'status2'">{{ $dict.getLabel('auditStatus', detail.status) }}</div>
 | 
			
		||||
 | 
			
		||||
            <div class="dels" @click.stop=";(modalShow = true), (deleId = detail.id)">删除</div>
 | 
			
		||||
            <!-- <img src="https://cdn.cunwuyun.cn/dvcp/AppVillager4.png" alt="" @click.stop="delShow = true" class="dels" /> -->
 | 
			
		||||
            <!-- <img src="https://cdn.cunwuyun.cn/dvcp/AppVillager/4.png" alt="" @click.stop="delShow = true" class="dels" /> -->
 | 
			
		||||
          </div>
 | 
			
		||||
        </div>
 | 
			
		||||
      </div>
 | 
			
		||||
@@ -38,30 +38,28 @@
 | 
			
		||||
 | 
			
		||||
        <div class="icones">
 | 
			
		||||
          <div class="img1">
 | 
			
		||||
            <img src="https://cdn.cunwuyun.cn/dvcp/AppVillager1.png" alt="" class="img11" />
 | 
			
		||||
            <img src="https://cdn.cunwuyun.cn/dvcp/AppVillager/1.png" alt="" class="img11" />
 | 
			
		||||
          </div>
 | 
			
		||||
 | 
			
		||||
          <div class="rightFlex">
 | 
			
		||||
            <img src="https://cdn.cunwuyun.cn/dvcp/AppVillager2.png" alt="" class="img2" @click="poupShow = true" />
 | 
			
		||||
            <img src="https://cdn.cunwuyun.cn/dvcp/AppVillager3.png" alt="" class="img3" @click="like" />
 | 
			
		||||
            <img src="https://cdn.cunwuyun.cn/dvcp/AppVillager/2.png" alt="" class="img2" @click="poupShow = true" />
 | 
			
		||||
            <img src="https://cdn.cunwuyun.cn/dvcp/AppVillager/3.png" alt="" class="img3" @click="like" />
 | 
			
		||||
          </div>
 | 
			
		||||
        </div>
 | 
			
		||||
      </div>
 | 
			
		||||
 | 
			
		||||
      <div class="reply">
 | 
			
		||||
        <div class="replyTop" @click="deleShowBtn(item)">
 | 
			
		||||
          <img src="https://cdn.cunwuyun.cn/dvcp/AppVillager3.png" alt="" />
 | 
			
		||||
          <span class="people">张三、李四、陶白白等12人</span>
 | 
			
		||||
          <img src="https://cdn.cunwuyun.cn/dvcp/AppVillager/3.png" alt="" />
 | 
			
		||||
          <span class="people">
 | 
			
		||||
            <span v-for="(items, index) in detail.comments || detail.villagerCircleInfo.comments" :key="index" v-if="index < 3">{{ items.replyUserName }}</span>
 | 
			
		||||
            等{{ detail.villagerCircleInfo ? detail.villagerCircleInfo.comments.length : detail.comments.length }}人</span
 | 
			
		||||
          >
 | 
			
		||||
        </div>
 | 
			
		||||
 | 
			
		||||
        <div class="replyCont" @click="deleShowBtn(item)">
 | 
			
		||||
          <span class="nameLeft">张三:</span>
 | 
			
		||||
          <span class="contRight">非常不错!</span>
 | 
			
		||||
        </div>
 | 
			
		||||
 | 
			
		||||
        <div class="replyCont" @click="deleShowBtn(item)">
 | 
			
		||||
          <span class="nameLeft">张三:</span>
 | 
			
		||||
          <span class="contRight">为什么不带上我呢!为什么不带上我呢!为什么不带上我呢!</span>
 | 
			
		||||
        <div class="replyCont" @click="deleShowBtn(item)" v-for="(item, i) in detail.comments || detail.villagerCircleInfo.comments" :key="i">
 | 
			
		||||
          <span class="nameLeft">{{ item.replyUserName }} : </span>
 | 
			
		||||
          <span class="contRight"> {{ item.content }}</span>
 | 
			
		||||
        </div>
 | 
			
		||||
      </div>
 | 
			
		||||
    </div>
 | 
			
		||||
@@ -101,7 +99,7 @@ export default {
 | 
			
		||||
    return {
 | 
			
		||||
      id: '',
 | 
			
		||||
      avatarUrl: '',
 | 
			
		||||
      data: {},
 | 
			
		||||
      detail: {},
 | 
			
		||||
      poupShow: false,
 | 
			
		||||
      content: '',
 | 
			
		||||
      flag: false,
 | 
			
		||||
@@ -109,34 +107,35 @@ export default {
 | 
			
		||||
      deleShow: false,
 | 
			
		||||
      modalShow: false,
 | 
			
		||||
      deleId: '',
 | 
			
		||||
      flagLike: false,
 | 
			
		||||
      tabCurrent1: '',
 | 
			
		||||
    }
 | 
			
		||||
  },
 | 
			
		||||
  computed: { ...mapState(['user']) },
 | 
			
		||||
  watch: {},
 | 
			
		||||
  onLoad(o) {
 | 
			
		||||
    this.$dict.load('villagerCircleTopic').then(() => {
 | 
			
		||||
      console.log(o)
 | 
			
		||||
      this.id = o.id
 | 
			
		||||
      this.avatarUrl = o.avatarUrl
 | 
			
		||||
      this.tabCurrent1 = o.tabCurrent1
 | 
			
		||||
      this.getDetail()
 | 
			
		||||
    })
 | 
			
		||||
  },
 | 
			
		||||
  onShow() {},
 | 
			
		||||
  methods: {
 | 
			
		||||
    getDetail() {
 | 
			
		||||
      this.$instance.post(`/app/appvillagercircleinfo/queryDetailById?id=${this.id}`).then((res) => {
 | 
			
		||||
        if (res.code == 0) {
 | 
			
		||||
          this.detail = res.data
 | 
			
		||||
          this.getReplyList()
 | 
			
		||||
        }
 | 
			
		||||
      })
 | 
			
		||||
    },
 | 
			
		||||
 | 
			
		||||
    getReplyList() {
 | 
			
		||||
      this.$instance.post(`/app/appvillagercirclecomment/list?id=${detail.id}&size=999`).then((res) => {
 | 
			
		||||
        if (res.code == 0) {
 | 
			
		||||
          this.replylist = res.data.records
 | 
			
		||||
        }
 | 
			
		||||
      })
 | 
			
		||||
      this.$instance
 | 
			
		||||
        .post(this.tabCurrent1 == 0 ? '/app/appvillagercircleinfo/queryDetailById' : '/app/appvillagercirclecomment/queryDetailById', null, {
 | 
			
		||||
          params: {
 | 
			
		||||
            id: this.id,
 | 
			
		||||
          },
 | 
			
		||||
        })
 | 
			
		||||
        .then((res) => {
 | 
			
		||||
          if (res.code == 0) {
 | 
			
		||||
            this.detail = res.data
 | 
			
		||||
          }
 | 
			
		||||
        })
 | 
			
		||||
    },
 | 
			
		||||
 | 
			
		||||
    send() {
 | 
			
		||||
@@ -151,7 +150,7 @@ export default {
 | 
			
		||||
          replyUserResidentId: this.user.id,
 | 
			
		||||
          replyUserName: this.user.name,
 | 
			
		||||
          areaId: this.$areaId,
 | 
			
		||||
          id: '888',
 | 
			
		||||
          vcId: this.detail.id,
 | 
			
		||||
        })
 | 
			
		||||
        .then((res) => {
 | 
			
		||||
          if (res?.code == 0) {
 | 
			
		||||
@@ -159,24 +158,30 @@ export default {
 | 
			
		||||
            this.flag = false
 | 
			
		||||
            this.content = ''
 | 
			
		||||
            this.poupShow = false
 | 
			
		||||
            // this.getDetail()
 | 
			
		||||
            this.getDetail()
 | 
			
		||||
          }
 | 
			
		||||
        })
 | 
			
		||||
    },
 | 
			
		||||
 | 
			
		||||
    like() {
 | 
			
		||||
      var id = '88'
 | 
			
		||||
      if (this.flagLike) return
 | 
			
		||||
 | 
			
		||||
      this.flagLike = true
 | 
			
		||||
      this.$instance
 | 
			
		||||
        .post(`/app/appvillagediscussmessage/suport?id=${id}&userId=${this.user.id}`)
 | 
			
		||||
        .post(`/app/appvillagercircleinfo/up?id=${this.detail.id}&userId=${this.user.id}`)
 | 
			
		||||
        .then((res) => {
 | 
			
		||||
          this.$hideLoading()
 | 
			
		||||
          if (res.code === 0) {
 | 
			
		||||
            this.$u.toast('点赞成功')
 | 
			
		||||
            this.$u.toast(detail.upFlag == 0 ? '点赞成功' : '取消点赞成功')
 | 
			
		||||
            this.getDetail()
 | 
			
		||||
            setTimeout(() => {
 | 
			
		||||
              this.flagLike = false
 | 
			
		||||
            }, 600)
 | 
			
		||||
          }
 | 
			
		||||
        })
 | 
			
		||||
        .catch((err) => {
 | 
			
		||||
          this.$u.toast(err)
 | 
			
		||||
          this.flagLike = false
 | 
			
		||||
        })
 | 
			
		||||
    },
 | 
			
		||||
 | 
			
		||||
@@ -235,10 +240,9 @@ export default {
 | 
			
		||||
  }
 | 
			
		||||
 | 
			
		||||
  .middle {
 | 
			
		||||
    padding-bottom: 48px;
 | 
			
		||||
    padding: 32px 0 48px 0;
 | 
			
		||||
    .cardTop {
 | 
			
		||||
      display: flex;
 | 
			
		||||
      margin-top: 32px;
 | 
			
		||||
      img {
 | 
			
		||||
        width: 96px;
 | 
			
		||||
        height: 96px;
 | 
			
		||||
@@ -282,7 +286,7 @@ export default {
 | 
			
		||||
          .dels {
 | 
			
		||||
            margin-left: 20px;
 | 
			
		||||
            width: 68px;
 | 
			
		||||
            height: 68px;
 | 
			
		||||
            // height: 68px;
 | 
			
		||||
          }
 | 
			
		||||
        }
 | 
			
		||||
      }
 | 
			
		||||
@@ -363,6 +367,7 @@ export default {
 | 
			
		||||
        font-weight: 500;
 | 
			
		||||
        .nameLeft {
 | 
			
		||||
          color: #485d87;
 | 
			
		||||
          margin-right: 12px;
 | 
			
		||||
        }
 | 
			
		||||
        .contRight {
 | 
			
		||||
          color: #485d87;
 | 
			
		||||
 
 | 
			
		||||
		Reference in New Issue
	
	Block a user