bug
This commit is contained in:
		@@ -2,10 +2,10 @@
 | 
			
		||||
  <div class="home">
 | 
			
		||||
    <image class="banner" src="https://jisheng-xiaochengxu.oss-cn-hangzhou.aliyuncs.com/admin/5bad9165-fa6e-4c81-894d-2beae426260b.png" />
 | 
			
		||||
    <div class="nav">
 | 
			
		||||
      <div class="nav-item">
 | 
			
		||||
      <div class="nav-item" hover-class="text-hover" @click="$linkTo('./PhotoReport')">
 | 
			
		||||
        <span>随手拍</span>
 | 
			
		||||
      </div>
 | 
			
		||||
      <div class="nav-item">
 | 
			
		||||
      <div class="nav-item" @click="$linkTo('./Culture')">
 | 
			
		||||
        <span>文明倡导</span>
 | 
			
		||||
        <image src="https://jisheng-xiaochengxu.oss-cn-hangzhou.aliyuncs.com/admin/5bad9165-fa6e-4c81-894d-2beae426260b.png" />
 | 
			
		||||
      </div>
 | 
			
		||||
@@ -13,7 +13,7 @@
 | 
			
		||||
    <div class="activity-wrapper">
 | 
			
		||||
      <h2>线下活动</h2>
 | 
			
		||||
      <div class="activity-list">
 | 
			
		||||
        <div class="activity-item" @click="$linkTo('./Activity')" hover-class="bg-hover" v-for="(item, index) in 10" :key="index">
 | 
			
		||||
        <div class="activity-item" @click="$linkTo('./Activity')" hover-class="bg-hover" v-for="(item, index) in list" :key="index">
 | 
			
		||||
          <div class="top">
 | 
			
		||||
            <h2>10月31日线下公益宣传</h2>
 | 
			
		||||
            <p>百年征程波澜壮阔,百年初心历久弥坚。7月1日上午,庆祝中国共产党成立100周年大会在北百年征程波澜壮阔,百年初心历久弥坚。7月1日上午,庆祝中国共产党成立100周年大会在北…</p>
 | 
			
		||||
@@ -21,25 +21,91 @@
 | 
			
		||||
          <div class="bottom">
 | 
			
		||||
            <div class="item">
 | 
			
		||||
              <h3>进场时间:</h3>
 | 
			
		||||
              <span>2022-10-14  09:25:25  至
 | 
			
		||||
2022-10-28  12:00:00</span>
 | 
			
		||||
              <span>2022-10-14  09:25:25  至 2022-10-28  12:00:00</span>
 | 
			
		||||
            </div>
 | 
			
		||||
            <div class="item">
 | 
			
		||||
              <h3>进场时间:</h3>
 | 
			
		||||
              <span>2022-10-14  09:25:25  至
 | 
			
		||||
2022-10-28  12:00:00</span>
 | 
			
		||||
              <span>2022-10-14  09:25:25  至 2022-10-28  12:00:00</span>
 | 
			
		||||
            </div>
 | 
			
		||||
          </div>
 | 
			
		||||
        </div>
 | 
			
		||||
        <AiEmpty v-if="!list.length"></AiEmpty>
 | 
			
		||||
      </div>
 | 
			
		||||
    </div>
 | 
			
		||||
  </div>
 | 
			
		||||
</template>
 | 
			
		||||
 | 
			
		||||
