功能完善
This commit is contained in:
		@@ -57,7 +57,7 @@
 | 
			
		||||
      </div>
 | 
			
		||||
      <AiEmpty v-if="!list.length"></AiEmpty>
 | 
			
		||||
    </div>
 | 
			
		||||
    <div class="add" hover-class="text-hover" @click="$linkTo('./Add')">
 | 
			
		||||
    <div class="add" hover-class="text-hover" @click="toAdd">
 | 
			
		||||
      <image src="https://cdn.cunwuyun.cn/wxmp/fengdu/ic-fatie.png" />
 | 
			
		||||
    </div>
 | 
			
		||||
    <AiLogin ref="login"/>
 | 
			
		||||
@@ -89,19 +89,25 @@
 | 
			
		||||
      }
 | 
			
		||||
    },
 | 
			
		||||
 | 
			
		||||
    onLoad() {
 | 
			
		||||
    onLoad () {
 | 
			
		||||
      this.getTopicList()
 | 
			
		||||
 | 
			
		||||
      uni.$on('updateList', () => {
 | 
			
		||||
        this.changeTab(this.currIndex)
 | 
			
		||||
      })
 | 
			
		||||
 | 
			
		||||
      if (this.token) {
 | 
			
		||||
      if (!this.token) {
 | 
			
		||||
        this.autoLogin().then(() => {
 | 
			
		||||
          this.getMyPublishCount()
 | 
			
		||||
        })
 | 
			
		||||
      } else {
 | 
			
		||||
        this.getMyPublishCount()
 | 
			
		||||
      }
 | 
			
		||||
    },
 | 
			
		||||
 | 
			
		||||
    methods: {
 | 
			
		||||
      ...mapActions(['autoLogin']),
 | 
			
		||||
 | 
			
		||||
      getMyPublishCount () {
 | 
			
		||||
        this.$instance.post(`/app/appneighborhoodassistance/list`, null, {
 | 
			
		||||
          params: {
 | 
			
		||||
@@ -117,6 +123,12 @@
 | 
			
		||||
        })
 | 
			
		||||
      },
 | 
			
		||||
 | 
			
		||||
      toAdd () {
 | 
			
		||||
        if (!this.user.AreaId) {
 | 
			
		||||
          this.$linkTo('./Add')
 | 
			
		||||
        }
 | 
			
		||||
      },
 | 
			
		||||
 | 
			
		||||
      getTopicList () {
 | 
			
		||||
        this.$instance.post(`/app/appneighborhoodassistancetheme/list`, null, {
 | 
			
		||||
          withoutToken: true,
 | 
			
		||||
@@ -147,8 +159,8 @@
 | 
			
		||||
 | 
			
		||||
        this.$loading()
 | 
			
		||||
        this.$instance.post(`/app/appneighborhoodassistance/list`, null, {
 | 
			
		||||
          withoutToken: this.token ? false : true,
 | 
			
		||||
          params: {
 | 
			
		||||
            withoutToken: this.token ? false : true,
 | 
			
		||||
            current: this.current,
 | 
			
		||||
            size: 10,
 | 
			
		||||
            visibleRange: this.currIndex === 0 ? 1 : 0
 | 
			
		||||
@@ -283,20 +295,23 @@
 | 
			
		||||
        .item-imgs {
 | 
			
		||||
          display: flex;
 | 
			
		||||
          align-items: center;
 | 
			
		||||
          flex-wrap: wrap;
 | 
			
		||||
 | 
			
		||||
          image {
 | 
			
		||||
            flex: 1;
 | 
			
		||||
            height: 202px;
 | 
			
		||||
            margin-right: 12px;
 | 
			
		||||
            height: 208px;
 | 
			
		||||
            width: 33.33%;
 | 
			
		||||
            padding-right: 12px;
 | 
			
		||||
            margin-bottom: 12px;
 | 
			
		||||
            box-sizing: border-box;
 | 
			
		||||
 | 
			
		||||
            &:nth-of-type(3n) {
 | 
			
		||||
              margin-right: 0;
 | 
			
		||||
              padding-right: 0;
 | 
			
		||||
            }
 | 
			
		||||
          }
 | 
			
		||||
        }
 | 
			
		||||
 | 
			
		||||
        & > p {
 | 
			
		||||
          margin: 24px 0;
 | 
			
		||||
          margin: 12px 0;
 | 
			
		||||
          font-size: 28px;
 | 
			
		||||
          color: #333333;
 | 
			
		||||
        }
 | 
			
		||||
 
 | 
			
		||||
@@ -13,7 +13,7 @@
 | 
			
		||||
        <text>{{ info.content }}</text>
 | 
			
		||||
      </div>
 | 
			
		||||
      <div class="item-imgs" v-if="info.files && info.files.length">
 | 
			
		||||
        <image mode="aspectFill" v-for="(item, index) in item.files" :key="index" :src="item.url" />
 | 
			
		||||
        <image mode="aspectFill" v-for="(item, index) in info.files" :key="index" :src="item.url" />
 | 
			
		||||
      </div>
 | 
			
		||||
      <p>{{ info.createTime }}</p>
 | 
			
		||||
      <div class="item-bottom">
 | 
			
		||||
@@ -95,6 +95,7 @@
 | 
			
		||||
</template>
 | 
			
		||||
 | 
			
		||||
<script>
 | 
			
		||||
  import { mapActions, mapState } from 'vuex'
 | 
			
		||||
  export default {
 | 
			
		||||
    name: 'Detail',
 | 
			
		||||
    appName: '详情',
 | 
			
		||||
@@ -118,6 +119,10 @@
 | 
			
		||||
      }
 | 
			
		||||
    },
 | 
			
		||||
 | 
			
		||||
    computed: {
 | 
			
		||||
      ...mapState(['user', 'token'])
 | 
			
		||||
    },
 | 
			
		||||
 | 
			
		||||
    onLoad (query) {
 | 
			
		||||
      this.isFrom = query.isFrom
 | 
			
		||||
      this.id = query.id
 | 
			
		||||
@@ -125,13 +130,24 @@
 | 
			
		||||
      this.name = query.name || ''
 | 
			
		||||
 | 
			
		||||
      this.$loading()
 | 
			
		||||
      this.getInfo(query.id)
 | 
			
		||||
      this.getCommontList(query.id)
 | 
			
		||||
      if (!this.token) {
 | 
			
		||||
        this.autoLogin().then(() => {
 | 
			
		||||
          this.getInfo(query.id)
 | 
			
		||||
          this.getCommontList(query.id)
 | 
			
		||||
        })
 | 
			
		||||
      } else {
 | 
			
		||||
        this.getInfo(query.id)
 | 
			
		||||
        this.getCommontList(query.id)
 | 
			
		||||
      }
 | 
			
		||||
    },
 | 
			
		||||
 | 
			
		||||
    methods: {
 | 
			
		||||
      ...mapActions(['autoLogin']),
 | 
			
		||||
 | 
			
		||||
      getInfo (id) {
 | 
			
		||||
        this.$instance.post(`/app/appneighborhoodassistance/queryDetailById?id=${id}`).then(res => {
 | 
			
		||||
        this.$instance.post(`/app/appneighborhoodassistance/queryDetailById?id=${id}`, null, {
 | 
			
		||||
          withoutToken: this.token ? false : true,
 | 
			
		||||
        }).then(res => {
 | 
			
		||||
          if (res.code === 0) {
 | 
			
		||||
            this.info = res.data
 | 
			
		||||
 | 
			
		||||
@@ -199,8 +215,8 @@
 | 
			
		||||
 | 
			
		||||
        this.$loading()
 | 
			
		||||
        this.$instance.post(`/app/appneighborhoodassistance/commontList`, null, {
 | 
			
		||||
          withoutToken: this.token ? false : true,
 | 
			
		||||
          params: {
 | 
			
		||||
            withoutToken: this.token ? false : true,
 | 
			
		||||
            id,
 | 
			
		||||
            current: this.current,
 | 
			
		||||
            size: 10
 | 
			
		||||
@@ -516,20 +532,23 @@
 | 
			
		||||
      .item-imgs {
 | 
			
		||||
        display: flex;
 | 
			
		||||
        align-items: center;
 | 
			
		||||
        flex-wrap: wrap;
 | 
			
		||||
 | 
			
		||||
        image {
 | 
			
		||||
          flex: 1;
 | 
			
		||||
          height: 202px;
 | 
			
		||||
          margin-right: 12px;
 | 
			
		||||
          height: 208px;
 | 
			
		||||
          width: 33.33%;
 | 
			
		||||
          padding-right: 12px;
 | 
			
		||||
          margin-bottom: 12px;
 | 
			
		||||
          box-sizing: border-box;
 | 
			
		||||
 | 
			
		||||
          &:nth-of-type(3n) {
 | 
			
		||||
            margin-right: 0;
 | 
			
		||||
            padding-right: 0;
 | 
			
		||||
          }
 | 
			
		||||
        }
 | 
			
		||||
      }
 | 
			
		||||
 | 
			
		||||
      & > p {
 | 
			
		||||
        margin: 24px 0;
 | 
			
		||||
        margin: 12px 0;
 | 
			
		||||
        font-size: 28px;
 | 
			
		||||
        color: #333333;
 | 
			
		||||
      }
 | 
			
		||||
 
 | 
			
		||||
@@ -522,6 +522,24 @@
 | 
			
		||||
          }
 | 
			
		||||
        }
 | 
			
		||||
 | 
			
		||||
      .item-imgs {
 | 
			
		||||
          display: flex;
 | 
			
		||||
          align-items: center;
 | 
			
		||||
          flex-wrap: wrap;
 | 
			
		||||
 | 
			
		||||
          image {
 | 
			
		||||
            height: 208px;
 | 
			
		||||
            width: 33.33%;
 | 
			
		||||
            padding-right: 12px;
 | 
			
		||||
            margin-bottom: 12px;
 | 
			
		||||
            box-sizing: border-box;
 | 
			
		||||
 | 
			
		||||
            &:nth-of-type(3n) {
 | 
			
		||||
              padding-right: 0;
 | 
			
		||||
            }
 | 
			
		||||
          }
 | 
			
		||||
        }
 | 
			
		||||
 | 
			
		||||
        .item-content {
 | 
			
		||||
          margin: 16px 0;
 | 
			
		||||
          line-height: 1.3;
 | 
			
		||||
@@ -536,21 +554,6 @@
 | 
			
		||||
            font-size: 28px;
 | 
			
		||||
            color: #333333;
 | 
			
		||||
          }
 | 
			
		||||
 | 
			
		||||
        .item-imgs {
 | 
			
		||||
          display: flex;
 | 
			
		||||
          align-items: center;
 | 
			
		||||
 | 
			
		||||
          image {
 | 
			
		||||
            flex: 1;
 | 
			
		||||
            height: 202px;
 | 
			
		||||
            margin-right: 12px;
 | 
			
		||||
 | 
			
		||||
            &:nth-of-type(3n) {
 | 
			
		||||
              margin-right: 0;
 | 
			
		||||
            }
 | 
			
		||||
          }
 | 
			
		||||
        }
 | 
			
		||||
        }
 | 
			
		||||
      }
 | 
			
		||||
    }
 | 
			
		||||
@@ -600,20 +603,23 @@
 | 
			
		||||
        .item-imgs {
 | 
			
		||||
          display: flex;
 | 
			
		||||
          align-items: center;
 | 
			
		||||
          flex-wrap: wrap;
 | 
			
		||||
 | 
			
		||||
          image {
 | 
			
		||||
            flex: 1;
 | 
			
		||||
            height: 202px;
 | 
			
		||||
            margin-right: 12px;
 | 
			
		||||
            height: 208px;
 | 
			
		||||
            width: 33.33%;
 | 
			
		||||
            padding-right: 12px;
 | 
			
		||||
            margin-bottom: 12px;
 | 
			
		||||
            box-sizing: border-box;
 | 
			
		||||
 | 
			
		||||
            &:nth-of-type(3n) {
 | 
			
		||||
              margin-right: 0;
 | 
			
		||||
              padding-right: 0;
 | 
			
		||||
            }
 | 
			
		||||
          }
 | 
			
		||||
        }
 | 
			
		||||
 | 
			
		||||
        & > p {
 | 
			
		||||
          margin: 24px 0;
 | 
			
		||||
          margin: 12px 0;
 | 
			
		||||
          font-size: 28px;
 | 
			
		||||
          color: #333333;
 | 
			
		||||
        }
 | 
			
		||||
@@ -644,7 +650,7 @@
 | 
			
		||||
        }
 | 
			
		||||
 | 
			
		||||
        .item-content {
 | 
			
		||||
          margin: 16px;
 | 
			
		||||
          margin: 16px 0;
 | 
			
		||||
          line-height: 1.3;
 | 
			
		||||
          // text-align: justify;
 | 
			
		||||
 | 
			
		||||
 
 | 
			
		||||
@@ -131,13 +131,6 @@
 | 
			
		||||
 | 
			
		||||
    onReachBottom () {
 | 
			
		||||
      this.getList()
 | 
			
		||||
    },
 | 
			
		||||
 | 
			
		||||
    onShareAppMessage() {
 | 
			
		||||
      return {
 | 
			
		||||
        title: '欢迎使用数字乡村治理服务一体化平台~',
 | 
			
		||||
        path: `/pages/AppCircle/AppCircle`
 | 
			
		||||
      }
 | 
			
		||||
    }
 | 
			
		||||
  }
 | 
			
		||||
</script>
 | 
			
		||||
@@ -203,20 +196,23 @@
 | 
			
		||||
        .item-imgs {
 | 
			
		||||
          display: flex;
 | 
			
		||||
          align-items: center;
 | 
			
		||||
          flex-wrap: wrap;
 | 
			
		||||
 | 
			
		||||
          image {
 | 
			
		||||
            flex: 1;
 | 
			
		||||
            height: 202px;
 | 
			
		||||
            margin-right: 12px;
 | 
			
		||||
            height: 208px;
 | 
			
		||||
            width: 33.33%;
 | 
			
		||||
            padding-right: 12px;
 | 
			
		||||
            margin-bottom: 12px;
 | 
			
		||||
            box-sizing: border-box;
 | 
			
		||||
 | 
			
		||||
            &:nth-of-type(3n) {
 | 
			
		||||
              margin-right: 0;
 | 
			
		||||
              padding-right: 0;
 | 
			
		||||
            }
 | 
			
		||||
          }
 | 
			
		||||
        }
 | 
			
		||||
 | 
			
		||||
        & > p {
 | 
			
		||||
          margin: 24px 0;
 | 
			
		||||
          margin: 12px 0;
 | 
			
		||||
          font-size: 28px;
 | 
			
		||||
          color: #333333;
 | 
			
		||||
        }
 | 
			
		||||
 
 | 
			
		||||
		Reference in New Issue
	
	Block a user