BUG 25821
This commit is contained in:
		@@ -1,9 +1,10 @@
 | 
			
		||||
<template>
 | 
			
		||||
  <div class="AppUniMsg">
 | 
			
		||||
    <u-tabs :list="tabList" :is-scroll="false" :current="currentTabs" height="96" bg-color="#3975C6" inactive-color="#fff" active-color="#fff" @change="change"></u-tabs>
 | 
			
		||||
    <u-tabs :list="tabList" :is-scroll="false" :current="currentTabs" height="96" bg-color="#3975C6"
 | 
			
		||||
            inactive-color="#fff" active-color="#fff" @change="change"></u-tabs>
 | 
			
		||||
 | 
			
		||||
    <template v-if="datas.length > 0">
 | 
			
		||||
      <AiCard v-for="(item, i) in datas" :key="i" @click.native="toAdd(item, 1)">
 | 
			
		||||
      <AiCard v-for="(item, i) in datas" :ref="item.id" :key="i" @click.native="toAdd(item, 1)">
 | 
			
		||||
        <template #custom>
 | 
			
		||||
          <div class="titles">
 | 
			
		||||
            {{ item.title }}
 | 
			
		||||
@@ -20,7 +21,8 @@
 | 
			
		||||
          </div>
 | 
			
		||||
 | 
			
		||||
          <div class="imgs">
 | 
			
		||||
            <img :src="items.url" alt="" v-for="(items, i) in item.images" :key="i" v-if="i < 3"  @click.stop="previewImage(item.images, items.url)" />
 | 
			
		||||
            <img :src="items.url" alt="" v-for="(items, i) in item.images" :key="i" v-if="i < 3"
 | 
			
		||||
                 @click.stop="previewImage(item.images, items.url)"/>
 | 
			
		||||
          </div>
 | 
			
		||||
        </template>
 | 
			
		||||
 | 
			
		||||
@@ -30,21 +32,22 @@
 | 
			
		||||
        </template>
 | 
			
		||||
      </AiCard>
 | 
			
		||||
 | 
			
		||||
      <u-loadmore :status="loadmore" color="#999" font-size="24" margin-top="32" margin-bottom="80" />
 | 
			
		||||
      <u-loadmore :status="loadmore" color="#999" font-size="24" margin-top="32" margin-bottom="80"/>
 | 
			
		||||
    </template>
 | 
			
		||||
 | 
			
		||||
    <AiEmpty description="暂无数据" v-else></AiEmpty>
 | 
			
		||||
 | 
			
		||||
    <AiFixedBtn>
 | 
			
		||||
      <div class="addBtn iconfont iconfont-iconfangda" @tap.stop="toAdd()" />
 | 
			
		||||
      <div class="addBtn iconfont iconfont-iconfangda" @tap.stop="toAdd()"/>
 | 
			
		||||
    </AiFixedBtn>
 | 
			
		||||
 | 
			
		||||
    <u-modal v-model="deletShow" content="您确认要删除该条信息吗?" :show-cancel-button="true" :mask-close-able="true" :show-title="false" @confirm="delet"></u-modal>
 | 
			
		||||
    <u-modal v-model="deletShow" content="您确认要删除该条信息吗?" :show-cancel-button="true" :mask-close-able="true"
 | 
			
		||||
             :show-title="false" @confirm="delet"></u-modal>
 | 
			
		||||
  </div>
 | 
			
		||||
</template>
 | 
			
		||||
 | 
			
		||||
<script>
 | 
			
		||||
import { mapState } from 'vuex'
 | 
			
		||||
import {mapState} from 'vuex'
 | 
			
		||||
 | 
			
		||||
