BUG 30376
This commit is contained in:
		@@ -15,12 +15,15 @@
 | 
			
		||||
            </div>
 | 
			
		||||
          </div>
 | 
			
		||||
        </div>
 | 
			
		||||
        <div class="photo-item__bottom">
 | 
			
		||||
          <i :class="'status-' + item.eventStatus"></i>
 | 
			
		||||
          <span :class="'status-' + item.eventStatus">{{ item.statusName }}</span>
 | 
			
		||||
        <div class="photo-item__bottom flex">
 | 
			
		||||
          <div class="flex fill">
 | 
			
		||||
            <i :class="'status-' + item.eventStatus"></i>
 | 
			
		||||
            <span :class="'status-' + item.eventStatus">{{ item.statusName }}</span>
 | 
			
		||||
          </div>
 | 
			
		||||
          <div class="color-red" @click.stop="handleDelete(item.id)">删除</div>
 | 
			
		||||
        </div>
 | 
			
		||||
      </div>
 | 
			
		||||
      <AiEmpty v-if="!list.length"></AiEmpty>
 | 
			
		||||
      <AiEmpty v-if="!list.length"/>
 | 
			
		||||
    </div>
 | 
			
		||||
    <div class="btn-wrapper">
 | 
			
		||||
      <div class="btn" @click="toReport" hover-class="text-hover">我要上报</div>
 | 
			
		||||
@@ -29,178 +32,193 @@
 | 
			
		||||
</template>
 | 
			
		||||
 | 
			
		||||