<script>
 | 
			
		||||
  import { mapActions, mapState } from 'vuex'
 | 
			
		||||
 | 
			
		||||
  export default {
 | 
			
		||||
    appName: '天府星小程序',
 | 
			
		||||
    name: 'AppHome'
 | 
			
		||||
 | 
			
		||||
    name: 'AppHome',
 | 
			
		||||
 | 
			
		||||
    data () {
 | 
			
		||||
      return {
 | 
			
		||||
        current: 1,
 | 
			
		||||
        list: [],
 | 
			
		||||
        isMore: false
 | 
			
		||||
      }
 | 
			
		||||
    },
 | 
			
		||||
 | 
			
		||||
    computed: {
 | 
			
		||||
      ...mapState(['user', 'token'])
 | 
			
		||||
    },
 | 
			
		||||
 | 
			
		||||
    onLoad () {
 | 
			
		||||
      this.getList()
 | 
			
		||||
 | 
			
		||||
      if (!this.token) {
 | 
			
		||||
        this.autoLogin()
 | 
			
		||||
      } else {
 | 
			
		||||
        this.getUserInfo()
 | 
			
		||||
      }
 | 
			
		||||
    },
 | 
			
		||||
 | 
			
		||||
    methods: {
 | 
			
		||||
      ...mapActions(['autoLogin', 'getUserInfo']),
 | 
			
		||||
 | 
			
		||||
      getList () {
 | 
			
		||||
        if (this.isMore) return
 | 
			
		||||
 | 
			
		||||
        this.$loading()
 | 
			
		||||
        this.$instance.post(`/appactivityinfo/list`, null, {
 | 
			
		||||
          withoutToken: true,
 | 
			
		||||
          params: {
 | 
			
		||||
            current: this.current,
 | 
			
		||||
            size: 10
 | 
			
		||||
          }
 | 
			
		||||
        }).then(res => {
 | 
			
		||||
          if (res.code === 200) {
 | 
			
		||||
            this.$hideLoading()
 | 
			
		||||
            if (this.page > 1) {
 | 
			
		||||
              this.list = [...this.list, ...res.data]
 | 
			
		||||
            } else {
 | 
			
		||||
              this.list = res.data
 | 
			
		||||
            }
 | 
			
		||||
 | 
			
		||||
            if (res.data.length < 10) {
 | 
			
		||||
              this.isMore = true
 | 
			
		||||
 | 
			
		||||
              return false
 | 
			
		||||
            }
 | 
			
		||||
 | 
			
		||||
            this.page = this.page + 1
 | 
			
		||||
          } else {
 | 
			
		||||
            this.isMore = true
 | 
			
		||||
          }
 | 
			
		||||
        }).catch(() => {
 | 
			
		||||
          this.$hideLoading()
 | 
			
		||||
        })
 | 
			
		||||
      }
 | 
			
		||||
    },
 | 
			
		||||
 | 
			
		||||
    onReachBottom () {
 | 
			
		||||
      this.getList()
 | 
			
		||||
    }
 | 
			
		||||
  }
 | 
			
		||||
</script>
 | 
			
		||||
 | 
			
		||||
 
 | 
			
		||||
@@ -253,7 +253,7 @@
 | 
			
		||||
 | 
			
		||||
  .photo-header {
 | 
			
		||||
    position: relative;
 | 
			
		||||
    height: 400px;
 | 
			
		||||
    height: 448px;
 | 
			
		||||
    padding: 150px 48px 0;
 | 
			
		||||
 | 
			
		||||
    image {
 | 
			
		||||
@@ -285,7 +285,7 @@
 | 
			
		||||
  }
 | 
			
		||||
 | 
			
		||||
  .phone-wrapper {
 | 
			
		||||
    margin-top: 90px;
 | 
			
		||||
    margin-top: 26px;
 | 
			
		||||
    padding: 0 32px;
 | 
			
		||||
 | 
			
		||||
    & > h2 {
 | 
			
		||||
 
 | 
			
		||||
@@ -74,12 +74,6 @@
 | 
			
		||||
      },
 | 
			
		||||
 | 
			
		||||
      upload () {
 | 
			
		||||
        if (!this.token) {
 | 
			
		||||
          this.$refs.login.show()
 | 
			
		||||
 | 
			
		||||
          return false
 | 
			
		||||
        }
 | 
			
		||||
 | 
			
		||||
        this.imgList = []
 | 
			
		||||
        this.hideStatus = false
 | 
			
		||||
        uni.chooseImage({
 | 
			
		||||
@@ -240,7 +234,7 @@
 | 
			
		||||
 | 
			
		||||
  .photo-header {
 | 
			
		||||
    position: relative;
 | 
			
		||||
    height: 400px;
 | 
			
		||||
    height: 448px;
 | 
			
		||||
    padding: 150px 48px 0;
 | 
			
		||||
 | 
			
		||||
    image {
 | 
			
		||||
@@ -272,7 +266,7 @@
 | 
			
		||||
  }
 | 
			
		||||
 | 
			
		||||
  .phone-wrapper {
 | 
			
		||||
    margin-top: 90px;
 | 
			
		||||
    margin-top: 26px;
 | 
			
		||||
    padding: 0 32px;
 | 
			
		||||
 | 
			
		||||
    & > h2 {
 | 
			
		||||
 
 | 
			
		||||
		Reference in New Issue
	
	Block a user