export default {
 | 
			
		||||
  name: 'AppUniMsg',
 | 
			
		||||
@@ -80,7 +83,8 @@ export default {
 | 
			
		||||
  onLoad() {
 | 
			
		||||
    this.getList()
 | 
			
		||||
  },
 | 
			
		||||
  onShow() {},
 | 
			
		||||
  onShow() {
 | 
			
		||||
  },
 | 
			
		||||
  methods: {
 | 
			
		||||
    getList() {
 | 
			
		||||
      this.$http
 | 
			
		||||
@@ -109,24 +113,24 @@ export default {
 | 
			
		||||
    },
 | 
			
		||||
 | 
			
		||||
    toAdd(item, type) {
 | 
			
		||||
      console.log(type)
 | 
			
		||||
      if (item?.id) {
 | 
			
		||||
        this.$refs?.[item.id]?.[0]?.handleClose()
 | 
			
		||||
      }
 | 
			
		||||
      if (type == '1') {
 | 
			
		||||
        console.log('详情')
 | 
			
		||||
        uni.navigateTo({ url: `./Detail?id=${item.id}` })
 | 
			
		||||
        uni.navigateTo({url: `./Detail?id=${item.id}`})
 | 
			
		||||
      }
 | 
			
		||||
      if (type == '2') {
 | 
			
		||||
        console.log('编辑')
 | 
			
		||||
        uni.navigateTo({ url: `./Add?id=${item.id}` })
 | 
			
		||||
        uni.navigateTo({url: `./Add?id=${item.id}`})
 | 
			
		||||
      }
 | 
			
		||||
      if (type == null) {
 | 
			
		||||
        console.log('添加')
 | 
			
		||||
        uni.navigateTo({ url: `./Add` })
 | 
			
		||||
        uni.navigateTo({url: `./Add`})
 | 
			
		||||
      }
 | 
			
		||||
    },
 | 
			
		||||
 | 
			
		||||
    toDetele(item) {
 | 
			
		||||
      this.deletShow = true
 | 
			
		||||
      this.deletId = item.id
 | 
			
		||||
      this.$refs?.[item.id]?.[0]?.handleClose()
 | 
			
		||||
    },
 | 
			
		||||
 | 
			
		||||
    delet() {
 | 
			
		||||
@@ -143,7 +147,7 @@ export default {
 | 
			
		||||
      this.getList()
 | 
			
		||||
    },
 | 
			
		||||
 | 
			
		||||
    previewImage (images, img) {
 | 
			
		||||
    previewImage(images, img) {
 | 
			
		||||
      uni.previewImage({
 | 
			
		||||
        urls: images.map(v => v.url),
 | 
			
		||||
        current: img
 | 
			
		||||
@@ -161,36 +165,45 @@ export default {
 | 
			
		||||
uni-page-body {
 | 
			
		||||
  height: 100%;
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
.AppUniMsg {
 | 
			
		||||
  height: 100%;
 | 
			
		||||
 | 
			
		||||
  ::v-deep .AiCard {
 | 
			
		||||
    background: #f3f6f9;
 | 
			
		||||
 | 
			
		||||
    .start {
 | 
			
		||||
      background: #fff;
 | 
			
		||||
      padding: 32px;
 | 
			
		||||
      border-radius: 16px;
 | 
			
		||||
 | 
			
		||||
      .fill {
 | 
			
		||||
        .titles {
 | 
			
		||||
          font-size: 30px;
 | 
			
		||||
          color: #333;
 | 
			
		||||
          font-family: 500;
 | 
			
		||||
        }
 | 
			
		||||
 | 
			
		||||
        .imgs {
 | 
			
		||||
          margin-top: 10px;
 | 
			
		||||
 | 
			
		||||
          img {
 | 
			
		||||
            width: 200px;
 | 
			
		||||
            height: 200px;
 | 
			
		||||
            margin-right: 8px;
 | 
			
		||||
          }
 | 
			
		||||
 | 
			
		||||
          img:nth-child(3n) {
 | 
			
		||||
            margin-right: 0;
 | 
			
		||||
          }
 | 
			
		||||
        }
 | 
			
		||||
      }
 | 
			
		||||
    }
 | 
			
		||||
 | 
			
		||||
    .mask {
 | 
			
		||||
      .moreMenu {
 | 
			
		||||
        transform: translate(-175px, 20px);
 | 
			
		||||
 | 
			
		||||
        .menu {
 | 
			
		||||
          text-align: center;
 | 
			
		||||
          line-height: 80px;
 | 
			
		||||
 
 | 
			
		||||
		Reference in New Issue
	
	Block a user