<script>
 | 
			
		||||
  import { mapState } from 'vuex'
 | 
			
		||||
  export default {
 | 
			
		||||
    name:"AppPhotoReport",
 | 
			
		||||
    appName:"随手拍",
 | 
			
		||||
    data () {
 | 
			
		||||
      return {
 | 
			
		||||
        list: [],
 | 
			
		||||
        pageShow: false,
 | 
			
		||||
        current: 1,
 | 
			
		||||
        total: 0,
 | 
			
		||||
        isMore: false
 | 
			
		||||
      }
 | 
			
		||||
    },
 | 
			
		||||
import {mapState} from 'vuex'
 | 
			
		||||
 | 
			
		||||
    computed: {
 | 
			
		||||
      ...mapState(['user'])
 | 
			
		||||
    },
 | 
			
		||||
 | 
			
		||||
    onLoad () {
 | 
			
		||||
      this.$loading()
 | 
			
		||||
      this.$dict.load(['clapEventStatus']).then(() => {
 | 
			
		||||
        this.getList()
 | 
			
		||||
      })
 | 
			
		||||
 | 
			
		||||
      uni.$on('update', () => {
 | 
			
		||||
        this.current = 1
 | 
			
		||||
        this.isMore = false
 | 
			
		||||
 | 
			
		||||
        this.getList()
 | 
			
		||||
      })
 | 
			
		||||
    },
 | 
			
		||||
 | 
			
		||||
    methods: {
 | 
			
		||||
      toReport () {
 | 
			
		||||
        this.$linkTo('./PhotoForm')
 | 
			
		||||
      },
 | 
			
		||||
 | 
			
		||||
      getList() {
 | 
			
		||||
        if (this.isMore) return
 | 
			
		||||
 | 
			
		||||
        this.$instance.post(`/app/appclapeventinfo/listByWxApplet`, null, {
 | 
			
		||||
          params: {
 | 
			
		||||
            current: this.current,
 | 
			
		||||
            size: 15
 | 
			
		||||
          }
 | 
			
		||||
        }).then(res => {
 | 
			
		||||
          if (res.code == 0) {
 | 
			
		||||
            this.total = res.data.total
 | 
			
		||||
            if (this.current > 1) {
 | 
			
		||||
              this.list = [...this.list, ...res.data.records].map(v => {
 | 
			
		||||
                return {
 | 
			
		||||
                  ...v,
 | 
			
		||||
                  statusName: this.$dict.getLabel('clapEventStatus', v.eventStatus)
 | 
			
		||||
                }
 | 
			
		||||
              })
 | 
			
		||||
            } else {
 | 
			
		||||
              this.list = res.data.records.map(v => {
 | 
			
		||||
                return {
 | 
			
		||||
                  ...v,
 | 
			
		||||
                  statusName: this.$dict.getLabel('clapEventStatus', v.eventStatus)
 | 
			
		||||
                }
 | 
			
		||||
              })
 | 
			
		||||
            }
 | 
			
		||||
            uni.hideLoading()
 | 
			
		||||
            this.pageShow = true
 | 
			
		||||
            if (res.data.records.length < 15) {
 | 
			
		||||
              this.isMore = true
 | 
			
		||||
 | 
			
		||||
              return false
 | 
			
		||||
            }
 | 
			
		||||
 | 
			
		||||
            this.current = this.current + 1
 | 
			
		||||
          } else {
 | 
			
		||||
            uni.hideLoading()
 | 
			
		||||
          }
 | 
			
		||||
        }).catch(() => {
 | 
			
		||||
          uni.hideLoading()
 | 
			
		||||
        })
 | 
			
		||||
      }
 | 
			
		||||
    },
 | 
			
		||||
 | 
			
		||||
    onReachBottom() {
 | 
			
		||||
      this.getList()
 | 
			
		||||
export default {
 | 
			
		||||
  name: "AppPhotoReport",
 | 
			
		||||
  appName: "随手拍",
 | 
			
		||||
  data() {
 | 
			
		||||
    return {
 | 
			
		||||
      list: [],
 | 
			
		||||
      pageShow: false,
 | 
			
		||||
      current: 1,
 | 
			
		||||
      total: 0,
 | 
			
		||||
      isMore: false
 | 
			
		||||
    }
 | 
			
		||||
  },
 | 
			
		||||
 | 
			
		||||
  computed: {
 | 
			
		||||
    ...mapState(['user'])
 | 
			
		||||
  },
 | 
			
		||||
 | 
			
		||||
  onLoad() {
 | 
			
		||||
    this.$loading()
 | 
			
		||||
    this.$dict.load(['clapEventStatus']).then(() => {
 | 
			
		||||
      this.getList()
 | 
			
		||||
    })
 | 
			
		||||
 | 
			
		||||
    uni.$on('update', () => {
 | 
			
		||||
      this.current = 1
 | 
			
		||||
      this.isMore = false
 | 
			
		||||
 | 
			
		||||
      this.getList()
 | 
			
		||||
    })
 | 
			
		||||
  },
 | 
			
		||||
 | 
			
		||||
  methods: {
 | 
			
		||||
    toReport() {
 | 
			
		||||
      this.$linkTo('./PhotoForm')
 | 
			
		||||
    },
 | 
			
		||||
 | 
			
		||||
    getList() {
 | 
			
		||||
      if (this.isMore) return
 | 
			
		||||
 | 
			
		||||
      this.$instance.post(`/app/appclapeventinfo/listByWxApplet`, null, {
 | 
			
		||||
        params: {
 | 
			
		||||
          current: this.current,
 | 
			
		||||
          size: 15
 | 
			
		||||
        }
 | 
			
		||||
      }).then(res => {
 | 
			
		||||
        if (res.code == 0) {
 | 
			
		||||
          this.total = res.data.total
 | 
			
		||||
          if (this.current > 1) {
 | 
			
		||||
            this.list = [...this.list, ...res.data.records].map(v => {
 | 
			
		||||
              return {
 | 
			
		||||
                ...v,
 | 
			
		||||
                statusName: this.$dict.getLabel('clapEventStatus', v.eventStatus)
 | 
			
		||||
              }
 | 
			
		||||
            })
 | 
			
		||||
          } else {
 | 
			
		||||
            this.list = res.data.records.map(v => {
 | 
			
		||||
              return {
 | 
			
		||||
                ...v,
 | 
			
		||||
                statusName: this.$dict.getLabel('clapEventStatus', v.eventStatus)
 | 
			
		||||
              }
 | 
			
		||||
            })
 | 
			
		||||
          }
 | 
			
		||||
          uni.hideLoading()
 | 
			
		||||
          this.pageShow = true
 | 
			
		||||
          if (res.data.records.length < 15) {
 | 
			
		||||
            this.isMore = true
 | 
			
		||||
 | 
			
		||||
            return false
 | 
			
		||||
          }
 | 
			
		||||
 | 
			
		||||
          this.current = this.current + 1
 | 
			
		||||
        } else {
 | 
			
		||||
          uni.hideLoading()
 | 
			
		||||
        }
 | 
			
		||||
      }).catch(() => {
 | 
			
		||||
        uni.hideLoading()
 | 
			
		||||
      })
 | 
			
		||||
    },
 | 
			
		||||
    handleDelete(ids) {
 | 
			
		||||
      this.$dialog.confirm({content: "是否要进行删除?"}).then(() => {
 | 
			
		||||
        this.$instance.post("/app/appclapeventinfo/delete", null, {
 | 
			
		||||
          params: {ids}
 | 
			
		||||
        }).then(res => {
 | 
			
		||||
          if (res?.code == 0) {
 | 
			
		||||
            this.$u.toast("删除成功!")
 | 
			
		||||
            this.current = 1
 | 
			
		||||
            this.isMore = false
 | 
			
		||||
            this.getList()
 | 
			
		||||
          }
 | 
			
		||||
        })
 | 
			
		||||
      }).catch(() => 0)
 | 
			
		||||
    }
 | 
			
		||||
  },
 | 
			
		||||
 | 
			
		||||
  onReachBottom() {
 | 
			
		||||
    this.getList()
 | 
			
		||||
  }
 | 
			
		||||
}
 | 
			
		||||
</script>
 | 
			
		||||
 | 
			
		||||
<style lang="scss">
 | 
			
		||||
  .photo-list {
 | 
			
		||||
    padding: 24px 0 150px 0;
 | 
			
		||||
.photo-list {
 | 
			
		||||
  padding: 24px 0 150px 0;
 | 
			
		||||
 | 
			
		||||
    .photo-item {
 | 
			
		||||
      width: 686px;
 | 
			
		||||
      margin: 0 auto 24px;
 | 
			
		||||
      background: #FFFFFF;
 | 
			
		||||
      box-shadow: 0 0 8px 0 rgba(0, 0, 0, 0.02);
 | 
			
		||||
      border-radius: 16px;
 | 
			
		||||
  .photo-item {
 | 
			
		||||
    width: 686px;
 | 
			
		||||
    margin: 0 auto 24px;
 | 
			
		||||
    background: #FFFFFF;
 | 
			
		||||
    box-shadow: 0 0 8px 0 rgba(0, 0, 0, 0.02);
 | 
			
		||||
    border-radius: 16px;
 | 
			
		||||
 | 
			
		||||
      .photo-item__top {
 | 
			
		||||
        padding: 32px;
 | 
			
		||||
        text-align: justify;
 | 
			
		||||
    .photo-item__top {
 | 
			
		||||
      padding: 32px;
 | 
			
		||||
      text-align: justify;
 | 
			
		||||
 | 
			
		||||
        h2 {
 | 
			
		||||
          margin-bottom: 32px;
 | 
			
		||||
          line-height: 1.4;
 | 
			
		||||
          color: #333333;
 | 
			
		||||
          font-size: 32px;
 | 
			
		||||
          font-weight: 600;
 | 
			
		||||
          overflow : hidden;
 | 
			
		||||
          text-overflow: ellipsis;
 | 
			
		||||
          display: -webkit-box;
 | 
			
		||||
          -webkit-line-clamp: 2;
 | 
			
		||||
          -webkit-box-orient: vertical;
 | 
			
		||||
        }
 | 
			
		||||
 | 
			
		||||
        .photo-item__top--info-item {
 | 
			
		||||
          display: flex;
 | 
			
		||||
          align-items: center;
 | 
			
		||||
 | 
			
		||||
          &:last-child {
 | 
			
		||||
            margin-bottom: 8px;
 | 
			
		||||
          }
 | 
			
		||||
 | 
			
		||||
          label {
 | 
			
		||||
            margin-right: 32px;
 | 
			
		||||
            color: #999999;
 | 
			
		||||
            font-size: 26px;
 | 
			
		||||
          }
 | 
			
		||||
 | 
			
		||||
          span {
 | 
			
		||||
            color: #333333;
 | 
			
		||||
            font-size: 26px;
 | 
			
		||||
          }
 | 
			
		||||
        }
 | 
			
		||||
      h2 {
 | 
			
		||||
        margin-bottom: 32px;
 | 
			
		||||
        line-height: 1.4;
 | 
			
		||||
        color: #333333;
 | 
			
		||||
        font-size: 32px;
 | 
			
		||||
        font-weight: 600;
 | 
			
		||||
        overflow: hidden;
 | 
			
		||||
        text-overflow: ellipsis;
 | 
			
		||||
        display: -webkit-box;
 | 
			
		||||
        -webkit-line-clamp: 2;
 | 
			
		||||
        -webkit-box-orient: vertical;
 | 
			
		||||
      }
 | 
			
		||||
 | 
			
		||||
      .photo-item__bottom {
 | 
			
		||||
      .photo-item__top--info-item {
 | 
			
		||||
        display: flex;
 | 
			
		||||
        align-items: center;
 | 
			
		||||
        height: 104px;
 | 
			
		||||
        padding: 0 32px;
 | 
			
		||||
        border-top: 1px solid #DDDDDD;
 | 
			
		||||
 | 
			
		||||
        i {
 | 
			
		||||
          width: 8px;
 | 
			
		||||
          height: 8px;
 | 
			
		||||
          margin-right: 8px;
 | 
			
		||||
          border-radius: 50%;
 | 
			
		||||
          background: #FF883C;
 | 
			
		||||
        &:last-child {
 | 
			
		||||
          margin-bottom: 8px;
 | 
			
		||||
        }
 | 
			
		||||
 | 
			
		||||
        label {
 | 
			
		||||
          margin-right: 32px;
 | 
			
		||||
          color: #999999;
 | 
			
		||||
          font-size: 26px;
 | 
			
		||||
        }
 | 
			
		||||
 | 
			
		||||
        span {
 | 
			
		||||
          color: #FF883C;
 | 
			
		||||
          font-size: 28px;
 | 
			
		||||
          background: transparent!important;
 | 
			
		||||
        }
 | 
			
		||||
 | 
			
		||||
        .status-1 {
 | 
			
		||||
          color: #1AAAFF;
 | 
			
		||||
          background: #1AAAFF;
 | 
			
		||||
        }
 | 
			
		||||
 | 
			
		||||
        .status-2 {
 | 
			
		||||
          color: #42D784;
 | 
			
		||||
          background: #42D784;
 | 
			
		||||
        }
 | 
			
		||||
 | 
			
		||||
        .status-3 {
 | 
			
		||||
          color: #FF4466;
 | 
			
		||||
          background: #FF4466;
 | 
			
		||||
          color: #333333;
 | 
			
		||||
          font-size: 26px;
 | 
			
		||||
        }
 | 
			
		||||
      }
 | 
			
		||||
    }
 | 
			
		||||
 | 
			
		||||
    .photo-item__bottom {
 | 
			
		||||
      display: flex;
 | 
			
		||||
      align-items: center;
 | 
			
		||||
      height: 104px;
 | 
			
		||||
      padding: 0 32px;
 | 
			
		||||
      border-top: 1px solid #DDDDDD;
 | 
			
		||||
 | 
			
		||||
      i {
 | 
			
		||||
        width: 8px;
 | 
			
		||||
        height: 8px;
 | 
			
		||||
        margin-right: 8px;
 | 
			
		||||
        border-radius: 50%;
 | 
			
		||||
        background: #FF883C;
 | 
			
		||||
      }
 | 
			
		||||
 | 
			
		||||
      span {
 | 
			
		||||
        color: #FF883C;
 | 
			
		||||
        font-size: 28px;
 | 
			
		||||
        background: transparent !important;
 | 
			
		||||
      }
 | 
			
		||||
 | 
			
		||||
      .status-1 {
 | 
			
		||||
        color: #1AAAFF;
 | 
			
		||||
        background: #1AAAFF;
 | 
			
		||||
      }
 | 
			
		||||
 | 
			
		||||
      .status-2 {
 | 
			
		||||
        color: #42D784;
 | 
			
		||||
        background: #42D784;
 | 
			
		||||
      }
 | 
			
		||||
 | 
			
		||||
      .status-3 {
 | 
			
		||||
        color: #FF4466;
 | 
			
		||||
        background: #FF4466;
 | 
			
		||||
      }
 | 
			
		||||
    }
 | 
			
		||||
  }
 | 
			
		||||
}
 | 
			
		||||
</style>
 | 
			
		||||
 
 | 
			
		||||
		Reference in New Issue
	
	Block a user